Composable Frontend 2.0 Learn more 

  • Commerce Cloud/
    Account Management/
    Using Account Membership API/
    Delete an Account Membership

    Delete an Account Membership

    DELETE Delete by ID

    https://useast.api.elasticpath.com/v2/accounts/:accountId/account-memberships/:membershipId
    

    Parameters

    Path parameters

    NameRequiredTypeDescription
    accountIdRequiredstringThe ID of the account that the membership is associated with.
    membershipIdRequiredstringThe ID of the account membership that you want to delete.

    Headers

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

    Request Examples

    Curl

    curl -X DELETE https://useast.api.elasticpath.com/v2/accounts/:accountId/account-memberships/:membershipId \
         -H "Authorization: Bearer XXXX" \
         -H "Content-Type: application/json" \
    

    JavaScript SDK

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

    Response Example

    204 No Content

    Previous
    Update an Account Membership