Orders
OrdersService reads orders and cash drawer sessions. Devices create and change them offline and push them through SyncService; see the entities below for the rules the server enforces.
ListOrders#
Request body
locationIdstringlocation_idEmpty for every location.
stateOrderStateOptional filter; unspecified lists every state.
customerIdstringcustomer_idOptional: only this customer's orders.
sourceOrderSourceOptional: only orders placed this way (a self-order kiosk's, say).
pageSizeintegerpage_sizePage through results newest first; pass the previous response's next_page_token.
pageTokenstringpage_tokenfromDatestringfrom_dateOptional: only orders opened in this range of local dates (YYYY-MM-DD, both inclusive) in time_zone, narrowed by from_time and to_time (HH:MM) as in GetSalesSummaryRequest. Both dates or neither.
toDatestringto_datetimeZonestringtime_zonefromTimestringfrom_timetoTimestringto_timeResponse
ordersOrder[]nextPageTokenstringnext_page_tokencurl https://api.buziin.tech/holygrail.orders.v1.OrdersService/ListOrders \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"state": "ORDER_STATE_OPEN",
"source": "ORDER_SOURCE_REGISTER",
"pageSize": 50,
"fromDate": "2026-12-05",
"toDate": "2026-12-05"
}'{
"orders": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"deviceId": "",
"number": "",
"state": "ORDER_STATE_OPEN",
"openedAt": "",
"closedAt": "",
"note": "",
"orderDiscount": 1,
"customerId": "",
"loyaltyPointsRedeemed": "0",
"tableId": "",
"guestCount": 1,
"tabName": "Amina Mushi",
"hlc": "",
"bookingId": "",
"teamMemberId": "",
"ownerId": "",
"voidReason": "",
"voidedById": "",
"mergedIntoId": "",
"backdated": false,
"recordedAt": "",
"reservationId": "",
"source": "ORDER_SOURCE_REGISTER",
"diningOption": "DINING_OPTION_DINE_IN",
"callNumber": "",
"cancelled": false
}
],
"nextPageToken": ""
}curl https://api.buziin.tech/holygrail.orders.v1.OrdersService/GetOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"order": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"deviceId": "",
"number": "",
"state": "ORDER_STATE_OPEN",
"openedAt": "",
"closedAt": "",
"note": "",
"orderDiscount": 1,
"customerId": "",
"loyaltyPointsRedeemed": "0",
"tableId": "",
"guestCount": 1,
"tabName": "Amina Mushi",
"hlc": "",
"bookingId": "",
"teamMemberId": "",
"ownerId": "",
"voidReason": "",
"voidedById": "",
"mergedIntoId": "",
"backdated": false,
"recordedAt": "",
"reservationId": "",
"source": "ORDER_SOURCE_REGISTER",
"diningOption": "DINING_OPTION_DINE_IN",
"callNumber": "",
"cancelled": false
},
"payments": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"orderId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"deviceId": "",
"tender": "TENDER_CASH",
"amount": "150000",
"tip": "150000",
"tendered": "0",
"change": "0",
"drawerSessionId": "",
"reference": "",
"createdAt": "",
"refundId": "",
"label": "",
"reservationId": "",
"teamMemberId": "",
"methodId": "",
"methodName": "Amina Mushi",
"note": "",
"payLaterPlanId": ""
}
],
"refunds": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"orderId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"deviceId": "",
"amount": "150000",
"reason": "",
"createdAt": "",
"teamMemberId": "",
"approvedById": ""
}
],
"tickets": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"orderId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"deviceId": "",
"stationId": "",
"orderNumber": "",
"label": "",
"course": 0,
"kind": "TICKET_KIND_FIRE",
"createdAt": "",
"status": "TICKET_STATUS_NEW",
"statusAt": "",
"hlc": "",
"departmentId": "",
"doneItems": [
0
],
"priority": false,
"readyAt": ""
}
]
}FindOrder#
Request body
numberstringThe receipt number, e.g. "D2-000184".
curl https://api.buziin.tech/holygrail.orders.v1.OrdersService/FindOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"order": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"deviceId": "",
"number": "",
"state": "ORDER_STATE_OPEN",
"openedAt": "",
"closedAt": "",
"note": "",
"orderDiscount": 1,
"customerId": "",
"loyaltyPointsRedeemed": "0",
"tableId": "",
"guestCount": 1,
"tabName": "Amina Mushi",
"hlc": "",
"bookingId": "",
"teamMemberId": "",
"ownerId": "",
"voidReason": "",
"voidedById": "",
"mergedIntoId": "",
"backdated": false,
"recordedAt": "",
"reservationId": "",
"source": "ORDER_SOURCE_REGISTER",
"diningOption": "DINING_OPTION_DINE_IN",
"callNumber": "",
"cancelled": false
},
"refunds": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"orderId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"deviceId": "",
"amount": "150000",
"reason": "",
"createdAt": "",
"teamMemberId": "",
"approvedById": ""
}
]
}ExportOpenOrders#
ExportOpenOrders gives a register's first sync the location's open tabs, their payments and the kitchen tickets still in play, with the feed cursor to pull from afterwards.
Request body
locationIdstringlocation_idResponse
ordersOrder[]paymentsPayment[]ticketsKitchenTicket[]Tickets not yet bumped, and those bumped in the last two hours.
cursorint64 stringcurl https://api.buziin.tech/holygrail.orders.v1.OrdersService/ExportOpenOrders \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"orders": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"deviceId": "",
"number": "",
"state": "ORDER_STATE_OPEN",
"openedAt": "",
"closedAt": "",
"note": "",
"orderDiscount": 1,
"customerId": "",
"loyaltyPointsRedeemed": "0",
"tableId": "",
"guestCount": 1,
"tabName": "Amina Mushi",
"hlc": "",
"bookingId": "",
"teamMemberId": "",
"ownerId": "",
"voidReason": "",
"voidedById": "",
"mergedIntoId": "",
"backdated": false,
"recordedAt": "",
"reservationId": "",
"source": "ORDER_SOURCE_REGISTER",
"diningOption": "DINING_OPTION_DINE_IN",
"callNumber": "",
"cancelled": false
}
],
"payments": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"orderId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"deviceId": "",
"tender": "TENDER_CASH",
"amount": "150000",
"tip": "150000",
"tendered": "0",
"change": "0",
"drawerSessionId": "",
"reference": "",
"createdAt": "",
"refundId": "",
"label": "",
"reservationId": "",
"teamMemberId": "",
"methodId": "",
"methodName": "Amina Mushi",
"note": "",
"payLaterPlanId": ""
}
],
"tickets": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"orderId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"deviceId": "",
"stationId": "",
"orderNumber": "",
"label": "",
"course": 0,
"kind": "TICKET_KIND_FIRE",
"createdAt": "",
"status": "TICKET_STATUS_NEW",
"statusAt": "",
"hlc": "",
"departmentId": "",
"doneItems": [
0
],
"priority": false,
"readyAt": ""
}
],
"cursor": "0"
}SendReceipt#
SendReceipt emails a completed order's receipt.
Request body
orderIdstringorder_idemailstringpaymentIdstringpayment_idOptional: one payment of a split bill. The receipt then says what that guest paid, and can be sent before the rest of the bill is paid.
Response
No fields: send {}.
curl https://api.buziin.tech/holygrail.orders.v1.OrdersService/SendReceipt \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "amina@example.co.tz"
}'{}GetDrawerSession#
Request body
idstringResponse
sessionDrawerSessionmovementsDrawerMovement[]cashSalesint64 stringcash_salesCash sales so far (open sessions) or at close.
curl https://api.buziin.tech/holygrail.orders.v1.OrdersService/GetDrawerSession \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"session": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"deviceId": "",
"state": "DRAWER_STATE_OPEN",
"openedAt": "",
"openingFloat": "0",
"closedAt": "",
"countedCash": 1,
"expectedCash": "0",
"openedById": "",
"closedById": ""
},
"movements": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"sessionId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"kind": "DRAWER_MOVEMENT_KIND_PAY_IN",
"amount": "150000",
"reason": "",
"createdAt": "",
"teamMemberId": ""
}
],
"cashSales": "0"
}GetSalesSummary#
GetSalesSummary reports closed orders over a range of local dates.
Request body
locationIdstringlocation_idEmpty for every location.
fromDatestringfrom_dateLocal dates, YYYY-MM-DD, both inclusive.
toDatestringto_datetimeZonestringtime_zoneIANA time zone the dates are in, e.g. "America/New_York".
fromTimestringfrom_timeOptional local times, HH:MM: the range starts at from_time on from_date and ends at to_time on to_date (exclusive). Empty means the whole day, so a night shift is from 18:00 on one date to 02:00 on the next.
toTimestringto_timeResponse
currencyCodestringcurrency_codetotalsSalesTotalsSales by department, largest first; lines with none are under "".
Discounts given, largest first: one row per preset (by its current name), one per custom discount name, and "Rewards and other" for plain amounts such as loyalty rewards. They add up to totals.discounts.
Payments by checkout method, largest first.
curl https://api.buziin.tech/holygrail.orders.v1.OrdersService/GetSalesSummary \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"fromDate": "2026-12-05",
"toDate": "2026-12-05"
}'{
"currencyCode": "TZS",
"totals": {
"grossSales": "0",
"discounts": 1,
"netSales": "0",
"tax": "150000",
"collected": "0",
"tips": "0",
"orders": 0,
"voidedOrders": 0,
"refunds": "0",
"refundCount": 1
},
"byTender": [
{
"tender": "TENDER_CASH",
"amount": "150000",
"tips": "0",
"payments": 0
}
],
"byDay": [
{
"key": "",
"netSales": "0",
"orders": 0
}
],
"byHour": [
{
"key": "",
"netSales": "0",
"orders": 0
}
],
"topItems": [
{
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"quantity": 1,
"sales": "0"
}
],
"byDepartment": [
{
"departmentId": "",
"name": "Amina Mushi",
"quantity": 1,
"sales": "0"
}
],
"byDiscount": [
{
"discountId": "",
"name": "Amina Mushi",
"orders": 0,
"uses": 0,
"amount": "150000",
"custom": false
}
],
"byMethod": [
{
"name": "Amina Mushi",
"tender": "TENDER_CASH",
"amount": "150000",
"tips": "0",
"payments": 0,
"refunded": "0"
}
]
}GetLocationComparison#
GetLocationComparison puts the caller's locations side by side over the same local dates, each in its own time zone, against the period of the same length just before. Owners, admins and managers.
Request body
fromDatestringfrom_dateLocal dates, YYYY-MM-DD, both inclusive.
toDatestringto_dateResponse
currencyCodestringcurrency_codelocationsLocationSales[]previousFromDatestringprevious_from_dateThe previous period's dates, for labels.
previousToDatestringprevious_to_datecurl https://api.buziin.tech/holygrail.orders.v1.OrdersService/GetLocationComparison \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fromDate": "2026-12-05",
"toDate": "2026-12-05"
}'{
"currencyCode": "TZS",
"locations": [
{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"timeZone": "",
"netSales": "0",
"orders": 0,
"discounts": 1,
"refunds": "0",
"voidedOrders": 0,
"previousNetSales": "0",
"previousOrders": 0
}
],
"previousFromDate": "2026-12-05",
"previousToDate": "2026-12-05"
}GetSalesReport#
GetSalesReport is the detailed sales report (ADR 50): totals against a comparison period, sales by team member, department, category, item, modifier, ingredient and recipe, payment method, channel, location, day and hour, and insights drawn from them, under rich filters. Needs reports.view; costs and profit need reports.profit.
Request body
fromDatestringfrom_dateBusiness dates, YYYY-MM-DD, both inclusive, and optional clock times, as GetSalesSummaryRequest. A business day runs from the business's day end (BusinessSettings.day_end_minute) to the next.
toDatestringto_datefromTimestringfrom_timetoTimestringto_timetimeZonestringtime_zonefilterSalesReportFiltercompareFromDatestringcompare_from_dateOptional period to compare with, the same way; empty for none.
compareToDatestringcompare_to_datebyShiftDatebooleanby_shift_dateChoose sales by the date their named shift started instead of the business date (ADR 116), so a Night shift's sales after midnight stay with the night it began. Days in by_day are then shift dates too; clock times are ignored.
Response
currencyCodestringcurrency_codedayEndMinuteintegerday_end_minuteWhen the business day ends, minutes after midnight, and the instants the report covers (RFC 3339).
startsAtstringstarts_atendsAtstringends_attotalsSalesReportTotalspreviousSalesReportTotalsThe comparison period's totals, when asked for.
Register and kiosk, and dine in or take away.
insightsSalesInsight[]costsShownbooleancosts_shownWhether costs were filled in (the caller may see profit).
afterMidnightNetSalesint64 stringafter_midnight_net_salesSales after midnight that belong to the business day before.
afterMidnightOrdersintegerafter_midnight_ordersNamed shifts (ADR 116): sales by shift, with tips, voids, refunds and the comparison period's net sales; id "" for sales in no shift.
Each shift occurrence: a shift on the date it started.
curl https://api.buziin.tech/holygrail.orders.v1.OrdersService/GetSalesReport \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fromDate": "2026-12-05",
"toDate": "2026-12-05",
"filter": {
"locationIds": [
""
],
"teamMemberIds": [
""
],
"departmentIds": [
""
],
"categoryIds": [
""
],
"itemIds": [
""
],
"paymentMethods": [
""
],
"sources": [
"ORDER_SOURCE_REGISTER"
],
"diningOptions": [
"DINING_OPTION_DINE_IN"
],
"namedShiftIds": [
""
]
},
"compareFromDate": "2026-12-05",
"compareToDate": "2026-12-05"
}'{
"currencyCode": "TZS",
"dayEndMinute": 0,
"startsAt": "",
"endsAt": "",
"totals": {
"collected": "0",
"tips": "0",
"averageOrder": "0",
"voidedOrders": 0,
"voidedAmount": "150000",
"refunds": "0",
"refundCount": 1,
"customers": 0,
"guests": 0,
"costedNetSales": "0"
},
"previous": {
"collected": "0",
"tips": "0",
"averageOrder": "0",
"voidedOrders": 0,
"voidedAmount": "150000",
"refunds": "0",
"refundCount": 1,
"customers": 0,
"guests": 0,
"costedNetSales": "0"
},
"byDay": [
{
"key": "",
"netSales": "0",
"orders": 0
}
],
"byHour": [
{
"key": "",
"netSales": "0",
"orders": 0
}
],
"byWeekdayHour": [
{
"weekday": 0,
"hour": 0,
"netSales": "0",
"orders": 0
}
],
"byTeam": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"tips": "0",
"refunds": "0",
"voidedOrders": 0,
"voidedAmount": "150000",
"discountRateBp": 1,
"previousNetSales": "0",
"items": 0
}
],
"byDepartment": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"tips": "0",
"refunds": "0",
"voidedOrders": 0,
"voidedAmount": "150000",
"discountRateBp": 1,
"previousNetSales": "0",
"items": 0
}
],
"byCategory": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"tips": "0",
"refunds": "0",
"voidedOrders": 0,
"voidedAmount": "150000",
"discountRateBp": 1,
"previousNetSales": "0",
"items": 0
}
],
"byItem": [
{
"itemId": "",
"variantId": "",
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"categoryId": "",
"categoryName": "Amina Mushi",
"departmentId": "",
"departmentName": "Amina Mushi",
"measure": "0",
"unit": "",
"fromRecipe": false,
"hasCost": false,
"previousNetSales": "0",
"previousQuantity": 1
}
],
"byModifier": [
{
"modifierId": "",
"name": "Amina Mushi",
"groupId": "",
"groupName": "Amina Mushi",
"action": "",
"lines": 0,
"quantity": 1,
"sales": "0",
"itemLines": 0,
"topItem": ""
}
],
"byIngredient": [
{
"variantId": "",
"name": "Amina Mushi",
"quantity": 1,
"unit": "",
"cost": "150000",
"usedIn": [
""
],
"usedInCount": 1,
"shareBp": 0
}
],
"byRecipe": [
{
"itemId": "",
"variantId": "",
"name": "Amina Mushi",
"quantity": 1,
"netSales": "0",
"cost": "150000",
"unitCost": "150000",
"unitPrice": "150000",
"costBp": 0,
"ingredients": 0
}
],
"byMethod": [
{
"name": "Amina Mushi",
"tender": "TENDER_CASH",
"amount": "150000",
"tips": "0",
"payments": 0,
"refunded": "0"
}
],
"byLocation": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"tips": "0",
"refunds": "0",
"voidedOrders": 0,
"voidedAmount": "150000",
"discountRateBp": 1,
"previousNetSales": "0",
"items": 0
}
],
"byChannel": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"tips": "0",
"refunds": "0",
"voidedOrders": 0,
"voidedAmount": "150000",
"discountRateBp": 1,
"previousNetSales": "0",
"items": 0
}
],
"byDiscount": [
{
"discountId": "",
"name": "Amina Mushi",
"orders": 0,
"uses": 0,
"amount": "150000",
"custom": false
}
],
"insights": [
{
"tone": "",
"topic": "",
"title": "",
"detail": ""
}
],
"costsShown": false,
"afterMidnightNetSales": "0",
"afterMidnightOrders": 0,
"byShift": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"tips": "0",
"refunds": "0",
"voidedOrders": 0,
"voidedAmount": "150000",
"discountRateBp": 1,
"previousNetSales": "0",
"items": 0
}
],
"byShiftDay": [
{
"namedShiftId": "",
"name": "Amina Mushi",
"date": "2026-12-05",
"tips": "0",
"voidedOrders": 0,
"voidedAmount": "150000",
"refunds": "0",
"teamMembers": 0
}
]
}GetTableReport#
GetTableReport is how a restaurant's tables did over business dates: the guests seated (visitors), seatings (table turns), sales and time at the table, for each table on the floor plan, by day and by the hour guests were seated. Needs reports.view.
Request body
fromDatestringfrom_dateBusiness dates, YYYY-MM-DD, both inclusive, as GetSalesReportRequest.
toDatestringto_datetimeZonestringtime_zonelocationIdstringlocation_idOne location's tables; empty for every location.
compareFromDatestringcompare_from_dateOptional period to compare with; empty for none.
compareToDatestringcompare_to_dateResponse
currencyCodestringcurrency_codedaysintegerBusiness days in the period, for turns and guests per day.
totalsTableFiguresEvery table order, and tabs without a table that seated guests.
previousTableFiguresEvery day of the period, oldest first, including quiet ones.
tablesTablePerformance[]Every table on the floor plan, busiest first.
Tabs without a table that seated guests ("Sam at the bar").
seatsintegerSeats on the floor plan's tables.
curl https://api.buziin.tech/holygrail.orders.v1.OrdersService/GetTableReport \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fromDate": "2026-12-05",
"toDate": "2026-12-05",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"compareFromDate": "2026-12-05",
"compareToDate": "2026-12-05"
}'{
"currencyCode": "TZS",
"days": 0,
"totals": {
"guests": 0,
"seatings": 0,
"orders": 0,
"netSales": "0",
"seatedMinutes": "0",
"ordersWithoutGuests": 0
},
"previous": {
"guests": 0,
"seatings": 0,
"orders": 0,
"netSales": "0",
"seatedMinutes": "0",
"ordersWithoutGuests": 0
},
"byDay": [
{
"date": "2026-12-05",
"guests": 0,
"seatings": 0,
"netSales": "0"
}
],
"byHour": [
{
"hour": 0,
"guests": 0,
"seatings": 0
}
],
"tables": [
{
"tableId": "",
"name": "Amina Mushi",
"areaName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"locationName": "Amina Mushi",
"seats": 0,
"archived": false
}
],
"noTable": {
"guests": 0,
"seatings": 0,
"orders": 0,
"netSales": "0",
"seatedMinutes": "0",
"ordersWithoutGuests": 0
},
"seats": 0
}GetLaneReport#
GetLaneReport is a drive-thru lane's speed of service over business dates (ADR 81): from the order reaching the kitchen to the food ready, paid and handed out of the window, with averages, the 90th percentile, how many cars were served within the target, and by hour and day. Needs reports.view and the dining.drive_thru feature.
Request body
fromDatestringfrom_dateBusiness dates, YYYY-MM-DD, both inclusive, as GetSalesReportRequest.
toDatestringto_datetimeZonestringtime_zonelocationIdstringlocation_idOne location's lane; empty for every location.
targetSecondsintegertarget_secondsSeconds from sent to handed over that count as on target; 0 for the default (240, ADR 82).
Response
totalsLaneFiguresHours with cars, in clock order.
Every day of the period, oldest first, including quiet ones.
targetSecondsintegertarget_secondsThe target the report counted against, in seconds.
peakCarsPerHournumberpeak_cars_per_hourThe busiest hour's cars per hour, averaged over the days it had cars.
peakHourintegerpeak_hourtruncatedbooleanTrue when the period had more orders than the report reads (50,000); the figures are then over the first ones.
curl https://api.buziin.tech/holygrail.orders.v1.OrdersService/GetLaneReport \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fromDate": "2026-12-05",
"toDate": "2026-12-05",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"totals": {
"cars": 0,
"kitchenAvg": 0,
"kitchenP90": 0,
"payAvg": 0,
"totalAvg": 0,
"totalP50": 0,
"totalP90": 0,
"onTarget": 0,
"timed": 0,
"takingAvg": 0,
"windowAvg": 0
},
"byHour": [
{
"hour": 0
}
],
"byDay": [
{
"date": "2026-12-05"
}
],
"targetSeconds": 0,
"peakCarsPerHour": 0,
"peakHour": 0,
"truncated": false
}Types
The messages and enums these methods use. Field names are lowerCamelCase in JSON; the snake_case names work too. Enum values are sent as their names.
ListOrdersRequest
holygrail.orders.v1.ListOrdersRequest
locationIdstringlocation_idEmpty for every location.
stateOrderStateOptional filter; unspecified lists every state.
customerIdstringcustomer_idOptional: only this customer's orders.
sourceOrderSourceOptional: only orders placed this way (a self-order kiosk's, say).
pageSizeintegerpage_sizePage through results newest first; pass the previous response's next_page_token.
pageTokenstringpage_tokenfromDatestringfrom_dateOptional: only orders opened in this range of local dates (YYYY-MM-DD, both inclusive) in time_zone, narrowed by from_time and to_time (HH:MM) as in GetSalesSummaryRequest. Both dates or neither.
toDatestringto_datetimeZonestringtime_zonefromTimestringfrom_timetoTimestringto_timeListOrdersResponse
holygrail.orders.v1.ListOrdersResponse
ordersOrder[]nextPageTokenstringnext_page_tokenGetOrderRequest
holygrail.orders.v1.GetOrderRequest
idstringGetOrderResponse
holygrail.orders.v1.GetOrderResponse
orderOrderpaymentsPayment[]refundsRefund[]ticketsKitchenTicket[]FindOrderRequest
holygrail.orders.v1.FindOrderRequest
numberstringThe receipt number, e.g. "D2-000184".
ExportOpenOrdersRequest
holygrail.orders.v1.ExportOpenOrdersRequest
FindOrderByNumber looks up a completed order from its receipt, to take a return. Registers ask it when the sale was rung up on another device.
locationIdstringlocation_idExportOpenOrdersResponse
holygrail.orders.v1.ExportOpenOrdersResponse
ordersOrder[]paymentsPayment[]ticketsKitchenTicket[]Tickets not yet bumped, and those bumped in the last two hours.
cursorint64 stringSendReceiptRequest
holygrail.orders.v1.SendReceiptRequest
orderIdstringorder_idemailstringpaymentIdstringpayment_idOptional: one payment of a split bill. The receipt then says what that guest paid, and can be sent before the rest of the bill is paid.
SendReceiptResponse
holygrail.orders.v1.SendReceiptResponse
No fields.
GetDrawerSessionRequest
holygrail.orders.v1.GetDrawerSessionRequest
idstringGetDrawerSessionResponse
holygrail.orders.v1.GetDrawerSessionResponse
sessionDrawerSessionmovementsDrawerMovement[]cashSalesint64 stringcash_salesCash sales so far (open sessions) or at close.
GetSalesSummaryRequest
holygrail.orders.v1.GetSalesSummaryRequest
locationIdstringlocation_idEmpty for every location.
fromDatestringfrom_dateLocal dates, YYYY-MM-DD, both inclusive.
toDatestringto_datetimeZonestringtime_zoneIANA time zone the dates are in, e.g. "America/New_York".
fromTimestringfrom_timeOptional local times, HH:MM: the range starts at from_time on from_date and ends at to_time on to_date (exclusive). Empty means the whole day, so a night shift is from 18:00 on one date to 02:00 on the next.
toTimestringto_timeGetSalesSummaryResponse
holygrail.orders.v1.GetSalesSummaryResponse
currencyCodestringcurrency_codetotalsSalesTotalsSales by department, largest first; lines with none are under "".
Discounts given, largest first: one row per preset (by its current name), one per custom discount name, and "Rewards and other" for plain amounts such as loyalty rewards. They add up to totals.discounts.
Payments by checkout method, largest first.
GetLocationComparisonRequest
holygrail.orders.v1.GetLocationComparisonRequest
fromDatestringfrom_dateLocal dates, YYYY-MM-DD, both inclusive.
toDatestringto_dateGetLocationComparisonResponse
holygrail.orders.v1.GetLocationComparisonResponse
currencyCodestringcurrency_codelocationsLocationSales[]previousFromDatestringprevious_from_dateThe previous period's dates, for labels.
previousToDatestringprevious_to_dateGetSalesReportRequest
holygrail.orders.v1.GetSalesReportRequest
fromDatestringfrom_dateBusiness dates, YYYY-MM-DD, both inclusive, and optional clock times, as GetSalesSummaryRequest. A business day runs from the business's day end (BusinessSettings.day_end_minute) to the next.
toDatestringto_datefromTimestringfrom_timetoTimestringto_timetimeZonestringtime_zonefilterSalesReportFiltercompareFromDatestringcompare_from_dateOptional period to compare with, the same way; empty for none.
compareToDatestringcompare_to_datebyShiftDatebooleanby_shift_dateChoose sales by the date their named shift started instead of the business date (ADR 116), so a Night shift's sales after midnight stay with the night it began. Days in by_day are then shift dates too; clock times are ignored.
GetSalesReportResponse
holygrail.orders.v1.GetSalesReportResponse
currencyCodestringcurrency_codedayEndMinuteintegerday_end_minuteWhen the business day ends, minutes after midnight, and the instants the report covers (RFC 3339).
startsAtstringstarts_atendsAtstringends_attotalsSalesReportTotalspreviousSalesReportTotalsThe comparison period's totals, when asked for.
Register and kiosk, and dine in or take away.
insightsSalesInsight[]costsShownbooleancosts_shownWhether costs were filled in (the caller may see profit).
afterMidnightNetSalesint64 stringafter_midnight_net_salesSales after midnight that belong to the business day before.
afterMidnightOrdersintegerafter_midnight_ordersNamed shifts (ADR 116): sales by shift, with tips, voids, refunds and the comparison period's net sales; id "" for sales in no shift.
Each shift occurrence: a shift on the date it started.
GetTableReportRequest
holygrail.orders.v1.GetTableReportRequest
fromDatestringfrom_dateBusiness dates, YYYY-MM-DD, both inclusive, as GetSalesReportRequest.
toDatestringto_datetimeZonestringtime_zonelocationIdstringlocation_idOne location's tables; empty for every location.
compareFromDatestringcompare_from_dateOptional period to compare with; empty for none.
compareToDatestringcompare_to_dateGetTableReportResponse
holygrail.orders.v1.GetTableReportResponse
currencyCodestringcurrency_codedaysintegerBusiness days in the period, for turns and guests per day.
totalsTableFiguresEvery table order, and tabs without a table that seated guests.
previousTableFiguresEvery day of the period, oldest first, including quiet ones.
tablesTablePerformance[]Every table on the floor plan, busiest first.
Tabs without a table that seated guests ("Sam at the bar").
seatsintegerSeats on the floor plan's tables.
GetLaneReportRequest
holygrail.orders.v1.GetLaneReportRequest
fromDatestringfrom_dateBusiness dates, YYYY-MM-DD, both inclusive, as GetSalesReportRequest.
toDatestringto_datetimeZonestringtime_zonelocationIdstringlocation_idOne location's lane; empty for every location.
targetSecondsintegertarget_secondsSeconds from sent to handed over that count as on target; 0 for the default (240, ADR 82).
GetLaneReportResponse
holygrail.orders.v1.GetLaneReportResponse
totalsLaneFiguresHours with cars, in clock order.
Every day of the period, oldest first, including quiet ones.
targetSecondsintegertarget_secondsThe target the report counted against, in seconds.
peakCarsPerHournumberpeak_cars_per_hourThe busiest hour's cars per hour, averaged over the days it had cars.
peakHourintegerpeak_hourtruncatedbooleanTrue when the period had more orders than the report reads (50,000); the figures are then over the first ones.
Order
holygrail.orders.v1.Order
Order is pushed whole while it is open. Amounts are integer minor units in the organization's currency. Names and prices are snapshots taken at sale time, so later catalog edits never change an old order.
A tab (an order with a table or a tab name) is often changed by several devices: a server's handheld, the bar, the counter. Pushes merge rather than replace: - The order's own fields (table, guests, note, discount, customer, state) come from the push with the newest clock. - Each line carries the clock of its last change and is merged on its own, so lines added or changed on different devices all survive. - A removed line stays in removed_lines with the clock of its removal, which beats any older copy of the line another device still sends. The server prices the merged order and sends it back through the feed. Completing an order is refused when the merge changes it: the device that took payment had not seen everything on the tab.
idstringlocationIdstringlocation_iddeviceIdstringdevice_idnumberstringReceipt number, unique in the organization: "<device prefix>-<sequence>", e.g. "D2-000184". The device assigns it, so it works offline.
stateOrderStateopenedAtstringopened_atRFC 3339 device time.
closedAtstringclosed_atnotestringlinesOrderLine[]orderDiscountint64 stringorder_discountA plain amount off the order, spread across lines in proportion to their amounts: loyalty rewards. Named discounts are in discounts.
totalsTotalsTotals the device computed. The server recomputes them with the same pricing rules and rejects an order whose totals disagree.
customerIdstringcustomer_idThe customer the sale is for, if any. Completing the order earns them loyalty points.
loyaltyPointsRedeemedint64 stringloyalty_points_redeemedLoyalty points spent on rewards. Their value is already in order_discount; the register works it out from the loyalty program.
tableIdstringtable_idThe table the tab is at, if any.
guestCountintegerguest_counttabNamestringtab_nameA name for a tab without a table: "Sam at the bar".
Lines taken off the order. Those already sent to the kitchen are voids.
hlcstringClock of the last change to the order's own fields, set by the server so devices can move their clocks past it.
bookingIdstringbooking_idThe appointment this sale is for. Completing the order completes it.
teamMemberIdstringteam_member_idThe team member who rang it up (holygrail.team.v1.TeamMember), signed in on the register with their passcode. Their sales and shift reports count it.
ownerIdstringowner_idOpen tickets: an open order saved with "Send" from the cart, or a tab. See docs/adr/0022-open-tickets.md.
The team member whose ticket it is: who opened it, or whom it was transferred to. Without pos.all_tickets, people work only their own tickets. Merged like the other header fields, but never cleared.
voidReasonstringvoid_reasonWhy the ticket was voided, and who voided it.
voidedByIdstringvoided_by_idmergedIntoIdstringmerged_into_idSet on a ticket merged into another: it is voided with its lines moved to that order, so nothing on it was thrown away.
backdatedbooleanSet when someone with pos.backdate dated the sale earlier than it was rung up: opened_at, closed_at and its payments carry the chosen time, and the books post it on that day.
recordedAtstringrecorded_atOutput only: when the server first received the order (RFC 3339).
discountsAppliedDiscount[]Named discounts on the whole sale, applied in this order after the lines' own and before order_discount. Merged like the other header fields.
reservationIdstringreservation_idRoom service: the hotel stay at the location this order is for. The ticket is the guest's, and paying offers that room first. A stay the server does not know at the location is dropped, like an unknown customer.
sourceOrderSourceWhere the order was placed. Set by the server from the kind of device that opened it: a self-order kiosk's orders are ORDER_SOURCE_KIOSK, every other device's ORDER_SOURCE_REGISTER. What a device sends is ignored. See docs/adr/0048-self-order-kiosk.md.
Whether the customer eats in, takes the order away or is served at a drive-thru window, as they chose at the kiosk (or the cashier set). Merged like the other header fields.
callNumberstringcall_numberThe short number called out when the order is ready: "A12". A kiosk gives each order the next one of the day; the kitchen ticket and the receipt show it. Merged like the other header fields.
cancelledbooleanA voided order that was a sale cancelled at checkout, not a void, at a business whose cancellations don't count as voids (BusinessSettings.cancels_not_voids, ADR 51). It stays VOIDED, so it is closed and immutable like any void, but reports leave it out of voids. The server clears it when the business counts cancellations as voids, or when anything on the order went to the kitchen.
The loyalty rewards behind loyalty_points_redeemed, from the program's rewards list (ADR 120). Their points add up to loyalty_points_redeemed and their values are already in order_discount. Merged with loyalty_points_redeemed.
Payment
holygrail.orders.v1.Payment
Payment is an immutable fact: it is pushed once and never changed.
idstringorderIdstringorder_idlocationIdstringlocation_iddeviceIdstringdevice_idtenderTenderamountint64 stringApplied to the order total.
tipint64 stringtenderedint64 stringCash only: what the customer handed over, and the change given back.
changeint64 stringdrawerSessionIdstringdrawer_session_idCash only: the open drawer session the cash went into.
referencestringTerminal reference, last four digits, etc.
createdAtstringcreated_atrefundIdstringrefund_idExchange only: the refund whose credit this spends.
labelstringThe check this pays when a bill is split, e.g. "Seat 2" or "Check 1 of 3"; empty otherwise. At most 60 characters.
reservationIdstringreservation_idRoom charge only: the checked-in stay whose folio it goes on.
teamMemberIdstringteam_member_idThe team member who took it.
methodIdstringmethod_idThe business's checkout method that took it (CheckoutMethod.id in the business settings) and its name then, e.g. "M-Pesa"; empty for exchange credit, deposits, room charges and older payments. The tender follows the method's kind. At most 40 characters.
methodNamestringmethod_namenotestringAn optional note the cashier typed at checkout ("paid by the company card", "customer will bring the receipt"). At most 500 characters.
payLaterPlanIdstringpay_later_plan_idPay later only: the approved plan this payment puts the sale on.
Refund
holygrail.orders.v1.Refund
Refund is an immutable fact, created offline like a payment. It returns units of a completed order, at the location of the device that takes it back. Each line gives back its share of the line's sales (net of discounts and of inclusive tax) and of its tax, each counted cumulatively so that refunding every unit, in any number of refunds, gives back exactly what was paid:
share(x) = round(x × (before + quantity) / sold) - round(x × before / sold) amount = share(sales) + share(tax)
where before is how many units of the line earlier refunds returned and rounding is half away from zero. The shared pricing packages implement it as refundShare. Tips are not refunded.
idstringorderIdstringorder_idlocationIdstringlocation_iddeviceIdstringdevice_idlinesRefundLine[]paymentsRefundPayment[]amountint64 stringSum of the lines, and of the payments.
reasonstringcreatedAtstringcreated_atteamMemberIdstringteam_member_idThe team member who gave it, and the one who approved it with their passcode when that person may not refund on their own.
approvedByIdstringapproved_by_idKitchenTicket
holygrail.orders.v1.KitchenTicket
KitchenTicket is what one station has to make for one course of an order. The device that sends it creates it offline and pushes it once; after that only its status changes, from any device at the location (newest clock wins), as the kitchen starts and bumps it, strikes items or marks it a priority.
idstringorderIdstringorder_idlocationIdstringlocation_iddeviceIdstringdevice_idThe device that sent it.
stationIdstringstation_idEmpty when the location has no stations: every kitchen screen shows it.
orderNumberstringorder_numberlabelstringWho it is for, as sent: "Table 4", a tab's name, or a customer's.
courseintegerkindTicketKinditemsTicketItem[]createdAtstringcreated_atstatusTicketStatusstatusAtstringstatus_atWhen the status last changed (RFC 3339).
hlcstringClock of the last status change, set by the server.
departmentIdstringdepartment_idThe department that makes its items, so a kitchen screen can show one department's tickets. Empty when they have none.
doneItemsinteger[]done_itemsWhich of items (by index) the kitchen has finished, struck through on every kitchen screen. Changes with the status, newest clock wins.
prioritybooleanMoved to the front of every kitchen screen's queue. Changes with the status.
readyAtstringready_atWhen the kitchen marked it ready at the pass (RFC 3339), kept once it is done so speed of service can be measured from sent to ready to handed over (ADR 82). Empty until then, and cleared if it is recalled to make again. Changes with the status.
DrawerSession
holygrail.orders.v1.DrawerSession
DrawerSession is one shift of a device's cash drawer, from opening float to closing count. A device has at most one open session.
idstringlocationIdstringlocation_iddeviceIdstringdevice_idstateDrawerStateopenedAtstringopened_atopeningFloatint64 stringopening_floatclosedAtstringclosed_atcountedCashint64 stringcounted_cashexpectedCashint64 stringexpected_cashSet by the server at close: float + cash sales + pay-ins - pay-outs.
openedByIdstringopened_by_idTeam members who opened and closed it.
closedByIdstringclosed_by_idDrawerMovement
holygrail.orders.v1.DrawerMovement
DrawerMovement is cash added to or taken from an open drawer outside a sale.
idstringsessionIdstringsession_idlocationIdstringlocation_idamountint64 stringreasonstringcreatedAtstringcreated_atteamMemberIdstringteam_member_idSalesTotals
holygrail.orders.v1.SalesTotals
Amounts are minor units over completed orders.
grossSalesint64 stringgross_salesLine amounts before discounts, including any inclusive tax.
discountsint64 stringnetSalesint64 stringnet_salesGross sales minus discounts and inclusive tax: revenue before tax.
taxint64 stringAll tax, inclusive and added.
collectedint64 stringWhat customers paid for their orders, before tips.
tipsint64 stringordersintegervoidedOrdersintegervoided_ordersrefundsint64 stringRefunds given in the range, tax included, and how many. Sales figures above are before refunds.
refundCountintegerrefund_countTenderTotal
holygrail.orders.v1.TenderTotal
tenderTenderamountint64 stringtipsint64 stringpaymentsintegerSalesBucket
holygrail.orders.v1.SalesBucket
keystringA local date ("2026-10-22") for daily buckets, or the hour of day ("14") for hourly ones.
netSalesint64 stringnet_salesordersintegerItemSales
holygrail.orders.v1.ItemSales
itemNamestringitem_namevariantNamestringvariant_namequantityint64 stringsalesint64 stringLine amounts after discounts.
DepartmentSales
holygrail.orders.v1.DepartmentSales
departmentIdstringdepartment_idnamestringquantityint64 stringsalesint64 stringLine amounts after line discounts.
DiscountUsage
holygrail.orders.v1.DiscountUsage
discountIdstringdiscount_idThe preset; empty for custom discounts and the rest.
namestringordersintegerCompleted orders it was given on.
usesintegerHow many times it was applied (each line counts).
amountint64 stringcustombooleanTrue for discounts typed at the register rather than chosen from the list.
MethodTotal
holygrail.orders.v1.MethodTotal
MethodTotal is what one checkout method took, by its name on the payments ("M-Pesa"); payments without a method are under their tender's name ("Cash", "Card", "Other", "Exchange credit", "Deposit", "Room charge").
namestringtenderTenderamountint64 stringtipsint64 stringpaymentsintegerrefundedint64 stringGiven back by this method in refunds made in the period.
LocationSales
holygrail.orders.v1.LocationSales
locationIdstringlocation_idnamestringtimeZonestringtime_zonenetSalesint64 stringnet_salesAmounts are minor units over completed orders, as in SalesTotals.
ordersintegerdiscountsint64 stringrefundsint64 stringvoidedOrdersintegervoided_orderspreviousNetSalesint64 stringprevious_net_salesNet sales and orders over the period of the same length just before.
previousOrdersintegerprevious_ordersSalesReportFilter
holygrail.orders.v1.SalesReportFilter
SalesReportFilter narrows a sales report. Empty lists match everything. Location, team, channel and payment filters choose orders; department, category and item filters choose lines, and the totals are then over the chosen lines of the orders that have any.
locationIdsstring[]location_idsteamMemberIdsstring[]team_member_idsWho the sale is credited to; "none" for sales credited to no one.
departmentIdsstring[]department_ids"none" for lines in no department.
categoryIdsstring[]category_ids"none" for items in no category.
itemIdsstring[]item_idspaymentMethodsstring[]payment_methodsPayment method names as MethodTotal names them ("M-Pesa", "Cash").
sourcesOrderSource[]namedShiftIdsstring[]named_shift_idsNamed shifts the sales belong to (ADR 116); "none" for sales that belong to no shift.
SalesReportTotals
holygrail.orders.v1.SalesReportTotals
figuresSalesFigurescollectedint64 stringPaid by customers before tips, and tips.
tipsint64 stringaverageOrderint64 stringaverage_orderNet sales per order.
voidedOrdersintegervoided_ordersvoidedAmountint64 stringvoided_amountrefundsint64 stringRefunds given in the period against the chosen sales.
refundCountintegerrefund_countcustomersintegerDistinct customers on the orders.
guestsintegercostedNetSalesint64 stringcosted_net_salesNet sales of the items that have a cost (stock or recipe), so margins compare like with like.
HeatCell
holygrail.orders.v1.HeatCell
weekdayinteger0 Sunday ... 6 Saturday, of the business date.
hourintegerClock hour.
netSalesint64 stringnet_salesordersintegerSalesRow
holygrail.orders.v1.SalesRow
SalesRow is one row of a breakdown: a team member, a department, a category, a location, a channel.
idstringnamestringfiguresSalesFigurestipsint64 stringExtra detail some breakdowns fill: tips and refunds for team members.
refundsint64 stringvoidedOrdersintegervoided_ordersvoidedAmountint64 stringvoided_amountdiscountRateBpintegerdiscount_rate_bpDiscounts given by this person / here, as a share of gross (basis points).
previousNetSalesint64 stringprevious_net_salesNet sales in the comparison period.
itemsintegerItems rows only.
ItemSalesRow
holygrail.orders.v1.ItemSalesRow
itemIdstringitem_idvariantIdstringvariant_iditemNamestringitem_namevariantNamestringvariant_namecategoryIdstringcategory_idcategoryNamestringcategory_namedepartmentIdstringdepartment_iddepartmentNamestringdepartment_namefiguresSalesFiguresmeasureint64 stringSold by weight or volume: the amount in thousandths of unit.
unitstringfromRecipebooleanfrom_recipeTrue when the cost comes from a recipe rather than stock.
hasCostbooleanhas_costpreviousNetSalesint64 stringprevious_net_salespreviousQuantityint64 stringprevious_quantityModifierSalesRow
holygrail.orders.v1.ModifierSalesRow
modifierIdstringmodifier_idnamestringgroupIdstringgroup_idgroupNamestringgroup_nameactionstring"no", "sub", "extra", ... or "" for a plain add-on.
linesintegerLines it was chosen on, and those lines' units.
quantityint64 stringsalesint64 stringIts price times the units, before discounts.
itemLinesintegeritem_linesLines of the items it was chosen with.
topItemstringtop_itemThe item it was chosen with most.
IngredientUsageRow
holygrail.orders.v1.IngredientUsageRow
variantIdstringvariant_idnamestringquantityint64 stringIn the ingredient's stock unit, in thousandths ("kg", "l", "" pieces).
unitstringcostint64 stringusedInstring[]used_inMenu items whose sales used it, most cost first, at most five.
usedInCountintegerused_in_countshareBpintegershare_bpOf all ingredient cost in the period, basis points.
RecipeCostRow
holygrail.orders.v1.RecipeCostRow
itemIdstringitem_idvariantIdstringvariant_idnamestringquantityint64 stringnetSalesint64 stringnet_salescostint64 stringunitCostint64 stringunit_costCost per unit sold.
unitPriceint64 stringunit_priceNet sales per unit sold.
costBpintegercost_bpCost as a share of net sales, basis points.
ingredientsintegerSalesInsight
holygrail.orders.v1.SalesInsight
tonestring"good", "warn" or "info".
topicstringWhat it is about: sales, items, team, menu, discounts, modifiers, ingredients, hours, payments.
titlestringdetailstringShiftDaySales
holygrail.orders.v1.ShiftDaySales
ShiftDaySales is what one occurrence of a named shift sold.
namedShiftIdstringnamed_shift_idnamestringdatestringYYYY-MM-DD, the date the occurrence started.
figuresSalesFigurestipsint64 stringvoidedOrdersintegervoided_ordersvoidedAmountint64 stringvoided_amountrefundsint64 stringteamMembersintegerteam_membersTeam members who rang up sales in it.
TableFigures
holygrail.orders.v1.TableFigures
TableFigures are what a set of completed table orders came to. A seating is an order that seated guests (guest count above zero): one turn of the table. Tickets split off a table's bill carry no guests, so their sales count but they are no extra turn.
guestsintegerGuests seated: the visitors.
seatingsintegerordersintegerCompleted orders, seated or not.
netSalesint64 stringnet_salesLine amounts after discounts and inclusive tax, minor units, as SalesFigures.net_sales.
seatedMinutesint64 stringseated_minutesMinutes from seating to the bill being paid, summed over seatings.
ordersWithoutGuestsintegerorders_without_guestsOrders at a table with no guest count, so the guests are unknown.
TableDay
holygrail.orders.v1.TableDay
datestringBusiness date, YYYY-MM-DD.
guestsintegerseatingsintegernetSalesint64 stringnet_salesTableHour
holygrail.orders.v1.TableHour
hourintegerClock hour guests were seated, 0-23.
guestsintegerseatingsintegerTablePerformance
holygrail.orders.v1.TablePerformance
tableIdstringtable_idnamestringareaNamestringarea_namelocationIdstringlocation_idlocationNamestringlocation_nameseatsintegerarchivedbooleanTaken off the floor plan; listed while it has sales in the period.
figuresTableFigurespreviousTableFiguresThe comparison period's figures, when asked for.
Days with sales, oldest first.
LaneFigures
holygrail.orders.v1.LaneFigures
LaneFigures are a set of drive-thru orders' times, in seconds. Each time is over the orders that reached that step: an order handed over without its tickets marked ready has a total but no kitchen time.
carsintegerCompleted drive-thru orders that went to the kitchen: the cars served.
kitchenAvgintegerkitchen_avgSent to the kitchen to every ticket ready at the pass.
kitchenP90integerkitchen_p90payAvgintegerpay_avgSent to paid in full.
totalAvgintegertotal_avgSent to every ticket served: the car's wait from ordering to food.
totalP50integertotal_p50totalP90integertotal_p90onTargetintegeron_targetCars whose total was within the target, and how many had a total.
timedintegertakingAvgintegertaking_avgTaking the order (ADR 84): from the first item rung up at the order point to sending it. Orders rung up before that was stamped don't count.
windowAvgintegerwindow_avgTime at the window (ADR 84): from the car reaching the front of the lane (sent, or the car before it handed over, whichever is later) to its food handed over.
LaneHour
holygrail.orders.v1.LaneHour
hourintegerClock hour the order was sent, 0-23.
figuresLaneFiguresOrderLine
holygrail.orders.v1.OrderLine
idstringvariantIdstringvariant_iditemNamestringitem_namevariantNamestringvariant_namequantityintegerunitPriceint64 stringunit_pricemodifiersLineModifier[]taxesLineTax[]discountint64 stringA plain amount off this line (all units). Named discounts are in discounts.
notestringcourseintegerCourse the kitchen makes it in: 0 as soon as it is sent (drinks), then 1, 2, 3 in order, each fired when the table is ready for it.
seatintegerSeat number from 1, or 0 for the table to share.
sentAtstringsent_atWhen the line was sent to the kitchen (RFC 3339), empty until then.
hlcstringClock of the line's last change. The device sets it; the server takes the push's clock when it is empty, and refuses one newer than the push.
measureint64 stringA measured line (a variant sold by a unit with decimals): how much of the unit each of the quantity pieces is, in thousandths (1250 is 1.25 kg), the unit, and the price per one unit. unit_price is then the piece's price, rate × measure / 1000 rounded half away from zero, so pricing treats it like any other line. 0 and empty otherwise.
unitstringrateint64 stringdepartmentIdstringdepartment_idOutput only: the department the line was sold under (the item's, else its category's), set by the server when the order arrives. Empty for custom lines and items without one.
discountsAppliedDiscount[]Named discounts on this line, applied in this order after discount. They belong to the line, so they merge with it.
splitFromIdstringsplit_from_idInput only, not stored: the line this one was split from when part of a line sent to the kitchen moved to another ticket. Stock taken when the original was sent covers it (inventory settings stock_timing).
priceStepint64 stringprice_stepA measured line's price rounding (ADR 49): unit_price is the rate × measure price rounded half away from zero to the nearest price_step (the business's weighed_price_step when the line was rung up); 0 for exact.
byAmountbooleanby_amountA measured line sold by amount ("TSh 5,000 of beef"): unit_price is the amount the customer asked for, and measure is the weight that amount buys, unit_price × 1000 / rate rounded half away from zero, so the cutter knows how much to cut. price_step is then 0.
Totals
holygrail.orders.v1.Totals
subtotalint64 stringSum of (unit price + modifiers) × quantity.
discountint64 stringLine and order discounts.
taxint64 stringAll tax, inclusive and exclusive.
inclusiveTaxint64 stringinclusive_taxTax already inside prices (part of subtotal).
totalint64 stringWhat the customer owes before tips: subtotal - discount + exclusive tax.
RemovedLine
holygrail.orders.v1.RemovedLine
RemovedLine records a line taken off an open order.
lineIdstringline_idhlcstringClock of the removal.
itemNamestringitem_namevariantNamestringvariant_namequantityintegersentAtstringsent_atSet when the line had been sent to the kitchen, making this a void.
reasonstringmovedToOrderIdstringmoved_to_order_idSet when the line was moved to another ticket (a split or a merge) rather than taken off: it is not a void, and the kitchen keeps making it.
removedByIdstringremoved_by_idThe team member signed in at the register that took it off (ADR 112). Empty for lines removed before registers recorded it, on registers without a team, and for moved lines.
AppliedDiscount
holygrail.orders.v1.AppliedDiscount
AppliedDiscount is a discount given on an order or one of its lines: a preset from the catalog (holygrail.catalog.v1.Discount) or one the cashier typed. Its terms are a snapshot, like prices, so editing the preset later never changes an old sale. Exactly one of percent_bp and amount is set.
idstringUnique within the order, set by the device.
discountIdstringdiscount_idThe preset it came from; empty for a custom discount.
namestringpercentBpintegerpercent_bpBasis points, up to 10000.
amountint64 stringMinor units: per unit on a line, once on the order.
maxAmountint64 stringmax_amountCaps what it takes; 0 for no cap.
automaticbooleanApplied by the register because the preset's rules were met.
appliedByIdstringapplied_by_idThe team member who gave it, and the one who approved it when it needed a manager (a custom discount, or a preset that requires approval).
approvedByIdstringapproved_by_idappliedint64 stringOutput only: what it took off, as the server priced the order.
itemOnlybooleanitem_onlyOn a line: of the item's own price only, not its modifiers (ADR 46).
LoyaltyRedemption
holygrail.orders.v1.LoyaltyRedemption
One reward spent on an order.
rewardIdstringreward_idThe program's reward; empty for the standard reward.
namestringpointsint64 stringvalueint64 stringWhat it took off the order.
RefundLine
holygrail.orders.v1.RefundLine
RefundLine returns some units of one line of a completed order.
orderLineIdstringorder_line_idquantityintegerrestockbooleanPuts the units back in stock. Off for damaged goods, which stay written off.
amountint64 stringWhat this line gives back, tax included. The server works it out (see Refund) and rejects a refund whose amounts disagree.
RefundPayment
holygrail.orders.v1.RefundPayment
RefundPayment is how the money goes back: cash from the drawer, back to a card on the external terminal, other, or exchange credit for a new sale.
tenderTenderamountint64 stringdrawerSessionIdstringdrawer_session_idCash only: the open drawer session the cash leaves.
referencestringmethodIdstringmethod_idThe business's checkout method the money went back by, as on Payment.
methodNamestringmethod_nameTicketItem
holygrail.orders.v1.TicketItem
orderLineIdstringorder_line_idnamestringItem and variant, e.g. "Burger (Large)".
quantityintegermodifiersstring[]notestringseatintegerSalesFigures
holygrail.orders.v1.SalesFigures
SalesFigures are the money of a set of sales. Amounts are minor units.
grossSalesint64 stringgross_salesLine amounts before discounts, including any inclusive tax.
discountsint64 stringnetSalesint64 stringnet_salesGross minus discounts and inclusive tax.
taxint64 stringordersintegerquantityint64 stringPieces sold (weighed lines count once).
costint64 stringCost of goods sold, from stock and recipes; 0 when not shown.
linesintegerLines sold.
LineModifier
holygrail.orders.v1.LineModifier
modifierIdstringmodifier_idnamestringpriceint64 string0 for a choice included free in its group.
actionstringThe modifier's action when sold ("no", "sub", …), for kitchen tickets and receipts.
ownTaxesbooleanown_taxesTaxed on its own with these, a snapshot like the line's taxes, instead of like the line (ADR 46). With own_taxes and no taxes it is untaxed.
taxesLineTax[]discountint64 stringOutput only: its share of the line's discount, what is left, and its tax, for all the line's units, as the server priced the order.
netint64 stringtaxint64 stringLineTax
holygrail.orders.v1.LineTax
taxRateIdstringtax_rate_idnamestringrateBpintegerrate_bpinclusivebooleanOrderState enum
holygrail.orders.v1.OrderState
ORDER_STATE_UNSPECIFIEDORDER_STATE_OPENBeing rung up, or a tab still running. Any device at its location can change it; see Order for how changes merge.
ORDER_STATE_COMPLETEDPaid in full. Immutable from here on.
ORDER_STATE_VOIDEDAbandoned before any payment. Immutable.
OrderSource enum
holygrail.orders.v1.OrderSource
ORDER_SOURCE_UNSPECIFIEDORDER_SOURCE_REGISTERRung up by staff on a register or a handheld.
ORDER_SOURCE_KIOSKPlaced by the customer on a self-order kiosk.
DiningOption enum
holygrail.orders.v1.DiningOption
DINING_OPTION_UNSPECIFIEDDINING_OPTION_DINE_INDINING_OPTION_TAKE_AWAYDINING_OPTION_DRIVE_THRUOrdered from a car in a drive-thru lane and handed out at a window (ADR 82). Its call number has the lane's letter, "D7".
Tender enum
holygrail.orders.v1.Tender
TENDER_UNSPECIFIEDTENDER_CASHTENDER_EXTERNAL_CARDCard taken on a separate terminal; the reference is the terminal's.
TENDER_OTHERTENDER_EXCHANGECredit from a refund, spent on the exchange that follows it.
TENDER_DEPOSITAn appointment's deposit, paid online; the order's booking names it.
TENDER_ROOM_CHARGEPut on a hotel guest's bill; the payment's reservation names the stay.
TENDER_PAY_LATERThe part of the sale the customer pays over time on an installment plan (ADR 121); the payment's pay_later_plan_id names the plan.
TicketKind enum
holygrail.orders.v1.TicketKind
TICKET_KIND_UNSPECIFIEDTICKET_KIND_FIREMake these.
TICKET_KIND_VOIDStop making these: they were taken off the order.
TicketStatus enum
holygrail.orders.v1.TicketStatus
TICKET_STATUS_UNSPECIFIEDTICKET_STATUS_NEWTICKET_STATUS_PREPARINGTICKET_STATUS_READYMade and waiting at the pass to go out. Kitchen screens keep showing it until it is done; registers tell the server the food is ready.
TICKET_STATUS_DONEServed (or, for a void, seen): bumped off the kitchen screen, and recallable for a while. Before DONE existed, READY meant this; the server moved those tickets to DONE (migration 00051).
DrawerState enum
holygrail.orders.v1.DrawerState
DRAWER_STATE_UNSPECIFIEDDRAWER_STATE_OPENDRAWER_STATE_CLOSEDDrawerMovementKind enum
holygrail.orders.v1.DrawerMovementKind
DRAWER_MOVEMENT_KIND_UNSPECIFIEDDRAWER_MOVEMENT_KIND_PAY_INDRAWER_MOVEMENT_KIND_PAY_OUTBase URL https://api.buziin.tech. Every method is POST with a JSON body; see Making requests.