commercetools icon

commercetools

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

Actions671

Cart Discount → Update CartDiscount by Key

AI-generated

Summary

Update a commercetools Cart Discount identified by its unique Key using specified version and modification actions.

Inputs

  • Cart Discount Key (required) — The unique key of the Cart Discount resource to update.
  • Version (required) — The current version number of the Cart Discount resource, required for concurrency control.
  • Actions (JSON) — A raw JSON array of update actions to apply, which overrides the UI actions if provided.
  • Actions (UI) — A collection of modification actions selectable via UI, such as changing the cart predicate, name, active status, target, value, validity periods, stores, custom fields, and other properties.

Output shape

a single object representing the updated Cart Discount resource's latest state as returned by the commercetools API

If multiple input items are processed, output is an array with one updated Cart Discount per item. Error details are returned on failure if 'Continue on Fail' is enabled.

Examples

Example 1: Update a Cart Discount's name and activate it

Set the 'Cart Discount Key' to identify the discount, specify its current 'Version', then use 'Actions (UI)' to add 'ChangeName' with a localized name JSON and 'ChangeIsActive' to true.

Links

Discussion