merchantProducts
merchantProducts(merchantId: ID!, page: Int = 1, perPage: Int): ProductPage!Informations d'appel
Arguments
| Paramètre | Type | Valeur par défaut | Statut |
|---|---|---|---|
| merchantId | ID! | — | Obligatoire |
| page | Int | 1 | Facultatif |
| perPage | Int | — | Facultatif |
Exemple de requête GraphQL
query GetMerchantProducts($merchantId: ID!, $page: Int, $perPage: Int) {
merchantProducts(merchantId: $merchantId, page: $page, perPage: $perPage) {
items { id name { fr es } description { fr es } price }
currentPage
totalResults
totalPages
}
}Exemple de variables
{
"merchantId": "1",
"page": 1,
"perPage": 20
}Payload JSON complet
{
"query": "query GetMerchantProducts($merchantId: ID!, $page: Int, $perPage: Int) {\n merchantProducts(merchantId: $merchantId, page: $page, perPage: $perPage) {\n items { id name { fr es } description { fr es } price }\n currentPage\n totalResults\n totalPages\n }\n}",
"variables": {
"merchantId": "1",
"page": 1,
"perPage": 20
}
}Exemple cURL à tester
curl -X POST https://api.revclic.com/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{
"query": "query GetMerchantProducts($merchantId: ID!, $page: Int, $perPage: Int) {\n merchantProducts(merchantId: $merchantId, page: $page, perPage: $perPage) {\n items { id name { fr es } description { fr es } price }\n currentPage\n totalResults\n totalPages\n }\n}",
"variables": {
"merchantId": "1",
"page": 1,
"perPage": 20
}
}'