Skip to Content

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"
ParameterRequiredNotes
from, toTogether, instead of updated_sinceFirst 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_sinceInstead of from and toThe checkpoint from your previous sync: an ISO 8601 time with Z or an offset
limitNoOrders per page, 1 to 200. Default 50.
cursorNoThe next_cursor from the previous page. Works only with the same location and the same from and to, or updated_since.
locationWhen the key covers several locationsOne 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.

FieldMeaning
idThe order’s ID. It doesn’t change.
numberThe order number staff and the customer see. It restarts each day, so it isn’t unique. Can be null.
business_dateThe business day of the order’s needed time. A business day starts at the location’s POS start hour, as on Daily sales.
versionWhen 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.
originpos (staff), online (the customer, online or by QR code), kiosk, or third_party
platformFor third_party, the platform, such as DoorDash or UberEats. Otherwise null.
fulfillmentpickup, delivery, dinein, curbside, drive (drive-thru), qrcode, or retail
statusopen, in_progress, ready, fulfilled, or canceled
created, neededWhen the order was placed, and when it’s due. For delivery, needed is when it reaches the customer. created can be null.
noteThe order’s kitchen note
amountsThe 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.
itemsThe 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[].modifiersThe options picked, by name, with their price and any sub-options. Default options the customer removed aren’t listed.
tendersHow 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_idThe payment’s id on Payments. Set for Stripe payments listed there. Otherwise null, for example for cash, PAX terminals, or an external card terminal.
customername, 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 status canceled.
  • A voided or removed item is no longer on the order.
  • An order merged into another stays as fulfilled with no items.
  • Orders aren’t deleted once their day has ended.

Keep your copy current

  1. First load. Read the history you need with from and to, 31 days at a time. Keep the checkpoint from the first of those reads.
  2. Each sync. Call with updated_since set to your stored checkpoint, and follow next_cursor to the end. Replace each stored order with the same id. Store the new checkpoint only after you’ve applied the last page.
  3. Retry. If a sync fails partway, start again from the stored checkpoint. Orders you already have come back, and replacing by id keeps 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

StatuscodeWhen
400invalid_parameterNeither 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.
400invalid_date_rangeto is before from, or the range covers more than 31 days
400invalid_cursorThe cursor isn’t valid, or wasn’t issued for this location and these parameters
400location_requiredThe key covers several locations and none was named
403insufficient_scopeThe key lacks orders:read
403location_not_permittedThe key doesn’t cover the named location
403plan_requiredThe location isn’t live or is below the POS plan
404location_missingThe location no longer exists
503replica_unavailableOrders are briefly unavailable. Retry after Retry-After.
503order_timeoutThe request took too long. Retry after Retry-After, or ask for fewer orders.

See Errors for the codes every endpoint shares.

Last updated on