Catalogs

List catalogs

GET /api/external/catalogs

Auth: Authorization: Bearer ck_<api_key> (required)

Returns all active catalogs for the API key's WABA (ChatYug DB). To also import live Meta Commerce Manager catalogues before listing, pass syncFromMeta=true.

Query parameters

FieldRequiredTypeDescription
syncFromMetaNobooleanWhen true, imports owned and WABA-linked Meta catalogues into ChatYug, then returns the list. Also accepts forceSync=true.

Response example

{
  "success": true,
  "catalogs": [
    {
      "Catalog_Id": "3",
      "Meta_Catalog_Id": "900000000000003",
      "Catalog_Name": "Demo Shop Catalog",
      "Description": null,
      "Product_Count": 12,
      "Is_Active": true,
      "Created_At": "2026-06-01T10:00:00.000Z",
      "Last_Synced_At": null
    }
  ],
  "total": 1,
  "metaSync": {
    "success": true,
    "imported": 1,
    "skipped": 0,
    "totalMeta": 1,
    "message": null
  }
}

Sync catalogues from Meta

POST /api/external/catalogs/sync-from-meta

Auth: Authorization: Bearer ck_<api_key> (required)

Imports live Meta catalogues (Business Manager owned_product_catalogs plus WABA-linked product_catalogs) into ChatYug so you can add products to an existing Meta catalogue. Does not create a new Meta catalogue.

Response example

{
  "success": true,
  "message": "Imported 1 catalogue(s) from Meta (0 already present)",
  "data": {
    "imported": 1,
    "skipped": 0,
    "totalMeta": 1,
    "catalogs": [
      { "catalogId": "5", "metaCatalogId": "900000000000099", "name": "Live Meta Shop", "source": "owned" }
    ],
    "errors": []
  }
}

Connect Meta catalogue by ID

POST /api/external/catalogs/connect-meta

Auth: Authorization: Bearer ck_<api_key> (required)

Use when Meta already has a live catalogue but list/create cannot see or create it (for example the token is not a Business Manager admin). Pass the Catalogue ID from Meta Commerce Manager.

Request parameters

FieldRequiredTypeDescription
metaCatalogIdYesstringMeta Catalogue ID (digits only). Alias: catalogId.

Create catalog

POST /api/external/catalogs

Auth: Authorization: Bearer ck_<api_key> (required)

Request parameters

FieldRequiredTypeDescription
catalogNameYesstringDisplay name for the catalog
verticalYesstringMeta catalog vertical. Use commerce for standard WhatsApp product shops.

Response example

{
  "success": true,
  "message": "Catalog created successfully",
  "data": {
    "catalogId": "3",
    "metaCatalogId": "900000000000003",
    "catalogName": "Demo Shop Catalog",
    "verified": {
      "id": "900000000000003",
      "name": "Demo Shop Catalog",
      "vertical": "commerce",
      "productCount": 0
    }
  }
}

Code samples — create catalog

curl -X POST https://chatyug.com/api/external/catalogs \
  -H "Authorization: Bearer ck_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "catalogName": "Demo Shop Catalog",
    "vertical": "commerce"
  }'
const axios = require('axios');

await axios.post('https://chatyug.com/api/external/catalogs', {
  catalogName: 'Demo Shop Catalog',
  vertical: 'commerce'
}, { headers: { Authorization: 'Bearer ck_your_api_key_here' } });
import requests

requests.post('https://chatyug.com/api/external/catalogs', json={
    'catalogName': 'Demo Shop Catalog',
    'vertical': 'commerce'
}, headers={'Authorization': 'Bearer ck_your_api_key_here'})
$client = new GuzzleHttp\Client();
$client->post('https://chatyug.com/api/external/catalogs', [
    'headers' => ['Authorization' => 'Bearer ck_your_api_key_here'],
    'json' => [
        'catalogName' => 'Demo Shop Catalog',
        'vertical' => 'commerce'
    ]
]);
Next: Add products via Products, then send catalog messages via Sending Product Messages.