/v0.1/merchants/{merchant_code}/roles/{role_id}Updates 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.
OAuth scopes: Requires one of: user.subaccounts, roles.write.
Required permissions:
roles_update
Path parameters
Short unique identifier for the merchant.
Example:
"MK10CL2A"The ID of the role to retrieve.
Example:
"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"
Body parameters
application/jsonrequired- namestring
User-defined name of the role.
Example:
"Senior Shop Manager II" - permissionsarray<string>
User's permissions.
Example:
["catalog_access","taxes_access","members_access"] - descriptionstring
User-defined description of the role.
Example:
"Manges the shop and the employees."
Responses
200application/json
Returns the updated Role object if the update succeeded.
Unique identifier of the role.
Example:
"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"User-defined name of the role.
Example:
"Senior Shop Manager II"List of permission granted by this role.
Example:
[]True if the role is provided by SumUp.
Example:
true- format:
date-timeThe timestamp of when the role was created.
Example:
"2023-01-20T15:16:17Z" - format:
date-timeThe timestamp of when the role was last updated.
Example:
"2023-01-20T15:16:17Z" - descriptionstring
User-defined description of the role.
Example:
"Manges the shop and the employees." - metadataobject
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.
Example:
{}
400application/problem+json
Invalid request.
- format:
uriA URI reference that identifies the problem type.
Example:
"https://developer.sumup.com/problem/not-found" - titlestring
A short, human-readable summary of the problem type.
Example:
"Requested resource couldn't be found." - statusinteger
The HTTP status code generated by the origin server for this occurrence of the problem.
Example:
404 - detailstring
A human-readable explanation specific to this occurrence of the problem.
Example:
"The requested resource doesn't exist or does not belong to you." - instancestringformat:
uriA URI reference that identifies the specific occurrence of the problem.
Example:
"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
404application/problem+json
Merchant not found.
- format:
uriA URI reference that identifies the problem type.
Example:
"https://developer.sumup.com/problem/not-found" - titlestring
A short, human-readable summary of the problem type.
Example:
"Requested resource couldn't be found." - statusinteger
The HTTP status code generated by the origin server for this occurrence of the problem.
Example:
404 - detailstring
A human-readable explanation specific to this occurrence of the problem.
Example:
"The requested resource doesn't exist or does not belong to you." - instancestringformat:
uriA URI reference that identifies the specific occurrence of the problem.
Example:
"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"