Retrieve the current shopping cart contents including items, pricing, and totals
curl --request GET \
--url https://api.example.com/api/v1/cart/{
"items": {
"[item_key]": {
"product": "<string>",
"variant_id": 123,
"price": "<string>",
"original_price": "<string>",
"quantity": 123,
"offer_applied": true,
"shipping": "<string>",
"item_type": "<string>",
"active_offer": {
"offer_id": 123,
"requires_voucher": true,
"is_valid": true
},
"voucher_discount": {
"voucher_id": 123,
"discount_type": "<string>",
"discount_amount": 123
}
}
},
"count": 123,
"subtotal": 123,
"shipping": 123,
"total": 123
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/klvxn/ecommerce-api/llms.txt
Use this file to discover all available pages before exploring further.
curl -X GET https://api.example.com/api/v1/cart/ \
-H "Cookie: sessionid=your_session_id"
{
"items": {
"prod123_SKU789_dflt": {
"product": "Wireless Headphones",
"variant_id": 456,
"price": "89.99",
"original_price": "99.99",
"quantity": 2,
"offer_applied": true,
"shipping": "0",
"item_type": "variant",
"active_offer": {
"offer_id": 12,
"requires_voucher": false,
"is_valid": true
}
},
"prod234_SKU890_dflt": {
"product": "USB-C Cable",
"variant_id": 457,
"price": "12.99",
"original_price": "12.99",
"quantity": 1,
"offer_applied": false,
"shipping": "0",
"item_type": "standalone"
}
},
"count": 3,
"subtotal": 192.97,
"shipping": 0,
"total": 192.97
}
{
"info": "Your cart is empty"
}
prod{product_id}_{variant_sku}_dflt
prod123_2f23232242f2f3f_dflt
This key is required when updating or removing specific items from the cart.
curl --request GET \
--url https://api.example.com/api/v1/cart/{
"items": {
"[item_key]": {
"product": "<string>",
"variant_id": 123,
"price": "<string>",
"original_price": "<string>",
"quantity": 123,
"offer_applied": true,
"shipping": "<string>",
"item_type": "<string>",
"active_offer": {
"offer_id": 123,
"requires_voucher": true,
"is_valid": true
},
"voucher_discount": {
"voucher_id": 123,
"discount_type": "<string>",
"discount_amount": 123
}
}
},
"count": 123,
"subtotal": 123,
"shipping": 123,
"total": 123
}