Carts/
Cart Items/
Remove Cart Item

Remove Cart Item

You can easily remove items from the Cart. A successful Cart item removal request returns the cart items.

DELETE Remove Item from Cart

https://api.moltin.com/v2/carts/:reference/items/:id

Parameters

Path parameters

NameRequiredTypeDescription
referenceRequiredstringA unique reference for the cart created by you.
idRequiredstringThe unique identifier for this cart item.

Headers

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

Request Examples

Curl

curl -X DELETE https://api.moltin.com/v2/carts/:reference/items/:id \
     -H "Authorization: Bearer XXXX"

JavaScript SDK

const reference = "XXXX";


// Where `EPCC` is an authenticated client
await Moltin.Cart(reference).RemoveItem(itemId)();

Response Example

200 OK

{
    "data": [],
    "meta": {
        "display_price": {
            "with_tax": {
                "amount": 0,
                "currency": "",
                "formatted": "0"
            },
            "without_tax": {
                "amount": 0,
                "currency": "",
                "formatted": "0"
            }
        },
        "timestamps": {
            "created_at": "2018-05-08T10:25:40.02Z",
            "updated_at": "2018-05-08T10:25:40.02Z",
            "expires_at": "2018-05-20T10:25:40.02Z"
        }
    }
}

Was this helpful?

Previous
Update Cart Item

Learn

Docs