Manual delivery status update

For testing purposes only. Updates the delivery status of a cart.

Request Parameters

🏷️ header · unmarked parameters are query params

ParameterTypeRequiredDescription
Locally-Api-Token 🏷️stringYesLocally API token must be passed in the header to authenticate the API consumer.
hashstringYesCart hash.
statusstringYesDelivery 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. When false, the response also carries a top-level error_code and explanatory msg — always check success, not just the HTTP status.
  • data.delivery_status — The cart's delivery stage after the update: 50 canceled, 60 pickup, 70 pickup_complete/dropoff, 90 delivered — not the 15 request codes. Each stage advance also fires the matching delivery webhook.
  • data.mock_status — Echo of the requested stage as code - name: 1 canceled, 2 pickup, 3 pickup_complete, 4 dropoff, 5 delivered.
  • data.session.id — Locally session ID, returned on every response. Replay it via the Locally-Api-Session-Id header 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-level error_code.
Query Params
string
required

Cart hash

string
required

Delivery status

Headers
string
required

Locally API token must be passed in the header to authenticate the API consumer

Responses
200

Successful

400

Bad Request

401

Unauthorized

402

Request Failed

403

Forbidden

404

Not Found

429

Too Many Requests

500

Server Error

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!