• Account Management/
    Using Account Membership API/
    Get All Unassigned Account Members

    Get All Unassigned Account Members

    Use this resource to get a list of all account members that are not assigned to an account.

    GET Get a list of Unassigned Account Members

    https://api.moltin.com/v2/accounts/:accountId/account-memberships/unassigned-account-members/
    

    Parameters

    Path parameters

    NameRequiredTypeDescription
    accountIdRequiredstringThe ID of the account for which you want to get the list of unassigned account members.

    Headers

    NameRequiredTypeDescription
    AuthorizationRequiredstringThe Bearer token required to get access to the API.

    Query parameters

    NameRequiredTypeDescription
    filterOptionalstringFilter attributes. For more information, see the Filtering unassigned account members section.

    You can use pagination with this resource. For more information, see pagination.

    Request Examples

    Curl

    curl -X GET https://api.moltin.com/v2/accounts/:accountId/account-memberships/unassigned-account-members/ \
         -H "Authorization: Bearer XXXX"
    

    JavaScript SDK

    const MoltinGateway = require("@moltin/sdk").gateway;
    const Moltin = MoltinGateway({
        client_id: "X",
        client_secret: "X",
    });
    const accountId = "00000000-0000-1000-8000-000f00000300";
    Moltin.AccountMembers.UnassignedAccountMembers(accountId).then((acc) => {
        // Do something
    });
    

    Response Example

    200 OK

    {
        "meta": {
            "page": {
                "limit": 100,
                "offset": 0,
                "current": 1,
                "total": 1
            },
            "results": {
                "total": 2
            }
        },
        "data": [
            {
                "id": "908f7849-60da-4e4a-a3b1-51d4cbe3b953",
                "type": "account_member",
                "name": "Ron Swanson",
                "email": "ron@swanson.com",
                "links": {
                    "self": "https://api.moltin.com/v2/account-members/908f7849-60da-4e4a-a3b1-51d4cbe3b953"
                }
            },
            {
                "id": "0ff71321-f7ae-4400-abc2-d7919a78d429",
                "type": "account_member",
                "name": "John Smith",
                "email": "john@smith.com",
                "links": {
                    "self": "https://api.moltin.com/v2/account-members/0ff71321-f7ae-4400-abc2-d7919a78d429"
                }
            }
        ],
        "links": {
            "current": "https://api.moltin.com/v2/account-members?page[offset]=0&page[limit]=100",
            "first": "https://api.moltin.com/v2/account-members?page[offset]=0&page[limit]=100",
            "last": "https://api.moltin.com/v2/account-members?page[offset]=0&page[limit]=100",
            "next": "null",
            "prev": "null"
        }
    }
    

    Filtering

    The following operators and attributes are available for filtering unassigned account members.

    OperatorDescription
    eqChecks whether the values of two operands are equal. If the values are equal, the condition is true.
    likeChecks if the operand contains the specified string. You can use wildcard characters in operand.
    AttributeTypeOperatorExample
    emailstringeq / likeeq(email,ronswanson@example.com)
    namestringeq / likelike(name,*swan*)

    You can use pagination with this resource.

    Was this helpful?

    Previous
    Get All Account Memberships