Sync and change feed
SyncService moves changes between devices and the server.
Devices write locally first and queue Mutations in an outbox. Push applies each mutation exactly once (by op_id). Every accepted change is appended to the organization's change feed, which devices read with Pull.
Push#
Request body
deviceIdstringdevice_idThe registered device pushing, or empty for the web dashboard.
mutationsMutation[]Response
resultsMutationResult[]curl https://api.buziin.tech/holygrail.sync.v1.SyncService/Push \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"mutations": [
{
"taxRate": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi"
}
}
]
}'{
"results": [
{
"opId": "",
"status": "MUTATION_STATUS_APPLIED",
"errorCode": "",
"errorMessage": ""
}
]
}Pull#
Request body
locationIdstringlocation_idInclude changes for this location as well as organization-wide ones.
cursorint64 stringLast seq the device has applied; 0 replays the whole feed.
limitintegerDefaults to 500, at most 1000.
Response
curl https://api.buziin.tech/holygrail.sync.v1.SyncService/Pull \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"changes": [
{
"seq": "0"
}
],
"cursor": "0",
"hasMore": 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.
PushRequest
holygrail.sync.v1.PushRequest
deviceIdstringdevice_idThe registered device pushing, or empty for the web dashboard.
mutationsMutation[]PullRequest
holygrail.sync.v1.PullRequest
locationIdstringlocation_idInclude changes for this location as well as organization-wide ones.
cursorint64 stringLast seq the device has applied; 0 replays the whole feed.
limitintegerDefaults to 500, at most 1000.
PullResponse
holygrail.sync.v1.PullResponse
changesChange[]cursorint64 stringPass back as the next cursor.
hasMorebooleanhas_moreMutation
holygrail.sync.v1.Mutation
Mutation is one queued change. The oneof field names match Change's, and each patch's set fields are merged field by field: a field only changes when the mutation's clock is newer than the clock of its last write.
opIdstringop_idClient-generated UUIDv7; retries reuse it.
hlcstringHybrid logical clock from the writing device, see docs/adr/0003.
Orders and cash are whole documents or immutable facts, not patches.
Pushed once when sent; later pushes change only its status.
Splits, moves and merges between open tickets: two orders applied together. The feed sends them back as two orders.
Whole timecards, pushed on clock in and as they change.
Immutable: one line for the audit log.
Whole documents a team member writes on the register: their time off and shift change requests, and their availability.
Immutable: someone confirmed they read an announcement.
Nuru till prompts (ADR 90): a register dismisses one.
Whole shift runs (ADR 117), pushed when started and when ended.
MutationResult
holygrail.sync.v1.MutationResult
opIdstringop_idstatusMutationStatuserrorCodestringerror_codeMachine-readable reason when rejected, e.g. "invalid", "forbidden", "not_found".
errorMessagestringerror_messageChange
holygrail.sync.v1.Change
Change is the full new state of one entity.
seqint64 stringKept by the server; never pushed.
Made through AppointmentsService.
Never sent: register events go to the audit log only.
Edited through TeamService. With the passcode check, for registers.
Published shifts at the location.
Never sent: acknowledgements come back on the announcement.
Made by Nuru at the location: something about to run out, prep due.
Edited through TeamService (ADR 116); never pushed.
TaxRatePatch
holygrail.catalog.v1.TaxRatePatch
idstringnamestringoptionalrateBpintegeroptionalrate_bpinclusivebooleanoptionalarchivedbooleanoptionalCategoryPatch
holygrail.catalog.v1.CategoryPatch
idstringnamestringoptionalcolorstringoptionalsortOrderintegeroptionalsort_orderarchivedbooleanoptionaldepartmentIdstringoptionaldepartment_idItemPatch
holygrail.catalog.v1.ItemPatch
idstringcategoryIdstringoptionalcategory_idnamestringoptionaldescriptionstringoptionalarchivedbooleanoptionaldurationMinutesintegeroptionalduration_minutesdepartmentIdstringoptionaldepartment_idimageIdstringoptionalimage_idItemVariantPatch
holygrail.catalog.v1.ItemVariantPatch
idstringitemIdstringoptionalitem_idnamestringoptionalskustringoptionalbarcodestringoptionalpriceint64 stringoptionaltrackStockbooleanoptionaltrack_stocksortOrderintegeroptionalsort_orderarchivedbooleanoptionalunitstringoptionalunitPrecisionintegeroptionalunit_precisionimageIdstringoptionalimage_idwholesalePriceint64 stringoptionalwholesale_priceModifierGroupPatch
holygrail.catalog.v1.ModifierGroupPatch
idstringnamestringoptionalminSelectintegeroptionalmin_selectmaxSelectintegeroptionalmax_selectarchivedbooleanoptionalfreeCountintegeroptionalfree_countavailabilityModifierAvailabilitykindstringoptionaldisplayNamestringoptionaldisplay_namemaxPerChoiceintegeroptionalmax_per_choiceModifierPatch
holygrail.catalog.v1.ModifierPatch
idstringgroupIdstringoptionalgroup_idnamestringoptionalpriceint64 stringoptionalsortOrderintegeroptionalsort_orderarchivedbooleanoptionalisDefaultbooleanoptionalis_defaultsoldOutbooleanoptionalsold_outactionstringoptionalchildGroupIdstringoptionalchild_group_idexcludesIdListavailabilityModifierAvailabilitystockVariantIdstringoptionalstock_variant_idownTaxesbooleanoptionalown_taxesOrder
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.
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_idRefund
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.
TicketMove
holygrail.orders.v1.TicketMove
TicketMove moves lines from one open ticket to another in one step: splitting a ticket into a new one, moving items between two tickets, or merging a ticket into another. It carries both orders whole, as the device saved them. The server applies them together by the rules for orders, or refuses both, so lines are never on two tickets or neither.
The rules: both orders are at the pushing device's location; `from` and `to` differ; `to` is open; `from` is open, or voided with merged_into_id set to `to` (a merge); every line removed from `from` with moved_to_order_id names `to`; and `from` has no payments.
idstringfromOrdertoOrderLocationPricePatch
holygrail.catalog.v1.LocationPricePatch
idstringlocationIdstringoptionallocation_idFixed once set: one price per variant per location.
variantIdstringoptionalvariant_idpriceint64 stringoptionalarchivedbooleanoptionalDepartmentPatch
holygrail.catalog.v1.DepartmentPatch
idstringnamestringoptionalcolorstringoptionalsortOrderintegeroptionalsort_orderarchivedbooleanoptionalDiscountPatch
holygrail.catalog.v1.DiscountPatch
idstringnamestringoptionalpercentBpintegeroptionalpercent_bpamountint64 stringoptionalvariablebooleanoptionalmaxAmountint64 stringoptionalmax_amountminOrderAmountint64 stringoptionalmin_order_amountminQuantityintegeroptionalmin_quantityautomaticbooleanoptionalrequiresApprovalbooleanoptionalrequires_approvalstartsOnstringoptionalstarts_onendsOnstringoptionalends_ondaysOfWeekintegeroptionaldays_of_weekstartMinuteintegeroptionalstart_minuteendMinuteintegeroptionalend_minutecolorstringoptionalsortOrderintegeroptionalsort_orderarchivedbooleanoptionalitemOnlybooleanoptionalitem_onlyCustomerPatch
holygrail.customers.v1.CustomerPatch
Fields set here replace the customer's; see SyncService.
idstringnamestringoptionalemailstringoptionalphonestringoptionalnotestringoptionalarchivedbooleanoptionalwholesalebooleanoptionalbirthdaystringoptionalmarketingOptInbooleanoptionalmarketing_opt_inLoyaltyProgramPatch
holygrail.customers.v1.LoyaltyProgramPatch
idstringenabledbooleanoptionalspendPerPointint64 stringoptionalspend_per_pointrewardPointsint64 stringoptionalreward_pointsrewardValueint64 stringoptionalreward_valuenamestringoptionalwelcomePointsint64 stringoptionalwelcome_pointsbirthdayPointsint64 stringoptionalbirthday_pointsexpiryMonthsintegeroptionalexpiry_monthstierWindowMonthsintegeroptionaltier_window_monthstiersLoyaltyTier[]Set replace_tiers (and so on) to replace the list, even with nothing.
replaceTiersbooleanreplace_tiersrewardsLoyaltyReward[]replaceRewardsbooleanreplace_rewardscampaignsLoyaltyCampaign[]replaceCampaignsbooleanreplace_campaignscolorstringoptionalDiningAreaPatch
holygrail.dining.v1.DiningAreaPatch
idstringlocationIdstringoptionallocation_idnamestringoptionalsortOrderintegeroptionalsort_orderarchivedbooleanoptionalDiningTablePatch
holygrail.dining.v1.DiningTablePatch
idstringlocationIdstringoptionallocation_idareaIdstringoptionalarea_idnamestringoptionalseatsintegeroptionalxintegeroptionalyintegeroptionalarchivedbooleanoptionalKitchenStationPatch
holygrail.dining.v1.KitchenStationPatch
idstringlocationIdstringoptionallocation_idnamestringoptionalarchivedbooleanoptionalPrinterPatch
holygrail.dining.v1.PrinterPatch
idstringlocationIdstringoptionallocation_idnamestringoptionaladdressstringoptionaldeviceIdstringoptionaldevice_idpaperWidthMmintegeroptionalpaper_width_mmcolumnsintegeroptionalbackupPrinterIdstringoptionalbackup_printer_idcashDrawerbooleanoptionalcash_drawerbuzzerbooleanoptionalcutterbooleanoptionalarchivedbooleanoptionalPrinterProfilePatch
holygrail.dining.v1.PrinterProfilePatch
idstringlocationIdstringoptionallocation_idnamestringoptionalreceiptsbooleanoptionalautoReceiptbooleanoptionalauto_receiptbillsbooleanoptionalticketsbooleanoptionalreportsbooleanoptionalcopiesintegeroptionallargeTicketsbooleanoptionallarge_ticketsarchivedbooleanoptionalStaffMemberPatch
holygrail.appointments.v1.StaffMemberPatch
idstringlocationIdstringoptionallocation_idnamestringoptionalcolorstringoptionalhoursWeeklyHoursarchivedbooleanoptionalBookingResourcePatch
holygrail.appointments.v1.BookingResourcePatch
idstringlocationIdstringoptionallocation_idnamestringoptionalarchivedbooleanoptionalTimecard
holygrail.team.v1.Timecard
Timecard is time someone clocked at a location. A register pushes it when they clock in and again as it changes; it is the register's until a manager edits it on the dashboard.
idstringlocationIdstringlocation_idteamMemberIdstringteam_member_iddeviceIdstringdevice_idshiftIdstringshift_idThe scheduled shift it is for, if any.
clockInAtstringclock_in_atclockOutAtstringclock_out_atEmpty while clocked in.
breaksBreak[]notestringeditedBystringedited_bySet by the server: who last edited it on the dashboard, and when.
editedAtstringedited_atapprovedBystringapproved_byApproved for payroll, by whom and when; it no longer changes.
approvedAtstringapproved_atnamedShiftIdstringnamed_shift_idThe named shift they clocked in against (ADR 116); the server fills it from the clock when the register leaves it empty. Sales they ring up while clocked in belong to it.
shiftDatestringshift_dateSet by the server: the date the shift occurrence started, YYYY-MM-DD.
shiftRunIdstringshift_run_idThe shift run (ADR 117) it belongs to: the shift its owner started and has not ended yet. Its named shift and date come from the run.
RegisterEvent
holygrail.team.v1.RegisterEvent
RegisterEvent is one thing a team member did on a register, for the audit log: signing in, clocking in, opening a screen, a refund, a manager approval, a refused action. Registers push them through sync, offline too.
idstringlocationIdstringlocation_idteamMemberIdstringteam_member_idEmpty when nobody was signed in, e.g. a wrong passcode.
actionstring"register.sign_in", "register.clock_in", "register.view", "register.refund", "register.approval", "register.denied", ...
summarystringdetailsstringJSON object with more about it.
atstringapprovedByIdstringapproved_by_idA manager who approved it with their passcode.
outcomestring"ok", or "denied" when it was refused.
TimeOffRequest
holygrail.team.v1.TimeOffRequest
idstringteamMemberIdstringteam_member_idkindstring"vacation", "sick", "personal", "unpaid" or "other".
startsAtstringstarts_atRFC 3339. A whole-day request runs from the first day's midnight to the midnight after its last day, local time.
endsAtstringends_atallDaybooleanall_daynotestringstatusstring"pending", "approved", "denied" or "cancelled".
minutesint64 stringPaid minutes it counts for: eight hours a whole day, else its length; 0 when unpaid.
decidedBystringdecided_bySet by the server.
decidedAtstringdecided_atdecisionNotestringdecision_notecreatedAtstringcreated_atshortNoticebooleanshort_noticeAsked for later than the schedule settings' notice.
ShiftRequest
holygrail.team.v1.ShiftRequest
idstringlocationIdstringlocation_idkindstring"pickup" an open shift, "drop" your own, "give" yours to target_member_id, or "swap" yours for target_shift_id.
shiftIdstringshift_idteamMemberIdstringteam_member_idWho asked.
targetMemberIdstringtarget_member_idtargetShiftIdstringtarget_shift_idnotestringstatusstring"pending" (with the teammate or a manager), "approved", "denied", "declined" (by the teammate) or "cancelled".
peerStatusstringpeer_statusFor give and swap: "waiting", "accepted" or "declined".
decidedBystringdecided_bydecidedAtstringdecided_atdecisionNotestringdecision_notecreatedAtstringcreated_atshiftScheduledShiftThe shifts as they were asked about, for showing.
Availability
holygrail.team.v1.Availability
Availability is one team member's week. Registers push it whole when someone changes their own.
idstringSame as team_member_id.
teamMemberIdstringteam_member_idwindowsAvailabilityWindow[]notestringupdatedAtstringupdated_atAnnouncementAck
holygrail.team.v1.AnnouncementAck
AnnouncementAck is a team member confirming they read an announcement, on a register; pushed through sync.
idstringannouncementIdstringannouncement_idteamMemberIdstringteam_member_idatstringTillPromptDismiss
holygrail.autopilot.v1.TillPromptDismiss
idstringShiftRun
holygrail.team.v1.ShiftRun
ShiftRun is a shift someone works: started on the register, open across clock-ins and clock-outs, and ended by them (or a manager).
idstringlocationIdstringlocation_idteamMemberIdstringteam_member_iddeviceIdstringdevice_idnamedShiftIdstringnamed_shift_idThe named shift it works, if any; the server fills it from the clock when the register leaves it empty.
shiftDatestringshift_dateSet by the server: the date the named shift occurrence started.
startedAtstringstarted_atendedAtstringended_atEmpty while the shift is open.
endedBystringended_bySet by the server when a manager ended it on the dashboard.
fullNamestringfull_nameSet by the server in lists: their name.
TaxRate
holygrail.catalog.v1.TaxRate
idstringnamestringrateBpintegerrate_bpBasis points: 825 = 8.25%.
inclusivebooleanTrue when prices already include this tax (common for VAT).
archivedbooleanCategory
holygrail.catalog.v1.Category
idstringnamestringcolorstring"#RRGGBB" or empty.
sortOrderintegersort_orderarchivedbooleandepartmentIdstringdepartment_idThe department its items belong to, unless an item names its own.
Item
holygrail.catalog.v1.Item
idstringcategoryIdstringcategory_idEmpty for uncategorised items.
namestringdescriptionstringkindItemKindarchivedbooleandurationMinutesintegerduration_minutesHow long a service takes, for booking; 0 for anything else.
departmentIdstringdepartment_idIts own department, when not its category's; empty to follow the category.
imageIdstringimage_idThe library image the register and dashboard show for it; empty for none.
Its own selection rules for some of its modifier groups (ADR 115); unset when it takes every group as it is.
ItemVariant
holygrail.catalog.v1.ItemVariant
ItemVariant is what is actually sold: every item has at least one.
idstringitemIdstringitem_idnamestringEmpty for an item's single default variant, e.g. "Large", "Red / M".
skustringbarcodestringpriceint64 stringtrackStockbooleantrack_stocksortOrderintegersort_orderarchivedbooleanunitstringUnit the variant is sold by, as its abbreviation ("kg", "lb", "h"), or empty to sell it by the piece. price is per one unit.
unitPrecisionintegerunit_precisionDecimals a quantity of the unit takes, 0 to 3. Above 0 the register asks for the measure (1.25 kg) and stock is kept in thousandths of the unit.
imageIdstringimage_idIts own library image, such as the red one of a shirt; empty to show the item's.
wholesalePriceint64 stringwholesale_priceThe price for wholesale customers (hotels and restaurants buying in bulk), per one unit like price; 0 when they pay the normal price (ADR 49).
ModifierGroup
holygrail.catalog.v1.ModifierGroup
idstringnamestringminSelectintegermin_selectmaxSelectintegermax_select0 means no limit.
archivedbooleanfreeCountintegerfree_countHow many choices come free (ADR 46): the first ones chosen are included in the price, and only the rest are charged.
availabilityModifierAvailabilityWhere and when the group is offered (ADR 46); unset for always.
kindstring"modifier" (a choice that changes the item: size, milk, cooking) or "addon" (an optional extra, usually charged) (ADR 115).
displayNamestringdisplay_nameWhat the register, kiosk and guests see; empty to show name. name is what the team manages the set by ("Milk (coffee bar)").
maxPerChoiceintegermax_per_choiceHow many times one choice can be picked: 0 or 1 for once, up to 99 ("Extra shot" ×3). Each pick goes on the line as its own modifier.
Modifier
holygrail.catalog.v1.Modifier
idstringgroupIdstringgroup_idnamestringpriceint64 stringsortOrderintegersort_orderarchivedbooleanisDefaultbooleanis_defaultChosen already when the item is picked; it can be taken off.
soldOutbooleansold_outSold out for now (86'd): shown, but it can't be chosen.
actionstringHow the kitchen and the receipt say it: "" (just the name), "add", "extra", "no", "sub", "side" or "light". "no" prints "NO Onions".
childGroupIdstringchild_group_idA group that opens when this is chosen ("Add cheese", then "Which cheese?"); empty for none.
excludesIdListChoices that can't go with this one, in any group.
availabilityModifierAvailabilityWhere and when it is offered; unset for always.
stockVariantIdstringstock_variant_idOffered only while this variant (an ingredient) has stock at the register's location; empty for always.
What it costs at some locations instead of price.
With own_taxes, taxed with tax_rate_ids (none for untaxed) instead of like its item (ADR 46).
ownTaxesbooleanown_taxesLocationPrice
holygrail.catalog.v1.LocationPrice
LocationPrice sells a variant at one location for a different price than the catalog's. Managers can set them for their own locations; the catalog itself is shared by every location.
idstringlocationIdstringlocation_idvariantIdstringvariant_idpriceint64 stringarchivedbooleanArchived goes back to the catalog price.
Department
holygrail.catalog.v1.Department
Department is a part of the business that makes or serves what is sold: Kitchen, Bar, Barista. Categories and items belong to one; kitchen tickets go to it, and sales are reported by it.
idstringnamestringcolorstring"#RRGGBB" or empty.
sortOrderintegersort_orderarchivedbooleanDiscount
holygrail.catalog.v1.Discount
Discount is a preset discount the register offers: "Staff 20%", "Happy hour", "$5 off $50". The register applies it to an order as an orders.v1.AppliedDiscount, a snapshot of these terms. See docs/adr/0026-discounts.md for how the rules work offline.
idstringnamestringkindDiscountKindpercentBpintegerpercent_bpBasis points for a percentage: 1500 = 15%. Up to 10000.
amountint64 stringMinor units for a fixed amount.
variablebooleanThe cashier types the percentage or amount at the sale (an open discount); percent_bp or amount is then a suggestion, or 0.
scopeDiscountScopeITEMS scope: the items and categories it applies to; both empty for any.
maxAmountint64 stringmax_amountCaps what one application takes; 0 for no cap.
minOrderAmountint64 stringmin_order_amountRules. The sale must be at least this much before discounts (0 for any), with at least min_quantity units it applies to (0 for any).
minQuantityintegermin_quantityautomaticbooleanApplied by the register on its own whenever the rules are met.
requiresApprovalbooleanrequires_approvalNeeds someone with pos.discount_approve to enter their passcode.
Locations it is offered at; empty for every location.
startsOnstringstarts_onLocal dates (YYYY-MM-DD) it runs from and to, both included; empty for no limit.
endsOnstringends_ondaysOfWeekintegerdays_of_weekDays of the week it runs on, a bit each from Sunday (1) to Saturday (64); 0 for every day.
startMinuteintegerstart_minuteLocal time of day it runs from and until, in minutes after midnight; both 0 for all day. An end before the start runs past midnight.
endMinuteintegerend_minutecolorstring"#RRGGBB" or empty: its button on the register.
sortOrderintegersort_orderarchivedbooleanitemOnlybooleanitem_onlyITEMS scope: off each item's own price only, never its modifiers ("half off pizzas, not the toppings").
Customer
holygrail.customers.v1.Customer
idstringnamestringemailstringphonestringnotestringarchivedbooleanpointsBalanceint64 stringpoints_balanceKept by the server from completed orders and adjustments.
visitCountintegervisit_counttotalSpentint64 stringtotal_spentOrder totals, including tax, in minor units.
lastVisitAtstringlast_visit_atRFC 3339; empty before the first visit.
createdAtstringcreated_atwholesalebooleanA wholesale customer (a hotel or restaurant buying in bulk) pays each item's wholesale price where it has one (ADR 49).
tierIdstringtier_idLoyalty membership (ADR 120). The tier is kept by the server from what the customer spent in the program's tier window.
qualifyingSpendint64 stringqualifying_spendBefore tax, in minor units, over the program's tier window.
lifetimePointsint64 stringlifetime_pointsEvery point ever earned, bonuses included.
birthdaystring"MM-DD" or "YYYY-MM-DD"; empty if not given. Earns the birthday bonus.
marketingOptInbooleanmarketing_opt_inThe customer agreed to hear about offers.
cardTokenstringcard_tokenThe private part of the customer's loyalty card link. Output only.
LoyaltyProgram
holygrail.customers.v1.LoyaltyProgram
LoyaltyProgram is the organization's loyalty program; its id is the organization's id. Amounts are minor units.
Tiers, rewards and campaigns are part of the program document: an owner edits them together on the dashboard and each list is replaced whole when it changes (ADR 120).
idstringenabledbooleanspendPerPointint64 stringspend_per_pointOne point for every this much spent before tax, e.g. 100 for $1.
rewardPointsint64 stringreward_pointsThe standard reward, offered when rewards is empty: it costs this many points...
rewardValueint64 stringreward_value...and takes this much off an order.
namestringThe program's name on receipts, the member card and the register: "Mama Lishe Rewards". Empty means "Rewards".
welcomePointsint64 stringwelcome_pointsPoints given once when a customer joins.
birthdayPointsint64 stringbirthday_pointsPoints given once a year on the customer's birthday.
expiryMonthsintegerexpiry_monthsPoints lapse after this many months without a visit; 0 keeps them.
tierWindowMonthsintegertier_window_monthsTiers count spend over this many months; 0 counts every sale.
tiersLoyaltyTier[]Lowest first by min_spend.
rewardsLoyaltyReward[]campaignsLoyaltyCampaign[]colorstringA hex accent for the member card, e.g. "#0F766E".
StockLevel
holygrail.inventory.v1.StockLevel
StockLevel is what a register sees: how many of a variant a location has. It is synced through the feed and kept by the server.
idstringlocationIdstringlocation_idvariantIdstringvariant_idonHandint64 stringon_handCan go below zero when registers sell offline what was not in stock.
reorderPointint64 stringreorder_pointareaIdstringarea_idThe storage area it is in. Registers only receive their sales floor's.
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.
archivedbooleanStaffMember
holygrail.appointments.v1.StaffMember
StaffMember is someone customers book: a stylist, a therapist. They take bookings for their services during their hours.
idstringlocationIdstringlocation_idnamestringcolorstring"#rrggbb", for the calendar.
The services (catalog items) they do.
hoursWeeklyHoursarchivedbooleanteamMemberIdstringteam_member_idThe team member whose shifts follow this person's bookings. Set with SetStaffTeamMember, not through sync.
BookingResource
holygrail.appointments.v1.BookingResource
BookingResource is something a service needs one of: a chair, a treatment room, a wash basin. A service listed by any resource takes one free resource for each booking.
idstringlocationIdstringlocation_idnamestringarchivedbooleanBooking
holygrail.appointments.v1.Booking
Booking holds a person (and a resource, when the service needs one) for a stretch of time. Booked, arrived and completed bookings hold their time; cancelled ones and no-shows free it.
idstringlocationIdstringlocation_idkindBookingKindstatusBookingStatussourceBookingSourcestaffIdstringstaff_idresourceIdstringresource_idEmpty when the service needs no resource.
itemIdstringitem_idThe service booked, for an appointment: the item variant sold at the register, its name ("Haircut (Long)") and price when it was booked.
variantIdstringvariant_idserviceNamestringservice_namepriceint64 stringstartsAtstringstarts_atRFC 3339.
endsAtstringends_atcustomerIdstringcustomer_idcustomerNamestringcustomer_nameThe customer's name, or a walk-in's.
notestringorderIdstringorder_idThe sale that paid for it.
createdAtstringcreated_atstatusAtstringstatus_atdepositint64 stringPaid when booking online; taken off the bill at the register.
customerEmailstringcustomer_emailcustomerPhonestringcustomer_phonejobIdstringjob_idFor a visit, the job it is for.
TeamMember
holygrail.team.v1.TeamMember
TeamMember is someone who works at the business. Registers receive the team through the change feed, with the passcode check (salt and hash); the dashboard never sees those.
idstringfullNamestringfull_nameemailstringphonestringroleIdstringrole_idroleNamestringrole_nameThe role's name and permissions, so a register can check them offline.
permissionsstring[]locationIdsstring[]location_idsEmpty means every location.
hourlyRateint64 stringhourly_ratePay per hour in minor units.
colorstring"#rrggbb" for the schedule and the register.
activebooleanhasPasscodebooleanhas_passcodehasLoginbooleanhas_loginWhether they can sign in to the dashboard, and whether an invitation is waiting for them.
invitedbooleanpasscodeSaltstringpasscode_saltThe register checks a passcode p as hex(sha256(salt + ":" + p)) == hash. Set only in the change feed and ExportTeam.
passcodeHashstringpasscode_hashownerbooleanWhether this is an owner; owners can do everything.
updatedAtstringupdated_atpositionIdsstring[]position_idsThe positions they can work, for the schedule.
maxWeeklyMinutesintegermax_weekly_minutesThe most they want to work in a week, in minutes; 0 for no limit.
ScheduledShift
holygrail.team.v1.ScheduledShift
Shift is a scheduled stretch of work at a location.
idstringlocationIdstringlocation_idteamMemberIdstringteam_member_idEmpty for an open shift anyone can pick up.
startsAtstringstarts_atRFC 3339.
endsAtstringends_atbreakMinutesintegerbreak_minutesUnpaid break time within the shift.
notestringpublishedbooleanremovedbooleanFeed only: the shift was deleted or unpublished.
positionIdstringposition_idThe position they work, if any.
sourcestringmanual, or forecast for an unpublished draft made from the demand forecast (ADR 56).
Announcement
holygrail.team.v1.Announcement
idstringtitlestringbodystringlocationIdsstring[]location_idsEmpty for every location.
pinnedbooleanrequireAckbooleanrequire_ackTeam members are asked to confirm they read it.
publishedAtstringpublished_atexpiresAtstringexpires_atEmpty for no end.
authorNamestringauthor_namearchivedbooleanacknowledgedMemberIdsstring[]acknowledged_member_idsWho confirmed they read it.
audienceintegerHow many people it is for (dashboard only).
Position
holygrail.team.v1.Position
idstringnamestringcolorstring"#rrggbb".
sortintegerarchivedbooleanTillPrompt
holygrail.autopilot.v1.TillPrompt
TillPrompt is Nuru at the register and handheld (ADR 90): an item about to run out today, or a prep task due. Made on the server and synced to the location's devices through the change feed, so a register shows it offline; a register dismisses it with TillPromptDismiss.
idstringlocationIdstringlocation_idkindstringlow_stock or prep_due.
titlestringdetailstringvariantIdstringvariant_idThe item it is about, if any.
daystringThe local day it is for, YYYY-MM-DD.
statusstringopen, dismissed, or gone (no longer true).
updatedAtstringupdated_atRFC 3339.
NamedShift
holygrail.team.v1.NamedShift
idstringlocationIdstringlocation_idnamestringcodestringShort label, at most 8 characters ("AM").
colorstring"#rrggbb".
startMinuteintegerstart_minuteMinutes after local midnight. An end at or before the start runs into the next day; equal start and end is a 24-hour shift.
endMinuteintegerend_minutedaysinteger[]Weekdays it starts on, 0 Sunday ... 6 Saturday; empty for every day.
teamMemberIdsstring[]team_member_idsThe team members assigned to it.
earlyClockInMinutesintegerearly_clock_in_minutesHow early someone may clock in against it, and after how many minutes past the start a clock-in is late.
lateGraceMinutesintegerlate_grace_minutessortintegerarchivedbooleanupdatedAtstringupdated_atIdList
holygrail.catalog.v1.IdList
IdList wraps a list of ids so a patch can tell "not changed" from "cleared".
idsstring[]ModifierOverrides
holygrail.catalog.v1.ModifierOverrides
ModifierOverrides are an item's own rules for its modifier groups, by modifier group id.
ModifierAvailability
holygrail.catalog.v1.ModifierAvailability
ModifierAvailability says where and when a modifier group or choice is offered.
locationIdsstring[]location_idsThe locations that offer it; empty for every location.
daysOfWeekintegerdays_of_weekDays of the week, bit 0 = Sunday, bit 6 = Saturday; 0 for every day.
startMinuteintegerstart_minuteMinutes after midnight, local time. Equal for all day; an end before the start runs past midnight (18:00 to 02:00).
endMinuteintegerend_minuteLocationPrices
holygrail.catalog.v1.LocationPrices
LocationPrices is what a modifier costs at some locations instead of its price, by location id.
pricesmap<string, int64 string>OrderLine
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[]notestringseatintegerLoyaltyTier
holygrail.customers.v1.LoyaltyTier
A level customers reach by spending: Silver, Gold. Higher tiers earn faster.
idstringClient-chosen UUID, kept when the tier is renamed.
namestringminSpendint64 stringmin_spendSpend before tax over the tier window that reaches the tier. The lowest tier usually has 0.
earnMultiplierBpintegerearn_multiplier_bpPoints earned are multiplied by this, in basis points: 15000 is 1.5×.
perksstringWhat members get, shown on the register and the member card.
colorstringLoyaltyReward
holygrail.customers.v1.LoyaltyReward
Something a member can spend points on.
idstringnamestringdescriptionstringpointsint64 stringkindRewardKindvalueint64 stringmaxValueint64 stringmax_valuevariantIdsstring[]variant_idsminTierIdstringmin_tier_idOnly members at this tier or above; empty for everyone.
archivedbooleanLoyaltyCampaign
holygrail.customers.v1.LoyaltyCampaign
A promotion that earns extra points while it runs.
idstringnamestringkindCampaignKindmultiplierBpintegermultiplier_bpbonusPointsint64 stringbonus_pointsstartsOnstringstarts_onDates at the sale's location, inclusive; empty is open-ended.
endsOnstringends_ondaysOfWeekintegerdays_of_weekDays it runs, bit 0 Sunday to bit 6 Saturday; 0 is every day.
minSpendint64 stringmin_spendSpend before tax a sale needs to qualify.
tierIdsstring[]tier_idsOnly members of these tiers; empty for everyone.
activebooleanBreak
holygrail.team.v1.Break
startAtstringstart_atendAtstringend_atEmpty while on break.
AvailabilityWindow
holygrail.team.v1.AvailabilityWindow
AvailabilityWindow is a stretch of a weekday, in the location's local time. Outside any window, someone counts as available.
weekdayinteger1 Monday to 7 Sunday.
startstring"HH:MM"; end "24:00" for the rest of the day.
endstringkindstring"unavailable" or "preferred".
ModifierGroupOverride
holygrail.catalog.v1.ModifierGroupOverride
ModifierGroupOverride changes a shared modifier group's selection rules for one item only (ADR 115); an unset field keeps the group's rule.
minSelectintegeroptionalmin_selectmaxSelectintegeroptionalmax_selectfreeCountintegeroptionalfree_countLineModifier
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_bpinclusivebooleanShift
holygrail.appointments.v1.Shift
Shift is one stretch of working time in a week, in the location's time zone: weekday 0 is Sunday, minutes count from midnight.
weekdayintegerstartMinuteintegerstart_minuteendMinuteintegerend_minuteMutationStatus enum
holygrail.sync.v1.MutationStatus
MUTATION_STATUS_UNSPECIFIEDMUTATION_STATUS_APPLIEDMUTATION_STATUS_DUPLICATEAlready received earlier; the original outcome is in error_code.
MUTATION_STATUS_REJECTEDNot applied. Retrying will not help; show it in the sync issues inbox.
ItemKind enum
holygrail.catalog.v1.ItemKind
ITEM_KIND_UNSPECIFIEDITEM_KIND_PRODUCTITEM_KIND_SERVICEA service has a duration and can be booked (Phase 4).
ITEM_KIND_FEEITEM_KIND_INGREDIENTStocked and used by recipes, never sold at the register: flour, milk, or a prepared sauce. See docs/adr/0027-storage-and-recipes.md.
OrderState 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.
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_OUTTicketKind 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).
DiscountKind enum
holygrail.catalog.v1.DiscountKind
DISCOUNT_KIND_UNSPECIFIEDDISCOUNT_KIND_PERCENTA percentage of what it applies to: percent_bp.
DISCOUNT_KIND_AMOUNTA fixed amount: amount, per unit on an item, once on a sale.
DiscountScope enum
holygrail.catalog.v1.DiscountScope
DISCOUNT_SCOPE_UNSPECIFIEDDISCOUNT_SCOPE_ORDERComes off the whole sale, spread over its lines.
DISCOUNT_SCOPE_ITEMSComes off each line it applies to: the items and categories it names, or any line when it names none.
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.
BookingKind enum
holygrail.appointments.v1.BookingKind
BOOKING_KIND_UNSPECIFIEDBOOKING_KIND_APPOINTMENTA customer booked a service.
BOOKING_KIND_BLOCKTime the person cannot be booked: lunch, a day off.
BOOKING_KIND_VISITA visit for a job: the person's time at the customer's address.
BookingStatus enum
holygrail.appointments.v1.BookingStatus
BOOKING_STATUS_UNSPECIFIEDBOOKING_STATUS_BOOKEDBOOKING_STATUS_ARRIVEDThe customer is here.
BOOKING_STATUS_COMPLETEDPaid for at the register, or marked done.
BOOKING_STATUS_CANCELLEDBOOKING_STATUS_NO_SHOWBookingSource enum
holygrail.appointments.v1.BookingSource
BOOKING_SOURCE_UNSPECIFIEDBOOKING_SOURCE_REGISTERBOOKING_SOURCE_DASHBOARDBOOKING_SOURCE_ONLINEDepositStatus enum
holygrail.appointments.v1.DepositStatus
DEPOSIT_STATUS_UNSPECIFIEDDEPOSIT_STATUS_NONEDEPOSIT_STATUS_PAIDDEPOSIT_STATUS_APPLIEDTaken off the bill at the register.
DEPOSIT_STATUS_REFUNDEDDEPOSIT_STATUS_KEPTKept for a no-show or a late cancellation.
RewardKind enum
holygrail.customers.v1.RewardKind
REWARD_KIND_UNSPECIFIEDREWARD_KIND_AMOUNT_OFFvalue off the order.
REWARD_KIND_PERCENT_OFFvalue basis points off the order, up to max_value if set.
REWARD_KIND_FREE_ITEMOne of variant_ids free: the register takes the price of one off when it is on the order.
CampaignKind enum
holygrail.customers.v1.CampaignKind
CAMPAIGN_KIND_UNSPECIFIEDCAMPAIGN_KIND_MULTIPLIERPoints earned are multiplied by multiplier_bp: double points weekends.
CAMPAIGN_KIND_BONUSbonus_points more on each qualifying sale.
Base URL https://api.buziin.tech. Every method is POST with a JSON body; see Making requests.