Rebrand 2023 Learn more 

  • Commerce Cloud/
    Carts/
    Cart Management API/
    Delete a Cart

    Delete a Cart

    You can delete a cart, including the items, name, description, and remove all associations.

    DELETE Delete cart by ID

    https://useast.api.elasticpath.com/v2/carts/:cartID
    

    Parameters

    Path parameters

    NameRequiredTypeDescription
    cartIDRequiredstringThe unique identifier of the cart 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/carts/:cartID \
         -H "Authorization: Bearer XXXX" \
         -H "Content-Type: application/json" \
    

    JavaScript SDK

    const reference = "XXXX";
    
    
    // Where `EPCC` is an authenticated client
    await EPCC.Cart(reference).Delete();
    

    Response Example

    204 No Content

    Previous
    Update a Cart