Memberships

List memberships

Changed on

List memberships of the current user.

get/v0.1/memberships

Request

  • Base URL
    https://api.sumup.com
  • URL
    https://api.sumup.com/v0.1/memberships
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: https://api.sumup.com/authorize
      Token URL: https://api.sumup.com/token scopes: user.profile, user.profile_readonly

Query parameters

offsetinteger

Offset of the first member to return.

limitinteger
Example:10

Maximum number of members to return.

kindstring

The type of the membership resource. Possible values are:

  • merchant - merchant account(s)
  • organization - organization(s)
Example:merchant

Filter memberships by resource kind.

status'accepted' | 'pending' | 'expired' | 'disabled' | 'unknown'

The status of the membership.

Filter the returned memberships by the membership status.

resource.typestring

The type of the membership resource. Possible values are:

  • merchant - merchant account(s)
  • organization - organization(s)
Example:merchant

Filter memberships by resource kind.

resource.attributes.sandboxboolean

Filter memberships by the sandbox status of the resource the membership is in.

resource.namestring

Filter memberships by the name of the resource the membership is in.

resource.idstring

Filter memberships by the ID of the resource the membership is in.

resource.parent.idstring

Filter memberships by the parent of the resource the membership is in. Omit both resource.parent.id and resource.parent.type to skip parent filtering. When filtering by parent, both parameters must be present. To select resources without a parent, set each parameter to an empty value. Otherwise, both parameters must identify a parent.

resource.parent.typestring

The type of the membership resource. Possible values are:

  • merchant - merchant account(s)
  • organization - organization(s)
Example:merchant

Filter memberships by the parent of the resource the membership is in. Omit both resource.parent.id and resource.parent.type to skip parent filtering. When filtering by parent, both parameters must be present. To select resources without a parent, set each parameter to an empty value. Otherwise, both parameters must identify a parent.

rolesstring[]

Filter the returned memberships by role.

[
  "role_employee",
  "role_accountant"
]

Response

Returns a list of Membership objects.

total_countinteger required

Example response

{
  "items": [
    {
      "id": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP",
      "resource_id": "M2DDT39A",
      "type": "merchant",
      "roles": [
        "role_admin"
      ],
      "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-01-20T15:16:17Z",
      "invite": {
        "email": "boaty.mcboatface@sumup.com",
        "expires_at": "2023-01-20T15:16:17Z"
      },
      "metadata": {},
      "attributes": {},
      "resource": {
        "id": "M2DDT39A",
        "type": "merchant",
        "name": "Acme Corp",
        "logo": "https://images.sumup.com/img_2x4y6z8a0b1c2d3e4f5g6h7j8k.png",
        "created_at": "2023-01-20T15:16:17Z",
        "updated_at": "2023-01-20T15:16:17Z",
        "attributes": {}
      }
    }
  ],
  "total_count": 3
}

Changes