v50

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-08-0342108400.9 KB
Roles

Create a role

Create a custom role for the merchant. Roles are defined by the set of permissions that they grant to the members that they are assigned to.

post/v0.1/merchants/{merchant_code}/roles

Path parameters

merchant_codestring required
Example:MK10CL2A

Short unique identifier for the merchant.

Request body

namestring required

User-defined name of the role.

permissionsstring[] required

User's permissions.

metadataMetadata

Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object.

descriptionstring

User-defined description of the role.

Example request

{
  "name": "Senior Shop Manager II",
  "permissions": [
    "catalog_access",
    "taxes_access",
    "members_access"
  ],
  "metadata": {},
  "description": "Manges the shop and the employees."
}

Response

Returns the Role object after successful custom role creation.

idstring required

Unique identifier of the role.

namestring required

User-defined name of the role.

descriptionstring

User-defined description of the role.

permissionsstring[] required

List of permission granted by this role.

is_predefinedboolean required

True if the role is provided by SumUp.

metadataMetadata

Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object.

created_atstring date-time required

The timestamp of when the role was created.

updated_atstring date-time required

The timestamp of when the role was last updated.

Example response

{
  "id": "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
  "name": "Senior Shop Manager II",
  "description": "Manges the shop and the employees.",
  "permissions": [],
  "is_predefined": true,
  "metadata": {},
  "created_at": "2023-01-20T15:16:17Z",
  "updated_at": "2023-01-20T15:16:17Z"
}