searchProducts
searchProducts(query: String, locale: Locale! = FR, categoryId: ID, limit: Int = 20, offset: Int = 0): [ProductSearchResult!]!Información de la llamada
Argumentos
| Parámetro | Tipo | Valor predeterminado | Estado |
|---|---|---|---|
| query | String | — | Opcional |
| locale | Locale! | FR | Obligatorio |
| categoryId | ID | — | Opcional |
| limit | Int | 20 | Opcional |
| offset | Int | 0 | Opcional |
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
}
}'