← Retour à la liste des opérations
Requête

merchantProducts

merchantProducts(merchantId: ID!, page: Int = 1, perPage: Int): ProductPage!

Informations d'appel

Point d'accès

https://api.revclic.com/

Méthode

POST

Authentification

Jeton Bearer (JWT)

Retourne

ProductPage!

Arguments

ParamètreTypeValeur par défautStatut
merchantIdID!Obligatoire
pageInt1Facultatif
perPageIntFacultatif

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
  }
}'

Types associés