commercetools icon

commercetools

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

Actions671

Business Unit → Update BusinessUnit by ID

AI-generated

Summary

Update an existing Business Unit in commercetools by specifying its ID and the expected version, applying one or more update actions.

Inputs

  • Business Unit ID (required) — The unique identifier of the Business Unit to update.
  • Version (required) — The current version number of the Business Unit to prevent conflicting updates.
  • Actions (UI) — A set of predefined update actions to apply to the Business Unit, such as adding or removing addresses, associates, stores, or changing properties like name, status, or parent unit.
  • Actions (JSON) — Raw JSON array of update actions, which overrides the UI actions if provided.

Output shape

a single JSON object representing the updated Business Unit

Returns the full updated Business Unit resource object as received from the commercetools API. The update requires the correct version to avoid conflicts. Errors are thrown if update fails or resource not found.

Examples

Example 1: Update a Business Unit's name and add an associate

Specify the Business Unit ID and current version, choose 'ChangeName' and 'AddAssociate' actions in UI or provide equivalent JSON in actions JSON.

Links

Discussion