post
https://www.locally.com/api/v2/cart//
Request Parameters
🏷️ header · 🔗 path · 📦 body field · unmarked parameters are query params
| Parameter | Type | Required | Description |
|---|---|---|---|
Locally-Api-Token 🏷️ | string | No | Locally issued API key. |
cart_hash 🔗 | string | Yes | Unique cart identifier. |
upc 🔗 | string | Yes | Variant-level identifier for item that exists in cart. |
status 📦 | string | Yes | One of: confirm, reject. |
sts_status 📦 | string | No | One of: confirm-brand, reject-brand, processing, shipped. |
reason 📦 | string | No | An sts_status of reject-brand requires a reason. |
refund 📦 | boolean | No | Only include if a refund is required. |
order_resolution 📦 | string | No | 1 — The shopper purchased this item (and this item only) · 2 — The shopper purchased this item and additional products · 3 — The shopper showed up, but purchased a different product than this. · 4 — The shopper showed up but did not purchase anything · 5 — No sale/the shopper did not show up to the store. |
message 📦 | string | No | |
delivery_estimate_id 📦 | number | No | |
scheduled_dispatch_at 📦 | string | No | This value must be in UTC time in ISO 8601 format. Example: 2026-02-10T19:25:27Z. |
Example Request
curl 'https://www.locally.com/api/v2/cart/{{CART_HASH}}/{{UPC}}' \
--request POST \
--header 'Locally-Api-Token: {{API_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
"status": "confirm",
"message": "Confirmed! We will text you when your order is out for delivery.",
"delivery_estimate_id": 928101,
"scheduled_dispatch_at": "2026-02-10T19:25:27Z"
}'const response = await fetch('https://www.locally.com/api/v2/cart/{{CART_HASH}}/{{UPC}}', {
method: 'POST',
headers: {
'Locally-Api-Token': '{{API_TOKEN}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
status: 'confirm',
message: 'Confirmed! We will text you when your order is out for delivery.',
delivery_estimate_id: 928101,
scheduled_dispatch_at: '2026-02-10T19:25:27Z'
})
});
const data = await response.json();
console.log(data);import requests
response = requests.post(
'https://www.locally.com/api/v2/cart/{{CART_HASH}}/{{UPC}}',
headers={'Locally-Api-Token': '{{API_TOKEN}}'},
json={
'status': 'confirm',
'message': 'Confirmed! We will text you when your order is out for delivery.',
'delivery_estimate_id': 928101,
'scheduled_dispatch_at': '2026-02-10T19:25:27Z',
},
)
print(response.json())Each request performs one operation on the cart item: send status (confirm or reject) for BOPIS/ROPIS orders, sts_status (confirm-brand, reject-brand, processing, or shipped) for Ship to Store orders (reject-brand requires a reason), refund to refund a confirmed item, order_resolution to record the order outcome, or message to message the shopper. When confirming a delivery order — as in the example — you may also include delivery_estimate_id and scheduled_dispatch_at (UTC, ISO 8601). A message or reason accompanying a status change is relayed to the shopper by text/email.
Example Response
{
"status": true,
"debug": "Inputs: array (\n 'status' => 'confirm',\n 'message' => 'Confirmed! We will text you when your order is out for delivery.',\n 'delivery_estimate_id' => 928101,\n 'scheduled_dispatch_at' => '2026-02-10T19:25:27Z',\n) | ",
"code": 101
}Response Explanation
status—truewhen the update was applied (HTTP200); failures returnstatus: falsewith HTTP500and amessagefield explaining why (for example, a disallowed status transition).debug— Diagnostic echo of the request body as Locally parsed it (PHPvar_exportformat), useful when troubleshooting rejected updates; not intended to be parsed programmatically.code— Returned forstatusupdates:101means the change was applied;102means the item was already in the requested state (treated as success, nothing changed).

