← Volver a la lista de operaciones
Consulta

searchProducts

searchProducts(query: String, locale: Locale! = FR, categoryId: ID, limit: Int = 20, offset: Int = 0): [ProductSearchResult!]!

Información de la llamada

Punto de acceso

https://api.revclic.com/

Método

POST

Autenticación

Token Bearer (JWT)

Devuelve

[ProductSearchResult!]!

Argumentos

ParámetroTipoValor predeterminadoEstado
queryStringOpcional
localeLocale!FRObligatorio
categoryIdIDOpcional
limitInt20Opcional
offsetInt0Opcional

Ejemplo de consulta GraphQL

query GetSearchProducts($query: String, $locale: Locale!, $categoryId: ID, $limit: Int, $offset: Int) {
  searchProducts(query: $query, locale: $locale, categoryId: $categoryId, limit: $limit, offset: $offset) {
    id
    name
    description
    price
    pricingType { code label }
    imageUrls
  }
}

Ejemplo de variables

{
  "query": "example",
  "locale": "FR",
  "categoryId": "1",
  "limit": 20,
  "offset": 0
}

Payload JSON completo

{
  "query": "query GetSearchProducts($query: String, $locale: Locale!, $categoryId: ID, $limit: Int, $offset: Int) {\n  searchProducts(query: $query, locale: $locale, categoryId: $categoryId, limit: $limit, offset: $offset) {\n    id\n    name\n    description\n    price\n    pricingType { code label }\n    imageUrls\n  }\n}",
  "variables": {
    "query": "example",
    "locale": "FR",
    "categoryId": "1",
    "limit": 20,
    "offset": 0
  }
}

Ejemplo cURL para probar

curl -X POST https://api.revclic.com/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
  "query": "query GetSearchProducts($query: String, $locale: Locale!, $categoryId: ID, $limit: Int, $offset: Int) {\n  searchProducts(query: $query, locale: $locale, categoryId: $categoryId, limit: $limit, offset: $offset) {\n    id\n    name\n    description\n    price\n    pricingType { code label }\n    imageUrls\n  }\n}",
  "variables": {
    "query": "example",
    "locale": "FR",
    "categoryId": "1",
    "limit": 20,
    "offset": 0
  }
}'

Tipos relacionados