commercetools icon

commercetools

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

Actions671

Store Business Unit → Update BusinessUnit in Store by Key

AI-generated

Summary

Update a Business Unit within a specified Store in commercetools by its Business Unit key, applying one or more update actions.

Inputs

  • Store Business Unit Key (required) — The key of the store containing the Business Unit to update.
  • Business Unit Key (required) — The key of the Business Unit within the store to update.
  • Store Key (required) — The key identifier of the store where the Business Unit resides.
  • Version (required) — The current version number of the Business Unit used for optimistic concurrency control.
  • Actions (JSON) — Raw JSON array of update actions to apply to the Business Unit. If provided and not empty, this overrides the UI-defined actions.
  • Actions (UI) — A structured list of update actions selectable via the UI, such as adding/removing associates, changing addresses, setting custom fields, or modifying status.

Output shape

a single record

Returns the updated Business Unit object as JSON. The update is version-controlled, and the specified version must match the current version in commercetools to succeed. Errors are thrown for version mismatches or invalid inputs.

Examples

Example 1: Update the name and add a shipping address to a Business Unit by key

Provide the Store Key, Store Business Unit Key, Business Unit Key, current Version, and specify update actions either as JSON or via the UI to change the 'name' and add a new shipping address to the store's business unit.

Links

Discussion