Endpoints to manage custom roles. Custom roles allow you to tailor roles from individual permissions to match your needs. Once created, you can assign your custom roles to your merchant account members using the memberships.
List roles
GET/v0.1/merchants/{merchant_code}/rolesCreate a role
POST/v0.1/merchants/{merchant_code}/rolesRetrieve a role
GET/v0.1/merchants/{merchant_code}/roles/{role_id}Update a role
PATCH/v0.1/merchants/{merchant_code}/roles/{role_id}Delete a role
DELETE/v0.1/merchants/{merchant_code}/roles/{role_id}
The Role object
A custom role that can be used to assign set of permissions to members.
- idstringrequired
Unique identifier of the role.
Example:"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - namestringrequired
User-defined name of the role.
Example:"Senior Shop Manager II" - descriptionstring
User-defined description of the role.
Example:"Manges the shop and the employees." - permissions[]stringrequiredmax items: 100
List of permission granted by this role.
- is_predefinedbooleanrequired
True if the role is provided by SumUp.
Example:true - metadataobjectmax properties: 64
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:{} - created_atstringrequiredformat: date-time
The timestamp of when the role was created.
Example:"2023-01-20T15:16:17Z" - updated_atstringrequiredformat: date-time
The timestamp of when the role was last updated.
Example:"2023-01-20T15:16:17Z"
{
"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"
}List roles
List merchant's custom roles.
user.subaccountsroles.readPath Parameters
- merchant_codestringrequired
Short unique identifier for the merchant.
Example:"MK10CL2A"
Response
Returns a list of Role objects. See Role object.
- items[]Rolerequired
A custom role that can be used to assign set of permissions to members.
CloseRole- idstringrequired
Unique identifier of the role.
Example:"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - namestringrequired
User-defined name of the role.
Example:"Senior Shop Manager II" - descriptionstring
User-defined description of the role.
Example:"Manges the shop and the employees." - permissions[]stringrequiredmax items: 100
List of permission granted by this role.
- is_predefinedbooleanrequired
True if the role is provided by SumUp.
Example:true - metadataobjectmax properties: 64
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:{} - created_atstringrequiredformat: date-time
The timestamp of when the role was created.
Example:"2023-01-20T15:16:17Z" - updated_atstringrequiredformat: date-time
The timestamp of when the role was last updated.
Example:"2023-01-20T15:16:17Z"
curl https://api.sumup.com/v0.1/merchants/{merchant_code}/roles \
-X GET \
-H "Authorization: Bearer $SUMUP_API_KEY"import SumUp from '@sumup/sdk';
const client = new SumUp();
const result = await client.roles.list("MK10CL2A");using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Threading.Tasks;
using SumUp;
public static class Program
{
public static async Task Main()
{
using var client = new SumUpClient();
var response = await client.Roles.ListAsync(
"your-merchant-code");
Console.WriteLine(response.StatusCode);
}
}import com.sumup.sdk.SumUpClient;
public final class ListMerchantRolesSample {
public static void main(String[] args) throws Exception {
var client = new SumUpClient();
var result = client.roles().list(
"MK10CL2A"
);
System.out.println(result);
}
}import os
import sumup
def main() -> None:
client = sumup.Sumup(api_key=os.environ["SUMUP_API_KEY"])
result = client.roles.list(
"MK10CL2A",
)
print(result)
if __name__ == "__main__":
main()<?php
$sumup = new \SumUp\SumUp();
$result = $sumup->roles->list('MK10CL2A');package main
import (
"context"
"log"
"github.com/sumup/sumup-go"
)
func main() {
ctx := context.Background()
client := sumup.NewClient()
result, err := client.Roles.List(ctx, "MK10CL2A")
if err != nil {
log.Fatal(err)
}
log.Printf("%+v", result)
}use sumup::Client;
let client = Client::default();
let result = client.roles().list("MK10CL2A").await;{
"items": [
{
"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"
}
]
}Content-Type: application/problem+json
Merchant not found.
- typestringrequiredformat: uri
A 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: uri
A URI reference that identifies the specific occurrence of the problem.
Example:"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
{
"type": "https://developer.sumup.com/problem/not-found",
"title": "Requested resource couldn't be found.",
"status": 404,
"detail": "The requested resource doesn't exist or does not belong to you."
}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.
user.subaccountsroles.writePath Parameters
- merchant_codestringrequired
Short unique identifier for the merchant.
Example:"MK10CL2A"
Body Parameters
- namestringrequired
User-defined name of the role.
Example:"Senior Shop Manager II" - permissions[]stringrequiredmax items: 100
User's permissions.
- metadataobjectmax properties: 64
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:{} - descriptionstring
User-defined description of the role.
Example:"Manges the shop and the employees."
Response
Returns the Role object after successful custom role creation. See Role object.
- idstringrequired
Unique identifier of the role.
Example:"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - namestringrequired
User-defined name of the role.
Example:"Senior Shop Manager II" - descriptionstring
User-defined description of the role.
Example:"Manges the shop and the employees." - permissions[]stringrequiredmax items: 100
List of permission granted by this role.
- is_predefinedbooleanrequired
True if the role is provided by SumUp.
Example:true - metadataobjectmax properties: 64
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:{} - created_atstringrequiredformat: date-time
The timestamp of when the role was created.
Example:"2023-01-20T15:16:17Z" - updated_atstringrequiredformat: date-time
The timestamp of when the role was last updated.
Example:"2023-01-20T15:16:17Z"
curl https://api.sumup.com/v0.1/merchants/{merchant_code}/roles \
-X POST \
-H "Authorization: Bearer $SUMUP_API_KEY" \
--json '{
"name": "Senior Shop Manager II",
"permissions": [
"catalog_access",
"taxes_access",
"members_access"
]
}'import SumUp from '@sumup/sdk';
const client = new SumUp();
const result = await client.roles.create("MK10CL2A", {
name: "Senior Shop Manager II",
permissions: ["catalog_access","taxes_access","members_access"],
});using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Threading.Tasks;
using SumUp;
public static class Program
{
public static async Task Main()
{
using var client = new SumUpClient();
var response = await client.Roles.CreateAsync(
"your-merchant-code",
JsonSerializer.Deserialize<RolesCreateRequest>(@"{""description"":""Manges the shop and the employees."",""metadata"":{},""name"":""Senior Shop Manager II"",""permissions"":[""catalog_access"",""taxes_access"",""members_access""]}")!);
Console.WriteLine(response.StatusCode);
}
}import com.sumup.sdk.SumUpClient;
public final class CreateMerchantRoleSample {
public static void main(String[] args) throws Exception {
var client = new SumUpClient();
var result = client.roles().create(
"MK10CL2A",
com.sumup.sdk.models.CreateMerchantRoleRequest.builder()
.name("Senior Shop Manager II")
.permissions(java.util.List.of("catalog_access", "taxes_access", "members_access"))
.build()
);
System.out.println(result);
}
}import os
import sumup
def main() -> None:
client = sumup.Sumup(api_key=os.environ["SUMUP_API_KEY"])
result = client.roles.create(
"MK10CL2A",
name="Senior Shop Manager II",
permissions=[
"catalog_access",
"taxes_access",
"members_access",
],
metadata={},
description="Manges the shop and the employees.",
)
print(result)
if __name__ == "__main__":
main()<?php
$sumup = new \SumUp\SumUp();
$result = $sumup->roles->create('MK10CL2A', [
'name' => 'Senior Shop Manager II',
'permissions' => [ 'catalog_access', 'taxes_access', 'members_access'],
]);package main
import (
"context"
"log"
"github.com/sumup/sumup-go"
)
func main() {
ctx := context.Background()
client := sumup.NewClient()
result, err := client.Roles.Create(ctx, "MK10CL2A", sumup.RolesCreateParams{
Description: ptr("Manges the shop and the employees."),
Metadata: sumup.Metadata{},
Name: "Senior Shop Manager II",
Permissions: []string{"catalog_access", "taxes_access", "members_access"},
})
if err != nil {
log.Fatal(err)
}
log.Printf("%+v", result)
}
func ptr[T any](value T) *T {
return &value
}use sumup::Client;
let client = Client::default();
let result = client.roles().create("MK10CL2A", sumup::CreateMerchantRoleBody{
name: "Senior Shop Manager II".to_string(),
permissions: vec!["catalog_access", "taxes_access", "members_access"],
}).await;{
"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"
}Content-Type: application/problem+json
Invalid request.
- typestringrequiredformat: uri
A 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: uri
A URI reference that identifies the specific occurrence of the problem.
Example:"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
Content-Type: application/problem+json
Merchant not found.
- typestringrequiredformat: uri
A 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: uri
A URI reference that identifies the specific occurrence of the problem.
Example:"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
{
"type": "https://developer.sumup.com/problem/bad-request",
"title": "Bad Request",
"status": 400,
"detail": "Request validation failed."
}{
"type": "https://developer.sumup.com/problem/not-found",
"title": "Requested resource couldn't be found.",
"status": 404,
"detail": "The requested resource doesn't exist or does not belong to you."
}Retrieve a role
Retrieve a custom role by ID.
user.subaccountsroles.readPath Parameters
- merchant_codestringrequired
Short unique identifier for the merchant.
Example:"MK10CL2A" - role_idstringrequired
The ID of the role to retrieve.
Example:"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"
Response
Returns the Role object for a valid identifier. See Role object.
- idstringrequired
Unique identifier of the role.
Example:"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - namestringrequired
User-defined name of the role.
Example:"Senior Shop Manager II" - descriptionstring
User-defined description of the role.
Example:"Manges the shop and the employees." - permissions[]stringrequiredmax items: 100
List of permission granted by this role.
- is_predefinedbooleanrequired
True if the role is provided by SumUp.
Example:true - metadataobjectmax properties: 64
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:{} - created_atstringrequiredformat: date-time
The timestamp of when the role was created.
Example:"2023-01-20T15:16:17Z" - updated_atstringrequiredformat: date-time
The timestamp of when the role was last updated.
Example:"2023-01-20T15:16:17Z"
curl https://api.sumup.com/v0.1/merchants/{merchant_code}/roles/{role_id} \
-X GET \
-H "Authorization: Bearer $SUMUP_API_KEY"import SumUp from '@sumup/sdk';
const client = new SumUp();
const result = await client.roles.get("MK10CL2A", "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP");using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Threading.Tasks;
using SumUp;
public static class Program
{
public static async Task Main()
{
using var client = new SumUpClient();
var response = await client.Roles.GetAsync(
"your-merchant-code",
"example-id");
Console.WriteLine(response.StatusCode);
}
}import com.sumup.sdk.SumUpClient;
public final class GetMerchantRoleSample {
public static void main(String[] args) throws Exception {
var client = new SumUpClient();
var result = client.roles().get(
"MK10CL2A",
"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"
);
System.out.println(result);
}
}import os
import sumup
def main() -> None:
client = sumup.Sumup(api_key=os.environ["SUMUP_API_KEY"])
result = client.roles.get(
"MK10CL2A",
"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
)
print(result)
if __name__ == "__main__":
main()<?php
$sumup = new \SumUp\SumUp();
$result = $sumup->roles->get('MK10CL2A', 'role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP');package main
import (
"context"
"log"
"github.com/sumup/sumup-go"
)
func main() {
ctx := context.Background()
client := sumup.NewClient()
result, err := client.Roles.Get(ctx, "MK10CL2A", "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP")
if err != nil {
log.Fatal(err)
}
log.Printf("%+v", result)
}use sumup::Client;
let client = Client::default();
let result = client.roles().get("MK10CL2A", "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP").await;{
"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"
}Content-Type: application/problem+json
Merchant or role not found.
- typestringrequiredformat: uri
A 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: uri
A URI reference that identifies the specific occurrence of the problem.
Example:"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
{
"type": "https://developer.sumup.com/problem/not-found",
"title": "Requested resource couldn't be found.",
"status": 404,
"detail": "The requested resource doesn't exist or does not belong to you."
}Update a role
Update a custom role.
user.subaccountsroles.writePath Parameters
- merchant_codestringrequired
Short unique identifier for the merchant.
Example:"MK10CL2A" - role_idstringrequired
The ID of the role to retrieve.
Example:"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"
Body Parameters
- namestring
User-defined name of the role.
Example:"Senior Shop Manager II" - permissions[]stringmax items: 100
User's permissions.
- descriptionstring
User-defined description of the role.
Example:"Manges the shop and the employees."
Response
Returns the updated Role object if the update succeeded. See Role object.
- idstringrequired
Unique identifier of the role.
Example:"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - namestringrequired
User-defined name of the role.
Example:"Senior Shop Manager II" - descriptionstring
User-defined description of the role.
Example:"Manges the shop and the employees." - permissions[]stringrequiredmax items: 100
List of permission granted by this role.
- is_predefinedbooleanrequired
True if the role is provided by SumUp.
Example:true - metadataobjectmax properties: 64
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:{} - created_atstringrequiredformat: date-time
The timestamp of when the role was created.
Example:"2023-01-20T15:16:17Z" - updated_atstringrequiredformat: date-time
The timestamp of when the role was last updated.
Example:"2023-01-20T15:16:17Z"
curl https://api.sumup.com/v0.1/merchants/{merchant_code}/roles/{role_id} \
-X PATCH \
-H "Authorization: Bearer $SUMUP_API_KEY" \
--json '{
"name": "Senior Shop Manager III",
"permissions": [
"catalog_edit",
"taxes_access",
"members_edit"
]
}'import SumUp from '@sumup/sdk';
const client = new SumUp();
const result = await client.roles.update("MK10CL2A", "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP", {
name: "Senior Shop Manager III",
permissions: ["catalog_edit","taxes_access","members_edit"],
});using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Threading.Tasks;
using SumUp;
public static class Program
{
public static async Task Main()
{
using var client = new SumUpClient();
var response = await client.Roles.UpdateAsync(
"your-merchant-code",
"example-id",
JsonSerializer.Deserialize<RolesUpdateRequest>(@"{""name"":""Senior Shop Manager III"",""permissions"":[""catalog_edit"",""taxes_access"",""members_edit""]}")!);
Console.WriteLine(response.StatusCode);
}
}import com.sumup.sdk.SumUpClient;
public final class UpdateMerchantRoleSample {
public static void main(String[] args) throws Exception {
var client = new SumUpClient();
var result = client.roles().update(
"MK10CL2A",
"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
com.sumup.sdk.models.UpdateMerchantRoleRequest.builder()
.name("Senior Shop Manager III")
.permissions(java.util.List.of("catalog_edit", "taxes_access", "members_edit"))
.build()
);
System.out.println(result);
}
}import os
import sumup
def main() -> None:
client = sumup.Sumup(api_key=os.environ["SUMUP_API_KEY"])
result = client.roles.update(
"MK10CL2A",
"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
name="Senior Shop Manager III",
permissions=[
"catalog_edit",
"taxes_access",
"members_edit",
],
)
print(result)
if __name__ == "__main__":
main()<?php
$sumup = new \SumUp\SumUp();
$result = $sumup->roles->update('MK10CL2A', 'role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP', [
'name' => 'Senior Shop Manager III',
'permissions' => [ 'catalog_edit', 'taxes_access', 'members_edit'],
]);package main
import (
"context"
"log"
"github.com/sumup/sumup-go"
)
func main() {
ctx := context.Background()
client := sumup.NewClient()
result, err := client.Roles.Update(ctx, "MK10CL2A", "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP", sumup.RolesUpdateParams{
Name: ptr("Senior Shop Manager III"),
Permissions: []string{"catalog_edit", "taxes_access", "members_edit"},
})
if err != nil {
log.Fatal(err)
}
log.Printf("%+v", result)
}
func ptr[T any](value T) *T {
return &value
}use sumup::Client;
let client = Client::default();
let result = client.roles().update("MK10CL2A", "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP", sumup::UpdateMerchantRoleBody{
name: "Senior Shop Manager III".to_string(),
permissions: vec!["catalog_edit", "taxes_access", "members_edit"],
}).await;{
"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"
}Content-Type: application/problem+json
Invalid request.
- typestringrequiredformat: uri
A 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: uri
A URI reference that identifies the specific occurrence of the problem.
Example:"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
Content-Type: application/problem+json
Merchant not found.
- typestringrequiredformat: uri
A 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: uri
A URI reference that identifies the specific occurrence of the problem.
Example:"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
{
"type": "https://developer.sumup.com/problem/bad-request",
"title": "Bad Request",
"status": 400,
"detail": "Request validation failed."
}{
"type": "https://developer.sumup.com/problem/not-found",
"title": "Requested resource couldn't be found.",
"status": 404,
"detail": "The requested resource doesn't exist or does not belong to you."
}Delete a role
Delete a custom role.
user.subaccountsroles.writePath Parameters
- merchant_codestringrequired
Short unique identifier for the merchant.
Example:"MK10CL2A" - role_idstringrequired
The ID of the role to retrieve.
Example:"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"
Response
Returns empty response.
curl https://api.sumup.com/v0.1/merchants/{merchant_code}/roles/{role_id} \
-X DELETE \
-H "Authorization: Bearer $SUMUP_API_KEY"import SumUp from '@sumup/sdk';
const client = new SumUp();
const result = await client.roles.delete("MK10CL2A", "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP");using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Threading.Tasks;
using SumUp;
public static class Program
{
public static async Task Main()
{
using var client = new SumUpClient();
var response = await client.Roles.DeleteAsync(
"your-merchant-code",
"example-id");
Console.WriteLine(response.StatusCode);
}
}import com.sumup.sdk.SumUpClient;
public final class DeleteMerchantRoleSample {
public static void main(String[] args) throws Exception {
var client = new SumUpClient();
client.roles().delete(
"MK10CL2A",
"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"
);
}
}import os
import sumup
def main() -> None:
client = sumup.Sumup(api_key=os.environ["SUMUP_API_KEY"])
client.roles.delete(
"MK10CL2A",
"role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
)
if __name__ == "__main__":
main()<?php
$sumup = new \SumUp\SumUp();
$result = $sumup->roles->delete('MK10CL2A', 'role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP');package main
import (
"context"
"log"
"github.com/sumup/sumup-go"
)
func main() {
ctx := context.Background()
client := sumup.NewClient()
if err := client.Roles.Delete(ctx, "MK10CL2A", "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"); err != nil {
log.Fatal(err)
}
}use sumup::Client;
let client = Client::default();
let result = client.roles().delete("MK10CL2A", "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP").await;Content-Type: application/problem+json
Invalid request.
- typestringrequiredformat: uri
A 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: uri
A URI reference that identifies the specific occurrence of the problem.
Example:"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
Content-Type: application/problem+json
Merchant not found.
- typestringrequiredformat: uri
A 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: uri
A URI reference that identifies the specific occurrence of the problem.
Example:"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
{
"type": "https://developer.sumup.com/problem/bad-request",
"title": "Bad Request",
"status": 400,
"detail": "Request validation failed."
}{
"type": "https://developer.sumup.com/problem/not-found",
"title": "Requested resource couldn't be found.",
"status": 404,
"detail": "The requested resource doesn't exist or does not belong to you."
}