commercetools icon

commercetools

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

Actions671

Product → Update Product by Key

AI-generated

Summary

Update an existing product identified by its unique product key by applying one or more update actions with a specified current version number.

Inputs

  • Product Key (required) — The unique key identifying the product to update.
  • Version (required) — The current version of the product for concurrency control.
  • Actions (JSON) — A raw JSON array of update actions to apply to the product; if provided and not empty, this overrides the 'Actions (UI)' field.
  • Actions (UI) — One or more update actions selected and configured via the UI to modify the product's state.

Output shape

a single JSON object representing the updated product, including all current attributes after applying the actions.

The operation requires the correct version number for concurrency control to avoid conflicts. Actions can be specified either via a structured UI or by a raw JSON array; the JSON array property takes precedence if not empty. Errors on failure include details. Only one product update per item is processed.

Examples

Example 1: Update the name and add an asset to a product identified by 'my-product-key' at version 2 using UI actions.

  • Set Product Key to 'my-product-key'.
  • Set Version to 2.
  • Add multiple actions in the 'Actions (UI)' field, such as ChangeName and AddAsset.

Links

Discussion