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 ID

AI-generated

Summary

Update a specific business unit within a given store by its unique Business Unit ID and Store Key, specifying the expected version and update actions to apply.

Inputs

  • Store Key (required) — The unique key identifying the store containing the business unit.
  • Business Unit ID (required) — The unique ID of the business unit to update within the specified store.
  • Version (required) — The current version of the business unit resource to handle concurrency control during update.
  • Actions (UI) — A list of predefined update actions you want to apply to the business unit, entered via the user interface with multiple possible action types like addAddress, changeName, removeStore, etc.
  • Actions (JSON) — A raw JSON array of update actions to apply; if provided and not empty, it overrides the UI-based actions.

Output shape

a single JSON object representing the updated business unit resource returned from the commercetools API

Requires specifying the correct version to avoid conflicts; supports multiple types of update actions which must be properly formatted; if the API request fails, an error is thrown or returned depending on node error handling settings.

Examples

Example 1: Update the name and add an address to a business unit

Provide Store Key, Business Unit ID, current Version, and use Actions (UI) to set 'changeName' action with the new name and 'addAddress' action with address details.

Example 2: Apply multiple updates via raw JSON actions

Supply the Store Key, Business Unit ID, Version, and a JSON array of actions in Actions (JSON) field to perform bulk updates in one request.

Links

Discussion