Skip to main content

List Collection Products

Method#

/catalogs/collection-products/{{catalog-owner-phone}}#

GET https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/catalogs/collection-products/{{catalog-owner-phone}}

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Concept#

Using this method, you will be able to list the products that are part of a collection in your catalog.


Attributes#

Required#

AttributesTypeDescription
collectionIdstringCollection ID

Optional#

AttributesTypeDescription
nextCursorstringToken used for pagination of records

Request Params#

Example URL#

Method

GET https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/catalogs/collection-products/{{catalog-owner-phone}}?collectionId=12312312312&nextCursor=CURSOR_VALUE


Response#

200#

AttributesTypeDescription
nextCursorstring or nullToken that defines the records of the next request
productsarray objectList with product data

Object (products)

AttributesTypeDescription
idstringProduct ID
namestringProduct name
descriptionstringProduct description
urlstringProduct URL
pricestringProduct price
currencystringCurrency type
isHiddenbooleanHidden product
availabilitystringAttribute to determine product availability
retailerIdstringRetailer ID
imagesstringProduct image link
quantitystringProduct quantity attribute

Example

{
"nextCursor": null,
"products": [
{
"id": "6988917394481455",
"name": "Product Name",
"description": "Product Description",
"url": "http://site.com/product",
"price": "10000",
"currency": "BRL",
"isHidden": false,
"availability": "in stock",
"retailerId": "123",
"images": [
"https://cdn.greatsoftwares.com.br/files/pages/10603-92bb9420b363835d05d41b96a45d8f4e.png"
],
"quantity": "99"
}
]
}

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#