commercetools icon

commercetools

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

Actions671

Product-discount → Update ProductDiscount by ID

AI-generated

Summary

Update a specific ProductDiscount by its ID in commercetools by providing the current version and a list of update actions.

Inputs

  • Product-discount ID (required) — The unique identifier of the ProductDiscount to update.
  • Version (required) — The current version number of the ProductDiscount. Required to ensure update consistency.
  • Actions (JSON) — A raw JSON array of update actions which overrides the UI-defined actions if provided.
  • Actions (UI) — A collection of update actions defined via the UI, such as changing active status, name, predicate, sort order, value, description, key, and validity periods.

Output shape

a single object representing the updated ProductDiscount

Returns the updated ProductDiscount object as JSON on success. Throws an error if the update fails or the resource does not exist.

Links

Discussion