Cart Operations
Get Cart
Retrieves the current shopping cart
GET
/
api
/
v1
/
domains
/
{domain}
/
cart
curl --request GET \
--url https://api.firmly.work/api/v1/domains/staging.luma.gift/cart \
--header 'x-firmly-authorization: YOUR_TOKEN'
const response = await fetch('https://api.firmly.work/api/v1/domains/staging.luma.gift/cart', {
method: 'GET',
headers: {
'x-firmly-authorization': 'YOUR_TOKEN'
}
});
const cart = await response.json();
import requests
response = requests.get(
'https://api.firmly.work/api/v1/domains/staging.luma.gift/cart',
headers={
'x-firmly-authorization': 'YOUR_TOKEN'
}
)
cart = response.json()
{
"cart_discount": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"line_items": [
{
"base_sku": "WS12",
"description": "Radiant Tee - Orange XS",
"image": {
"url": "https://cdn.staging.luma.gift/products/radiant-tee/orange.jpg"
},
"line_item_id": "00000000-0000-0000-0000-000000000000",
"line_price": {
"currency": "USD",
"value": 22.00,
"symbol": "$",
"number": 2200
},
"msrp": {
"currency": "USD",
"value": 22.00,
"symbol": "$",
"number": 2200
},
"platform_line_item_id": "4df9941b-bd06-4495-8759-61c6145dc408",
"price": {
"currency": "USD",
"value": 22.00,
"symbol": "$",
"number": 2200
},
"quantity": 1,
"requires_shipping": true,
"sku": "WS12-XS-Orange"
}
],
"payment_method_options": [
{
"type": "CreditCard",
"wallet": "user"
}
],
"shipping_total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"sub_total": {
"currency": "USD",
"value": 869.99,
"symbol": "$",
"number": 86999
},
"tax": {
"currency": "USD",
"value": 2.20,
"symbol": "$",
"number": 220
},
"total": {
"currency": "USD",
"value": 24.20,
"symbol": "$",
"number": 2420
}
}
{
"cart_id": "abc123",
"cart_status": "active",
"display_name": "Luma Store",
"platform_id": "example",
"shop_id": "staging.luma.gift",
"line_items": [],
"sub_total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"tax": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"payment_method_options": [
{
"type": "CreditCard",
"wallet": "user"
}
]
}
Overview
Gets the current state of the cart with line items and pricing information. Returns an empty cart if no items have been added yet.Authentication
string
required
Device authentication token from browser session
Path Parameters
string
required
Merchant domain (e.g.,
staging.luma.gift)Query Parameters
string
default:"false"
Set to
true for faster response with potentially cached dataResponse
Returns the shopping cart with line items, pricing, and available options.Response Fields
string
Unique identifier for the cart
string
Current cart status (
active, submitted, etc.)string
Merchant display name
string
E-commerce platform identifier
string
Merchant identifier
array
Array of items in the cart
Show Line Item Object
Show Line Item Object
string
Unique identifier for the line item
string
Product SKU
string
Base product SKU (parent product)
number
Quantity of the item
string
Product description
object
object
Total price for this line item (price × quantity)
boolean
Whether this item requires shipping
object
Subtotal before shipping and tax
object
Shipping cost (if shipping info has been set)
object
Tax amount
object
Grand total including all costs
object
Shipping address (if set)
object
Selected shipping method (if set)
array
Available shipping methods (if shipping info has been set)
array
Available payment methods
array
Array of notice messages (Simple Cart API uses string array)
curl --request GET \
--url https://api.firmly.work/api/v1/domains/staging.luma.gift/cart \
--header 'x-firmly-authorization: YOUR_TOKEN'
const response = await fetch('https://api.firmly.work/api/v1/domains/staging.luma.gift/cart', {
method: 'GET',
headers: {
'x-firmly-authorization': 'YOUR_TOKEN'
}
});
const cart = await response.json();
import requests
response = requests.get(
'https://api.firmly.work/api/v1/domains/staging.luma.gift/cart',
headers={
'x-firmly-authorization': 'YOUR_TOKEN'
}
)
cart = response.json()
{
"cart_discount": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"line_items": [
{
"base_sku": "WS12",
"description": "Radiant Tee - Orange XS",
"image": {
"url": "https://cdn.staging.luma.gift/products/radiant-tee/orange.jpg"
},
"line_item_id": "00000000-0000-0000-0000-000000000000",
"line_price": {
"currency": "USD",
"value": 22.00,
"symbol": "$",
"number": 2200
},
"msrp": {
"currency": "USD",
"value": 22.00,
"symbol": "$",
"number": 2200
},
"platform_line_item_id": "4df9941b-bd06-4495-8759-61c6145dc408",
"price": {
"currency": "USD",
"value": 22.00,
"symbol": "$",
"number": 2200
},
"quantity": 1,
"requires_shipping": true,
"sku": "WS12-XS-Orange"
}
],
"payment_method_options": [
{
"type": "CreditCard",
"wallet": "user"
}
],
"shipping_total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"sub_total": {
"currency": "USD",
"value": 869.99,
"symbol": "$",
"number": 86999
},
"tax": {
"currency": "USD",
"value": 2.20,
"symbol": "$",
"number": 220
},
"total": {
"currency": "USD",
"value": 24.20,
"symbol": "$",
"number": 2420
}
}
{
"cart_id": "abc123",
"cart_status": "active",
"display_name": "Luma Store",
"platform_id": "example",
"shop_id": "staging.luma.gift",
"line_items": [],
"sub_total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"tax": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"payment_method_options": [
{
"type": "CreditCard",
"wallet": "user"
}
]
}
Error Responses
400 Bad Request
Missing or invalid authentication header404 Not Found
Cart was not found503 Service Unavailable
Store temporarily unavailable⌘I
curl --request GET \
--url https://api.firmly.work/api/v1/domains/staging.luma.gift/cart \
--header 'x-firmly-authorization: YOUR_TOKEN'
const response = await fetch('https://api.firmly.work/api/v1/domains/staging.luma.gift/cart', {
method: 'GET',
headers: {
'x-firmly-authorization': 'YOUR_TOKEN'
}
});
const cart = await response.json();
import requests
response = requests.get(
'https://api.firmly.work/api/v1/domains/staging.luma.gift/cart',
headers={
'x-firmly-authorization': 'YOUR_TOKEN'
}
)
cart = response.json()
{
"cart_discount": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"line_items": [
{
"base_sku": "WS12",
"description": "Radiant Tee - Orange XS",
"image": {
"url": "https://cdn.staging.luma.gift/products/radiant-tee/orange.jpg"
},
"line_item_id": "00000000-0000-0000-0000-000000000000",
"line_price": {
"currency": "USD",
"value": 22.00,
"symbol": "$",
"number": 2200
},
"msrp": {
"currency": "USD",
"value": 22.00,
"symbol": "$",
"number": 2200
},
"platform_line_item_id": "4df9941b-bd06-4495-8759-61c6145dc408",
"price": {
"currency": "USD",
"value": 22.00,
"symbol": "$",
"number": 2200
},
"quantity": 1,
"requires_shipping": true,
"sku": "WS12-XS-Orange"
}
],
"payment_method_options": [
{
"type": "CreditCard",
"wallet": "user"
}
],
"shipping_total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"sub_total": {
"currency": "USD",
"value": 869.99,
"symbol": "$",
"number": 86999
},
"tax": {
"currency": "USD",
"value": 2.20,
"symbol": "$",
"number": 220
},
"total": {
"currency": "USD",
"value": 24.20,
"symbol": "$",
"number": 2420
}
}
{
"cart_id": "abc123",
"cart_status": "active",
"display_name": "Luma Store",
"platform_id": "example",
"shop_id": "staging.luma.gift",
"line_items": [],
"sub_total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"tax": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"payment_method_options": [
{
"type": "CreditCard",
"wallet": "user"
}
]
}