List memberships

GET/v0.1/memberships

List memberships of the current user.

OAuth scopes: Requires one of: user.profile, user.profile_readonly.

Authorization

Use one of the following alternatives:

  • apiKey
  • oauth2 with scopes user.profileuser.profile_readonly
Authorization guide

Query parameters

  • offsetinteger
    minimum: 0default: 0

    Offset of the first member to return.

    Example: 0

  • limitinteger
    minimum: 1maximum: 25default: 10

    Maximum number of members to return.

    Example: 10

  • kindstring

    Filter memberships by resource kind.

    Example: "merchant"

  • statusstring
    Options:"accepted""pending""expired""disabled""unknown"

    Filter the returned memberships by the membership status.

  • typestring

    Filter memberships by resource kind.

    Example: "merchant"

  • sandboxboolean

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

  • namestring

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

  • idstring

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

  • 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.

  • typestring

    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.

    Example: "merchant"

  • rolesarray<string>

    Filter the returned memberships by role.

    Example: ["role_employee","role_accountant"]

Responses

200application/json

Returns a list of Membership objects.

  • itemsarray<object>required
    Show 12 properties
    • idstringrequired

      ID of the membership.

      Example: "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP"

    • resource_idstringrequired

      ID of the resource the membership is in.

      Example: "M2DDT39A"

    • typestringrequired

      The type of the membership resource. Possible values are:

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

      Example: "merchant"

    • rolesarray<string>required

      User's roles.

      Example: ["role_admin"]

    • permissionsarray<string>requireddeprecated

      User's permissions.

      Example: ["members_read","members_write","create_moto_payments","full_transaction_history_view","refund_transactions","create_referral","developer_settings_edit","developer_settings_access"]

    • created_atstringrequired
      format: date-time

      The timestamp of when the membership was created.

      Example: "2023-01-20T15:16:17Z"

    • updated_atstringrequired
      format: date-time

      The timestamp of when the membership was last updated.

      Example: "2023-01-20T15:16:17Z"

    • statusstringrequired
      Options:"accepted""pending""expired""disabled""unknown"

      The status of the membership.

    • resourceobjectrequired

      Information about the resource the membership is in.

      Show 7 properties
      • idstringrequired

        ID of the resource the membership is in.

        Example: "M2DDT39A"

      • typestringrequired

        The type of the membership resource. Possible values are:

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

        Example: "merchant"

      • namestringrequired

        Display name of the resource.

        Example: "Acme Corp"

      • created_atstringrequired
        format: date-time

        The timestamp of when the membership resource was created.

        Example: "2023-01-20T15:16:17Z"

      • updated_atstringrequired
        format: date-time

        The timestamp of when the membership resource was last updated.

        Example: "2023-01-20T15:16:17Z"

      • Object attributes that are modifiable only by SumUp applications.

        Example: {}

    • inviteobject

      Pending invitation for membership.

      Show 2 properties
      • emailstringrequired
        format: email

        Email address of the invited user.

        Example: "boaty.mcboatface@sumup.com"

      • expires_atstringrequired
        format: date-time

        Example: "2023-01-20T15:16:17Z"

    • 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: {}

    • Object attributes that are modifiable only by SumUp applications.

      Example: {}

  • total_countintegerrequired

    Example: 3

400application/problem+json

Invalid query parameter combination.

  • typestringrequired
    format: 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."

  • instancestring
    format: uri

    A URI reference that identifies the specific occurrence of the problem.

401application/problem+json

Authentication failed or missing required scope.

  • typestringrequired
    format: 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."

  • instancestring
    format: uri

    A URI reference that identifies the specific occurrence of the problem.

Type to search…