Developers
Sign inGet API keys
API reference/Platform

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.

holygrail.sync.v1.SyncService2 methodssync.read · sync.write

Push#

sync.writeWrite
POST/holygrail.sync.v1.SyncService/Push

Request body

deviceIdstringdevice_id

The registered device pushing, or empty for the web dashboard.

mutationsMutation[]

Response

Request
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"
      }
    }
  ]
}'
Response example
{
  "results": [
    {
      "opId": "",
      "status": "MUTATION_STATUS_APPLIED",
      "errorCode": "",
      "errorMessage": ""
    }
  ]
}

Pull#

sync.readRead
POST/holygrail.sync.v1.SyncService/Pull

Request body

locationIdstringlocation_id

Include changes for this location as well as organization-wide ones.

cursorint64 string

Last seq the device has applied; 0 replays the whole feed.

limitinteger

Defaults to 500, at most 1000.

Response

changesChange[]
cursorint64 string

Pass back as the next cursor.

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

The registered device pushing, or empty for the web dashboard.

mutationsMutation[]

PushResponse

holygrail.sync.v1.PushResponse

PullRequest

holygrail.sync.v1.PullRequest

locationIdstringlocation_id

Include changes for this location as well as organization-wide ones.

cursorint64 string

Last seq the device has applied; 0 replays the whole feed.

limitinteger

Defaults to 500, at most 1000.

PullResponse

holygrail.sync.v1.PullResponse

changesChange[]
cursorint64 string

Pass back as the next cursor.

hasMorebooleanhas_more

Mutation

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_id

Client-generated UUIDv7; retries reuse it.

hlcstring

Hybrid logical clock from the writing device, see docs/adr/0003.

taxRateTaxRatePatchone of patchtax_rate
categoryCategoryPatchone of patch
itemItemPatchone of patch
itemVariantItemVariantPatchone of patchitem_variant
modifierGroupModifierGroupPatchone of patchmodifier_group
modifierModifierPatchone of patch
orderOrderone of patch

Orders and cash are whole documents or immutable facts, not patches.

paymentPaymentone of patch
drawerSessionDrawerSessionone of patchdrawer_session
drawerMovementDrawerMovementone of patchdrawer_movement
refundRefundone of patch
kitchenTicketKitchenTicketone of patchkitchen_ticket

Pushed once when sent; later pushes change only its status.

ticketMoveTicketMoveone of patchticket_move

Splits, moves and merges between open tickets: two orders applied together. The feed sends them back as two orders.

locationPriceLocationPricePatchone of patchlocation_price
departmentDepartmentPatchone of patch
discountDiscountPatchone of patch
customerCustomerPatchone of patch
loyaltyProgramLoyaltyProgramPatchone of patchloyalty_program
diningAreaDiningAreaPatchone of patchdining_area
diningTableDiningTablePatchone of patchdining_table
kitchenStationKitchenStationPatchone of patchkitchen_station
printerPrinterPatchone of patch
printerProfilePrinterProfilePatchone of patchprinter_profile
staffMemberStaffMemberPatchone of patchstaff_member
bookingResourceBookingResourcePatchone of patchbooking_resource
timecardTimecardone of patch

Whole timecards, pushed on clock in and as they change.

registerEventRegisterEventone of patchregister_event

Immutable: one line for the audit log.

timeOffRequestTimeOffRequestone of patchtime_off_request

Whole documents a team member writes on the register: their time off and shift change requests, and their availability.

shiftRequestShiftRequestone of patchshift_request
availabilityAvailabilityone of patch
announcementAckAnnouncementAckone of patchannouncement_ack

Immutable: someone confirmed they read an announcement.

tillPromptDismissTillPromptDismissone of patchtill_prompt_dismiss

Nuru till prompts (ADR 90): a register dismisses one.

shiftRunShiftRunone of patchshift_run

Whole shift runs (ADR 117), pushed when started and when ended.

MutationResult

holygrail.sync.v1.MutationResult

opIdstringop_id
errorCodestringerror_code

Machine-readable reason when rejected, e.g. "invalid", "forbidden", "not_found".

errorMessagestringerror_message

Change

holygrail.sync.v1.Change

Change is the full new state of one entity.

seqint64 string
taxRateTaxRateone of entitytax_rate
categoryCategoryone of entity
itemItemone of entity
itemVariantItemVariantone of entityitem_variant
modifierGroupModifierGroupone of entitymodifier_group
modifierModifierone of entity
locationPriceLocationPriceone of entitylocation_price
departmentDepartmentone of entity
discountDiscountone of entity
orderOrderone of entity
paymentPaymentone of entity
drawerSessionDrawerSessionone of entitydrawer_session
drawerMovementDrawerMovementone of entitydrawer_movement
refundRefundone of entity
kitchenTicketKitchenTicketone of entitykitchen_ticket
customerCustomerone of entity
loyaltyProgramLoyaltyProgramone of entityloyalty_program
stockLevelStockLevelone of entitystock_level

Kept by the server; never pushed.

diningAreaDiningAreaone of entitydining_area
diningTableDiningTableone of entitydining_table
kitchenStationKitchenStationone of entitykitchen_station
printerPrinterone of entity
printerProfilePrinterProfileone of entityprinter_profile
staffMemberStaffMemberone of entitystaff_member
bookingResourceBookingResourceone of entitybooking_resource
bookingBookingone of entity

Made through AppointmentsService.

timecardTimecardone of entity
registerEventRegisterEventone of entityregister_event

Never sent: register events go to the audit log only.

teamMemberTeamMemberone of entityteam_member

Edited through TeamService. With the passcode check, for registers.

shiftScheduledShiftone of entity

Published shifts at the location.

timeOffRequestTimeOffRequestone of entitytime_off_request
shiftRequestShiftRequestone of entityshift_request
availabilityAvailabilityone of entity
announcementAnnouncementone of entity
announcementAckAnnouncementAckone of entityannouncement_ack

Never sent: acknowledgements come back on the announcement.

positionPositionone of entity
tillPromptTillPromptone of entitytill_prompt

Made by Nuru at the location: something about to run out, prep due.

namedShiftNamedShiftone of entitynamed_shift

Edited through TeamService (ADR 116); never pushed.

shiftRunShiftRunone of entityshift_run

TaxRatePatch

holygrail.catalog.v1.TaxRatePatch

idstring
namestringoptional
rateBpintegeroptionalrate_bp
inclusivebooleanoptional
archivedbooleanoptional

CategoryPatch

holygrail.catalog.v1.CategoryPatch

idstring
namestringoptional
colorstringoptional
sortOrderintegeroptionalsort_order
archivedbooleanoptional
departmentIdstringoptionaldepartment_id

ItemPatch

holygrail.catalog.v1.ItemPatch

idstring
categoryIdstringoptionalcategory_id
namestringoptional
descriptionstringoptional
kindItemKindoptional
taxRateIdsIdListtax_rate_ids
modifierGroupIdsIdListmodifier_group_ids
archivedbooleanoptional
durationMinutesintegeroptionalduration_minutes
departmentIdstringoptionaldepartment_id
imageIdstringoptionalimage_id
modifierOverridesModifierOverridesmodifier_overrides

ItemVariantPatch

holygrail.catalog.v1.ItemVariantPatch

idstring
itemIdstringoptionalitem_id
namestringoptional
skustringoptional
barcodestringoptional
priceint64 stringoptional
trackStockbooleanoptionaltrack_stock
sortOrderintegeroptionalsort_order
archivedbooleanoptional
unitstringoptional
unitPrecisionintegeroptionalunit_precision
imageIdstringoptionalimage_id
wholesalePriceint64 stringoptionalwholesale_price

ModifierGroupPatch

holygrail.catalog.v1.ModifierGroupPatch

idstring
namestringoptional
minSelectintegeroptionalmin_select
maxSelectintegeroptionalmax_select
archivedbooleanoptional
freeCountintegeroptionalfree_count
kindstringoptional
displayNamestringoptionaldisplay_name
maxPerChoiceintegeroptionalmax_per_choice

ModifierPatch

holygrail.catalog.v1.ModifierPatch

idstring
groupIdstringoptionalgroup_id
namestringoptional
priceint64 stringoptional
sortOrderintegeroptionalsort_order
archivedbooleanoptional
isDefaultbooleanoptionalis_default
soldOutbooleanoptionalsold_out
actionstringoptional
childGroupIdstringoptionalchild_group_id
excludesIdList
stockVariantIdstringoptionalstock_variant_id
locationPricesLocationPriceslocation_prices
taxRateIdsIdListtax_rate_ids
ownTaxesbooleanoptionalown_taxes

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.

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

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.

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.

idstring
fromOrder

LocationPricePatch

holygrail.catalog.v1.LocationPricePatch

idstring
locationIdstringoptionallocation_id

Fixed once set: one price per variant per location.

variantIdstringoptionalvariant_id
priceint64 stringoptional
archivedbooleanoptional

DepartmentPatch

holygrail.catalog.v1.DepartmentPatch

idstring
namestringoptional
colorstringoptional
sortOrderintegeroptionalsort_order
archivedbooleanoptional

DiscountPatch

holygrail.catalog.v1.DiscountPatch

idstring
namestringoptional
kindDiscountKindoptional
percentBpintegeroptionalpercent_bp
amountint64 stringoptional
variablebooleanoptional
scopeDiscountScopeoptional
itemIdsIdListitem_ids
categoryIdsIdListcategory_ids
maxAmountint64 stringoptionalmax_amount
minOrderAmountint64 stringoptionalmin_order_amount
minQuantityintegeroptionalmin_quantity
automaticbooleanoptional
requiresApprovalbooleanoptionalrequires_approval
locationIdsIdListlocation_ids
startsOnstringoptionalstarts_on
endsOnstringoptionalends_on
daysOfWeekintegeroptionaldays_of_week
startMinuteintegeroptionalstart_minute
endMinuteintegeroptionalend_minute
colorstringoptional
sortOrderintegeroptionalsort_order
archivedbooleanoptional
itemOnlybooleanoptionalitem_only

CustomerPatch

holygrail.customers.v1.CustomerPatch

Fields set here replace the customer's; see SyncService.

idstring
namestringoptional
emailstringoptional
phonestringoptional
notestringoptional
archivedbooleanoptional
wholesalebooleanoptional
birthdaystringoptional
marketingOptInbooleanoptionalmarketing_opt_in

LoyaltyProgramPatch

holygrail.customers.v1.LoyaltyProgramPatch

idstring
enabledbooleanoptional
spendPerPointint64 stringoptionalspend_per_point
rewardPointsint64 stringoptionalreward_points
rewardValueint64 stringoptionalreward_value
namestringoptional
welcomePointsint64 stringoptionalwelcome_points
birthdayPointsint64 stringoptionalbirthday_points
expiryMonthsintegeroptionalexpiry_months
tierWindowMonthsintegeroptionaltier_window_months

Set replace_tiers (and so on) to replace the list, even with nothing.

replaceTiersbooleanreplace_tiers
replaceRewardsbooleanreplace_rewards
replaceCampaignsbooleanreplace_campaigns
colorstringoptional

DiningAreaPatch

holygrail.dining.v1.DiningAreaPatch

idstring
locationIdstringoptionallocation_id
namestringoptional
sortOrderintegeroptionalsort_order
archivedbooleanoptional

DiningTablePatch

holygrail.dining.v1.DiningTablePatch

idstring
locationIdstringoptionallocation_id
areaIdstringoptionalarea_id
namestringoptional
seatsintegeroptional
shapeTableShapeoptional
xintegeroptional
yintegeroptional
archivedbooleanoptional

KitchenStationPatch

holygrail.dining.v1.KitchenStationPatch

idstring
locationIdstringoptionallocation_id
namestringoptional
categoryIdsIdListcategory_ids
archivedbooleanoptional
departmentIdsIdListdepartment_ids

PrinterPatch

holygrail.dining.v1.PrinterPatch

idstring
locationIdstringoptionallocation_id
namestringoptional
connectionPrinterConnectionoptional
addressstringoptional
deviceIdstringoptionaldevice_id
languagePrinterLanguageoptional
paperWidthMmintegeroptionalpaper_width_mm
columnsintegeroptional
profileIdsIdListprofile_ids
backupPrinterIdstringoptionalbackup_printer_id
cashDrawerbooleanoptionalcash_drawer
buzzerbooleanoptional
cutterbooleanoptional
archivedbooleanoptional

PrinterProfilePatch

holygrail.dining.v1.PrinterProfilePatch

idstring
locationIdstringoptionallocation_id
namestringoptional
receiptsbooleanoptional
autoReceiptbooleanoptionalauto_receipt
billsbooleanoptional
ticketsbooleanoptional
departmentIdsIdListdepartment_ids
reportsbooleanoptional
copiesintegeroptional
largeTicketsbooleanoptionallarge_tickets
archivedbooleanoptional

StaffMemberPatch

holygrail.appointments.v1.StaffMemberPatch

idstring
locationIdstringoptionallocation_id
namestringoptional
colorstringoptional
serviceIdsIdListservice_ids
archivedbooleanoptional

BookingResourcePatch

holygrail.appointments.v1.BookingResourcePatch

idstring
locationIdstringoptionallocation_id
namestringoptional
serviceIdsIdListservice_ids
archivedbooleanoptional

Timecard

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.

idstring
locationIdstringlocation_id
teamMemberIdstringteam_member_id
deviceIdstringdevice_id
shiftIdstringshift_id

The scheduled shift it is for, if any.

clockInAtstringclock_in_at
clockOutAtstringclock_out_at

Empty while clocked in.

breaksBreak[]
notestring
editedBystringedited_by

Set by the server: who last edited it on the dashboard, and when.

editedAtstringedited_at
approvedBystringapproved_by

Approved for payroll, by whom and when; it no longer changes.

approvedAtstringapproved_at
namedShiftIdstringnamed_shift_id

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

Set by the server: the date the shift occurrence started, YYYY-MM-DD.

shiftRunIdstringshift_run_id

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

idstring
locationIdstringlocation_id
teamMemberIdstringteam_member_id

Empty 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", ...

summarystring
detailsstring

JSON object with more about it.

atstring
approvedByIdstringapproved_by_id

A manager who approved it with their passcode.

outcomestring

"ok", or "denied" when it was refused.

TimeOffRequest

holygrail.team.v1.TimeOffRequest

idstring
teamMemberIdstringteam_member_id
kindstring

"vacation", "sick", "personal", "unpaid" or "other".

startsAtstringstarts_at

RFC 3339. A whole-day request runs from the first day's midnight to the midnight after its last day, local time.

endsAtstringends_at
allDaybooleanall_day
notestring
statusstring

"pending", "approved", "denied" or "cancelled".

minutesint64 string

Paid minutes it counts for: eight hours a whole day, else its length; 0 when unpaid.

decidedBystringdecided_by

Set by the server.

decidedAtstringdecided_at
decisionNotestringdecision_note
createdAtstringcreated_at
shortNoticebooleanshort_notice

Asked for later than the schedule settings' notice.

ShiftRequest

holygrail.team.v1.ShiftRequest

idstring
locationIdstringlocation_id
kindstring

"pickup" an open shift, "drop" your own, "give" yours to target_member_id, or "swap" yours for target_shift_id.

shiftIdstringshift_id
teamMemberIdstringteam_member_id

Who asked.

targetMemberIdstringtarget_member_id
targetShiftIdstringtarget_shift_id
notestring
statusstring

"pending" (with the teammate or a manager), "approved", "denied", "declined" (by the teammate) or "cancelled".

peerStatusstringpeer_status

For give and swap: "waiting", "accepted" or "declined".

decidedBystringdecided_by
decidedAtstringdecided_at
decisionNotestringdecision_note
createdAtstringcreated_at

The shifts as they were asked about, for showing.

targetShiftScheduledShifttarget_shift

Availability

holygrail.team.v1.Availability

Availability is one team member's week. Registers push it whole when someone changes their own.

idstring

Same as team_member_id.

teamMemberIdstringteam_member_id
notestring
updatedAtstringupdated_at

AnnouncementAck

holygrail.team.v1.AnnouncementAck

AnnouncementAck is a team member confirming they read an announcement, on a register; pushed through sync.

idstring
announcementIdstringannouncement_id
teamMemberIdstringteam_member_id
atstring

TillPromptDismiss

holygrail.autopilot.v1.TillPromptDismiss

idstring

ShiftRun

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

idstring
locationIdstringlocation_id
teamMemberIdstringteam_member_id
deviceIdstringdevice_id
namedShiftIdstringnamed_shift_id

The named shift it works, if any; the server fills it from the clock when the register leaves it empty.

shiftDatestringshift_date

Set by the server: the date the named shift occurrence started.

startedAtstringstarted_at
endedAtstringended_at

Empty while the shift is open.

endedBystringended_by

Set by the server when a manager ended it on the dashboard.

fullNamestringfull_name

Set by the server in lists: their name.

TaxRate

holygrail.catalog.v1.TaxRate

idstring
namestring
rateBpintegerrate_bp

Basis points: 825 = 8.25%.

inclusiveboolean

True when prices already include this tax (common for VAT).

archivedboolean

Category

holygrail.catalog.v1.Category

idstring
namestring
colorstring

"#RRGGBB" or empty.

sortOrderintegersort_order
archivedboolean
departmentIdstringdepartment_id

The department its items belong to, unless an item names its own.

Item

holygrail.catalog.v1.Item

idstring
categoryIdstringcategory_id

Empty for uncategorised items.

namestring
descriptionstring
taxRateIdsIdListtax_rate_ids
modifierGroupIdsIdListmodifier_group_ids
archivedboolean
durationMinutesintegerduration_minutes

How long a service takes, for booking; 0 for anything else.

departmentIdstringdepartment_id

Its own department, when not its category's; empty to follow the category.

imageIdstringimage_id

The library image the register and dashboard show for it; empty for none.

modifierOverridesModifierOverridesmodifier_overrides

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.

idstring
itemIdstringitem_id
namestring

Empty for an item's single default variant, e.g. "Large", "Red / M".

skustring
barcodestring
priceint64 string
trackStockbooleantrack_stock
sortOrderintegersort_order
archivedboolean
unitstring

Unit 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_precision

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

Its own library image, such as the red one of a shirt; empty to show the item's.

wholesalePriceint64 stringwholesale_price

The 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

idstring
namestring
minSelectintegermin_select
maxSelectintegermax_select

0 means no limit.

archivedboolean
freeCountintegerfree_count

How many choices come free (ADR 46): the first ones chosen are included in the price, and only the rest are charged.

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

What the register, kiosk and guests see; empty to show name. name is what the team manages the set by ("Milk (coffee bar)").

maxPerChoiceintegermax_per_choice

How 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

idstring
groupIdstringgroup_id
namestring
priceint64 string
sortOrderintegersort_order
archivedboolean
isDefaultbooleanis_default

Chosen already when the item is picked; it can be taken off.

soldOutbooleansold_out

Sold out for now (86'd): shown, but it can't be chosen.

actionstring

How the kitchen and the receipt say it: "" (just the name), "add", "extra", "no", "sub", "side" or "light". "no" prints "NO Onions".

childGroupIdstringchild_group_id

A group that opens when this is chosen ("Add cheese", then "Which cheese?"); empty for none.

excludesIdList

Choices that can't go with this one, in any group.

Where and when it is offered; unset for always.

stockVariantIdstringstock_variant_id

Offered only while this variant (an ingredient) has stock at the register's location; empty for always.

locationPricesLocationPriceslocation_prices

What it costs at some locations instead of price.

taxRateIdsIdListtax_rate_ids

With own_taxes, taxed with tax_rate_ids (none for untaxed) instead of like its item (ADR 46).

ownTaxesbooleanown_taxes

LocationPrice

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.

idstring
locationIdstringlocation_id
variantIdstringvariant_id
priceint64 string
archivedboolean

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

idstring
namestring
colorstring

"#RRGGBB" or empty.

sortOrderintegersort_order
archivedboolean

Discount

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.

idstring
namestring
percentBpintegerpercent_bp

Basis points for a percentage: 1500 = 15%. Up to 10000.

amountint64 string

Minor units for a fixed amount.

variableboolean

The cashier types the percentage or amount at the sale (an open discount); percent_bp or amount is then a suggestion, or 0.

itemIdsIdListitem_ids

ITEMS scope: the items and categories it applies to; both empty for any.

categoryIdsIdListcategory_ids
maxAmountint64 stringmax_amount

Caps what one application takes; 0 for no cap.

minOrderAmountint64 stringmin_order_amount

Rules. 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_quantity
automaticboolean

Applied by the register on its own whenever the rules are met.

requiresApprovalbooleanrequires_approval

Needs someone with pos.discount_approve to enter their passcode.

locationIdsIdListlocation_ids

Locations it is offered at; empty for every location.

startsOnstringstarts_on

Local dates (YYYY-MM-DD) it runs from and to, both included; empty for no limit.

endsOnstringends_on
daysOfWeekintegerdays_of_week

Days of the week it runs on, a bit each from Sunday (1) to Saturday (64); 0 for every day.

startMinuteintegerstart_minute

Local 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_minute
colorstring

"#RRGGBB" or empty: its button on the register.

sortOrderintegersort_order
archivedboolean
itemOnlybooleanitem_only

ITEMS scope: off each item's own price only, never its modifiers ("half off pizzas, not the toppings").

Customer

holygrail.customers.v1.Customer

idstring
namestring
emailstring
phonestring
notestring
archivedboolean
pointsBalanceint64 stringpoints_balance

Kept by the server from completed orders and adjustments.

visitCountintegervisit_count
totalSpentint64 stringtotal_spent

Order totals, including tax, in minor units.

lastVisitAtstringlast_visit_at

RFC 3339; empty before the first visit.

createdAtstringcreated_at
wholesaleboolean

A wholesale customer (a hotel or restaurant buying in bulk) pays each item's wholesale price where it has one (ADR 49).

tierIdstringtier_id

Loyalty membership (ADR 120). The tier is kept by the server from what the customer spent in the program's tier window.

qualifyingSpendint64 stringqualifying_spend

Before tax, in minor units, over the program's tier window.

lifetimePointsint64 stringlifetime_points

Every point ever earned, bonuses included.

birthdaystring

"MM-DD" or "YYYY-MM-DD"; empty if not given. Earns the birthday bonus.

marketingOptInbooleanmarketing_opt_in

The customer agreed to hear about offers.

cardTokenstringcard_token

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

idstring
enabledboolean
spendPerPointint64 stringspend_per_point

One point for every this much spent before tax, e.g. 100 for $1.

rewardPointsint64 stringreward_points

The standard reward, offered when rewards is empty: it costs this many points...

rewardValueint64 stringreward_value

...and takes this much off an order.

namestring

The program's name on receipts, the member card and the register: "Mama Lishe Rewards". Empty means "Rewards".

welcomePointsint64 stringwelcome_points

Points given once when a customer joins.

birthdayPointsint64 stringbirthday_points

Points given once a year on the customer's birthday.

expiryMonthsintegerexpiry_months

Points lapse after this many months without a visit; 0 keeps them.

tierWindowMonthsintegertier_window_months

Tiers count spend over this many months; 0 counts every sale.

Lowest first by min_spend.

colorstring

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

idstring
locationIdstringlocation_id
variantIdstringvariant_id
onHandint64 stringon_hand

Can go below zero when registers sell offline what was not in stock.

reorderPointint64 stringreorder_point
areaIdstringarea_id

The storage area it is in. Registers only receive their sales floor's.

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

StaffMember

holygrail.appointments.v1.StaffMember

StaffMember is someone customers book: a stylist, a therapist. They take bookings for their services during their hours.

idstring
locationIdstringlocation_id
namestring
colorstring

"#rrggbb", for the calendar.

serviceIdsIdListservice_ids

The services (catalog items) they do.

archivedboolean
teamMemberIdstringteam_member_id

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

idstring
locationIdstringlocation_id
namestring
serviceIdsIdListservice_ids
archivedboolean

Booking

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.

idstring
locationIdstringlocation_id
staffIdstringstaff_id
resourceIdstringresource_id

Empty when the service needs no resource.

itemIdstringitem_id

The service booked, for an appointment: the item variant sold at the register, its name ("Haircut (Long)") and price when it was booked.

variantIdstringvariant_id
serviceNamestringservice_name
priceint64 string
startsAtstringstarts_at

RFC 3339.

endsAtstringends_at
customerIdstringcustomer_id
customerNamestringcustomer_name

The customer's name, or a walk-in's.

notestring
orderIdstringorder_id

The sale that paid for it.

createdAtstringcreated_at
statusAtstringstatus_at
depositint64 string

Paid when booking online; taken off the bill at the register.

depositStatusDepositStatusdeposit_status
customerEmailstringcustomer_email
customerPhonestringcustomer_phone
jobIdstringjob_id

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

idstring
fullNamestringfull_name
emailstring
phonestring
roleIdstringrole_id
roleNamestringrole_name

The role's name and permissions, so a register can check them offline.

permissionsstring[]
locationIdsstring[]location_ids

Empty means every location.

hourlyRateint64 stringhourly_rate

Pay per hour in minor units.

colorstring

"#rrggbb" for the schedule and the register.

activeboolean
hasPasscodebooleanhas_passcode
hasLoginbooleanhas_login

Whether they can sign in to the dashboard, and whether an invitation is waiting for them.

invitedboolean
passcodeSaltstringpasscode_salt

The register checks a passcode p as hex(sha256(salt + ":" + p)) == hash. Set only in the change feed and ExportTeam.

passcodeHashstringpasscode_hash
ownerboolean

Whether this is an owner; owners can do everything.

updatedAtstringupdated_at
positionIdsstring[]position_ids

The positions they can work, for the schedule.

maxWeeklyMinutesintegermax_weekly_minutes

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

idstring
locationIdstringlocation_id
teamMemberIdstringteam_member_id

Empty for an open shift anyone can pick up.

startsAtstringstarts_at

RFC 3339.

endsAtstringends_at
breakMinutesintegerbreak_minutes

Unpaid break time within the shift.

notestring
publishedboolean
removedboolean

Feed only: the shift was deleted or unpublished.

positionIdstringposition_id

The position they work, if any.

sourcestring

manual, or forecast for an unpublished draft made from the demand forecast (ADR 56).

Announcement

holygrail.team.v1.Announcement

idstring
titlestring
bodystring
locationIdsstring[]location_ids

Empty for every location.

pinnedboolean
requireAckbooleanrequire_ack

Team members are asked to confirm they read it.

publishedAtstringpublished_at
expiresAtstringexpires_at

Empty for no end.

authorNamestringauthor_name
archivedboolean
acknowledgedMemberIdsstring[]acknowledged_member_ids

Who confirmed they read it.

audienceinteger

How many people it is for (dashboard only).

Position

holygrail.team.v1.Position

idstring
namestring
colorstring

"#rrggbb".

sortinteger
archivedboolean

TillPrompt

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.

idstring
locationIdstringlocation_id
kindstring

low_stock or prep_due.

titlestring
detailstring
variantIdstringvariant_id

The item it is about, if any.

daystring

The local day it is for, YYYY-MM-DD.

statusstring

open, dismissed, or gone (no longer true).

updatedAtstringupdated_at

RFC 3339.

NamedShift

holygrail.team.v1.NamedShift

idstring
locationIdstringlocation_id
namestring
codestring

Short label, at most 8 characters ("AM").

colorstring

"#rrggbb".

startMinuteintegerstart_minute

Minutes 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_minute
daysinteger[]

Weekdays it starts on, 0 Sunday ... 6 Saturday; empty for every day.

teamMemberIdsstring[]team_member_ids

The team members assigned to it.

earlyClockInMinutesintegerearly_clock_in_minutes

How early someone may clock in against it, and after how many minutes past the start a clock-in is late.

lateGraceMinutesintegerlate_grace_minutes
sortinteger
archivedboolean
updatedAtstringupdated_at

IdList

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_ids

The locations that offer it; empty for every location.

daysOfWeekintegerdays_of_week

Days of the week, bit 0 = Sunday, bit 6 = Saturday; 0 for every day.

startMinuteintegerstart_minute

Minutes after midnight, local time. Equal for all day; an end before the start runs past midnight (18:00 to 02:00).

endMinuteintegerend_minute

LocationPrices

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

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

LoyaltyTier

holygrail.customers.v1.LoyaltyTier

A level customers reach by spending: Silver, Gold. Higher tiers earn faster.

idstring

Client-chosen UUID, kept when the tier is renamed.

namestring
minSpendint64 stringmin_spend

Spend before tax over the tier window that reaches the tier. The lowest tier usually has 0.

earnMultiplierBpintegerearn_multiplier_bp

Points earned are multiplied by this, in basis points: 15000 is 1.5×.

perksstring

What members get, shown on the register and the member card.

colorstring

LoyaltyReward

holygrail.customers.v1.LoyaltyReward

Something a member can spend points on.

idstring
namestring
descriptionstring
pointsint64 string
valueint64 string
maxValueint64 stringmax_value
variantIdsstring[]variant_ids
minTierIdstringmin_tier_id

Only members at this tier or above; empty for everyone.

archivedboolean

LoyaltyCampaign

holygrail.customers.v1.LoyaltyCampaign

A promotion that earns extra points while it runs.

idstring
namestring
multiplierBpintegermultiplier_bp
bonusPointsint64 stringbonus_points
startsOnstringstarts_on

Dates at the sale's location, inclusive; empty is open-ended.

endsOnstringends_on
daysOfWeekintegerdays_of_week

Days it runs, bit 0 Sunday to bit 6 Saturday; 0 is every day.

minSpendint64 stringmin_spend

Spend before tax a sale needs to qualify.

tierIdsstring[]tier_ids

Only members of these tiers; empty for everyone.

activeboolean

WeeklyHours

holygrail.appointments.v1.WeeklyHours

shiftsShift[]

Break

holygrail.team.v1.Break

startAtstringstart_at
endAtstringend_at

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

weekdayinteger

1 Monday to 7 Sunday.

startstring

"HH:MM"; end "24:00" for the rest of the day.

endstring
kindstring

"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_select
maxSelectintegeroptionalmax_select
freeCountintegeroptionalfree_count

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

Shift

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.

weekdayinteger
startMinuteintegerstart_minute
endMinuteintegerend_minute

MutationStatus enum

holygrail.sync.v1.MutationStatus

MUTATION_STATUS_UNSPECIFIED
MUTATION_STATUS_APPLIED
MUTATION_STATUS_DUPLICATE

Already received earlier; the original outcome is in error_code.

MUTATION_STATUS_REJECTED

Not applied. Retrying will not help; show it in the sync issues inbox.

ItemKind enum

holygrail.catalog.v1.ItemKind

ITEM_KIND_UNSPECIFIED
ITEM_KIND_PRODUCT
ITEM_KIND_SERVICE

A service has a duration and can be booked (Phase 4).

ITEM_KIND_FEE
ITEM_KIND_INGREDIENT

Stocked 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_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.

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

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

DiscountKind enum

holygrail.catalog.v1.DiscountKind

DISCOUNT_KIND_UNSPECIFIED
DISCOUNT_KIND_PERCENT

A percentage of what it applies to: percent_bp.

DISCOUNT_KIND_AMOUNT

A fixed amount: amount, per unit on an item, once on a sale.

DiscountScope enum

holygrail.catalog.v1.DiscountScope

DISCOUNT_SCOPE_UNSPECIFIED
DISCOUNT_SCOPE_ORDER

Comes off the whole sale, spread over its lines.

DISCOUNT_SCOPE_ITEMS

Comes 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_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.

BookingKind enum

holygrail.appointments.v1.BookingKind

BOOKING_KIND_UNSPECIFIED
BOOKING_KIND_APPOINTMENT

A customer booked a service.

BOOKING_KIND_BLOCK

Time the person cannot be booked: lunch, a day off.

BOOKING_KIND_VISIT

A visit for a job: the person's time at the customer's address.

BookingStatus enum

holygrail.appointments.v1.BookingStatus

BOOKING_STATUS_UNSPECIFIED
BOOKING_STATUS_BOOKED
BOOKING_STATUS_ARRIVED

The customer is here.

BOOKING_STATUS_COMPLETED

Paid for at the register, or marked done.

BOOKING_STATUS_CANCELLED
BOOKING_STATUS_NO_SHOW

BookingSource enum

holygrail.appointments.v1.BookingSource

BOOKING_SOURCE_UNSPECIFIED
BOOKING_SOURCE_REGISTER
BOOKING_SOURCE_DASHBOARD
BOOKING_SOURCE_ONLINE

DepositStatus enum

holygrail.appointments.v1.DepositStatus

DEPOSIT_STATUS_UNSPECIFIED
DEPOSIT_STATUS_NONE
DEPOSIT_STATUS_PAID
DEPOSIT_STATUS_APPLIED

Taken off the bill at the register.

DEPOSIT_STATUS_REFUNDED
DEPOSIT_STATUS_KEPT

Kept for a no-show or a late cancellation.

RewardKind enum

holygrail.customers.v1.RewardKind

REWARD_KIND_UNSPECIFIED
REWARD_KIND_AMOUNT_OFF

value off the order.

REWARD_KIND_PERCENT_OFF

value basis points off the order, up to max_value if set.

REWARD_KIND_FREE_ITEM

One 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_UNSPECIFIED
CAMPAIGN_KIND_MULTIPLIER

Points earned are multiplied by multiplier_bp: double points weekends.

CAMPAIGN_KIND_BONUS

bonus_points more on each qualifying sale.

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