Skip to main content
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
string
Customer ID to retrieve cart for (admin API only)

Response

success
boolean
Whether the request succeeded
data
object
Cart object

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

CodeDescription
UNAUTHORIZEDInvalid or missing access token
NOT_FOUNDCart not found