commercetools icon

commercetools

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

Actions671

Cart → Update Cart by ID

AI-generated

Summary

Update an existing Cart by its unique ID, specifying the current version and applying one or more update actions to modify the cart's details.

Inputs

  • Cart ID (required) — The unique identifier of the cart to update.
  • Version (required) — The current version number of the cart; used for concurrency control.
  • Actions (JSON) — A raw JSON array of update actions; if provided and non-empty, it overrides the GUI-specified actions.
  • Actions (UI) — One or multiple update actions selectable via the UI to modify the cart (e.g., add items, set shipping address, apply discount codes).

Output shape

a single JSON object representing the updated Cart resource as returned from the commercetools API

The output includes the updated cart data. Errors during update result in exceptions unless 'continueOnFail' is set, in which case error info is output per item.

Links

Discussion