commercetools icon

commercetools

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

Actions671

Associate-role → Update AssociateRole by ID

AI-generated

Summary

Update an existing Associate-role in commercetools by specifying its ID and current version along with one or more update actions.

Inputs

  • Associate-role ID (required) — The unique identifier of the Associate-role to update.
  • Version (required) — The current version of the Associate-role to ensure concurrency control.
  • Actions (JSON) — A raw JSON array of update actions to apply to the Associate-role, overriding UI actions if provided.
  • Actions (UI) — A collection of update actions selectable via the UI, such as AddPermission, RemovePermission, ChangeBuyerAssignable, SetCustomField, SetCustomType, SetName, or SetPermissions.

Output shape

a single JSON object representing the updated Associate-role resource as returned by the commercetools API

The output returns the updated Associate-role resource data. The operation requires the correct version number for optimistic concurrency. If both Actions (JSON) and Actions (UI) are provided, Actions (JSON) takes precedence.

Examples

Example 1: Update Associate-role to add a permission

Provide the Associate-role ID, current version, and Actions (UI) with an AddPermission action specifying the new permission.

Example 2: Update Associate-role using raw JSON actions

Provide the Associate-role ID, current version, and a raw JSON array of actions in the Actions (JSON) field to customize the update precisely.

Links

Discussion