Products
:catalogId accepts either the Meta catalog ID or the stringified internal Catalog_Id.
List categories
GET /api/external/catalogs/:catalogId/categories
Auth: Authorization: Bearer ck_<api_key> (required)
Query parameters
| Field | Required | Type | Description |
|---|---|---|---|
inStockOnly | No | string | Defaults to in-stock only. Pass false or 0 to include out-of-stock products. |
Response example
{
"success": true,
"catalogId": "900000000000003",
"categories": [
{ "slug": "apparel", "name": "Apparel", "productCount": 5 }
],
"interactiveListSections": [
{
"title": "Categories",
"rows": [
{ "id": "apparel", "title": "Apparel", "description": "5 products" }
]
}
]
}List products
GET /api/external/catalogs/:catalogId/products
Auth: Authorization: Bearer ck_<api_key> (required)
Query parameters
| Field | Required | Type | Description |
|---|---|---|---|
page | No | number | Page number (default 1) |
limit | No | number | Items per page (default 50) |
search | No | string | Filter by product name, description, or retailer ID |
availability | No | string | Filter by availability (e.g. in stock) |
category | No | string | When set, returns category-scoped results with resolvedCategory and productRetailerIds |
Response example
{
"success": true,
"products": [
{
"Product_Id": "101",
"Meta_Product_Id": "ext_1720856400000",
"Product_Name": "Demo Cotton T-Shirt",
"Description": "Soft cotton, size M",
"Retailer_ID": "SKU-DEMO-001",
"Currency": "INR",
"Price": 499.00,
"Image_URL": "https://example.com/demo-shirt.jpg",
"Product_URL": "https://example.com/products/demo-shirt",
"Availability": "in stock",
"Category": "Apparel",
"Brand": "ChatYug Demo",
"Inventory": 100
}
],
"pagination": { "page": 1, "limit": 50, "total": 1, "pages": 1 }
}Create product
POST /api/external/catalogs/:catalogId/products
Auth: Authorization: Bearer ck_<api_key> (required)
Request parameters
| Field | Required | Type | Description |
|---|---|---|---|
productName | Yes | string | Product title |
price | Yes | number | Price in currency units (e.g. 499 for ₹499) |
description | No | string | Product description |
currency | No | string | Default INR |
imageUrl | No | string | Public image URL |
productUrl | No | string | Product page URL |
availability | No | string | Default in stock |
retailerId | No | string | SKU / retailer ID. Auto-generated as SKU-{timestamp} if omitted. |
category | No | string | Product category |
brand | No | string | Brand name |
inventory | No | number | Stock count |
Response example
{
"success": true,
"message": "Product created successfully",
"data": {
"productId": "101",
"metaProductId": "ext_1720856400000",
"retailerId": "SKU-DEMO-001",
"productName": "Demo Cotton T-Shirt",
"price": 499,
"currency": "INR"
}
}Update product
PUT /api/external/catalogs/:catalogId/products/:retailerId
Auth: Authorization: Bearer ck_<api_key> (required)
Request parameters
Same fields as create — all optional in the body. :retailerId in the path identifies the product.
| Field | Required | Type | Description |
|---|---|---|---|
productName | No | string | Updated title |
description | No | string | Updated description |
price | No | number | Updated price |
currency | No | string | Currency code |
imageUrl | No | string | Updated image URL |
productUrl | No | string | Updated product URL |
availability | No | string | Availability status |
category | No | string | Category |
brand | No | string | Brand |
inventory | No | number | Stock count |
Response example
{
"success": true,
"message": "Product updated successfully",
"data": { "productId": "101", "retailerId": "SKU-DEMO-001" }
}Code samples — create product
curl -X POST https://chatyug.com/api/external/catalogs/900000000000003/products \
-H "Authorization: Bearer ck_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"productName": "Demo Cotton T-Shirt",
"price": 499,
"currency": "INR",
"retailerId": "SKU-DEMO-001",
"availability": "in stock"
}'const axios = require('axios');
await axios.post('https://chatyug.com/api/external/catalogs/900000000000003/products', {
productName: 'Demo Cotton T-Shirt',
price: 499,
currency: 'INR',
retailerId: 'SKU-DEMO-001',
availability: 'in stock'
}, { headers: { Authorization: 'Bearer ck_your_api_key_here' } });import requests
requests.post('https://chatyug.com/api/external/catalogs/900000000000003/products', json={
'productName': 'Demo Cotton T-Shirt',
'price': 499,
'currency': 'INR',
'retailerId': 'SKU-DEMO-001',
'availability': 'in stock'
}, headers={'Authorization': 'Bearer ck_your_api_key_here'})$client = new GuzzleHttp\Client();
$client->post('https://chatyug.com/api/external/catalogs/900000000000003/products', [
'headers' => ['Authorization' => 'Bearer ck_your_api_key_here'],
'json' => [
'productName' => 'Demo Cotton T-Shirt',
'price' => 499,
'currency' => 'INR',
'retailerId' => 'SKU-DEMO-001',
'availability' => 'in stock'
]
]);