Skip to main content

Get Products (Phone)

Method#

/catalogs/Phone-Number#

GET https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/catalogs/{{Phone-Number}}

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Concept#

In this method, you will be able to get products from a WhatsApp Business catalog of any phone number, whether it's your catalog or someone else's.

Attributes#

Optional#

AttributesTypeDescription
nextCursorstringToken used for pagination of records

Request Params#

URL example#

Method

GET https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/catalogs/{{Phone-Number}}?nextCursor=CURSOR_VALUE


Response#

200#

AttributesTypeDescription
cartEnabledbooleanAttribute to know if the cart is active
nextCursorstringToken that defines the records of the next request
availabilitystringAttribute to know the product's availability
idstringProduct ID
retailerIdbooleanRetailer ID
pricestringProduct price
currencystringCurrency type
namestringProduct name
quantitybooleanProduct quantity attribute
imagesstringProduct image link

Example

{
"cartEnabled": true,
"products": [
{
"availability": "in stock",
"id": "99999999999999999",
"retailerId": null,
"price": "100000",
"currency": "BRL",
"name": "Mouse",
"quantity": null,
"images": ["https://"]
}
]
}

405#

In this case, ensure that you are sending the method specification correctly, i.e., check if you sent the POST or GET as specified at the beginning of this topic.

415#

If you receive a 415 error, make sure to add the "Content-Type" of the object you are sending in the request headers, in most cases, it should be "application/json".


Code#