API Playground

Update an existing attribute definition. This playground calls the live API and will modify your data.

Authentication Required

You need to Login to test the API playground

Update attribute

Update an existing attribute definition by id.

Send only the fields you want to change. For single-select / multi-select attributes, options are managed through the options array using a per-option action (new, edit, delete).

Endpoint URL
PUT https://api.commerceclarity.com/api/2026-05/attributes/update/{id}

Path Parameters

ParameterTypeRequiredDescription
idstringRequiredThe attribute's attribute_id or Mongo _id.

Body parameters

ParameterTypeRequiredDescription
namestringOptionalNew attribute name.
descriptionstringOptionalNew description.
is_enabledbooleanOptionalEnable/disable the attribute.
optionsarrayOptionalSelect options to add/edit/remove. Each entry has an action (new | edit | delete) and a value.
family_idsarrayOptionalFamily ids for family-scoped attributes.

Request Examples

curl -X PUT "https://api.commerceclarity.com/api/2026-05/attributes/update/color" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Colour", "is_enabled": true }'

Response Example

Success Response
{
  "success": true,
  "data": {
    "attribute": {
      "_id": "507f1f77bcf86cd799439011",
      "attribute_id": "color",
      "name": "Colour",
      "type": "single-select",
      "scope": "global",
      "updated_at": "2026-01-15T11:00:00Z"
    }
  }
}
Error Response - Validation
{
  "success": false,
  "message": "Attribute not found"
}