Update a Cart Item

Request Parameters

🏷️ header · 🔗 path · 📦 body field · unmarked parameters are query params

ParameterTypeRequiredDescription
Locally-Api-Token 🏷️stringNoLocally issued API key.
cart_hash 🔗stringYesUnique cart identifier.
upc 🔗stringYesVariant-level identifier for item that exists in cart.
status 📦stringYesOne of: confirm, reject.
sts_status 📦stringNoOne of: confirm-brand, reject-brand, processing, shipped.
reason 📦stringNoAn sts_status of reject-brand requires a reason.
refund 📦booleanNoOnly include if a refund is required.
order_resolution 📦stringNo1 — 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 📦stringNo
delivery_estimate_id 📦numberNo
scheduled_dispatch_at 📦stringNoThis 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

  • statustrue when the update was applied (HTTP 200); failures return status: false with HTTP 500 and a message field explaining why (for example, a disallowed status transition).
  • debug — Diagnostic echo of the request body as Locally parsed it (PHP var_export format), useful when troubleshooting rejected updates; not intended to be parsed programmatically.
  • code — Returned for status updates: 101 means the change was applied; 102 means the item was already in the requested state (treated as success, nothing changed).
Path Params
string
required

Unique cart identifier

string
required

Variant-level identifier for item that exists in cart

Body Params
string
enum
required
Allowed:
string
enum
Allowed:
string

An sts_status of reject-brand requires a reason.

boolean

Only include if a refund is required

string

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

string
number
string

This value must be in UTC time in ISO 8601 format. Example: 2026-02-10T19:25:27Z

Headers
string

Locally issued API key

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json