Update Products (Bulk) API

Overview

Updates multiple existing products in a catalog in a single request. This API allows you to modify product fields and custom attributes for existing products.

Only products with matching identity values are updated. Products that fail validation do not prevent other valid products from being processed.

Method

PUT

Endpoint

PUT /v2/catalogs/{catalogId}/products/bulk

Base URL

https://in1.api.clevertap.com/v2/catalogs/{catalogId}/products/bulk

Region

Refer Region for more details.

Headers

These headers must be included with every API request to ensure authentication and request validation.

HeaderDescriptionRequired
Content-TypeContent type of the request. Must be application/json.Yes
X-CleverTap-Account-IdCleverTap account ID associated with the catalog.Yes
X-CleverTap-PasscodeAPI passcode used to authenticate the request.Yes

Path Parameter

The following path parameter is required to identify the catalog:

ParameterTypeRequiredDescription
catalogIdNumberYesUnique identifier of the catalog containing the products.

Request Parameters

The following request body parameters define the products to be updated:

ParameterTypeRequiredDescription
productsarrayYesList of products to be updated.
products.identitystringYesUnique identifier of the product within the catalog.
products.namestringNoUpdated name of the product.
products.imageUrlstringNoPublic URL of the product image.
products.attributesobjectNoKey-value pairs representing the product attributes to update.
products.attributes.fieldvariesNoValue of a specific product attribute. The data type must match the catalog schema.
updatedBystringYesEmail address of the user performing the update.
📘

Note

When the attributes field is included in an update, it replaces the entire attributes object rather than merging individual keys. To update a single attribute without affecting others, include all attributes you want to keep in the request.

Example Request

This example updates product details for two existing products in the catalog.

{
  "products": [
    {
      "identity": "SKU-12345",
      "name": "Wireless Bluetooth Headphones Pro",
      "attributes": {
        "price": 99.99,
        "rating": 4.8
      }
    },
    {
      "identity": "SKU-12346",
      "attributes": {
        "price": 11.99,
        "in_stock": false
      }
    }
  ],
  "updatedBy": "[email protected]"
}

Example Response

This example response indicates that all requested product updates were processed successfully.

{
  "successCount": 2,
  "failedCount": 0,
  "products": [
    {
      "identity": "SKU-12345",
      "name": "Wireless Bluetooth Headphones Pro",
      "imageUrl": "https://example.com/images/headphones.jpg",
      "attributes": {
        "brand": "AudioTech",
        "price": 99.99,
        "category": "Electronics",
        "in_stock": true,
        "rating": 4.8
      },
      "status": "ACTIVE",
      "createdAt": "2023-11-10T10:30:00Z",
      "createdBy": "[email protected]",
      "updatedBy": "[email protected]"
    },
    {
      "identity": "SKU-12346",
      "name": "USB-C Charging Cable",
      "imageUrl": "https://example.com/images/cable.jpg",
      "attributes": {
        "brand": "TechCable",
        "price": 11.99,
        "category": "Accessories",
        "in_stock": false
      },
      "status": "ACTIVE",
      "createdAt": "2023-11-10T10:30:00Z",
      "createdBy": "[email protected]",
      "updatedBy": "[email protected]"
    }
  ],
  "errors": []
}

Response Parameters

The response includes bulk operation results along with system-generated fields for successfully updated products.

ParameterTypeDescription
successCountintegerNumber of products that were successfully updated.
failedCountintegerNumber of products that failed to be updated.
productsarrayList of products that were successfully updated.
products.statusstringCurrent status of the product, for example, ACTIVE or INACTIVE.
products.createdAtstringDate and time when the product was originally created.
products.createdBystringEmail address of the user who created the product.
products.updatedBystringEmail address of the user who last updated the product.
errorsarrayList of products that could not be updated, along with error details.

Error Codes

This API returns a standard HTTP status code along with a plain-text message describing the issue. Common status codes include:

HTTP StatusDescription
400The request is invalid, missing required fields, or exceeds a bulk limit (product count or payload size).
403The caller lacks permission, or the catalog feature is not enabled for this account.
404The specified catalog or product does not exist.
409A conflicting resource already exists.
413The request payload exceeds the maximum allowed size.
500An unexpected server-side error occurred.

Did this page help you?
CleverTap Ask AI Widget (CSP-Safe)