Endpoints to manage account members. Members are users that have membership within merchant accounts.
List members
GET/v0.1/merchants/{merchant_code}/membersCreate a member
POST/v0.1/merchants/{merchant_code}/membersRetrieve a member
GET/v0.1/merchants/{merchant_code}/members/{member_id}Update a member
PUT/v0.1/merchants/{merchant_code}/members/{member_id}Delete a member
DELETE/v0.1/merchants/{merchant_code}/members/{member_id}
The Member object
A member is user within specific resource identified by resource id, resource type, and associated roles.
- idstringrequired
ID of the member.
Example:"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - roles[]stringrequired
User's roles.
- permissions[]stringrequireddeprecated
Permissions include only legacy permissions, please use roles instead. Member access is based on roles within a given resource and the permissions these roles grant.
User's permissions.
- created_atstringrequiredformat: date-time
The timestamp of when the member was created.
Example:"2023-01-20T15:16:17Z" - updated_atstringrequiredformat: date-time
The timestamp of when the member was last updated.
Example:"2023-01-20T15:16:17Z" - userobject
Information about the user associated with the membership.
CloseAttributes- idstringrequired
Identifier for the End-User (also called Subject).
Example:"44ca0f5b-813b-46e1-aee7-e6242010662e" - typestringrequiredOptions:
usermanaged_userservice_accountsystem_accountType of the user account.
Example:"user" - emailstringrequired
End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, for unique identification use ID instead.
Example:"example@sumup.com" - mfa_on_login_enabledbooleanrequired
True if the user has enabled MFA on login.
Example:true - virtual_userbooleanrequireddeprecated
Rely on
typeinstead.True if the user is a virtual user (operator).
- service_account_userbooleanrequireddeprecated
Rely on
typeinstead.True if the user is a service account.
- disabled_atstringformat: date-time
Time when the user has been disabled. Applies only to virtual users (
virtual_user: true). - nicknamestring
User's nickname. Used for display purposes only.
Example:"Test User" - picturestringformat: uri
URL of the End-User's profile picture. This URL refers to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image.
Example:"https://usercontent.sumup.com/44ca0f5b-813b-46e1-aee7-e6242010662e.png" - classicobjectdeprecated
Classic identifiers of the user.
CloseAttributes- user_idintegerrequiredminimum: 0, maximum: 2147483647
- inviteInvite
Pending invitation for membership.
CloseInvite- emailstringrequiredformat: email
Email address of the invited user.
Example:"boaty.mcboatface@sumup.com" - expires_atstringrequiredformat: date-timeExample:
"2023-01-20T15:16:17Z"
- statusstringrequiredOptions:
acceptedpendingexpireddisabledunknownThe status of the membership.
- 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:{} - attributesobject
Object attributes that are modifiable only by SumUp applications.
Example:{}
{
"id": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
"roles": [
"role_admin",
"role_owner"
],
"permissions": [
"members_read",
"members_write",
"create_moto_payments",
"full_transaction_history_view",
"refund_transactions",
"create_referral",
"developer_settings_edit",
"developer_settings_access"
],
"created_at": "2023-01-20T15:16:17Z",
"updated_at": "2023-02-20T15:16:17Z",
"user": {
"id": "44ca0f5b-813b-46e1-aee7-e6242010662e",
"email": "example@sumup.com",
"mfa_on_login_enabled": true,
"virtual_user": false,
"service_account_user": false
},
"status": "accepted"
}List members
Lists merchant members.
user.subaccountsmembers.readPath Parameters
- merchant_codestringrequired
Short unique identifier for the merchant.
Example:"MK10CL2A"
Query Parameters
- offsetintegerminimum: 0, default:
0Offset of the first member to return.
Example:0 - limitintegerminimum: 1, maximum: 25, default:
10Maximum number of members to return.
Example:10 - scrollbooleandefault:
falseIndicates to skip count query.
Example:true - emailstring
Filter the returned members by email address prefix.
Example:"user" - user.idstringformat: uuid
Search for a member by user id.
Example:"245b2ead-85bf-45ff-856f-311a88a5d454" - statusstringOptions:
acceptedpendingexpireddisabledunknownFilter the returned members by the membership status.
- roles[]string
Filter the returned members by role.
Example:["role_employee","role_accountant"]
Response
Returns a list of Member objects. See Member object.
- items[]Memberrequired
A member is user within specific resource identified by resource id, resource type, and associated roles.
CloseMember- idstringrequired
ID of the member.
Example:"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - roles[]stringrequired
User's roles.
- permissions[]stringrequireddeprecated
Permissions include only legacy permissions, please use roles instead. Member access is based on roles within a given resource and the permissions these roles grant.
User's permissions.
- created_atstringrequiredformat: date-time
The timestamp of when the member was created.
Example:"2023-01-20T15:16:17Z" - updated_atstringrequiredformat: date-time
The timestamp of when the member was last updated.
Example:"2023-01-20T15:16:17Z" - userobject
Information about the user associated with the membership.
CloseAttributes- idstringrequired
Identifier for the End-User (also called Subject).
Example:"44ca0f5b-813b-46e1-aee7-e6242010662e" - typestringrequiredOptions:
usermanaged_userservice_accountsystem_accountType of the user account.
Example:"user" - emailstringrequired
End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, for unique identification use ID instead.
Example:"example@sumup.com" - mfa_on_login_enabledbooleanrequired
True if the user has enabled MFA on login.
Example:true - virtual_userbooleanrequireddeprecated
Rely on
typeinstead.True if the user is a virtual user (operator).
- service_account_userbooleanrequireddeprecated
Rely on
typeinstead.True if the user is a service account.
- disabled_atstringformat: date-time
Time when the user has been disabled. Applies only to virtual users (
virtual_user: true). - nicknamestring
User's nickname. Used for display purposes only.
Example:"Test User" - picturestringformat: uri
URL of the End-User's profile picture. This URL refers to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image.
Example:"https://usercontent.sumup.com/44ca0f5b-813b-46e1-aee7-e6242010662e.png" - classicobjectdeprecated
Classic identifiers of the user.
CloseAttributes- user_idintegerrequiredminimum: 0, maximum: 2147483647
- inviteInvite
Pending invitation for membership.
CloseInvite- emailstringrequiredformat: email
Email address of the invited user.
Example:"boaty.mcboatface@sumup.com" - expires_atstringrequiredformat: date-timeExample:
"2023-01-20T15:16:17Z"
- statusstringrequiredOptions:
acceptedpendingexpireddisabledunknownThe status of the membership.
- 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:{} - attributesobject
Object attributes that are modifiable only by SumUp applications.
Example:{}
- total_countintegerExample:
3
curl https://api.sumup.com/v0.1/merchants/{merchant_code}/members \
-X GET \
-H "Authorization: Bearer $SUMUP_API_KEY"import SumUp from '@sumup/sdk';
const client = new SumUp();
const result = await client.members.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.Members.ListAsync(
"your-merchant-code",
new MembersListOptions
{
Offset = 10,
Limit = 10,
Scroll = true,
Email = "merchant@example.com",
UserId = Guid.Parse("00000000-0000-0000-0000-000000000001"),
Status = MembershipStatus.Accepted,
Roles = Array.Empty<string>(),
});
Console.WriteLine(response.StatusCode);
}
}import com.sumup.sdk.SumUpClient;
public final class ListMerchantMembersSample {
public static void main(String[] args) throws Exception {
var client = new SumUpClient();
var result = client.members().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.members.list(
"MK10CL2A",
offset=0,
limit=10,
scroll=True,
email="user",
user_id="245b2ead-85bf-45ff-856f-311a88a5d454",
status="accepted",
roles=[
"role_employee",
"role_accountant",
],
)
print(result)
if __name__ == "__main__":
main()<?php
$sumup = new \SumUp\SumUp();
$result = $sumup->members->list('MK10CL2A');package main
import (
"context"
"log"
"github.com/sumup/sumup-go"
)
func main() {
ctx := context.Background()
client := sumup.NewClient()
result, err := client.Members.List(ctx, "MK10CL2A", sumup.MembersListParams{
Offset: ptr(0),
Limit: ptr(10),
Scroll: ptr(true),
Email: ptr("user"),
UserID: ptr("245b2ead-85bf-45ff-856f-311a88a5d454"),
Status: ptr(sumup.MembershipStatus("accepted")),
Roles: []string{"role_employee", "role_accountant"},
})
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.members().list("MK10CL2A", sumup::ListMerchantMembersParams{
offset: Some(0),
limit: Some(10),
scroll: Some(true),
email: Some("user".to_string()),
user_id: Some("245b2ead-85bf-45ff-856f-311a88a5d454".to_string()),
status: Some("status".to_string()),
roles: Some(["role_employee","role_accountant"]),
}).await;{
"items": [
{
"id": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
"roles": [
"role_admin",
"role_owner"
],
"permissions": [
"members_read",
"members_write",
"create_moto_payments",
"full_transaction_history_view",
"refund_transactions",
"create_referral",
"developer_settings_edit",
"developer_settings_access"
],
"created_at": "2023-01-20T15:16:17Z",
"updated_at": "2023-02-20T15:16:17Z",
"user": {
"id": "44ca0f5b-813b-46e1-aee7-e6242010662e",
"email": "example@sumup.com",
"mfa_on_login_enabled": true,
"virtual_user": false,
"service_account_user": false
},
"status": "accepted"
}
],
"total_count": 3
}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 member
Create a merchant member.
user.subaccountsmembers.writePath Parameters
- merchant_codestringrequired
Short unique identifier for the merchant.
Example:"MK10CL2A"
Body Parameters
- is_managed_userboolean
True if the user is managed by the merchant. In this case, we'll created a virtual user with the provided password and nickname.
- emailstringrequiredmax length: 256, format: email
Email address of the member to add.
- passwordstringmin length: 8, format: password
Password of the member to add. Only used if
is_managed_useris true. In the case of service accounts, the password is not used and can not be defined by the caller. - nicknamestringmax length: 64
Nickname of the member to add. Only used if
is_managed_useris true. Used for display purposes only.Example:"Test User" - roles[]stringrequiredmax items: 124
List of roles to assign to the new member.
- 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:{} - attributesobject
Object attributes that are modifiable only by SumUp applications.
Example:{}
Response
Returns the Member object if the creation succeeded. See Member object.
- idstringrequired
ID of the member.
Example:"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - roles[]stringrequired
User's roles.
- permissions[]stringrequireddeprecated
Permissions include only legacy permissions, please use roles instead. Member access is based on roles within a given resource and the permissions these roles grant.
User's permissions.
- created_atstringrequiredformat: date-time
The timestamp of when the member was created.
Example:"2023-01-20T15:16:17Z" - updated_atstringrequiredformat: date-time
The timestamp of when the member was last updated.
Example:"2023-01-20T15:16:17Z" - userobject
Information about the user associated with the membership.
CloseAttributes- idstringrequired
Identifier for the End-User (also called Subject).
Example:"44ca0f5b-813b-46e1-aee7-e6242010662e" - typestringrequiredOptions:
usermanaged_userservice_accountsystem_accountType of the user account.
Example:"user" - emailstringrequired
End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, for unique identification use ID instead.
Example:"example@sumup.com" - mfa_on_login_enabledbooleanrequired
True if the user has enabled MFA on login.
Example:true - virtual_userbooleanrequireddeprecated
Rely on
typeinstead.True if the user is a virtual user (operator).
- service_account_userbooleanrequireddeprecated
Rely on
typeinstead.True if the user is a service account.
- disabled_atstringformat: date-time
Time when the user has been disabled. Applies only to virtual users (
virtual_user: true). - nicknamestring
User's nickname. Used for display purposes only.
Example:"Test User" - picturestringformat: uri
URL of the End-User's profile picture. This URL refers to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image.
Example:"https://usercontent.sumup.com/44ca0f5b-813b-46e1-aee7-e6242010662e.png" - classicobjectdeprecated
Classic identifiers of the user.
CloseAttributes- user_idintegerrequiredminimum: 0, maximum: 2147483647
- inviteInvite
Pending invitation for membership.
CloseInvite- emailstringrequiredformat: email
Email address of the invited user.
Example:"boaty.mcboatface@sumup.com" - expires_atstringrequiredformat: date-timeExample:
"2023-01-20T15:16:17Z"
- statusstringrequiredOptions:
acceptedpendingexpireddisabledunknownThe status of the membership.
- 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:{} - attributesobject
Object attributes that are modifiable only by SumUp applications.
Example:{}
curl https://api.sumup.com/v0.1/merchants/{merchant_code}/members \
-X POST \
-H "Authorization: Bearer $SUMUP_API_KEY" \
--json '{
"email": "karl.berg@example.com",
"roles": [
"role_employee"
]
}'import SumUp from '@sumup/sdk';
const client = new SumUp();
const result = await client.members.create("MK10CL2A", {
email: "karl.berg@example.com",
roles: ["role_employee"],
});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.Members.CreateAsync(
"your-merchant-code",
JsonSerializer.Deserialize<MembersCreateRequest>(@"{""email"":""karl.berg@example.com"",""roles"":[""role_employee""]}")!);
Console.WriteLine(response.StatusCode);
}
}import com.sumup.sdk.SumUpClient;
public final class CreateMerchantMemberSample {
public static void main(String[] args) throws Exception {
var client = new SumUpClient();
var result = client.members().create(
"MK10CL2A",
com.sumup.sdk.models.CreateMerchantMemberRequest.builder()
.email("karl.berg@example.com")
.roles(java.util.List.of("role_employee"))
.build()
);
System.out.println(result);
}
}import os
import sumup
def main() -> None:
client = sumup.Sumup(api_key=os.environ["SUMUP_API_KEY"])
result = client.members.create(
"MK10CL2A",
email="karl.berg@example.com",
roles=[
"role_employee",
],
)
print(result)
if __name__ == "__main__":
main()<?php
$sumup = new \SumUp\SumUp();
$result = $sumup->members->create('MK10CL2A', [
'email' => 'karl.berg@example.com',
'roles' => [ 'role_employee'],
]);package main
import (
"context"
"log"
"github.com/sumup/sumup-go"
)
func main() {
ctx := context.Background()
client := sumup.NewClient()
result, err := client.Members.Create(ctx, "MK10CL2A", sumup.MembersCreateParams{
Email: "karl.berg@example.com",
Roles: []string{"role_employee"},
})
if err != nil {
log.Fatal(err)
}
log.Printf("%+v", result)
}use sumup::Client;
let client = Client::default();
let result = client.members().create("MK10CL2A", sumup::CreateMerchantMemberBody{
email: "karl.berg@example.com".to_string(),
roles: vec!["role_employee"],
}).await;{
"id": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
"roles": [
"role_admin",
"role_owner"
],
"permissions": [
"members_read",
"members_write",
"create_moto_payments",
"full_transaction_history_view",
"refund_transactions",
"create_referral",
"developer_settings_edit",
"developer_settings_access"
],
"created_at": "2023-01-20T15:16:17Z",
"updated_at": "2023-02-20T15:16:17Z",
"user": {
"id": "44ca0f5b-813b-46e1-aee7-e6242010662e",
"email": "example@sumup.com",
"mfa_on_login_enabled": true,
"virtual_user": false,
"service_account_user": false
},
"status": "accepted"
}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"
Content-Type: application/problem+json
Too many invitations were sent to that user and the rate limit was exceeded. The Retry-After header indicates when the client can retry.
- 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."
}{
"type": "https://developer.sumup.com/problem/too-many-requests",
"title": "Too Many Requests",
"status": 429,
"detail": "Too many requests were sent. Please try again later."
}Retrieve a member
Retrieve a merchant member.
user.subaccountsmembers.readPath Parameters
- merchant_codestringrequired
Short unique identifier for the merchant.
Example:"MK10CL2A" - member_idstringrequired
The ID of the member to retrieve.
Example:"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"
Response
Returns the Member object for a valid identifier. See Member object.
- idstringrequired
ID of the member.
Example:"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - roles[]stringrequired
User's roles.
- permissions[]stringrequireddeprecated
Permissions include only legacy permissions, please use roles instead. Member access is based on roles within a given resource and the permissions these roles grant.
User's permissions.
- created_atstringrequiredformat: date-time
The timestamp of when the member was created.
Example:"2023-01-20T15:16:17Z" - updated_atstringrequiredformat: date-time
The timestamp of when the member was last updated.
Example:"2023-01-20T15:16:17Z" - userobject
Information about the user associated with the membership.
CloseAttributes- idstringrequired
Identifier for the End-User (also called Subject).
Example:"44ca0f5b-813b-46e1-aee7-e6242010662e" - typestringrequiredOptions:
usermanaged_userservice_accountsystem_accountType of the user account.
Example:"user" - emailstringrequired
End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, for unique identification use ID instead.
Example:"example@sumup.com" - mfa_on_login_enabledbooleanrequired
True if the user has enabled MFA on login.
Example:true - virtual_userbooleanrequireddeprecated
Rely on
typeinstead.True if the user is a virtual user (operator).
- service_account_userbooleanrequireddeprecated
Rely on
typeinstead.True if the user is a service account.
- disabled_atstringformat: date-time
Time when the user has been disabled. Applies only to virtual users (
virtual_user: true). - nicknamestring
User's nickname. Used for display purposes only.
Example:"Test User" - picturestringformat: uri
URL of the End-User's profile picture. This URL refers to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image.
Example:"https://usercontent.sumup.com/44ca0f5b-813b-46e1-aee7-e6242010662e.png" - classicobjectdeprecated
Classic identifiers of the user.
CloseAttributes- user_idintegerrequiredminimum: 0, maximum: 2147483647
- inviteInvite
Pending invitation for membership.
CloseInvite- emailstringrequiredformat: email
Email address of the invited user.
Example:"boaty.mcboatface@sumup.com" - expires_atstringrequiredformat: date-timeExample:
"2023-01-20T15:16:17Z"
- statusstringrequiredOptions:
acceptedpendingexpireddisabledunknownThe status of the membership.
- 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:{} - attributesobject
Object attributes that are modifiable only by SumUp applications.
Example:{}
curl https://api.sumup.com/v0.1/merchants/{merchant_code}/members/{member_id} \
-X GET \
-H "Authorization: Bearer $SUMUP_API_KEY"import SumUp from '@sumup/sdk';
const client = new SumUp();
const result = await client.members.get("MK10CL2A", "mem_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.Members.GetAsync(
"your-merchant-code",
"example-id");
Console.WriteLine(response.StatusCode);
}
}import com.sumup.sdk.SumUpClient;
public final class GetMerchantMemberSample {
public static void main(String[] args) throws Exception {
var client = new SumUpClient();
var result = client.members().get(
"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
"MK10CL2A"
);
System.out.println(result);
}
}import os
import sumup
def main() -> None:
client = sumup.Sumup(api_key=os.environ["SUMUP_API_KEY"])
result = client.members.get(
"MK10CL2A",
"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
)
print(result)
if __name__ == "__main__":
main()<?php
$sumup = new \SumUp\SumUp();
$result = $sumup->members->get('MK10CL2A', 'mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP');package main
import (
"context"
"log"
"github.com/sumup/sumup-go"
)
func main() {
ctx := context.Background()
client := sumup.NewClient()
result, err := client.Members.Get(ctx, "MK10CL2A", "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP")
if err != nil {
log.Fatal(err)
}
log.Printf("%+v", result)
}use sumup::Client;
let client = Client::default();
let result = client.members().get("MK10CL2A", "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP").await;{
"id": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
"roles": [
"role_admin",
"role_owner"
],
"permissions": [
"members_read",
"members_write",
"create_moto_payments",
"full_transaction_history_view",
"refund_transactions",
"create_referral",
"developer_settings_edit",
"developer_settings_access"
],
"created_at": "2023-01-20T15:16:17Z",
"updated_at": "2023-02-20T15:16:17Z",
"user": {
"id": "44ca0f5b-813b-46e1-aee7-e6242010662e",
"email": "example@sumup.com",
"mfa_on_login_enabled": true,
"virtual_user": false,
"service_account_user": false
},
"status": "accepted"
}Content-Type: application/problem+json
Merchant or member 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 member
Update the merchant member.
user.subaccountsmembers.writePath Parameters
- merchant_codestringrequired
Short unique identifier for the merchant.
Example:"MK10CL2A" - member_idstringrequired
The ID of the member to retrieve.
Example:"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"
Body Parameters
- roles[]stringmax items: 124
- 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:{} - attributesobject
Object attributes that are modifiable only by SumUp applications.
Example:{} - userobject
Allows you to update user data of managed users.
CloseAttributes- nicknamestringmax length: 64
User's nickname. Used for display purposes only.
Example:"Test User" - passwordstringmin length: 8, format: password
Password of the member to add. Only used if
is_managed_useris true.
Response
Returns the updated Member object if the update succeeded. See Member object.
- idstringrequired
ID of the member.
Example:"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - roles[]stringrequired
User's roles.
- permissions[]stringrequireddeprecated
Permissions include only legacy permissions, please use roles instead. Member access is based on roles within a given resource and the permissions these roles grant.
User's permissions.
- created_atstringrequiredformat: date-time
The timestamp of when the member was created.
Example:"2023-01-20T15:16:17Z" - updated_atstringrequiredformat: date-time
The timestamp of when the member was last updated.
Example:"2023-01-20T15:16:17Z" - userobject
Information about the user associated with the membership.
CloseAttributes- idstringrequired
Identifier for the End-User (also called Subject).
Example:"44ca0f5b-813b-46e1-aee7-e6242010662e" - typestringrequiredOptions:
usermanaged_userservice_accountsystem_accountType of the user account.
Example:"user" - emailstringrequired
End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, for unique identification use ID instead.
Example:"example@sumup.com" - mfa_on_login_enabledbooleanrequired
True if the user has enabled MFA on login.
Example:true - virtual_userbooleanrequireddeprecated
Rely on
typeinstead.True if the user is a virtual user (operator).
- service_account_userbooleanrequireddeprecated
Rely on
typeinstead.True if the user is a service account.
- disabled_atstringformat: date-time
Time when the user has been disabled. Applies only to virtual users (
virtual_user: true). - nicknamestring
User's nickname. Used for display purposes only.
Example:"Test User" - picturestringformat: uri
URL of the End-User's profile picture. This URL refers to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image.
Example:"https://usercontent.sumup.com/44ca0f5b-813b-46e1-aee7-e6242010662e.png" - classicobjectdeprecated
Classic identifiers of the user.
CloseAttributes- user_idintegerrequiredminimum: 0, maximum: 2147483647
- inviteInvite
Pending invitation for membership.
CloseInvite- emailstringrequiredformat: email
Email address of the invited user.
Example:"boaty.mcboatface@sumup.com" - expires_atstringrequiredformat: date-timeExample:
"2023-01-20T15:16:17Z"
- statusstringrequiredOptions:
acceptedpendingexpireddisabledunknownThe status of the membership.
- 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:{} - attributesobject
Object attributes that are modifiable only by SumUp applications.
Example:{}
curl https://api.sumup.com/v0.1/merchants/{merchant_code}/members/{member_id} \
-X PUT \
-H "Authorization: Bearer $SUMUP_API_KEY" \
--json '{
"Update member\'s role": {
"roles": [
"role_manager"
]
},
"Update managed user": {
"user": {
"nickname": "New Employee Name"
}
}
}'import SumUp from '@sumup/sdk';
const client = new SumUp();
const result = await client.members.update("MK10CL2A", "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP", {
Update member's role: {"roles":["role_manager"]},
Update managed user: {"user":{"nickname":"New Employee Name"}},
});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.Members.UpdateAsync(
"your-merchant-code",
"example-id",
JsonSerializer.Deserialize<MembersUpdateRequest>(@"{""Update managed user"":{""user"":{""nickname"":""New Employee Name""}},""Update member's role"":{""roles"":[""role_manager""]}}")!);
Console.WriteLine(response.StatusCode);
}
}import com.sumup.sdk.SumUpClient;
public final class UpdateMerchantMemberSample {
public static void main(String[] args) throws Exception {
var client = new SumUpClient();
var result = client.members().update(
"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
"MK10CL2A",
com.sumup.sdk.models.UpdateMerchantMemberRequest.builder()
.build()
);
System.out.println(result);
}
}import os
import sumup
def main() -> None:
client = sumup.Sumup(api_key=os.environ["SUMUP_API_KEY"])
result = client.members.update(
"MK10CL2A",
"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
)
print(result)
if __name__ == "__main__":
main()<?php
$sumup = new \SumUp\SumUp();
$result = $sumup->members->update('MK10CL2A', 'mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP', [
'Update member's role' => [
'roles' => [ 'role_manager'],
],
'Update managed user' => [
'user' => [
'nickname' => 'New Employee Name',
],
],
]);package main
import (
"context"
"log"
"github.com/sumup/sumup-go"
)
func main() {
ctx := context.Background()
client := sumup.NewClient()
result, err := client.Members.Update(ctx, "MK10CL2A", "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP", sumup.MembersUpdateParams{})
if err != nil {
log.Fatal(err)
}
log.Printf("%+v", result)
}use sumup::Client;
let client = Client::default();
let result = client.members().update("MK10CL2A", "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP", sumup::UpdateMerchantMemberBody{
update_member_s_role: {"roles":["role_manager"]},
update_managed_user: {"user":{"nickname":"New Employee Name"}},
}).await;{
"id": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
"roles": [
"role_admin",
"role_owner"
],
"permissions": [
"members_read",
"members_write",
"create_moto_payments",
"full_transaction_history_view",
"refund_transactions",
"create_referral",
"developer_settings_edit",
"developer_settings_access"
],
"created_at": "2023-01-20T15:16:17Z",
"updated_at": "2023-02-20T15:16:17Z",
"user": {
"id": "44ca0f5b-813b-46e1-aee7-e6242010662e",
"email": "example@sumup.com",
"mfa_on_login_enabled": true,
"virtual_user": false,
"service_account_user": false
},
"status": "accepted"
}Content-Type: application/problem+json
Cannot set password or nickname for an invited user.
- 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
Cannot change password for managed user. Password was already used before.
- 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 or member 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"
Content-Type: application/problem+json
Cannot update member as some data conflict with existing members.
- 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/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "You do not have permission to perform this action."
}{
"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."
}{
"type": "https://developer.sumup.com/problem/conflict",
"title": "Conflict",
"status": 409,
"detail": "The request conflicts with the current state of the resource."
}Delete a member
Deletes a merchant member.
user.subaccountsmembers.writePath Parameters
- merchant_codestringrequired
Short unique identifier for the merchant.
Example:"MK10CL2A" - member_idstringrequired
The ID of the member to retrieve.
Example:"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"
Response
Returns empty response.
curl https://api.sumup.com/v0.1/merchants/{merchant_code}/members/{member_id} \
-X DELETE \
-H "Authorization: Bearer $SUMUP_API_KEY"import SumUp from '@sumup/sdk';
const client = new SumUp();
const result = await client.members.delete("MK10CL2A", "mem_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.Members.DeleteAsync(
"your-merchant-code",
"example-id");
Console.WriteLine(response.StatusCode);
}
}import com.sumup.sdk.SumUpClient;
public final class DeleteMerchantMemberSample {
public static void main(String[] args) throws Exception {
var client = new SumUpClient();
client.members().delete(
"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
"MK10CL2A"
);
}
}import os
import sumup
def main() -> None:
client = sumup.Sumup(api_key=os.environ["SUMUP_API_KEY"])
client.members.delete(
"MK10CL2A",
"mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
)
if __name__ == "__main__":
main()<?php
$sumup = new \SumUp\SumUp();
$result = $sumup->members->delete('MK10CL2A', 'mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP');package main
import (
"context"
"log"
"github.com/sumup/sumup-go"
)
func main() {
ctx := context.Background()
client := sumup.NewClient()
if err := client.Members.Delete(ctx, "MK10CL2A", "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"); err != nil {
log.Fatal(err)
}
}use sumup::Client;
let client = Client::default();
let result = client.members().delete("MK10CL2A", "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP").await;Content-Type: application/problem+json
Member deletion was forbidden.
- 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 or member 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/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "You do not have permission to perform this action."
}{
"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."
}