Sending Product Messages
Send interactive catalog messages so customers can browse products and add to cart inside WhatsApp.
Product list
POST /api/external/messages/product-list
Auth: Authorization: Bearer ck_<api_key> (required)
Request parameters
| Field | Required | Type | Description |
|---|---|---|---|
phoneNumberId | Yes | string | WhatsApp phone number ID to send from |
to | Yes | string | Recipient phone with country code |
catalogId | Yes | string | Meta catalog ID |
productRetailerIds | One of | array | Retailer IDs for a single section. Required if sections is not provided. |
sections | One of | array | Multi-section layout. Each section: title, product_items[] with product_retailer_id. |
headerText | No | string | Default Our Products |
bodyText | No | string | Default Check out our products! |
footerText | No | string | Default Tap a product to view details |
sectionTitle | No | string | Section title when using productRetailerIds. Default Products |
Response example
{
"success": true,
"message": "Product list message sent",
"data": {
"messageId": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQjAwMDAwMDAwMDAwMDAwAA=="
}
}Single product
POST /api/external/messages/single-product
Auth: Authorization: Bearer ck_<api_key> (required)
Request parameters
| Field | Required | Type | Description |
|---|---|---|---|
phoneNumberId | Yes | string | WhatsApp phone number ID to send from |
to | Yes | string | Recipient phone with country code |
catalogId | Yes | string | Meta catalog ID |
productRetailerId | Yes | string | Product retailer ID (SKU) |
bodyText | No | string | Default Check out this product! |
Response example
{
"success": true,
"message": "Single product message sent",
"data": {
"messageId": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQjAwMDAwMDAwMDAwMDAwAA=="
}
}Product list payload builder
GET /api/external/catalogs/:catalogId/product-list-payload
Auth: Authorization: Bearer ck_<api_key> (required)
Builds ready-to-send sections[] for a product list message, optionally filtered by category.
Query parameters
| Field | Required | Type | Description |
|---|---|---|---|
category | No | string | Filter to a single category slug |
groupByCategory | No | string | Pass true or 1 to build multi-section payload grouped by category |
Response example
{
"success": true,
"catalogId": "900000000000003",
"sections": [
{
"title": "Apparel",
"product_items": [
{ "product_retailer_id": "SKU-DEMO-001" }
]
}
],
"productRetailerIds": ["SKU-DEMO-001"],
"totalProducts": 1,
"truncated": false
}Code samples — product list
curl -X POST https://chatyug.com/api/external/messages/product-list \
-H "Authorization: Bearer ck_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"phoneNumberId": "100000000000001",
"to": "919876543210",
"catalogId": "900000000000003",
"productRetailerIds": ["SKU-DEMO-001"],
"headerText": "Our Products",
"bodyText": "Browse and add to cart in WhatsApp"
}'const axios = require('axios');
await axios.post('https://chatyug.com/api/external/messages/product-list', {
phoneNumberId: '100000000000001',
to: '919876543210',
catalogId: '900000000000003',
productRetailerIds: ['SKU-DEMO-001'],
headerText: 'Our Products',
bodyText: 'Browse and add to cart in WhatsApp'
}, { headers: { Authorization: 'Bearer ck_your_api_key_here' } });import requests
requests.post('https://chatyug.com/api/external/messages/product-list', json={
'phoneNumberId': '100000000000001',
'to': '919876543210',
'catalogId': '900000000000003',
'productRetailerIds': ['SKU-DEMO-001'],
'headerText': 'Our Products',
'bodyText': 'Browse and add to cart in WhatsApp'
}, headers={'Authorization': 'Bearer ck_your_api_key_here'})$client = new GuzzleHttp\Client();
$client->post('https://chatyug.com/api/external/messages/product-list', [
'headers' => ['Authorization' => 'Bearer ck_your_api_key_here'],
'json' => [
'phoneNumberId' => '100000000000001',
'to' => '919876543210',
'catalogId' => '900000000000003',
'productRetailerIds' => ['SKU-DEMO-001'],
'headerText' => 'Our Products',
'bodyText' => 'Browse and add to cart in WhatsApp'
]
]);
Related webhook: When the customer completes checkout in WhatsApp's native cart, ChatYug forwards
eventType: order to your webhook URL. The order is stored with order_source: catalog_cart. See Event Reference.