Update Catalog API

Overview

Updates the metadata, schema, and sync configuration of an existing catalog. This API performs a full update, so all fields that should remain unchanged must be explicitly provided in the request.

This API can also be used to update or remove recurring sync configurations for external feeds.

Method

PUT

Endpoint

PUT /v2/catalogs/{id}

Base URL

https://in1.api.clevertap.com/v2/catalogs/{id}

Region

Refer Region for more details.

Headers

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

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

Path Parameter

The following parameters define how an existing catalog is updated:

ParameterTypeRequiredDescription
idLongYesUnique identifier of the catalog to update.

Request Parameters

The following request body parameters define how an existing catalog is updated:

ParameterTypeRequiredDescription
catalogNamestringNoName of the catalog. This value identifies which catalog you want to update.
descriptionstringNoUpdated description of the catalog.
statusstringNoCurrent status of the catalog, for example, ACTIVE or INACTIVE.
updatedBystringYesEmail address of the user making the update.
catalogSchemaarrayNoUpdated list of fields that define the structure of the catalog.
catalogSchema.namestringNoName of the catalog field.
catalogSchema.typestringNoData type of the field, such as string, number, or boolean.
catalogSchema.filterablebooleanNoIndicates whether this field can be used in filters. Default is false if not specified.

Example Request

This example updates the catalog name, schema, and recurring sync configuration.

{
  "catalogName": "electronics_catalog_v2",
  "description": "Updated product catalog for electronics store",
  "status": "ACTIVE",
  "updatedBy": "[email protected]",
  "catalogSchema": [
    {
      "name": "brand",
      "type": "string",
      "filterable": true
    },
    {
      "name": "price",
      "type": "number",
      "filterable": true
    },
    {
      "name": "category",
      "type": "string",
      "filterable": true
    },
    {
      "name": "rating",
      "type": "number",
      "filterable": false
    }
  ]
}
📘

Note This API performs a full update. Any fields omitted from the request may be reset to default values.

Example Response

This response confirms that the catalog was updated successfully.

{
  "id": 123,
  "catalogName": "electronics_catalog_v2",
  "catalogSchema": [
    {
      "name": "brand",
      "type": "string",
      "filterable": true
    },
    {
      "name": "price",
      "type": "number",
      "filterable": true
    },
    {
      "name": "category",
      "type": "string",
      "filterable": true
    },
    {
      "name": "rating",
      "type": "number",
      "filterable": false
    }
  ],
  "fieldMappings": {
    "manufacturer": "brand",
    "cost": "price"
  },
  "description": "Updated product catalog for electronics store",
  "totalProducts": 1500,
  "status": "ACTIVE",
  "createdAt": 1699564800,
  "createdBy": "[email protected]",
  "updatedBy": "[email protected]",
  "isActive": true,
  "attributeCount": 4,
  "totalColumns": 7
}

Response Parameters

The response includes additional system-generated fields returned after a successful update.

ParameterTypeDescription
idNumberUnique identifier of the updated catalog.
totalProductsintegerTotal number of products currently available in the catalog.
createdAtintegerTime when the catalog was created, in Unix timestamp format.
createdBystringEmail address of the user who created the catalog.
isActivebooleanIndicates whether the catalog is currently active.
attributeCountintegerTotal number of attributes defined in the catalog schema.
totalColumnsintegerTotal number of columns available in the catalog, including system-defined fields.

Error Codes

The following error codes may be returned by this API:

Error CodeDescription
CATALOG_NOT_FOUNDThe catalog specified by the ID does not exist.
CATALOG_NAME_CONFLICTAnother catalog with the same name already exists.
CATALOG_INVALID_REQUESTThe request payload is invalid or incomplete.
AUTHENTICATION_FAILEDAuthentication failed due to an invalid or missing token.
AUTHORIZATION_FAILEDThe caller does not have permission to update this catalog.
INTERNAL_ERRORAn unexpected server-side error occurred.

CleverTap Ask AI Widget (CSP-Safe)