Cart Operations
Clear Cart
Removes all items from the shopping cart
DELETE
/
api
/
v1
/
domains
/
{domain}
/
cart
/
line-items
curl --request DELETE \
--url https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items \
--header 'x-firmly-authorization: YOUR_TOKEN'
const response = await fetch('https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items', {
method: 'DELETE',
headers: {
'x-firmly-authorization': 'YOUR_TOKEN'
}
});
const cart = await response.json();
import requests
response = requests.delete(
'https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items',
headers={
'x-firmly-authorization': 'YOUR_TOKEN'
}
)
cart = response.json()
{
"cart_id": "1e43868c-d4a5-418c-bd6b-5fff043550d2",
"platform_id": "example",
"shop_id": "staging.luma.gift",
"display_name": "Luma Store",
"line_items": [],
"sub_total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"shipping_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
Removes all items from the cart, returning an empty cart.Authentication
string
required
Device authentication token from browser session
Path Parameters
string
required
Merchant domain (e.g.,
staging.luma.gift)Response
Returns an empty shopping cart.Response Fields
Same as Get Cart response, but with an emptyline_items array.
curl --request DELETE \
--url https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items \
--header 'x-firmly-authorization: YOUR_TOKEN'
const response = await fetch('https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items', {
method: 'DELETE',
headers: {
'x-firmly-authorization': 'YOUR_TOKEN'
}
});
const cart = await response.json();
import requests
response = requests.delete(
'https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items',
headers={
'x-firmly-authorization': 'YOUR_TOKEN'
}
)
cart = response.json()
{
"cart_id": "1e43868c-d4a5-418c-bd6b-5fff043550d2",
"platform_id": "example",
"shop_id": "staging.luma.gift",
"display_name": "Luma Store",
"line_items": [],
"sub_total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"shipping_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 not found⌘I
curl --request DELETE \
--url https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items \
--header 'x-firmly-authorization: YOUR_TOKEN'
const response = await fetch('https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items', {
method: 'DELETE',
headers: {
'x-firmly-authorization': 'YOUR_TOKEN'
}
});
const cart = await response.json();
import requests
response = requests.delete(
'https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items',
headers={
'x-firmly-authorization': 'YOUR_TOKEN'
}
)
cart = response.json()
{
"cart_id": "1e43868c-d4a5-418c-bd6b-5fff043550d2",
"platform_id": "example",
"shop_id": "staging.luma.gift",
"display_name": "Luma Store",
"line_items": [],
"sub_total": {
"currency": "USD",
"value": 0,
"symbol": "$",
"number": 0
},
"shipping_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"
}
]
}