Skip to main content
Version: Unstable

Cart

The Cart resource allows the manipulation of shopping carts generated in a storefront.

Only a Cart that is still modifiable can be accesed. Carts that have been converted or are still in the conversion process to an Order are no longer accessible via the Cart resource. Also, a Cart that has initiated a Redirect checkout process is no longer accessible.

You need the corresponding read_orders or write_orders scopes in order to call these endpoints.

Endpoints

GET /carts/{id}

Receive a single Cart by its id.

If you would like to retrieve an Order instead, refer to the Order resource.

Kit line items

When a Cart contains kits, each line item that is a kit component carries a catalog_kit_id, an order_kit_id (the kit instance in the cart) and a kit object describing the kit it belongs to. Only the kit-related fields are shown below:

{
"id": 467422732,
"product_id": 17310718,
"variant_id": 33739098,
"quantity": 1,
"catalog_kit_id": 8901234,
"order_kit_id": 778001,
"kit": {
"id": 778001,
"catalog_kit_id": 8901234,
"variant_id": 5678901,
"name": "Summer Bundle",
"image": "https://d2r9epyceweg5n.cloudfront.net/stores/001/234/products/summer-bundle.jpg",
"price": 4999,
"quantity": 2
}
}

The kit object's id is the order_kit_id (the kit instance in this cart), not the catalog_kit_id. kit.catalog_kit_id is the kit type in the catalog, and kit.quantity is the number of units of that kit combination in the cart.

DELETE /carts/{id}/line-items/{id}

Remove a line item from a Cart by its line item id.

DELETE /carts/1234/line-items/5678

HTTP/1.1 200 OK

{}

DELETE /carts/{id}/coupons/{id}

Unset a Coupon from a Cart by its coupon id.

DELETE /carts/1234/coupons/5678

HTTP/1.1 200 OK

{}