commercetools icon

commercetools

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

Actions671

Store Order → Update Order in Store by ID

AI-generated

Summary

Update an existing order by its ID within a specified store in commercetools, applying one or more update actions to modify the order's data.

Inputs

  • Store Key (required) — The key of the store in which the order exists.
  • Store Order Key (required) — The key of the store order resource (contextually refers to the store order resource key, though required for execution context).
  • Order ID (required) — The unique identifier of the order to update.
  • Version (required) — The current version of the order, used for concurrency control.
  • Actions (UI) — One or more update actions to perform on the order, selectable and configurable via the UI.
  • Actions (JSON) — Raw JSON array of update actions to apply, which overrides the UI actions if provided.

Output shape

a single JSON object representing the updated order.

The operation returns the updated order data as a JSON object. It requires specifying the current version for optimistic concurrency. Actions can be added via UI or raw JSON and must conform to commercetools update action formats. Errors are thrown if the operation fails, unless 'Continue On Fail' is enabled.

Examples

Example 1: Update an order's state and add a delivery in a store

Specify the store key, order ID, current version, and include update actions such as 'changeOrderState' and 'addDelivery' with necessary details.

Links

Discussion