Skip to main content

List all products in a catalog

This endpoint will return a list of products a given WhatsApp Business number has published on their account. You can list products that belong to your own WhatsApp account or any other WhatsApp Business account.

tip

👉 You can see this API live in 2Chat's WhatsApp catalog exporter, and try it yourself.

info

To use this API, you must connect a number that uses the free version of WhatsApp Business. This API does not need a WhatsApp Business API account to work.

tip

You may need the product IDs of these products to make modifications to your catalog.

Request query parameter

For each request, you must specify the phone number you connected to 2Chat that you want to use as the client. This must be set as a query parameter in the URL.

Example: from_number=+595981461442, where +595981461442 is the number you have connected.

Getting a list of products

If you want to get a list of your products, make a GET request to https://api.p.2chat.io/open/whatsapp/catalog/products?from_number=+595981461442 without specifying any phone number.

If you instead want to list products that belong to another WhatsApp Business account, you can add that phone number to the URL to get them.

For example: https://api.p.2chat.io/open/whatsapp/catalog/products/+17137157533?from_number=+595981461442.

tip

Use +595981461442 as an example of a live working set of products you can query

Invocation


curl --location --request GET 'https://api.p.2chat.io/open/whatsapp/catalog/products?from_number=+595981461442' \
--header 'X-User-API-Key: your_api_key_here'

Response

{
"success": true,
"products": [
{
"id": "6498277906923281",
"is_hidden": false,
"url": "",
"name": "PUMA | SUEDE CLASSIC REGAL",
"description": "First introduced in 1968, the Puma Suede Classic is Puma's most epic sneaker with its athletic inspired design and smooth suede. The Puma Suede Classic Regal Red/White is constructed with a suede upper and contrasting low profile rubber sole, and fat laces, the classic continues to make its mark on the streets today.",
"availability": "in stock",
"max_available": 99,
"whatsapp_product_can_appeal": true,
"retailer_id": "puma1",
"checkmark": false,
"is_approved": true,
"approval_status": "APPROVED",
"price": "80.50",
"currency": "USD",
"images": [
{
"url": "https://2chat-user-data-dev.s3.amazonaws.com/w/p/595981461442/6498277906923281_1"
}
]
},
{
"id": "9846351425439378",
"is_hidden": false,
"url": "https://2chatdemo.com/products/herschel-iona",
"name": "HERSCHEL | IONA",
"description": "Featuring a cinch closure concealed by a slender top flap, the Iona backpack unites everyday practicality with clean design.",
"availability": "in stock",
"max_available": 99,
"whatsapp_product_can_appeal": true,
"retailer_id": "herschel1",
"checkmark": false,
"is_approved": true,
"approval_status": "APPROVED",
"price": "150.50",
"currency": "USD",
"images": [
{
"url": "https://2chat-user-data-dev.s3.amazonaws.com/w/p/595981461442/9846351425439378_1"
}
]
}
]
}
FieldDescription
idThe ID of the product. You will need this value to make any kind of modification to this product
is_hiddenWhether this product is hidden from your customers or not
urlURL field of the product
nameName field of the product
descriptionThe description field of the product
availabilitytrue when the product is marked as available
max_availablenumber of units available
retailer_idyour custom ID for this product. For example, its SKU value
checkmarktrue when verified
is_approvedtrue when the product was approved by WhatsApp and visible to your customers
approval_statusAny of PENDING, OUTDATED, REJECTED or APPROVED
priceThe price you specified
currencyThe currency used in your catalog
imagesA list of images of the product