Skip to content

GetProducts#

Test Postman Apidog

The method is designed to retrieve the list of all products from the seller's catalog.

Behavior change

Previously the method worked without instance authorization via WhatsApp's public GraphQL. Now the instance must be authorized.
If the method is called on an unauthorized instance, an authorization error is returned.

WhatsApp-side limitations

If catalog methods are called frequently, WhatsApp may temporarily restrict access to the Business Catalog API. Do not send a large number of requests to catalog methods over a short period of time.

Request#

To get the list of products, you need to send a request to the address:

POST
{{apiUrl}}/waInstance{{idInstance}}/getProducts/{{apiTokenInstance}}

To obtain the request parameters idInstance and apiTokenInstance, refer to the section Before you start.

Request parameters#

Parameter Type Required Description
chatId string Yes Seller's chat identifier in the format 79876543210@c.us
productLimit integer No Number of products returned in the response. Default value is 10

Request body example#

{
  "chatId": "79876543210@c.us",
  "productLimit": 10
}

Response#

Response fields#

Field Type Description
paging object Pagination object, contains the after field โ€“ a cursor to get the next page of products
products array Array of product objects

Pagination object (paging):

Field Type Description
after string Next page cursor. Pass this value in the next request to get the next portion of products. If there is no next page, an empty string is returned

Product object (products):

Field Type Description
id string Unique product identifier in WhatsApp
name string Product name
description string Product description
price string Product price (in the smallest currency unit, e.g., 85000 = 850.00 EUR)
currency string Currency code (e.g., EUR)
retailer_id string Product identifier from the retailer
is_hidden boolean Whether the product is hidden
is_sanctioned boolean Whether the product is under sanctions
product_availability string Product availability (IN_STOCK, OUT_OF_STOCK, etc.)
max_available integer Maximum available quantity
status_info object Moderation status information (status field: APPROVED, PENDING, REJECTED)
media object Product media files (images and videos arrays)

Response body example#

{
  "paging": {
    "after": "Cg8QZXhjbHVkZV9pdGVtX2lkcxQCCggAYo4zmyyAMQgAWyw5259S/ggAYc+g+yqTVAgAhNXKzOxOWAgAg6htkNProAgAYWB67PU4BggAYUu//w+6lAgAYkLqOjLCxwgAY8unGARbRAgAZQT8w09/GAEPEWV4Y2x1ZGVfZ3JvdXBfaWRzFAIAAQ8OYmFja2VuZF9jdXJzb3IOAQ=="
  },
  "products": [
    {
      "id": "26437451389197252",
      "retailer_id": null,
      "is_hidden": null,
      "is_sanctioned": false,
      "product_availability": "IN_STOCK",
      "max_available": 99,
      "name": "Handmade Ceramic Mug - Large+",
      "description": "Hand-painted ceramic mug, 450ml. Dishwasher safe. New larger size.",
      "url": null,
      "shimmed_url": null,
      "currency": "USD",
      "price": "1000",
      "status_info": {
        "can_appeal": null,
        "status": "APPROVED"
      },
      "sale_price": null,
      "media": {
        "images": [
          {
            "id": "26756491040611445",
            "original_image_url": "https://mmg.whatsapp.net/...",
            "request_image_url": "https://mmg.whatsapp.net/..."
          }
        ],
        "videos": []
      },
      "belongs_to": null,
      "compliance_category": null,
      "compliance_info": null,
      "variant_info": null
    }
  ]
}

GetProducts errors#

For a list of common errors for all methods, see the section Common errors

Code examples#

import requests
url = "{{apiUrl}}/waInstance{{idInstance}}/getProducts/{{apiTokenInstance}}"
payload = {
    "chatId": "79876543210@c.us",
    "productLimit": 10
}
headers = {
    'Content-Type': 'application/json'
}
response = requests.post(url, json=payload, headers=headers)
print(response.text.encode('utf8'))
curl --location '{{apiUrl}}/waInstance{{idInstance}}/getProducts/{{apiTokenInstance}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "chatId": "79876543210@c.us",
    "productLimit": 10
}'