API reference
Catalog
Upsert commerce catalog products into Inaiy (source of truth before WhatsApp publish).
x-tenant-id and an API key or OAuth token. Channel IDs are copied from Settings → Developer in the app. See Authentication.Upsert a catalog product
/api/public/v1/commerce/catalog/productsCreate or update a product in the Inaiy catalog from an external system.
Query parameters
platformstringSource system name (default `generic`); products are matched on (platform, externalId).
connectionIdstringOptional source connection id. Defaults to `public-api:<platform>`.
Request bodyrequired
externalIdstringrequiredYour system's product id (string or number).
skustring | nulltitlestringProduct name. `title` or `name` is required.
namestringAlias of `title`.
descriptionstring | nullbrandstring | nullcategorystring | nullcategoryNamestring | nullAlias of `category`.
pricenumber | nullcurrencystring | null3-letter ISO 4217 code.
stockinteger | nullstatusstring | nullACTIVE / PUBLISHED → active, ARCHIVED / DELETED → archived; anything else is a draft.
imageUrlsstring (uri)[]The first 12 images are imported; the first one becomes the primary image.
imageUrlstring (uri) | nullSingle-image alias of `imageUrls`.
variantsobject[]6 child fields
externalIdstringskustring | nulltitlestring | nullpricenumber | nullstockinteger | nulloptionsobject
platformstringSource system name (default `generic`); products are matched on (platform, externalId).
connectionIdstringOptional source connection id. Defaults to `public-api:<platform>`.
Response 200Default Response
successbooleandataobject
curl -X POST "https://api.inaiy.com/api/public/v1/commerce/catalog/products" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx"{
"externalId": "SKU-1001",
"sku": "SKU-1001",
"title": "Ceramic Table Lamp",
"name": "string",
"description": "string",
"brand": "string",
"category": "Lighting",
"categoryName": "string",
"price": 1499,
"currency": "INR",
"stock": 25,
"status": "ACTIVE",
"imageUrls": [
"https://cdn.example.com/lamp.jpg"
],
"imageUrl": "https://example.com",
"variants": [
{
"externalId": "SKU-1001-RED",
"sku": "string",
"title": "Red",
"price": 1599,
"stock": 10,
"options": {
"color": "Red"
}
}
],
"platform": "generic",
"connectionId": "string"
}{
"success": true,
"data": {}
}Batch upsert catalog products
/api/public/v1/commerce/catalog/products/batchCreate or update up to 500 products in one request.
Request bodyrequired
productsobject[]required15 child fields
externalIdstringrequiredYour system's product id (string or number).
skustring | nulltitlestringProduct name. `title` or `name` is required.
namestringAlias of `title`.
descriptionstring | nullbrandstring | nullcategorystring | nullcategoryNamestring | nullAlias of `category`.
pricenumber | nullcurrencystring | null3-letter ISO 4217 code.
stockinteger | nullstatusstring | nullACTIVE / PUBLISHED → active, ARCHIVED / DELETED → archived; anything else is a draft.
imageUrlsstring (uri)[]The first 12 images are imported; the first one becomes the primary image.
imageUrlstring (uri) | nullSingle-image alias of `imageUrls`.
variantsobject[]6 child fields
externalIdstringskustring | nulltitlestring | nullpricenumber | nullstockinteger | nulloptionsobject
platformstringSource system name (default `generic`); products are matched on (platform, externalId).
connectionIdstringOptional source connection id. Defaults to `public-api:<platform>`.
Response 200Default Response
successbooleandataobject
curl -X POST "https://api.inaiy.com/api/public/v1/commerce/catalog/products/batch" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx"{
"products": [
{
"externalId": "SKU-1001",
"sku": "SKU-1001",
"title": "Ceramic Table Lamp",
"name": "string",
"description": "string",
"brand": "string",
"category": "Lighting",
"categoryName": "string",
"price": 1499,
"currency": "INR",
"stock": 25,
"status": "ACTIVE",
"imageUrls": [
"https://cdn.example.com/lamp.jpg"
],
"imageUrl": "https://example.com",
"variants": [
{
"externalId": "SKU-1001-RED",
"sku": "string",
"title": "Red",
"price": 1599,
"stock": 10,
"options": {
"color": "Red"
}
}
]
}
],
"platform": "generic",
"connectionId": "string"
}{
"success": true,
"data": {}
}Archive a product by externalId
/api/public/v1/commerce/catalog/products/{externalId}Soft-archives the Inaiy product linked to the given external identifier.
Path parameters
externalIdstringrequired
Query parameters
platformstringSource system name (default `generic`); products are matched on (platform, externalId).
Response 200Default Response
successbooleandataobject
curl -X DELETE "https://api.inaiy.com/api/public/v1/commerce/catalog/products/6650a1b2c3d4e5f6a7b8c9d0" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx"{
"success": true,
"data": {}
}