API reference

Catalog

Upsert commerce catalog products into Inaiy (source of truth before WhatsApp publish).

Every request needs 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

post/api/public/v1/commerce/catalog/products

Create or update a product in the Inaiy catalog from an external system.

Query parameters

  • platformstring

    Source system name (default `generic`); products are matched on (platform, externalId).

  • connectionIdstring

    Optional source connection id. Defaults to `public-api:<platform>`.

Request bodyrequired

  • externalIdstringrequired

    Your system's product id (string or number).

  • skustring | null
  • titlestring

    Product name. `title` or `name` is required.

  • namestring

    Alias of `title`.

  • descriptionstring | null
  • brandstring | null
  • categorystring | null
  • categoryNamestring | null

    Alias of `category`.

  • pricenumber | null
  • currencystring | null

    3-letter ISO 4217 code.

  • stockinteger | null
  • statusstring | null

    ACTIVE / 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) | null

    Single-image alias of `imageUrls`.

  • variantsobject[]
    6 child fields
    • externalIdstring
    • skustring | null
    • titlestring | null
    • pricenumber | null
    • stockinteger | null
    • optionsobject
  • platformstring

    Source system name (default `generic`); products are matched on (platform, externalId).

  • connectionIdstring

    Optional source connection id. Defaults to `public-api:<platform>`.

Response 200Default Response
  • successboolean
  • dataobject
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"
Request body
{
  "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"
}
Response 200
{
  "success": true,
  "data": {}
}

Batch upsert catalog products

post/api/public/v1/commerce/catalog/products/batch

Create or update up to 500 products in one request.

Request bodyrequired

  • productsobject[]required
    15 child fields
    • externalIdstringrequired

      Your system's product id (string or number).

    • skustring | null
    • titlestring

      Product name. `title` or `name` is required.

    • namestring

      Alias of `title`.

    • descriptionstring | null
    • brandstring | null
    • categorystring | null
    • categoryNamestring | null

      Alias of `category`.

    • pricenumber | null
    • currencystring | null

      3-letter ISO 4217 code.

    • stockinteger | null
    • statusstring | null

      ACTIVE / 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) | null

      Single-image alias of `imageUrls`.

    • variantsobject[]
      6 child fields
      • externalIdstring
      • skustring | null
      • titlestring | null
      • pricenumber | null
      • stockinteger | null
      • optionsobject
  • platformstring

    Source system name (default `generic`); products are matched on (platform, externalId).

  • connectionIdstring

    Optional source connection id. Defaults to `public-api:<platform>`.

Response 200Default Response
  • successboolean
  • dataobject
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"
Request body
{
  "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"
}
Response 200
{
  "success": true,
  "data": {}
}

Archive a product by externalId

delete/api/public/v1/commerce/catalog/products/{externalId}

Soft-archives the Inaiy product linked to the given external identifier.

Path parameters

  • externalIdstringrequired

Query parameters

  • platformstring

    Source system name (default `generic`); products are matched on (platform, externalId).

Response 200Default Response
  • successboolean
  • dataobject
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"
Response 200
{
  "success": true,
  "data": {}
}