Dining
DiningService reads a location's floor plan, kitchen stations and printers. They are changed through SyncService with field-by-field patches, like the catalog, and reach the location's registers through the change feed.
GetFloor#
GetFloor returns a location's areas, tables, kitchen stations, printers and printer profiles, with the feed cursor to pull from afterwards (a register's first sync uses it).
Request body
locationIdstringlocation_idResponse
curl https://api.buziin.tech/holygrail.dining.v1.DiningService/GetFloor \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"areas": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"sortOrder": 0,
"archived": false
}
],
"tables": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"areaId": "",
"name": "Amina Mushi",
"seats": 0,
"shape": "TABLE_SHAPE_SQUARE",
"x": 0,
"y": 0,
"archived": false
}
],
"stations": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"archived": false
}
],
"cursor": "0",
"printers": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"connection": "PRINTER_CONNECTION_NETWORK",
"address": "",
"deviceId": "",
"language": "PRINTER_LANGUAGE_ESC_POS",
"paperWidthMm": 0,
"columns": 0,
"backupPrinterId": "",
"cashDrawer": false,
"buzzer": false,
"cutter": false,
"archived": false
}
],
"printerProfiles": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"receipts": false,
"autoReceipt": false,
"bills": false,
"tickets": false,
"reports": false,
"copies": 0,
"largeTickets": false,
"archived": 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.
GetFloorRequest
holygrail.dining.v1.GetFloorRequest
locationIdstringlocation_idGetFloorResponse
holygrail.dining.v1.GetFloorResponse
areasDiningArea[]tablesDiningTable[]stationsKitchenStation[]cursorint64 stringprintersPrinter[]DiningArea
holygrail.dining.v1.DiningArea
DiningArea groups tables: "Patio", "Bar", "Main room".
idstringlocationIdstringlocation_idnamestringsortOrderintegersort_orderarchivedbooleanDiningTable
holygrail.dining.v1.DiningTable
DiningTable is a table on the floor plan. Its place is a cell on a grid 12 cells wide and 8 deep per area, so a plan drawn on the dashboard looks the same on every register. A square or round table takes one cell, a long one two side by side.
idstringlocationIdstringlocation_idareaIdstringarea_idnamestringseatsintegershapeTableShapexintegerGrid cell of the table's left end: x from 0 to 11, y from 0 to 7.
yintegerarchivedbooleanKitchenStation
holygrail.dining.v1.KitchenStation
KitchenStation is a screen in the kitchen or bar: grill, cold, bar. Items in its departments or categories go to its tickets. A station with neither takes whatever no other station takes; with no stations at all, every ticket goes to every kitchen screen, which can show one department.
idstringlocationIdstringlocation_idnamestringarchivedbooleanPrinter
holygrail.dining.v1.Printer
Printer is a printer at a location. What it prints comes from its profiles; a printer with none prints nothing until one is added.
idstringlocationIdstringlocation_idnamestringconnectionPrinterConnectionaddressstringNetwork: "192.168.1.50" or "192.168.1.50:9100". Bluetooth: the printer's Classic address ("66:22:B3:01:9C:4F"), or "le:" and its Low Energy id. USB: "vendor:product" in hex, with ":serial" when two of a kind are plugged in. System: empty, or the system's own printer id.
deviceIdstringdevice_idThe register a Bluetooth or USB printer is attached to; only it prints there. Empty for network and system printers.
languagePrinterLanguagepaperWidthMmintegerpaper_width_mm58 or 80. Characters per line follow from it unless columns is set.
columnsintegerCharacters per line in the normal font, 0 for the paper's usual (32 on 58 mm, 48 on 80 mm).
backupPrinterIdstringbackup_printer_idTakes this printer's jobs when it cannot print, after a few tries.
cashDrawerbooleancash_drawerA cash drawer is plugged into the printer: it opens on cash sales and from the drawer screen.
buzzerbooleanSound the printer's buzzer with each kitchen ticket.
cutterbooleanCut the paper after each print; off for printers without a cutter.
archivedbooleanPrinterProfile
holygrail.dining.v1.PrinterProfile
PrinterProfile says what a printer prints: "Front counter" prints receipts and bills, "Kitchen" prints the kitchen's tickets, "Bar" the bar's. Printers share profiles, so a second kitchen printer takes the same tickets by adding the same profile.
idstringlocationIdstringlocation_idnamestringreceiptsbooleanCustomer receipts for sales and refunds.
autoReceiptbooleanauto_receiptPrint a receipt after each sale without asking.
billsbooleanBills: what an open ticket owes, before payment.
ticketsbooleanKitchen tickets (and voids) for the departments in department_ids, or for every department when it is empty.
reportsbooleanCash drawer and shift reports.
copiesintegerCopies of each print, 1 to 5.
largeTicketsbooleanlarge_ticketsKitchen tickets in large type.
archivedbooleanIdList
holygrail.catalog.v1.IdList
IdList wraps a list of ids so a patch can tell "not changed" from "cleared".
idsstring[]TableShape enum
holygrail.dining.v1.TableShape
TABLE_SHAPE_UNSPECIFIEDTABLE_SHAPE_SQUARETABLE_SHAPE_ROUNDTABLE_SHAPE_LONGTwice as wide as it is deep, for long tables and booths.
PrinterConnection enum
holygrail.dining.v1.PrinterConnection
How a register reaches a printer. See docs/adr/0024-printers.md.
PRINTER_CONNECTION_UNSPECIFIEDPRINTER_CONNECTION_NETWORKEthernet or Wi-Fi, raw on TCP port 9100 (or the port in the address). Any register at the location can print to it; a register in a browser prints through the shop hub.
PRINTER_CONNECTION_BLUETOOTHPaired with one register (device_id), by Bluetooth Classic or Low Energy.
PRINTER_CONNECTION_USBPlugged into one register (device_id).
PRINTER_CONNECTION_SYSTEMAn office printer through the device's print service (AirPrint, the Android print service, or the browser's print dialog), for full pages.
PrinterLanguage enum
holygrail.dining.v1.PrinterLanguage
The command set a receipt printer speaks.
PRINTER_LANGUAGE_UNSPECIFIEDPRINTER_LANGUAGE_ESC_POSEpson's ESC/POS, which nearly every thermal printer speaks or emulates (Epson, Xprinter, Rongta, Munbyn, Bixolon, Citizen, Sunmi, HPRT...).
PRINTER_LANGUAGE_STAR_LINEStar Line Mode, for Star printers not set to ESC/POS emulation.
Base URL https://api.buziin.tech. Every method is POST with a JSON body; see Making requests.