Get Cart
curl --request GET \
--url https://api.launchmystore.io/api/v1/cart.json \
--header 'Authorization: Bearer <token>'{
"success": true,
"data": {
"token": "<string>",
"items": [
{
"id": "<string>",
"product_id": "<string>",
"variant_id": "<string>",
"title": "<string>",
"variant_title": "<string>",
"quantity": 123,
"price": 123,
"line_price": 123,
"sku": "<string>",
"image": {},
"properties": {}
}
],
"item_count": 123,
"total_price": 123,
"total_weight": 123,
"currency": "<string>",
"requires_shipping": true,
"note": "<string>",
"attributes": {},
"created_at": "<string>",
"updated_at": "<string>"
}
}Cart
Get Cart
Retrieve the current cart
GET
/
api
/
v1
/
cart.json
Get Cart
curl --request GET \
--url https://api.launchmystore.io/api/v1/cart.json \
--header 'Authorization: Bearer <token>'{
"success": true,
"data": {
"token": "<string>",
"items": [
{
"id": "<string>",
"product_id": "<string>",
"variant_id": "<string>",
"title": "<string>",
"variant_title": "<string>",
"quantity": 123,
"price": 123,
"line_price": 123,
"sku": "<string>",
"image": {},
"properties": {}
}
],
"item_count": 123,
"total_price": 123,
"total_weight": 123,
"currency": "<string>",
"requires_shipping": true,
"note": "<string>",
"attributes": {},
"created_at": "<string>",
"updated_at": "<string>"
}
}Documentation Index
Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
Use this file to discover all available pages before exploring further.
Get Cart
Returns the current cart for the session or customer.Request
curl -X GET "https://api.launchmystore.io/api/v1/cart.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Query Parameters
Customer ID to retrieve cart for (admin API only)
Response
Whether the request succeeded
Cart object
Show Cart Object
Show Cart Object
Unique cart token
Array of line items
Show Line Item
Show Line Item
Line item ID
Product ID
Variant ID
Product title
Variant title
Quantity
Price per item in cents
Total line price in cents
SKU
Product image
Custom line item properties
Total number of items
Cart total in cents
Total weight in grams
Currency code
Whether any items require shipping
Cart note
Cart attributes (key-value pairs)
Creation timestamp
Last update timestamp
Example Response
{
"success": true,
"data": {
"token": "cart_xyz789",
"items": [
{
"id": "li_001",
"product_id": "prod_abc123",
"variant_id": "var_def456",
"title": "Classic T-Shirt",
"variant_title": "Medium / Black",
"quantity": 2,
"price": 2500,
"line_price": 5000,
"sku": "TSHIRT-M-BLK",
"image": {
"src": "https://cdn.launchmystore.io/images/tshirt-black.jpg",
"alt": "Black T-Shirt"
},
"properties": {},
"requires_shipping": true,
"taxable": true
},
{
"id": "li_002",
"product_id": "prod_ghi789",
"variant_id": "var_jkl012",
"title": "Baseball Cap",
"variant_title": "One Size / Navy",
"quantity": 1,
"price": 1500,
"line_price": 1500,
"sku": "CAP-NAVY",
"image": {
"src": "https://cdn.launchmystore.io/images/cap-navy.jpg",
"alt": "Navy Baseball Cap"
},
"properties": {
"Personalization": "John"
},
"requires_shipping": true,
"taxable": true
}
],
"item_count": 3,
"total_price": 6500,
"total_weight": 350,
"currency": "USD",
"requires_shipping": true,
"note": "",
"attributes": {},
"created_at": "2024-03-20T10:00:00Z",
"updated_at": "2024-03-20T10:30:00Z"
}
}
Error Codes
| Code | Description |
|---|---|
UNAUTHORIZED | Invalid or missing access token |
NOT_FOUND | Cart not found |
⌘I