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. |
confirmed_qty 📦 | integer | No | Accept fewer units than were ordered. A whole number from 1 to the quantity ordered; send the full ordered quantity, or omit the field, for an ordinary confirm. To accept none, send a status of reject instead. In-store pickup and reserve orders only. |
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.
Confirming a partial quantity
When you only have some of the units a shopper ordered, confirm the quantity you can actually fill by sending confirmed_qty alongside status: confirm:
{
"status": "confirm",
"confirmed_qty": 2,
"message": "We only had 2 of these in stock, so those are being held for you."
}The order is reduced to that quantity: the shopper is charged for confirmed_qty units instead of the full order, sales tax is recalculated on the smaller amount, and Get a Single Cart then reports the accepted qty alongside the original_qty that was ordered.
Rules worth coding against:
confirmed_qtymust be a whole number from1to the quantity ordered. Zero, negative values, decimals and anything above the ordered quantity are rejected, and the item is left untouched.- To accept none of the units, send a
statusofreject. Do not sendconfirmed_qty: 0. - Sending the full ordered quantity behaves exactly like a confirm without the field, and no original quantity is recorded.
- Only in-store pickup (BOPIS) and reserve (ROPIS) orders support it. Ship to Store, delivery, affiliate, marketplace and prepaid orders are rejected with a message naming the order type — confirm those in full, or reject them.
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).

