Skip to content

Catalogs

Catalogs are WhatsApp product catalogs backed by Meta's Commerce Manager. Whatomate proxies catalog and product operations to the Meta Graph API and keeps a local mirror in your organization, so every create/update/delete both calls Meta and updates the local record. Each catalog is linked to a WhatsApp account by name.

Retrieve all catalogs in your organization, ordered by name.

Terminal window
GET /api/catalogs
ParameterTypeDescription
whatsapp_accountstringFilter by WhatsApp account name
{
"status": "success",
"data": {
"catalogs": [
{
"id": "uuid",
"meta_catalog_id": "123456789",
"whatsapp_account": "Main Business",
"name": "Summer Collection",
"is_active": true,
"product_count": 12,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
]
}
}

Retrieve a single catalog with its products.

Terminal window
GET /api/catalogs/{id}
{
"status": "success",
"data": {
"id": "uuid",
"meta_catalog_id": "123456789",
"whatsapp_account": "Main Business",
"name": "Summer Collection",
"is_active": true,
"product_count": 1,
"products": [
{
"id": "uuid",
"meta_product_id": "987654321",
"name": "T-Shirt",
"description": "Cotton t-shirt",
"price": 1999,
"currency": "USD",
"url": "https://example.com/tshirt",
"image_url": "https://example.com/tshirt.jpg",
"retailer_id": "SKU-001",
"is_active": true,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
}

Create a catalog in Meta Commerce Manager and store it locally.

Terminal window
POST /api/catalogs
{
"whatsapp_account": "Main Business",
"name": "Summer Collection"
}
FieldTypeRequiredDescription
whatsapp_accountstringYesName of the WhatsApp account that owns the catalog
namestringYesCatalog name

Returns the created catalog (with product_count of 0).

{
"status": "success",
"data": {
"id": "uuid",
"meta_catalog_id": "123456789",
"whatsapp_account": "Main Business",
"name": "Summer Collection",
"is_active": true,
"product_count": 0,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
}

Delete a catalog from Meta and locally. All products in the catalog are removed as well.

Terminal window
DELETE /api/catalogs/{id}
{
"status": "success",
"data": {
"message": "Catalog deleted"
}
}

Fetch catalogs from the Meta Graph API for a WhatsApp account and create or update the local mirror.

Terminal window
POST /api/catalogs/sync
{
"whatsapp_account": "Main Business"
}
FieldTypeRequiredDescription
whatsapp_accountstringYesName of the WhatsApp account to sync catalogs for
{
"status": "success",
"data": {
"message": "Catalogs synced",
"synced": 3,
"total": 3
}
}
FieldTypeDescription
syncedintegerNumber of catalogs created or updated locally
totalintegerNumber of catalogs returned by Meta

Retrieve all products in a catalog, ordered by name.

Terminal window
GET /api/catalogs/{id}/products
{
"status": "success",
"data": {
"products": [
{
"id": "uuid",
"meta_product_id": "987654321",
"name": "T-Shirt",
"description": "Cotton t-shirt",
"price": 1999,
"currency": "USD",
"url": "https://example.com/tshirt",
"image_url": "https://example.com/tshirt.jpg",
"retailer_id": "SKU-001",
"is_active": true,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
]
}
}

Create a product in the catalog's Meta catalog and store it locally.

Terminal window
POST /api/catalogs/{id}/products
{
"name": "T-Shirt",
"description": "Cotton t-shirt",
"price": 1999,
"currency": "USD",
"url": "https://example.com/tshirt",
"image_url": "https://example.com/tshirt.jpg",
"retailer_id": "SKU-001"
}
FieldTypeRequiredDescription
namestringYesProduct name
priceintegerYesPrice in the smallest currency unit (cents). Must be greater than 0
descriptionstringNoProduct description
currencystringNoISO 4217 currency code. Defaults to USD
urlstringNoProduct landing page URL
image_urlstringNoProduct image URL
retailer_idstringNoRetailer SKU / external identifier

Returns the created product (same shape as the product object above).

Retrieve a single product.

Terminal window
GET /api/products/{id}
{
"status": "success",
"data": {
"id": "uuid",
"meta_product_id": "987654321",
"name": "T-Shirt",
"description": "Cotton t-shirt",
"price": 1999,
"currency": "USD",
"url": "https://example.com/tshirt",
"image_url": "https://example.com/tshirt.jpg",
"retailer_id": "SKU-001",
"is_active": true,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
}

Update a product in Meta and locally. Only non-empty fields in the request body are applied to the local record.

Terminal window
PUT /api/products/{id}
{
"name": "Premium T-Shirt",
"price": 2499,
"currency": "USD"
}
FieldTypeDescription
namestringProduct name
descriptionstringProduct description
priceintegerPrice in cents (applied only when greater than 0)
currencystringISO 4217 currency code
urlstringProduct landing page URL
image_urlstringProduct image URL
retailer_idstringRetailer SKU / external identifier

Returns the updated product object.

Delete a product from Meta and locally.

Terminal window
DELETE /api/products/{id}
{
"status": "success",
"data": {
"message": "Product deleted"
}
}
  • Accounts API - Manage the WhatsApp accounts that own catalogs