commercetools icon

commercetools

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

Actions671

Discount-group → Update DiscountGroup by ID

AI-generated

Summary

Update a DiscountGroup in commercetools by specifying its ID and current version, applying one or more update actions.

Inputs

  • Discount-group ID (required) — The unique ID of the DiscountGroup to update.
  • Version (required) — The current version number of the DiscountGroup; used for concurrency control.
  • Actions (JSON) — A raw JSON array of update actions to apply. If provided and not empty, this overrides the Actions (UI) parameter.
  • Actions (UI) — One or more update actions selectable via UI, including setting description, active status, key, name, or sort order.

Output shape

a single updated DiscountGroup object

Returns the updated DiscountGroup JSON from the commercetools API. The update is processed simultaneously for multiple input items, each handled individually with error capture if 'Continue On Fail' is set.

Examples

Example 1: Update the name and sort order of a DiscountGroup by ID.

Set the Discount-group ID and Version, then use Actions (UI) to set a new 'Name' and 'Sort Order'.

Links

Discussion