Developers
Sign inGet API keys
API reference/Hospitality and services

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.

holygrail.dining.v1.DiningService1 methodsdining.read

GetFloor#

dining.readRead
POST/holygrail.dining.v1.DiningService/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_id

Response

cursorint64 string
printersPrinter[]
printerProfilesPrinterProfile[]printer_profiles
Request
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"
}'
Response example
{
  "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_id

GetFloorResponse

holygrail.dining.v1.GetFloorResponse

cursorint64 string
printersPrinter[]
printerProfilesPrinterProfile[]printer_profiles

DiningArea

holygrail.dining.v1.DiningArea

DiningArea groups tables: "Patio", "Bar", "Main room".

idstring
locationIdstringlocation_id
namestring
sortOrderintegersort_order
archivedboolean

DiningTable

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.

idstring
locationIdstringlocation_id
areaIdstringarea_id
namestring
seatsinteger
xinteger

Grid cell of the table's left end: x from 0 to 11, y from 0 to 7.

yinteger
archivedboolean

KitchenStation

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.

idstring
locationIdstringlocation_id
namestring
categoryIdsIdListcategory_ids
archivedboolean
departmentIdsIdListdepartment_ids

Printer

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.

idstring
locationIdstringlocation_id
namestring
addressstring

Network: "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_id

The register a Bluetooth or USB printer is attached to; only it prints there. Empty for network and system printers.

paperWidthMmintegerpaper_width_mm

58 or 80. Characters per line follow from it unless columns is set.

columnsinteger

Characters per line in the normal font, 0 for the paper's usual (32 on 58 mm, 48 on 80 mm).

profileIdsIdListprofile_ids
backupPrinterIdstringbackup_printer_id

Takes this printer's jobs when it cannot print, after a few tries.

cashDrawerbooleancash_drawer

A cash drawer is plugged into the printer: it opens on cash sales and from the drawer screen.

buzzerboolean

Sound the printer's buzzer with each kitchen ticket.

cutterboolean

Cut the paper after each print; off for printers without a cutter.

archivedboolean

PrinterProfile

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.

idstring
locationIdstringlocation_id
namestring
receiptsboolean

Customer receipts for sales and refunds.

autoReceiptbooleanauto_receipt

Print a receipt after each sale without asking.

billsboolean

Bills: what an open ticket owes, before payment.

ticketsboolean

Kitchen tickets (and voids) for the departments in department_ids, or for every department when it is empty.

departmentIdsIdListdepartment_ids
reportsboolean

Cash drawer and shift reports.

copiesinteger

Copies of each print, 1 to 5.

largeTicketsbooleanlarge_tickets

Kitchen tickets in large type.

archivedboolean

IdList

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_UNSPECIFIED
TABLE_SHAPE_SQUARE
TABLE_SHAPE_ROUND
TABLE_SHAPE_LONG

Twice 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_UNSPECIFIED
PRINTER_CONNECTION_NETWORK

Ethernet 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_BLUETOOTH

Paired with one register (device_id), by Bluetooth Classic or Low Energy.

PRINTER_CONNECTION_USB

Plugged into one register (device_id).

PRINTER_CONNECTION_SYSTEM

An 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_UNSPECIFIED
PRINTER_LANGUAGE_ESC_POS

Epson's ESC/POS, which nearly every thermal printer speaks or emulates (Epson, Xprinter, Rongta, Munbyn, Bixolon, Citizen, Sunmi, HPRT...).

PRINTER_LANGUAGE_STAR_LINE

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