API Keys and Public API
Overview
SpectaQR provides a versioned read API for order data.
Current live endpoints:
GET /api/v1/locations/{locationSlug}/ordersGET /api/v1/locations/{locationSlug}/orders/{orderSlug}
This API is organization-scoped and key-authenticated.
The number of active API keys depends on your plan; see plan limits. Creating a key past the limit is refused, and to downgrade to a plan with fewer keys you must revoke the extras first.
Authentication
Send your API key in either header:
x-api-key: <your secret>Authorization: Bearer <your secret>
Only the venue owner can create/revoke keys from the staff settings dialog. Secrets are shown once at creation and then masked.
Base URL and Versioning
- Base URL:
https://<your-web-app-domain> - Versioned path prefix:
/api/v1 - Response version header:
X-API-Version: v1
Error Format
All errors use a canonical envelope:
{
"error": {
"code": "unauthorized",
"message": "Unauthorized",
"requestId": "9b3d9ef5-89be-47a9-a5d0-9417f7f6c630",
"details": {
"hint": "optional"
}
}
}
Common status codes:
400invalid request401unauthorized or missing API key404location/order not found500internal server error
Endpoints
GET /api/v1/locations/{locationSlug}/orders
List orders for one location.
Path params:
locationSlug(string)
Query params:
updatedAfter(optional, Unix milliseconds): only orders whoseupdatedAtis later.limit(optional): orders per page, from 1 to 200. The default is 50.cursor(optional): thenextCursorof the previous page. Send it with the sameupdatedAfter.
Orders come one page at a time, oldest updatedAt first. To sync, follow nextCursor until it is null, then poll
with updatedAfter set to the highest updatedAt you received. An order that changes while you page through comes
back on a later page with its new updatedAt, so store orders by slug and keep the latest copy. A cursor from
another list, or with another updatedAfter, returns 400 with the code invalid_cursor.
Success response:
{
"version": "v1",
"locationSlug": "downtown",
"orders": [
{
"slug": "K7M2Q9XA",
"orderNumber": 42,
"locationSlug": "downtown",
"locationTimezone": "America/New_York",
"currencyId": "USD",
"table": {
"alias": 12,
"slug": "table-12",
"name": "Patio 1"
},
"isOpen": true,
"items": [
{
"menuItemId": "j57j4...",
"name": "Burger",
"orderItem": {
"_id": "h72da...",
"updatedAt": 1735689600000,
"deliveryStatus": "pending",
"deliveryFlow": "instant"
},
"prepStation": {
"id": "k17b2...",
"kind": "kitchen",
"name": "Kitchen"
},
"pricing": {
"listedPriceMinor": 1495,
"discountMinor": 0,
"netMinor": 1495,
"taxMinor": 133,
"grossMinor": 1628,
"taxRateMilliPercent": 8875,
"taxIncluded": false
},
"paymentId": null
},
{
"menuItemId": "j58k1...",
"name": "Packaged Snack",
"orderItem": {
"_id": "h72db...",
"updatedAt": 1735689600000,
"deliveryStatus": "pending",
"deliveryFlow": "instant"
},
"prepStation": {
"id": "k17b2...",
"kind": "kitchen",
"name": "Kitchen"
},
"pricing": {
"listedPriceMinor": 300,
"discountMinor": 0,
"netMinor": 300,
"taxMinor": 0,
"grossMinor": 300,
"taxRateMilliPercent": 0,
"taxIncluded": false
},
"paymentId": null
}
],
"payments": [],
"totals": {
"discountMinor": 0,
"subtotalMinor": 1795,
"taxMinor": 133,
"totalMinor": 1928,
"tipMinor": 0,
"totalWithTipMinor": 1928,
"taxBreakdown": [
{ "taxRateMilliPercent": 8875, "taxIncluded": false, "netMinor": 1495, "taxMinor": 133, "grossMinor": 1628, "lineCount": 1 },
{ "taxRateMilliPercent": 0, "taxIncluded": false, "netMinor": 300, "taxMinor": 0, "grossMinor": 300, "lineCount": 1 }
]
},
"orderedAt": 1735689600000,
"updatedAt": 1735689601000
}
],
"nextCursor": null
}
Order fields:
locationTimezone— the location's IANA timezone (e.g.Europe/Berlin). All timestamps are UTC Unix milliseconds; use it to show local times, as staff screens do.orderedAt— when the order was placed.updatedAtchanges whenever the order or one of its items changes, including a status change, soupdatedAfterpolling catches every change.orderNumber— what staff and guests call the order (42is shown as #42). Per location, it restarts at 1 each local day, so it is not unique: useslugas the id.isOpen— false once every item is delivered or canceled.closedAt— set when staff closed the order with items still pending (Close order): those items were marked delivered or canceled. Absent when the order completed item by item.currencyId— uppercase ISO 4217 code. Every amount (…Minor) is an integer in that currency's ISO 4217 minor units: cents for every currency SpectaQR accepts (1928= $19.28).totals— over billable lines (canceled ones excluded), after any discount. Tax is computed once per order and rate, rounded half-up, andtaxBreakdownhas one row per rate and inclusion.totalMinoris the goods total and excludes any tip. UsetaxBreakdownfor tax reporting.totals.discount— the discount staff set on the order, if any:{ "kind": "percent", "milliPercent": 10000 }(10% off, in thousandths of a percent, like tax rates) or{ "kind": "amount", "amountMinor": 500 }. Staff's reason for it is never included.totals.discountMinor— what the discount took off the listed prices, before tax: the sum of the lines'pricing.discountMinor.0without a discount.totals.tip— the optional staff or guest tip. It is a percentage (milliPercent) or a fixed amount (amountMinor), withsetBy. A percentage uses the order total in most countries and the pre-tax subtotal in the US and Canada.totals.tipMinor— the computed tip outside the tax base.0without a tip.totals.totalWithTipMinoris the goods total plus this amount. A POS books it apart from the sales, as bacșiș in Romania andTrinkgeldANin Germany.payments— rounds the guest paid online before they were sent to staff. Empty until online payments are available, and for orders paid at the venue. Each payment hasid,provider(venue_stripe: the venue's own Stripe account),status(succeeded,partially_refundedorrefunded),amountMinor,refundedAmountMinor,disputed,currency,paidAtandstripePaymentIntentId. A payment is not a fiscal record: the venue still records the order on its till.
Item fields:
orderItem.deliveryStatus—pending,ready,deliveredorcanceled.readyonly occurs on lines whosedeliveryFlowisprepared: the station has finished the item and it waits to be carried over. A ready line still counts as open and is billed. A canceled line stays initemsbut not intotals.orderItem.deliveryFlow—instant(pending, delivered or canceled) orprepared(pending, ready, delivered or canceled), as the menu item was set when the line was ordered.orderItem.estimatedMinutes— the minutes the item takes to prepare, when its menu item has an estimate. Only onpreparedlines.name— the item's name as ordered, frozen at order time.pricing— the line's price. Each line is one unit.listedPriceMinoris what the menu showed, before any discount: gross whentaxIncluded(VAT markets), net when tax is added on top (US/CA).discountMinoris the line's share of the order discount, taken off the listed price before tax (0on canceled lines).netMinor + taxMinor = grossMinor, after the discount. For billable lines,taxMinoris the line's share of its rate's tax, so the lines add up exactly tototals; a share can move by one minor unit when another line joins or leaves the order.taxRateMilliPercentis in thousandths of a percent:19000= 19%,8875= 8.875%.prepStation— the prep station the line was routed to when it was ordered:id,kind(kitchen,grill,bar,dessertorexpo) andname. It never changes after the order is placed, even if the station is later renamed or removed.paymentId— thepayments[].idthe guest paid this line with online, ornullfor a line paid at the venue. Alwaysnulluntil online payments are available.
GET /api/v1/locations/{locationSlug}/orders/{orderSlug}
Get one order by slug.
Path params:
locationSlug(string)orderSlug(string)
Success response:
{
"version": "v1",
"locationSlug": "downtown",
"order": {
"slug": "K7M2Q9XA",
"orderNumber": 42,
"locationSlug": "downtown",
"locationTimezone": "America/New_York",
"currencyId": "USD",
"table": {
"alias": 12,
"slug": "table-12",
"name": "Patio 1"
},
"isOpen": true,
"items": [
{
"menuItemId": "j57j4...",
"name": "Burger",
"orderItem": {
"_id": "h72da...",
"updatedAt": 1735689600000,
"deliveryStatus": "pending",
"deliveryFlow": "instant"
},
"prepStation": {
"id": "k17b2...",
"kind": "kitchen",
"name": "Kitchen"
},
"pricing": {
"listedPriceMinor": 1495,
"discountMinor": 0,
"netMinor": 1495,
"taxMinor": 133,
"grossMinor": 1628,
"taxRateMilliPercent": 8875,
"taxIncluded": false
},
"paymentId": null
},
{
"menuItemId": "j58k1...",
"name": "Packaged Snack",
"orderItem": {
"_id": "h72db...",
"updatedAt": 1735689600000,
"deliveryStatus": "pending",
"deliveryFlow": "instant"
},
"prepStation": {
"id": "k17b2...",
"kind": "kitchen",
"name": "Kitchen"
},
"pricing": {
"listedPriceMinor": 300,
"discountMinor": 0,
"netMinor": 300,
"taxMinor": 0,
"grossMinor": 300,
"taxRateMilliPercent": 0,
"taxIncluded": false
},
"paymentId": null
}
],
"payments": [],
"totals": {
"discountMinor": 0,
"subtotalMinor": 1795,
"taxMinor": 133,
"totalMinor": 1928,
"tipMinor": 0,
"totalWithTipMinor": 1928,
"taxBreakdown": [
{ "taxRateMilliPercent": 8875, "taxIncluded": false, "netMinor": 1495, "taxMinor": 133, "grossMinor": 1628, "lineCount": 1 },
{ "taxRateMilliPercent": 0, "taxIncluded": false, "netMinor": 300, "taxMinor": 0, "grossMinor": 300, "lineCount": 1 }
]
},
"orderedAt": 1735689600000,
"updatedAt": 1735689601000
}
}
Changelog
v1initial public orders read APIv1orders includelocationTimezoneandorderedAt(additive)v1(before public launch) items carrynameandpricing; orders carryisOpenandcompletedAt;totalsbecamesubtotalMinor,taxMinor,totalMinorandtaxBreakdown(the…AtOrder, discount and rounding fields are gone)v1(before public launch) orders carryorderNumberandclosedAt;totalscarrydiscountanddiscountMinor, and linepricingcarriesdiscountMinor. Net, tax and gross amounts are after the discountv1(before public launch) orders carrypaymentsand items carrypaymentId(both empty until online payments are available)v1(before public launch) the order list is paged withlimit,cursorandnextCursor, oldestupdatedAtfirst