Developers
Sign inGet API keys
API reference/Commerce

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.

holygrail.orders.v1.OrdersService11 methodsorders.read · orders.write

ListOrders#

orders.readRead
POST/holygrail.orders.v1.OrdersService/ListOrders

Request body

locationIdstringlocation_id

Empty for every location.

Optional filter; unspecified lists every state.

customerIdstringcustomer_id

Optional: only this customer's orders.

Optional: only orders placed this way (a self-order kiosk's, say).

pageSizeintegerpage_size

Page through results newest first; pass the previous response's next_page_token.

pageTokenstringpage_token
fromDatestringfrom_date

Optional: 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_date
timeZonestringtime_zone
fromTimestringfrom_time
toTimestringto_time

Response

ordersOrder[]
nextPageTokenstringnext_page_token
Request
curl 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"
}'
Response example
{
  "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": ""
}

GetOrder#

orders.readRead
POST/holygrail.orders.v1.OrdersService/GetOrder

Request body

idstring

Response

orderOrder
paymentsPayment[]
refundsRefund[]
Request
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"
}'
Response example
{
  "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#

orders.readRead
POST/holygrail.orders.v1.OrdersService/FindOrder

Request body

numberstring

The receipt number, e.g. "D2-000184".

Response

orderOrder
refundsRefund[]
Request
curl https://api.buziin.tech/holygrail.orders.v1.OrdersService/FindOrder \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "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#

orders.readRead
POST/holygrail.orders.v1.OrdersService/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_id

Response

ordersOrder[]
paymentsPayment[]

Tickets not yet bumped, and those bumped in the last two hours.

cursorint64 string
Request
curl 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"
}'
Response example
{
  "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#

orders.writeWrite
POST/holygrail.orders.v1.OrdersService/SendReceipt

SendReceipt emails a completed order's receipt.

Request body

orderIdstringorder_id
emailstring
paymentIdstringpayment_id

Optional: 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 {}.

Request
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"
}'
Response example
{}

GetDrawerSession#

orders.readRead
POST/holygrail.orders.v1.OrdersService/GetDrawerSession

Request body

idstring

Response

cashSalesint64 stringcash_sales

Cash sales so far (open sessions) or at close.

Request
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"
}'
Response example
{
  "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#

orders.readRead
POST/holygrail.orders.v1.OrdersService/GetSalesSummary

GetSalesSummary reports closed orders over a range of local dates.

Request body

locationIdstringlocation_id

Empty for every location.

fromDatestringfrom_date

Local dates, YYYY-MM-DD, both inclusive.

toDatestringto_date
timeZonestringtime_zone

IANA time zone the dates are in, e.g. "America/New_York".

fromTimestringfrom_time

Optional 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_time

Response

currencyCodestringcurrency_code
byTenderTenderTotal[]by_tender
byDaySalesBucket[]by_day
byHourSalesBucket[]by_hour
topItemsItemSales[]top_items
byDepartmentDepartmentSales[]by_department

Sales by department, largest first; lines with none are under "".

byDiscountDiscountUsage[]by_discount

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.

byMethodMethodTotal[]by_method

Payments by checkout method, largest first.

Request
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"
}'
Response example
{
  "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#

orders.readRead
POST/holygrail.orders.v1.OrdersService/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_date

Local dates, YYYY-MM-DD, both inclusive.

toDatestringto_date

Response

currencyCodestringcurrency_code
previousFromDatestringprevious_from_date

The previous period's dates, for labels.

previousToDatestringprevious_to_date
Request
curl 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"
}'
Response example
{
  "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#

orders.readRead
POST/holygrail.orders.v1.OrdersService/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_date

Business 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_date
fromTimestringfrom_time
toTimestringto_time
timeZonestringtime_zone
compareFromDatestringcompare_from_date

Optional period to compare with, the same way; empty for none.

compareToDatestringcompare_to_date
byShiftDatebooleanby_shift_date

Choose 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_code
dayEndMinuteintegerday_end_minute

When the business day ends, minutes after midnight, and the instants the report covers (RFC 3339).

startsAtstringstarts_at
endsAtstringends_at

The comparison period's totals, when asked for.

byDaySalesBucket[]by_day
byHourSalesBucket[]by_hour
byWeekdayHourHeatCell[]by_weekday_hour
byTeamSalesRow[]by_team
byDepartmentSalesRow[]by_department
byCategorySalesRow[]by_category
byItemItemSalesRow[]by_item
byModifierModifierSalesRow[]by_modifier
byIngredientIngredientUsageRow[]by_ingredient
byRecipeRecipeCostRow[]by_recipe
byMethodMethodTotal[]by_method
byLocationSalesRow[]by_location
byChannelSalesRow[]by_channel

Register and kiosk, and dine in or take away.

byDiscountDiscountUsage[]by_discount
costsShownbooleancosts_shown

Whether costs were filled in (the caller may see profit).

afterMidnightNetSalesint64 stringafter_midnight_net_sales

Sales after midnight that belong to the business day before.

afterMidnightOrdersintegerafter_midnight_orders
byShiftSalesRow[]by_shift

Named shifts (ADR 116): sales by shift, with tips, voids, refunds and the comparison period's net sales; id "" for sales in no shift.

byShiftDayShiftDaySales[]by_shift_day

Each shift occurrence: a shift on the date it started.

Request
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"
}'
Response example
{
  "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#

orders.readRead
POST/holygrail.orders.v1.OrdersService/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_date

Business dates, YYYY-MM-DD, both inclusive, as GetSalesReportRequest.

toDatestringto_date
timeZonestringtime_zone
locationIdstringlocation_id

One location's tables; empty for every location.

compareFromDatestringcompare_from_date

Optional period to compare with; empty for none.

compareToDatestringcompare_to_date

Response

currencyCodestringcurrency_code
daysinteger

Business days in the period, for turns and guests per day.

Every table order, and tabs without a table that seated guests.

previousTableFigures
byDayTableDay[]by_day

Every day of the period, oldest first, including quiet ones.

byHourTableHour[]by_hour

Every table on the floor plan, busiest first.

noTableTableFiguresno_table

Tabs without a table that seated guests ("Sam at the bar").

seatsinteger

Seats on the floor plan's tables.

Request
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"
}'
Response example
{
  "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#

orders.readRead
POST/holygrail.orders.v1.OrdersService/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_date

Business dates, YYYY-MM-DD, both inclusive, as GetSalesReportRequest.

toDatestringto_date
timeZonestringtime_zone
locationIdstringlocation_id

One location's lane; empty for every location.

targetSecondsintegertarget_seconds

Seconds from sent to handed over that count as on target; 0 for the default (240, ADR 82).

Response

byHourLaneHour[]by_hour

Hours with cars, in clock order.

byDayLaneDay[]by_day

Every day of the period, oldest first, including quiet ones.

targetSecondsintegertarget_seconds

The target the report counted against, in seconds.

peakCarsPerHournumberpeak_cars_per_hour

The busiest hour's cars per hour, averaged over the days it had cars.

peakHourintegerpeak_hour
truncatedboolean

True when the period had more orders than the report reads (50,000); the figures are then over the first ones.

Request
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"
}'
Response example
{
  "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_id

Empty for every location.

Optional filter; unspecified lists every state.

customerIdstringcustomer_id

Optional: only this customer's orders.

Optional: only orders placed this way (a self-order kiosk's, say).

pageSizeintegerpage_size

Page through results newest first; pass the previous response's next_page_token.

pageTokenstringpage_token
fromDatestringfrom_date

Optional: 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_date
timeZonestringtime_zone
fromTimestringfrom_time
toTimestringto_time

ListOrdersResponse

holygrail.orders.v1.ListOrdersResponse

ordersOrder[]
nextPageTokenstringnext_page_token

GetOrderRequest

holygrail.orders.v1.GetOrderRequest

idstring

GetOrderResponse

holygrail.orders.v1.GetOrderResponse

orderOrder
paymentsPayment[]
refundsRefund[]

FindOrderRequest

holygrail.orders.v1.FindOrderRequest

numberstring

The receipt number, e.g. "D2-000184".

FindOrderResponse

holygrail.orders.v1.FindOrderResponse

orderOrder
refundsRefund[]

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_id

ExportOpenOrdersResponse

holygrail.orders.v1.ExportOpenOrdersResponse

ordersOrder[]
paymentsPayment[]

Tickets not yet bumped, and those bumped in the last two hours.

cursorint64 string

SendReceiptRequest

holygrail.orders.v1.SendReceiptRequest

orderIdstringorder_id
emailstring
paymentIdstringpayment_id

Optional: 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

idstring

GetDrawerSessionResponse

holygrail.orders.v1.GetDrawerSessionResponse

cashSalesint64 stringcash_sales

Cash sales so far (open sessions) or at close.

GetSalesSummaryRequest

holygrail.orders.v1.GetSalesSummaryRequest

locationIdstringlocation_id

Empty for every location.

fromDatestringfrom_date

Local dates, YYYY-MM-DD, both inclusive.

toDatestringto_date
timeZonestringtime_zone

IANA time zone the dates are in, e.g. "America/New_York".

fromTimestringfrom_time

Optional 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_time

GetSalesSummaryResponse

holygrail.orders.v1.GetSalesSummaryResponse

currencyCodestringcurrency_code
byTenderTenderTotal[]by_tender
byDaySalesBucket[]by_day
byHourSalesBucket[]by_hour
topItemsItemSales[]top_items
byDepartmentDepartmentSales[]by_department

Sales by department, largest first; lines with none are under "".

byDiscountDiscountUsage[]by_discount

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.

byMethodMethodTotal[]by_method

Payments by checkout method, largest first.

GetLocationComparisonRequest

holygrail.orders.v1.GetLocationComparisonRequest

fromDatestringfrom_date

Local dates, YYYY-MM-DD, both inclusive.

toDatestringto_date

GetLocationComparisonResponse

holygrail.orders.v1.GetLocationComparisonResponse

currencyCodestringcurrency_code
previousFromDatestringprevious_from_date

The previous period's dates, for labels.

previousToDatestringprevious_to_date

GetSalesReportRequest

holygrail.orders.v1.GetSalesReportRequest

fromDatestringfrom_date

Business 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_date
fromTimestringfrom_time
toTimestringto_time
timeZonestringtime_zone
compareFromDatestringcompare_from_date

Optional period to compare with, the same way; empty for none.

compareToDatestringcompare_to_date
byShiftDatebooleanby_shift_date

Choose 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_code
dayEndMinuteintegerday_end_minute

When the business day ends, minutes after midnight, and the instants the report covers (RFC 3339).

startsAtstringstarts_at
endsAtstringends_at

The comparison period's totals, when asked for.

byDaySalesBucket[]by_day
byHourSalesBucket[]by_hour
byWeekdayHourHeatCell[]by_weekday_hour
byTeamSalesRow[]by_team
byDepartmentSalesRow[]by_department
byCategorySalesRow[]by_category
byItemItemSalesRow[]by_item
byModifierModifierSalesRow[]by_modifier
byIngredientIngredientUsageRow[]by_ingredient
byRecipeRecipeCostRow[]by_recipe
byMethodMethodTotal[]by_method
byLocationSalesRow[]by_location
byChannelSalesRow[]by_channel

Register and kiosk, and dine in or take away.

byDiscountDiscountUsage[]by_discount
costsShownbooleancosts_shown

Whether costs were filled in (the caller may see profit).

afterMidnightNetSalesint64 stringafter_midnight_net_sales

Sales after midnight that belong to the business day before.

afterMidnightOrdersintegerafter_midnight_orders
byShiftSalesRow[]by_shift

Named shifts (ADR 116): sales by shift, with tips, voids, refunds and the comparison period's net sales; id "" for sales in no shift.

byShiftDayShiftDaySales[]by_shift_day

Each shift occurrence: a shift on the date it started.

GetTableReportRequest

holygrail.orders.v1.GetTableReportRequest

fromDatestringfrom_date

Business dates, YYYY-MM-DD, both inclusive, as GetSalesReportRequest.

toDatestringto_date
timeZonestringtime_zone
locationIdstringlocation_id

One location's tables; empty for every location.

compareFromDatestringcompare_from_date

Optional period to compare with; empty for none.

compareToDatestringcompare_to_date

GetTableReportResponse

holygrail.orders.v1.GetTableReportResponse

currencyCodestringcurrency_code
daysinteger

Business days in the period, for turns and guests per day.

Every table order, and tabs without a table that seated guests.

previousTableFigures
byDayTableDay[]by_day

Every day of the period, oldest first, including quiet ones.

byHourTableHour[]by_hour

Every table on the floor plan, busiest first.

noTableTableFiguresno_table

Tabs without a table that seated guests ("Sam at the bar").

seatsinteger

Seats on the floor plan's tables.

GetLaneReportRequest

holygrail.orders.v1.GetLaneReportRequest

fromDatestringfrom_date

Business dates, YYYY-MM-DD, both inclusive, as GetSalesReportRequest.

toDatestringto_date
timeZonestringtime_zone
locationIdstringlocation_id

One location's lane; empty for every location.

targetSecondsintegertarget_seconds

Seconds from sent to handed over that count as on target; 0 for the default (240, ADR 82).

GetLaneReportResponse

holygrail.orders.v1.GetLaneReportResponse

byHourLaneHour[]by_hour

Hours with cars, in clock order.

byDayLaneDay[]by_day

Every day of the period, oldest first, including quiet ones.

targetSecondsintegertarget_seconds

The target the report counted against, in seconds.

peakCarsPerHournumberpeak_cars_per_hour

The busiest hour's cars per hour, averaged over the days it had cars.

peakHourintegerpeak_hour
truncatedboolean

True 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.

idstring
locationIdstringlocation_id
deviceIdstringdevice_id
numberstring

Receipt number, unique in the organization: "<device prefix>-<sequence>", e.g. "D2-000184". The device assigns it, so it works offline.

openedAtstringopened_at

RFC 3339 device time.

closedAtstringclosed_at
notestring
orderDiscountint64 stringorder_discount

A plain amount off the order, spread across lines in proportion to their amounts: loyalty rewards. Named discounts are in discounts.

totalsTotals

Totals the device computed. The server recomputes them with the same pricing rules and rejects an order whose totals disagree.

customerIdstringcustomer_id

The customer the sale is for, if any. Completing the order earns them loyalty points.

loyaltyPointsRedeemedint64 stringloyalty_points_redeemed

Loyalty points spent on rewards. Their value is already in order_discount; the register works it out from the loyalty program.

tableIdstringtable_id

The table the tab is at, if any.

guestCountintegerguest_count
tabNamestringtab_name

A name for a tab without a table: "Sam at the bar".

removedLinesRemovedLine[]removed_lines

Lines taken off the order. Those already sent to the kitchen are voids.

hlcstring

Clock of the last change to the order's own fields, set by the server so devices can move their clocks past it.

bookingIdstringbooking_id

The appointment this sale is for. Completing the order completes it.

teamMemberIdstringteam_member_id

The 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_id

Open 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_reason

Why the ticket was voided, and who voided it.

voidedByIdstringvoided_by_id
mergedIntoIdstringmerged_into_id

Set on a ticket merged into another: it is voided with its lines moved to that order, so nothing on it was thrown away.

backdatedboolean

Set 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_at

Output only: when the server first received the order (RFC 3339).

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_id

Room 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.

Where 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.

diningOptionDiningOptiondining_option

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_number

The 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.

cancelledboolean

A 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.

loyaltyRedemptionsLoyaltyRedemption[]loyalty_redemptions

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.

idstring
orderIdstringorder_id
locationIdstringlocation_id
deviceIdstringdevice_id
tenderTender
amountint64 string

Applied to the order total.

tipint64 string
tenderedint64 string

Cash only: what the customer handed over, and the change given back.

changeint64 string
drawerSessionIdstringdrawer_session_id

Cash only: the open drawer session the cash went into.

referencestring

Terminal reference, last four digits, etc.

createdAtstringcreated_at
refundIdstringrefund_id

Exchange only: the refund whose credit this spends.

labelstring

The check this pays when a bill is split, e.g. "Seat 2" or "Check 1 of 3"; empty otherwise. At most 60 characters.

reservationIdstringreservation_id

Room charge only: the checked-in stay whose folio it goes on.

teamMemberIdstringteam_member_id

The team member who took it.

methodIdstringmethod_id

The 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_name
notestring

An optional note the cashier typed at checkout ("paid by the company card", "customer will bring the receipt"). At most 500 characters.

payLaterPlanIdstringpay_later_plan_id

Pay 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.

idstring
orderIdstringorder_id
locationIdstringlocation_id
deviceIdstringdevice_id
amountint64 string

Sum of the lines, and of the payments.

reasonstring
createdAtstringcreated_at
teamMemberIdstringteam_member_id

The 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_id

KitchenTicket

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.

idstring
orderIdstringorder_id
locationIdstringlocation_id
deviceIdstringdevice_id

The device that sent it.

stationIdstringstation_id

Empty when the location has no stations: every kitchen screen shows it.

orderNumberstringorder_number
labelstring

Who it is for, as sent: "Table 4", a tab's name, or a customer's.

courseinteger
createdAtstringcreated_at
statusAtstringstatus_at

When the status last changed (RFC 3339).

hlcstring

Clock of the last status change, set by the server.

departmentIdstringdepartment_id

The department that makes its items, so a kitchen screen can show one department's tickets. Empty when they have none.

doneItemsinteger[]done_items

Which of items (by index) the kitchen has finished, struck through on every kitchen screen. Changes with the status, newest clock wins.

priorityboolean

Moved to the front of every kitchen screen's queue. Changes with the status.

readyAtstringready_at

When 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.

idstring
locationIdstringlocation_id
deviceIdstringdevice_id
openedAtstringopened_at
openingFloatint64 stringopening_float
closedAtstringclosed_at
countedCashint64 stringcounted_cash
expectedCashint64 stringexpected_cash

Set by the server at close: float + cash sales + pay-ins - pay-outs.

openedByIdstringopened_by_id

Team members who opened and closed it.

closedByIdstringclosed_by_id

DrawerMovement

holygrail.orders.v1.DrawerMovement

DrawerMovement is cash added to or taken from an open drawer outside a sale.

idstring
sessionIdstringsession_id
locationIdstringlocation_id
amountint64 string
reasonstring
createdAtstringcreated_at
teamMemberIdstringteam_member_id

SalesTotals

holygrail.orders.v1.SalesTotals

Amounts are minor units over completed orders.

grossSalesint64 stringgross_sales

Line amounts before discounts, including any inclusive tax.

discountsint64 string
netSalesint64 stringnet_sales

Gross sales minus discounts and inclusive tax: revenue before tax.

taxint64 string

All tax, inclusive and added.

collectedint64 string

What customers paid for their orders, before tips.

tipsint64 string
ordersinteger
voidedOrdersintegervoided_orders
refundsint64 string

Refunds given in the range, tax included, and how many. Sales figures above are before refunds.

refundCountintegerrefund_count

TenderTotal

holygrail.orders.v1.TenderTotal

tenderTender
amountint64 string
tipsint64 string
paymentsinteger

SalesBucket

holygrail.orders.v1.SalesBucket

keystring

A local date ("2026-10-22") for daily buckets, or the hour of day ("14") for hourly ones.

netSalesint64 stringnet_sales
ordersinteger

ItemSales

holygrail.orders.v1.ItemSales

itemNamestringitem_name
variantNamestringvariant_name
quantityint64 string
salesint64 string

Line amounts after discounts.

DepartmentSales

holygrail.orders.v1.DepartmentSales

departmentIdstringdepartment_id
namestring
quantityint64 string
salesint64 string

Line amounts after line discounts.

DiscountUsage

holygrail.orders.v1.DiscountUsage

discountIdstringdiscount_id

The preset; empty for custom discounts and the rest.

namestring
ordersinteger

Completed orders it was given on.

usesinteger

How many times it was applied (each line counts).

amountint64 string
customboolean

True 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").

namestring
tenderTender
amountint64 string
tipsint64 string
paymentsinteger
refundedint64 string

Given back by this method in refunds made in the period.

LocationSales

holygrail.orders.v1.LocationSales

locationIdstringlocation_id
namestring
timeZonestringtime_zone
netSalesint64 stringnet_sales

Amounts are minor units over completed orders, as in SalesTotals.

ordersinteger
discountsint64 string
refundsint64 string
voidedOrdersintegervoided_orders
previousNetSalesint64 stringprevious_net_sales

Net sales and orders over the period of the same length just before.

previousOrdersintegerprevious_orders

SalesReportFilter

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_ids
teamMemberIdsstring[]team_member_ids

Who 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_ids
paymentMethodsstring[]payment_methods

Payment method names as MethodTotal names them ("M-Pesa", "Cash").

diningOptionsDiningOption[]dining_options
namedShiftIdsstring[]named_shift_ids

Named shifts the sales belong to (ADR 116); "none" for sales that belong to no shift.

SalesReportTotals

holygrail.orders.v1.SalesReportTotals

collectedint64 string

Paid by customers before tips, and tips.

tipsint64 string
averageOrderint64 stringaverage_order

Net sales per order.

voidedOrdersintegervoided_orders
voidedAmountint64 stringvoided_amount
refundsint64 string

Refunds given in the period against the chosen sales.

refundCountintegerrefund_count
customersinteger

Distinct customers on the orders.

guestsinteger
costedNetSalesint64 stringcosted_net_sales

Net sales of the items that have a cost (stock or recipe), so margins compare like with like.

HeatCell

holygrail.orders.v1.HeatCell

weekdayinteger

0 Sunday ... 6 Saturday, of the business date.

hourinteger

Clock hour.

netSalesint64 stringnet_sales
ordersinteger

SalesRow

holygrail.orders.v1.SalesRow

SalesRow is one row of a breakdown: a team member, a department, a category, a location, a channel.

idstring
namestring
tipsint64 string

Extra detail some breakdowns fill: tips and refunds for team members.

refundsint64 string
voidedOrdersintegervoided_orders
voidedAmountint64 stringvoided_amount
discountRateBpintegerdiscount_rate_bp

Discounts given by this person / here, as a share of gross (basis points).

previousNetSalesint64 stringprevious_net_sales

Net sales in the comparison period.

itemsinteger

Items rows only.

ItemSalesRow

holygrail.orders.v1.ItemSalesRow

itemIdstringitem_id
variantIdstringvariant_id
itemNamestringitem_name
variantNamestringvariant_name
categoryIdstringcategory_id
categoryNamestringcategory_name
departmentIdstringdepartment_id
departmentNamestringdepartment_name
measureint64 string

Sold by weight or volume: the amount in thousandths of unit.

unitstring
fromRecipebooleanfrom_recipe

True when the cost comes from a recipe rather than stock.

hasCostbooleanhas_cost
previousNetSalesint64 stringprevious_net_sales
previousQuantityint64 stringprevious_quantity

ModifierSalesRow

holygrail.orders.v1.ModifierSalesRow

modifierIdstringmodifier_id
namestring
groupIdstringgroup_id
groupNamestringgroup_name
actionstring

"no", "sub", "extra", ... or "" for a plain add-on.

linesinteger

Lines it was chosen on, and those lines' units.

quantityint64 string
salesint64 string

Its price times the units, before discounts.

itemLinesintegeritem_lines

Lines of the items it was chosen with.

topItemstringtop_item

The item it was chosen with most.

IngredientUsageRow

holygrail.orders.v1.IngredientUsageRow

variantIdstringvariant_id
namestring
quantityint64 string

In the ingredient's stock unit, in thousandths ("kg", "l", "" pieces).

unitstring
costint64 string
usedInstring[]used_in

Menu items whose sales used it, most cost first, at most five.

usedInCountintegerused_in_count
shareBpintegershare_bp

Of all ingredient cost in the period, basis points.

RecipeCostRow

holygrail.orders.v1.RecipeCostRow

itemIdstringitem_id
variantIdstringvariant_id
namestring
quantityint64 string
netSalesint64 stringnet_sales
costint64 string
unitCostint64 stringunit_cost

Cost per unit sold.

unitPriceint64 stringunit_price

Net sales per unit sold.

costBpintegercost_bp

Cost as a share of net sales, basis points.

ingredientsinteger

SalesInsight

holygrail.orders.v1.SalesInsight

tonestring

"good", "warn" or "info".

topicstring

What it is about: sales, items, team, menu, discounts, modifiers, ingredients, hours, payments.

titlestring
detailstring

ShiftDaySales

holygrail.orders.v1.ShiftDaySales

ShiftDaySales is what one occurrence of a named shift sold.

namedShiftIdstringnamed_shift_id
namestring
datestring

YYYY-MM-DD, the date the occurrence started.

tipsint64 string
voidedOrdersintegervoided_orders
voidedAmountint64 stringvoided_amount
refundsint64 string
teamMembersintegerteam_members

Team 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.

guestsinteger

Guests seated: the visitors.

seatingsinteger
ordersinteger

Completed orders, seated or not.

netSalesint64 stringnet_sales

Line amounts after discounts and inclusive tax, minor units, as SalesFigures.net_sales.

seatedMinutesint64 stringseated_minutes

Minutes from seating to the bill being paid, summed over seatings.

ordersWithoutGuestsintegerorders_without_guests

Orders at a table with no guest count, so the guests are unknown.

TableDay

holygrail.orders.v1.TableDay

datestring

Business date, YYYY-MM-DD.

guestsinteger
seatingsinteger
netSalesint64 stringnet_sales

TableHour

holygrail.orders.v1.TableHour

hourinteger

Clock hour guests were seated, 0-23.

guestsinteger
seatingsinteger

TablePerformance

holygrail.orders.v1.TablePerformance

tableIdstringtable_id
namestring
areaNamestringarea_name
locationIdstringlocation_id
locationNamestringlocation_name
seatsinteger
archivedboolean

Taken off the floor plan; listed while it has sales in the period.

previousTableFigures

The comparison period's figures, when asked for.

byDayTableDay[]by_day

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.

carsinteger

Completed drive-thru orders that went to the kitchen: the cars served.

kitchenAvgintegerkitchen_avg

Sent to the kitchen to every ticket ready at the pass.

kitchenP90integerkitchen_p90
payAvgintegerpay_avg

Sent to paid in full.

totalAvgintegertotal_avg

Sent to every ticket served: the car's wait from ordering to food.

totalP50integertotal_p50
totalP90integertotal_p90
onTargetintegeron_target

Cars whose total was within the target, and how many had a total.

timedinteger
takingAvgintegertaking_avg

Taking 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_avg

Time 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

hourinteger

Clock hour the order was sent, 0-23.

LaneDay

holygrail.orders.v1.LaneDay

datestring

Business date, YYYY-MM-DD.

OrderLine

holygrail.orders.v1.OrderLine

idstring
variantIdstringvariant_id
itemNamestringitem_name
variantNamestringvariant_name
quantityinteger
unitPriceint64 stringunit_price
discountint64 string

A plain amount off this line (all units). Named discounts are in discounts.

notestring
courseinteger

Course 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.

seatinteger

Seat number from 1, or 0 for the table to share.

sentAtstringsent_at

When the line was sent to the kitchen (RFC 3339), empty until then.

hlcstring

Clock 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 string

A 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.

unitstring
rateint64 string
departmentIdstringdepartment_id

Output 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.

Named discounts on this line, applied in this order after discount. They belong to the line, so they merge with it.

splitFromIdstringsplit_from_id

Input 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_step

A 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_amount

A 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 string

Sum of (unit price + modifiers) × quantity.

discountint64 string

Line and order discounts.

taxint64 string

All tax, inclusive and exclusive.

inclusiveTaxint64 stringinclusive_tax

Tax already inside prices (part of subtotal).

totalint64 string

What the customer owes before tips: subtotal - discount + exclusive tax.

RemovedLine

holygrail.orders.v1.RemovedLine

RemovedLine records a line taken off an open order.

lineIdstringline_id
hlcstring

Clock of the removal.

itemNamestringitem_name
variantNamestringvariant_name
quantityinteger
sentAtstringsent_at

Set when the line had been sent to the kitchen, making this a void.

reasonstring
movedToOrderIdstringmoved_to_order_id

Set 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_id

The 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.

idstring

Unique within the order, set by the device.

discountIdstringdiscount_id

The preset it came from; empty for a custom discount.

namestring
percentBpintegerpercent_bp

Basis points, up to 10000.

amountint64 string

Minor units: per unit on a line, once on the order.

maxAmountint64 stringmax_amount

Caps what it takes; 0 for no cap.

automaticboolean

Applied by the register because the preset's rules were met.

appliedByIdstringapplied_by_id

The 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_id
appliedint64 string

Output only: what it took off, as the server priced the order.

itemOnlybooleanitem_only

On 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_id

The program's reward; empty for the standard reward.

namestring
pointsint64 string
valueint64 string

What it took off the order.

RefundLine

holygrail.orders.v1.RefundLine

RefundLine returns some units of one line of a completed order.

orderLineIdstringorder_line_id
quantityinteger
restockboolean

Puts the units back in stock. Off for damaged goods, which stay written off.

amountint64 string

What 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.

tenderTender
amountint64 string
drawerSessionIdstringdrawer_session_id

Cash only: the open drawer session the cash leaves.

referencestring
methodIdstringmethod_id

The business's checkout method the money went back by, as on Payment.

methodNamestringmethod_name

TicketItem

holygrail.orders.v1.TicketItem

orderLineIdstringorder_line_id
namestring

Item and variant, e.g. "Burger (Large)".

quantityinteger
modifiersstring[]
notestring
seatinteger

SalesFigures

holygrail.orders.v1.SalesFigures

SalesFigures are the money of a set of sales. Amounts are minor units.

grossSalesint64 stringgross_sales

Line amounts before discounts, including any inclusive tax.

discountsint64 string
netSalesint64 stringnet_sales

Gross minus discounts and inclusive tax.

taxint64 string
ordersinteger
quantityint64 string

Pieces sold (weighed lines count once).

costint64 string

Cost of goods sold, from stock and recipes; 0 when not shown.

linesinteger

Lines sold.

LineModifier

holygrail.orders.v1.LineModifier

modifierIdstringmodifier_id
namestring
priceint64 string

0 for a choice included free in its group.

actionstring

The modifier's action when sold ("no", "sub", …), for kitchen tickets and receipts.

ownTaxesbooleanown_taxes

Taxed 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.

discountint64 string

Output 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 string
taxint64 string

LineTax

holygrail.orders.v1.LineTax

taxRateIdstringtax_rate_id
namestring
rateBpintegerrate_bp
inclusiveboolean

OrderState enum

holygrail.orders.v1.OrderState

ORDER_STATE_UNSPECIFIED
ORDER_STATE_OPEN

Being rung up, or a tab still running. Any device at its location can change it; see Order for how changes merge.

ORDER_STATE_COMPLETED

Paid in full. Immutable from here on.

ORDER_STATE_VOIDED

Abandoned before any payment. Immutable.

OrderSource enum

holygrail.orders.v1.OrderSource

ORDER_SOURCE_UNSPECIFIED
ORDER_SOURCE_REGISTER

Rung up by staff on a register or a handheld.

ORDER_SOURCE_KIOSK

Placed by the customer on a self-order kiosk.

DiningOption enum

holygrail.orders.v1.DiningOption

DINING_OPTION_UNSPECIFIED
DINING_OPTION_DINE_IN
DINING_OPTION_TAKE_AWAY
DINING_OPTION_DRIVE_THRU

Ordered 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_UNSPECIFIED
TENDER_CASH
TENDER_EXTERNAL_CARD

Card taken on a separate terminal; the reference is the terminal's.

TENDER_OTHER
TENDER_EXCHANGE

Credit from a refund, spent on the exchange that follows it.

TENDER_DEPOSIT

An appointment's deposit, paid online; the order's booking names it.

TENDER_ROOM_CHARGE

Put on a hotel guest's bill; the payment's reservation names the stay.

TENDER_PAY_LATER

The 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_UNSPECIFIED
TICKET_KIND_FIRE

Make these.

TICKET_KIND_VOID

Stop making these: they were taken off the order.

TicketStatus enum

holygrail.orders.v1.TicketStatus

TICKET_STATUS_UNSPECIFIED
TICKET_STATUS_NEW
TICKET_STATUS_PREPARING
TICKET_STATUS_READY

Made 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_DONE

Served (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_UNSPECIFIED
DRAWER_STATE_OPEN
DRAWER_STATE_CLOSED

DrawerMovementKind enum

holygrail.orders.v1.DrawerMovementKind

DRAWER_MOVEMENT_KIND_UNSPECIFIED
DRAWER_MOVEMENT_KIND_PAY_IN
DRAWER_MOVEMENT_KIND_PAY_OUT

Base URL https://api.buziin.tech. Every method is POST with a JSON body; see Making requests.