Update Single Product API

Overview

Updates a single product by identity.

Method

PUT

Endpoint

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

Base URL

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

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 Parameters

The following path parameters are required to identify the product to update.

ParameterTypeRequiredDescription
catalogIdNumberYesUnique identifier of the catalog containing the products.
productIdStringYesUnique identifier of the product (URL encoded).

Request Parameters

The following request body parameters define the product fields to update:

ParameterTypeRequiredDescription
namestringNoUpdated name of the product.
imageUrlstringNoPublic URL of the product image.
attributesobjectNoKey-value pairs representing the product attributes to update.
attributes.fieldvariesNoValue of a specific product attribute. The data type must match the type defined in the catalog schema.
updatedBystringNoEmail address of the user who last updated the product.
Note: This field is not currently required by this endpoint, though it is required on the bulk update endpoint.
📘

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 in the catalog.

{
  "name": "Wireless Bluetooth Headphones Pro",
  "imageUrl": "https://example.com/images/headphones-pro.jpg",
  "attributes": {
    "price": 99.99,
    "rating": 4.8
  },
  "updatedBy": "[email protected]"
}

Example Response

This example response indicates that the product update was processed successfully.

{
  "identity": "SKU-12345",
  "name": "Wireless Bluetooth Headphones Pro",
  "imageUrl": "https://example.com/images/headphones-pro.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]"
}

Response Parameters

The response includes additional system-generated fields returned after the product is updated.

ParameterTypeDescription
statusstringCurrent status of the product, for example, ACTIVE or INACTIVE.
createdAtstringDate and time when the product was originally created.
createdBystringEmail address of the user who created the product.

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)