Roles
Update a role
Changed onUpdates a custom role's name, description, or permissions and returns the updated role.
Providing permissions replaces the role's permission list and changes the access granted to members assigned to that role. Omitted fields remain unchanged.
patch/v0.1/merchants/{merchant_code}/roles/{role_id}
Request
- Base URLhttps://api.sumup.com
- URLhttps://api.sumup.com/v0.1/merchants/{merchant_code}/roles/{role_id}
- 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.
role_idstring required
Example:role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP
The ID of the role to retrieve.
Request body
Example request
{
"name": "Senior Shop Manager III",
"permissions": [
"catalog_edit",
"taxes_access",
"members_edit"
]
}Response
Returns the updated Role object if the update succeeded.
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