post
https://www.locally.com/headless/api/1.0/cart/update/delivery/status
For testing purposes only. Updates the delivery status of a cart.
Request Parameters
🏷️ header · unmarked parameters are query params
| Parameter | Type | Required | Description |
|---|---|---|---|
Locally-Api-Token 🏷️ | string | Yes | Locally API token must be passed in the header to authenticate the API consumer. |
hash | string | Yes | Cart hash. |
status | string | Yes | Delivery status. |
Example Request
curl 'https://www.locally.com/headless/api/1.0/cart/update/delivery/status' \
--request POST \
--header 'Locally-Api-Token: {{API_TOKEN}}' \
--url-query 'hash={{CART_HASH}}' \
--url-query 'status=2'const response = await fetch(
'https://www.locally.com/headless/api/1.0/cart/update/delivery/status?hash={{CART_HASH}}&status=2',
{
method: 'POST',
headers: {
'Locally-Api-Token': '{{API_TOKEN}}'
}
}
);
const data = await response.json();
console.log(data);import requests
url = "https://www.locally.com/headless/api/1.0/cart/update/delivery/status"
headers = {"Locally-Api-Token": "{{API_TOKEN}}"}
params = {"hash": "{{CART_HASH}}", "status": "2"}
response = requests.post(url, headers=headers, params=params)
print(response.json())status is a numeric delivery stage: 1 (canceled), 2 (pickup), 3 (pickup_complete), 4 (dropoff), or 5 (delivered). The cart referenced by hash must be a test cart placed as a delivery order.
Example Response
{
"success": true,
"data": {
"delivery_status": 60,
"mock_status": "2 - pickup",
"session": {
"id": "abc999"
}
},
"msg": "Delivery status updated to 2."
}Response Explanation
success— Boolean outcome of the call. Whenfalse, the response also carries a top-levelerror_codeand explanatorymsg— always checksuccess, not just the HTTP status.data.delivery_status— The cart's delivery stage after the update:50canceled,60pickup,70pickup_complete/dropoff,90delivered — not the1–5request codes. Each stage advance also fires the matching delivery webhook.data.mock_status— Echo of the requested stage ascode - name:1canceled,2pickup,3pickup_complete,4dropoff,5delivered.data.session.id— Locally session ID, returned on every response. Replay it via theLocally-Api-Session-Idheader to persist the shopper's session between calls; expired IDs are transparently replaced with fresh ones.msg— Human-readable status text. Unlike most endpoints it is populated on success (Delivery status updated to 2.); on failure it carries the error text alongside a top-levelerror_code.
200Successful
400Bad Request
401Unauthorized
402Request Failed
403Forbidden
404Not Found
429Too Many Requests
500Server Error

