Cart Management
Get Cart
Retrieves the current state of a shopping cart with all line items, shipments, pricing, and addon information
GET
/
api
/
v2
/
domains
/
{domain}
/
cart
Get Cart
curl --request GET \
--url https://api.firmly.work/api/v2/domains/{domain}/cart \
--header 'Authorization: Bearer <token>'{
"cart_id": "cart_01H2XVBR8C8JS5MQSFPJ8HF9SA",
"platform_id": "shopify",
"shop_id": "staging.luma.gift",
"display_name": "Luma Store",
"cart_status": "active",
"line_items": [
{
"line_item_id": "item_01H2XVBR8C8JS5MQSFPJ8HF9SB",
"platform_line_item_id": "0",
"sku": "MH07-XS-Gray",
"variant_description": "Gray / XS",
"description": "Hero Hoodie",
"base_sku": "MH07",
"quantity": 1,
"price": {
"currency": "USD",
"value": 54.00,
"number": 5400,
"symbol": "$"
},
"line_price": {
"currency": "USD",
"value": 54.00,
"number": 5400,
"symbol": "$"
},
"msrp": {
"currency": "USD",
"value": 64.00,
"number": 6400,
"symbol": "$"
},
"image": {
"src": "https://staging.luma.gift/images/hero-hoodie.jpg",
"alt": "Hero Hoodie in Gray"
},
"requires_shipping": true
}
],
"shipments": [
{
"shipment_id": "ship_01H2XVBR8C8JS5MQSFPJ8HF9SD",
"line_item_ids": ["item_01H2XVBR8C8JS5MQSFPJ8HF9SB"],
"fulfillment_type": {
"id": "SCHEDULED_DELIVERY",
"name": "Scheduled Delivery",
"description": "White glove delivery with scheduled time"
},
"fulfillment_type_options": [
{
"id": "SHIP_TO_ADDRESS",
"name": "Ship to Address",
"description": "Standard shipping to customer address"
},
{
"id": "SCHEDULED_DELIVERY",
"name": "Scheduled Delivery",
"description": "White glove delivery with scheduled time"
},
{
"id": "IN_STORE_PICKUP",
"name": "In-Store Pickup",
"description": "Pick up at store location"
}
],
"shipping_method_options": [
{
"id": "WHITE_GLOVE",
"description": "White Glove Delivery Service",
"price": {
"currency": "USD",
"value": 149.99,
"number": 14999,
"symbol": "$"
},
"estimated_delivery": "Scheduled delivery"
}
],
"shipping_method": {
"id": "WHITE_GLOVE",
"description": "White Glove Delivery Service",
"price": {
"currency": "USD",
"value": 149.99,
"number": 14999,
"symbol": "$"
},
"estimated_delivery": "Scheduled delivery"
},
"notes": "",
"selected_date": "2025-07-14",
}
],
"addons": {
"offers": [
{
"addon_id": "shipping_protection",
"display": {
"name": "Shipping Protection",
"description": "Protect your order against shipping damage"
},
"scope": "CART",
"price": {
"currency": "USD",
"value": 12.99,
"number": 1299,
"symbol": "$"
}
}
],
"selections": []
},
"sub_total": {
"currency": "USD",
"value": 54.00,
"number": 5400,
"symbol": "$"
},
"shipping_total": {
"currency": "USD",
"value": 149.99,
"number": 14999,
"symbol": "$"
},
"tax_total": {
"currency": "USD",
"value": 5.40,
"number": 540,
"symbol": "$"
},
"addon_total": {
"currency": "USD",
"value": 0.00,
"number": 0,
"symbol": "$"
},
"total": {
"currency": "USD",
"value": 209.39,
"number": 20939,
"symbol": "$"
},
"shipping_info": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@staging.luma.gift",
"phone": "+1234567890",
"company": "",
"address_line_1": "123 Main Street",
"address_line_2": "Apt 4B",
"city": "New York",
"state_code": "NY",
"zip": "10001",
"country_code": "US"
},
"payment_handle": "pay_01H2XVBR8C8JS5MQSFPJ8HF9SE",
"payment_method_options": [
{
"type": "CreditCard",
"wallet": "user"
},
{
"type": "PayPal",
"wallet": "paypal"
}
],
"notices": [
{
"code": "ITEM_NOT_SHIPPABLE",
"severity": "error",
"item_id": "item_01H2XVBR8C8JS5MQSFPJ8HF9SB",
"details": {
"description": "This item cannot be shipped to the selected address",
"reason": "Shipping restrictions apply to this location"
}
}
],
"schema_version": "2.0"
}
Overview
The Get Cart endpoint retrieves the complete current state of a shopping cart, including:- All line items with product details and quantities
- Multiple shipments with items grouped by fulfillment requirements
- Complete pricing breakdown (subtotal, shipping, tax, addons, total)
- Available addon offers and current selections
- Cart-level metadata and schema version
Authentication
Device authentication token to identify and map the session
Path Parameters
Domain of the merchant website (e.g.,
staging.luma.gift)Response
Unique identifier for the shopping cart session
Platform identifier (e.g., “shopify”, “bigcommerce”, “magento”)
Shop identifier (merchant domain, e.g., “staging.luma.gift”)
Merchant display name
Current cart status (e.g., “active”)
Array of products currently in the cart
Show Line Item Properties
Show Line Item Properties
Unique identifier for the line item
Platform-specific line item identifier
Product SKU identifier
Variant-specific description
Product description
Base product SKU (parent of variants)
Quantity of the item in cart
Whether this item requires physical shipping
Array of shipment groups, each containing line items with similar fulfillment requirements
Show Shipment Properties
Show Shipment Properties
Unique identifier for the shipment
Array of line item IDs included in this shipment
Available fulfillment types for this shipment
Available shipping methods for the selected fulfillment type
Special instructions or notes for this shipment
Selected delivery date for scheduled delivery (YYYY-MM-DD format)
Subtotal of all line items
Total shipping cost across all shipments
Total tax amount
Total cost of selected addons
Grand total including all costs
Shipping address information (when address is set)
Show Shipping Info Properties
Show Shipping Info Properties
Recipient’s first name
Recipient’s last name
Recipient’s email address
Recipient’s phone number
Company name (optional)
Street address line 1
Street address line 2 (optional)
City name
State/province code
ZIP/postal code
Country code (e.g., US, CA)
Payment handle identifier (when payment is configured)
Cart notices providing information about cart state and issues
Show Notice Properties
Show Notice Properties
Notice code identifier
Show Available Codes
Show Available Codes
ITEM_NOT_SHIPPABLE- Item cannot be shipped to selected addressITEM_OUT_OF_STOCK- Item is out of stockPROMO_EXPIRED- Promotion code has expiredPROMO_NOT_APPLICABLE- Promotion doesn’t apply to cartSHIPPING_NOT_AVAILABLE- Shipping method unavailablePRICE_INCREASED- Item price has increasedPRICE_DECREASED- Item price has decreased
Notice severity level:
info, warning, or errorLine item ID if notice is item-specific
Additional notice details
Cart schema version (“2.0”)
Code Examples
curl --request GET \
--url https://api.firmly.work/api/v2/domains/staging.luma.gift/cart \
--header 'x-firmly-authorization: YOUR_TOKEN'
{
"cart_id": "cart_01H2XVBR8C8JS5MQSFPJ8HF9SA",
"platform_id": "shopify",
"shop_id": "staging.luma.gift",
"display_name": "Luma Store",
"cart_status": "active",
"line_items": [
{
"line_item_id": "item_01H2XVBR8C8JS5MQSFPJ8HF9SB",
"platform_line_item_id": "0",
"sku": "MH07-XS-Gray",
"variant_description": "Gray / XS",
"description": "Hero Hoodie",
"base_sku": "MH07",
"quantity": 1,
"price": {
"currency": "USD",
"value": 54.00,
"number": 5400,
"symbol": "$"
},
"line_price": {
"currency": "USD",
"value": 54.00,
"number": 5400,
"symbol": "$"
},
"msrp": {
"currency": "USD",
"value": 64.00,
"number": 6400,
"symbol": "$"
},
"image": {
"src": "https://staging.luma.gift/images/hero-hoodie.jpg",
"alt": "Hero Hoodie in Gray"
},
"requires_shipping": true
}
],
"shipments": [
{
"shipment_id": "ship_01H2XVBR8C8JS5MQSFPJ8HF9SD",
"line_item_ids": ["item_01H2XVBR8C8JS5MQSFPJ8HF9SB"],
"fulfillment_type": {
"id": "SCHEDULED_DELIVERY",
"name": "Scheduled Delivery",
"description": "White glove delivery with scheduled time"
},
"fulfillment_type_options": [
{
"id": "SHIP_TO_ADDRESS",
"name": "Ship to Address",
"description": "Standard shipping to customer address"
},
{
"id": "SCHEDULED_DELIVERY",
"name": "Scheduled Delivery",
"description": "White glove delivery with scheduled time"
},
{
"id": "IN_STORE_PICKUP",
"name": "In-Store Pickup",
"description": "Pick up at store location"
}
],
"shipping_method_options": [
{
"id": "WHITE_GLOVE",
"description": "White Glove Delivery Service",
"price": {
"currency": "USD",
"value": 149.99,
"number": 14999,
"symbol": "$"
},
"estimated_delivery": "Scheduled delivery"
}
],
"shipping_method": {
"id": "WHITE_GLOVE",
"description": "White Glove Delivery Service",
"price": {
"currency": "USD",
"value": 149.99,
"number": 14999,
"symbol": "$"
},
"estimated_delivery": "Scheduled delivery"
},
"notes": "",
"selected_date": "2025-07-14",
}
],
"addons": {
"offers": [
{
"addon_id": "shipping_protection",
"display": {
"name": "Shipping Protection",
"description": "Protect your order against shipping damage"
},
"scope": "CART",
"price": {
"currency": "USD",
"value": 12.99,
"number": 1299,
"symbol": "$"
}
}
],
"selections": []
},
"sub_total": {
"currency": "USD",
"value": 54.00,
"number": 5400,
"symbol": "$"
},
"shipping_total": {
"currency": "USD",
"value": 149.99,
"number": 14999,
"symbol": "$"
},
"tax_total": {
"currency": "USD",
"value": 5.40,
"number": 540,
"symbol": "$"
},
"addon_total": {
"currency": "USD",
"value": 0.00,
"number": 0,
"symbol": "$"
},
"total": {
"currency": "USD",
"value": 209.39,
"number": 20939,
"symbol": "$"
},
"shipping_info": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@staging.luma.gift",
"phone": "+1234567890",
"company": "",
"address_line_1": "123 Main Street",
"address_line_2": "Apt 4B",
"city": "New York",
"state_code": "NY",
"zip": "10001",
"country_code": "US"
},
"payment_handle": "pay_01H2XVBR8C8JS5MQSFPJ8HF9SE",
"payment_method_options": [
{
"type": "CreditCard",
"wallet": "user"
},
{
"type": "PayPal",
"wallet": "paypal"
}
],
"notices": [
{
"code": "ITEM_NOT_SHIPPABLE",
"severity": "error",
"item_id": "item_01H2XVBR8C8JS5MQSFPJ8HF9SB",
"details": {
"description": "This item cannot be shipped to the selected address",
"reason": "Shipping restrictions apply to this location"
}
}
],
"schema_version": "2.0"
}
Error Responses
400 Bad Request
400 Bad Request
Invalid request format or missing required headers
{
"code": 400,
"error": "MissingAuthHeader",
"description": "x-firmly-authorization header is required"
}
401 Unauthorized
401 Unauthorized
Invalid or expired authentication token
{
"code": 401,
"error": "InvalidJWTToken",
"description": "The JWT token is invalid"
}
404 Not Found
404 Not Found
Cart does not exist for the given domain
{
"code": 404,
"error": "ErrorCartNotFound",
"description": "Cart not found"
}
422 Unprocessable Entity
422 Unprocessable Entity
Store service unavailable or other processing error
{
"code": 422,
"error": "ErrorStoreUnavailable",
"description": "Store service unavailable"
}
Related Endpoints
- Add Line Item - Add items to cart
- Update Line Item - Modify cart items
- Clear Cart - Empty the cart
Previous
Add Line ItemAdds a product variant to the cart with automatic shipment grouping based on fulfillment requirements
Next
⌘I
Get Cart
curl --request GET \
--url https://api.firmly.work/api/v2/domains/{domain}/cart \
--header 'Authorization: Bearer <token>'{
"cart_id": "cart_01H2XVBR8C8JS5MQSFPJ8HF9SA",
"platform_id": "shopify",
"shop_id": "staging.luma.gift",
"display_name": "Luma Store",
"cart_status": "active",
"line_items": [
{
"line_item_id": "item_01H2XVBR8C8JS5MQSFPJ8HF9SB",
"platform_line_item_id": "0",
"sku": "MH07-XS-Gray",
"variant_description": "Gray / XS",
"description": "Hero Hoodie",
"base_sku": "MH07",
"quantity": 1,
"price": {
"currency": "USD",
"value": 54.00,
"number": 5400,
"symbol": "$"
},
"line_price": {
"currency": "USD",
"value": 54.00,
"number": 5400,
"symbol": "$"
},
"msrp": {
"currency": "USD",
"value": 64.00,
"number": 6400,
"symbol": "$"
},
"image": {
"src": "https://staging.luma.gift/images/hero-hoodie.jpg",
"alt": "Hero Hoodie in Gray"
},
"requires_shipping": true
}
],
"shipments": [
{
"shipment_id": "ship_01H2XVBR8C8JS5MQSFPJ8HF9SD",
"line_item_ids": ["item_01H2XVBR8C8JS5MQSFPJ8HF9SB"],
"fulfillment_type": {
"id": "SCHEDULED_DELIVERY",
"name": "Scheduled Delivery",
"description": "White glove delivery with scheduled time"
},
"fulfillment_type_options": [
{
"id": "SHIP_TO_ADDRESS",
"name": "Ship to Address",
"description": "Standard shipping to customer address"
},
{
"id": "SCHEDULED_DELIVERY",
"name": "Scheduled Delivery",
"description": "White glove delivery with scheduled time"
},
{
"id": "IN_STORE_PICKUP",
"name": "In-Store Pickup",
"description": "Pick up at store location"
}
],
"shipping_method_options": [
{
"id": "WHITE_GLOVE",
"description": "White Glove Delivery Service",
"price": {
"currency": "USD",
"value": 149.99,
"number": 14999,
"symbol": "$"
},
"estimated_delivery": "Scheduled delivery"
}
],
"shipping_method": {
"id": "WHITE_GLOVE",
"description": "White Glove Delivery Service",
"price": {
"currency": "USD",
"value": 149.99,
"number": 14999,
"symbol": "$"
},
"estimated_delivery": "Scheduled delivery"
},
"notes": "",
"selected_date": "2025-07-14",
}
],
"addons": {
"offers": [
{
"addon_id": "shipping_protection",
"display": {
"name": "Shipping Protection",
"description": "Protect your order against shipping damage"
},
"scope": "CART",
"price": {
"currency": "USD",
"value": 12.99,
"number": 1299,
"symbol": "$"
}
}
],
"selections": []
},
"sub_total": {
"currency": "USD",
"value": 54.00,
"number": 5400,
"symbol": "$"
},
"shipping_total": {
"currency": "USD",
"value": 149.99,
"number": 14999,
"symbol": "$"
},
"tax_total": {
"currency": "USD",
"value": 5.40,
"number": 540,
"symbol": "$"
},
"addon_total": {
"currency": "USD",
"value": 0.00,
"number": 0,
"symbol": "$"
},
"total": {
"currency": "USD",
"value": 209.39,
"number": 20939,
"symbol": "$"
},
"shipping_info": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@staging.luma.gift",
"phone": "+1234567890",
"company": "",
"address_line_1": "123 Main Street",
"address_line_2": "Apt 4B",
"city": "New York",
"state_code": "NY",
"zip": "10001",
"country_code": "US"
},
"payment_handle": "pay_01H2XVBR8C8JS5MQSFPJ8HF9SE",
"payment_method_options": [
{
"type": "CreditCard",
"wallet": "user"
},
{
"type": "PayPal",
"wallet": "paypal"
}
],
"notices": [
{
"code": "ITEM_NOT_SHIPPABLE",
"severity": "error",
"item_id": "item_01H2XVBR8C8JS5MQSFPJ8HF9SB",
"details": {
"description": "This item cannot be shipped to the selected address",
"reason": "Shipping restrictions apply to this location"
}
}
],
"schema_version": "2.0"
}