commercetools icon

commercetools

Interact with the commercetools API. Operations are auto-generated from the official Postman collection.

Actions671

Category → Update Category by Key

AI-generated

Summary

Update a commercetools Category identified by its unique key by applying one or more update actions to it.

Inputs

  • Category Key (required) — The unique key of the Category to update.
  • Version (required) — The expected current version of the Category resource to ensure optimistic concurrency control.
  • Actions (JSON) — A raw JSON array of update actions to apply to the Category, overriding the UI-based Actions if provided.
  • Actions (UI) — One or more update actions selected and configured via UI fields to modify the Category, such as changing its name, slug, parent, assets, or custom fields.

Output shape

a single JSON object representing the updated Category resource returned from the commercetools API

The operation requires both the Category Key and the Version as mandatory inputs. Update actions can be specified either as a raw JSON array (which takes precedence) or via the UI options. The node calls the commercetools API to apply the updates and returns the updated Category. Errors during execution are thrown or returned as error JSON if Continue On Fail is enabled.

Examples

Example 1: Change the name and slug of a Category by its key

Set 'Category Key' to identify the Category, specify the current Version number, and add UI Actions 'ChangeName' and 'ChangeSlug' with localized JSON objects for new values.

Example 2: Remove an asset from the Category using raw JSON actions

Provide 'Category Key' and Version, then input a JSON array representing the 'removeAsset' action in 'Actions (JSON)' field.

Links

Discussion