commercetools icon

commercetools

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

Actions671

Cart Discount → Update CartDiscount by ID

AI-generated

Summary

Update a Cart Discount in commercetools by specifying its unique ID and current version, applying one or more update actions to modify properties such as name, status, validity, discount value, and associated stores.

Inputs

  • Cart Discount ID (required) — The unique identifier of the Cart Discount to update.
  • Version (required) — The current version number of the Cart Discount for optimistic concurrency control.
  • Actions (JSON) — A raw JSON array of update actions to apply; if provided and not empty, it overrides the UI-configured actions.
  • Actions (UI) — One or more configured update actions using the UI builder, supporting operations like changing the name, active status, predicates, validity period, discount value, stores, custom fields, and other Cart Discount attributes.

Output shape

a single record representing the updated Cart Discount object as returned from the commercetools API

The output includes the updated Cart Discount JSON. The operation requires the correct current version and ID, otherwise it will error. Update actions can be specified either via raw JSON (overrides UI) or UI-based fields.

Links

Discussion