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
},
"fees": [
{
"description": "Recycle fee",
"currency": "USD",
"value": 2.00,
"symbol": "$",
"number": 200
}
],
"fee_total": {
"currency": "USD",
"value": 2.00,
"symbol": "$",
"number": 200
},
"total": {
"currency": "USD",
"value": 26.20,
"symbol": "$",
"number": 2620
}
}
{
"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
Path Parameters
Query Parameters
Response
Returns the shopping cart with line items, pricing, and available options.Response Fields
Array of items in the cart
Show Line Item Object
Show Line Item Object
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
},
"fees": [
{
"description": "Recycle fee",
"currency": "USD",
"value": 2.00,
"symbol": "$",
"number": 200
}
],
"fee_total": {
"currency": "USD",
"value": 2.00,
"symbol": "$",
"number": 200
},
"total": {
"currency": "USD",
"value": 26.20,
"symbol": "$",
"number": 2620
}
}
{
"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
},
"fees": [
{
"description": "Recycle fee",
"currency": "USD",
"value": 2.00,
"symbol": "$",
"number": 200
}
],
"fee_total": {
"currency": "USD",
"value": 2.00,
"symbol": "$",
"number": 200
},
"total": {
"currency": "USD",
"value": 26.20,
"symbol": "$",
"number": 2620
}
}
{
"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"
}
]
}