commercetools icon

commercetools

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

Actions671

Associate-role → Create AssociateRole

AI-generated

Summary

Create a new AssociateRole in commercetools by specifying a unique key and a set of permissions.

Inputs

  • Key (required) — A unique string to identify the AssociateRole.
  • Permissions (required) — A JSON array defining the permissions associated with the AssociateRole.

Output shape

a single record containing the created AssociateRole's details as JSON

Returns the full JSON response object from the commercetools API representing the newly created AssociateRole. Errors are returned in the workflow if the operation fails and continueOnFail is not enabled.

Examples

Example 1: Create an AssociateRole with key "sales-associate" and permissions to view products.

Set 'Key' to 'sales-associate', provide a JSON array of permissions such as [{"name": "ViewProducts"}] in 'Permissions'.

Links

Discussion