Roles
Create a role
Changed onCreate 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
Request
- Base URLhttps://api.sumup.com
- URLhttps://api.sumup.com/v0.1/merchants/{merchant_code}/roles
- Auth
- HTTP bearer
- or OAuth 2Authorization code: https://api.sumup.com/authorizeToken URL: https://api.sumup.com/token scopes: user.subaccounts, roles.write
Path parameters
merchant_codestring required
Example:MK10CL2A
Short unique identifier for the merchant.
Request body
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.
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"
}Changes
- breaking
the
request property's minItems was increased to1
- breaking
- info
the security scope
roles.writewas added to the endpoint's security schemeoauth2 - info
the security scope
user.subaccountswas added to the endpoint's security schemeoauth2
- info