Orders
GET /v1/orders returns one location’s orders from every channel: POS, online, kiosk, and third-party platforms. Each order carries its items, amounts, and tenders. Orders come by business day, and only for days that have ended. After a first load, ask only for the days that changed.
Needs the orders:read scope (Orders in Back Office). Customer contact details also need orders.customer:read (Customer contact details). See Scopes.
Request
Use one of two modes per request:
# A date range: first load or reconciliation
curl "https://developer.selflane.com/v1/orders?location=64b0c1e2f3a4b5c6d7e8f901&from=2026-11-01&to=2026-11-30" \
-H "Authorization: Bearer $SELFLANE_API_KEY"
# Every day changed since your last sync
curl "https://developer.selflane.com/v1/orders?location=64b0c1e2f3a4b5c6d7e8f901&updated_since=2026-11-24T18:25:00.000Z" \
-H "Authorization: Bearer $SELFLANE_API_KEY"| Parameter | Required | Notes |
|---|---|---|
from, to | Together, instead of updated_since | First and last business day, YYYY-MM-DD, inclusive. At most 31 days counting both ends. A day is left out until 5 minutes after it ends. |
updated_since | Instead of from and to | The checkpoint from your previous sync: an ISO 8601 time with Z or an offset |
limit | No | Orders per page, 1 to 200. Default 50. |
cursor | No | The next_cursor from the previous page. Works only with the same location and the same from and to, or updated_since. |
location | When the key covers several locations | One of the key’s locations |
Orders come by business day, then by id. Keep requesting with cursor until next_cursor is null. Only that last page has a checkpoint; earlier pages have checkpoint null. A page can hold fewer than limit orders, or none, and still have a next_cursor.
Response
{
"data": [
{
"id": "6b04329954af28e4b60255c3",
"location": "64b0c1e2f3a4b5c6d7e8f901",
"number": 1,
"business_date": "2026-11-23",
"version": "2026-11-24T07:41:10.512Z",
"origin": "pos",
"platform": null,
"fulfillment": "drive",
"status": "fulfilled",
"created": "2026-11-23T13:53:29.358Z",
"needed": "2026-11-23T13:53:29.106Z",
"note": null,
"currency": "usd",
"amounts": { "item_sales": 1079, "discount": 0, "saved": 0, "service_charge": 0, "tax": 82, "tip": 0, "fee": 0, "selflane": 0, "adjustment": -1, "deduction": 0, "gift": 0, "third_party": 0, "total": 1160 },
"items": [
{
"item_id": "6664f25ea0d313be606401f8",
"name": "Large Twister Burrito",
"quantity": 1,
"price": 1079,
"unit_price": 1079,
"percent_off": 0,
"seat": 1,
"note": null,
"modifiers": [{ "name": "Meat", "options": [{ "name": "Chicken", "price": 0, "quantity": 1 }], "sub_options": [] }]
}
],
"tenders": [{ "method": "cash", "amount": 1160, "tip": 0, "payment_id": null, "card": null }]
}
],
"next_cursor": null,
"checkpoint": "2026-11-24T18:25:00.000Z"
}Fields
All money is integer cents in currency. Times are ISO 8601 in UTC.
| Field | Meaning |
|---|---|
id | The order’s ID. It doesn’t change. |
number | The order number staff and the customer see. It restarts each day, so it isn’t unique. Can be null. |
business_date | The business day of the order’s needed time. A business day starts at the location’s POS start hour, as on Daily sales. |
version | When the day’s sales last changed or were recalculated, or when the day ended if that’s later. Every order on a day has the same version, except when the day changes while you page through a range. |
origin | pos (staff), online (the customer, online or by QR code), kiosk, or third_party |
platform | For third_party, the platform, such as DoorDash or UberEats. Otherwise null. |
fulfillment | pickup, delivery, dinein, curbside, drive (drive-thru), qrcode, or retail |
status | open, in_progress, ready, fulfilled, or canceled |
created, needed | When the order was placed, and when it’s due. For delivery, needed is when it reaches the customer. created can be null. |
note | The order’s kitchen note |
amounts | The Daily sales totals for this one order: item_sales, discount, saved, service_charge, tax, tip, fee, selflane, adjustment, deduction, gift, third_party, and total (what the customer paid). adjustment can be negative, and deduction is zero or negative. |
items | The lines on the order. item_id is the item’s ID on Menu, or null for an open-price line. price is the item’s price and unit_price includes its options. percent_off is a line discount in percent. |
items[].modifiers | The options picked, by name, with their price and any sub-options. Default options the customer removed aren’t listed. |
tenders | How the order was paid: its own tenders, then those on its split checks. Each has method (such as cash, card, online, stripe, or excard), amount (tip included), tip, card (brand and last4, either of which can be null, or null for no card), and payment_id. |
tenders[].payment_id | The payment’s id on Payments. Set for Stripe payments listed there. Otherwise null, for example for cash, PAX terminals, or an external card terminal. |
customer | name, phone, and email, each null when not given. Only with orders.customer:read. Without it, the field is missing. |
Accept new fulfillment and method values without failing.
Cancels, voids, and merges
- A canceled order stays, with
statuscanceled. - A voided or removed item is no longer on the order.
- An order merged into another stays as
fulfilledwith no items. - Orders aren’t deleted once their day has ended.
Keep your copy current
- First load. Read the history you need with
fromandto, 31 days at a time. Keep thecheckpointfrom the first of those reads. - Each sync. Call with
updated_sinceset to your stored checkpoint, and follownext_cursorto the end. Replace each stored order with the sameid. Store the newcheckpointonly after you’ve applied the last page. - Retry. If a sync fails partway, start again from the stored checkpoint. Orders you already have come back, and replacing by
idkeeps one copy.
A sync returns every order on each day that changed since your checkpoint. When anything on a day affects sales, such as an added or voided item, a cancel, a reopen, a split or merge, or a refund, the whole day comes back.
A sync covers changes up to 5 minutes before its first request. A day that changes while you page through comes back in the next sync. Today’s business day is never returned; it comes back in the first sync after it ends.
Changes to the customer’s contact details after the day ends, Selflane platform refunds, and card disputes don’t bring a day back. For refunds and disputes, see Payments.
Errors
| Status | code | When |
|---|---|---|
400 | invalid_parameter | Neither or both modes, only one of from and to, a date that doesn’t parse, updated_since without Z or an offset, updated_since in the future, or limit out of range. param names it. |
400 | invalid_date_range | to is before from, or the range covers more than 31 days |
400 | invalid_cursor | The cursor isn’t valid, or wasn’t issued for this location and these parameters |
400 | location_required | The key covers several locations and none was named |
403 | insufficient_scope | The key lacks orders:read |
403 | location_not_permitted | The key doesn’t cover the named location |
403 | plan_required | The location isn’t live or is below the POS plan |
404 | location_missing | The location no longer exists |
503 | replica_unavailable | Orders are briefly unavailable. Retry after Retry-After. |
503 | order_timeout | The request took too long. Retry after Retry-After, or ask for fewer orders. |
See Errors for the codes every endpoint shares.