Inventory
InventoryService keeps stock per location for variants that track stock, and buys stock from vendors with purchase orders.
Stock moves only through facts the server records: a completed sale or an issued invoice takes stock out, a purchase order receipt brings it in, and adjustments and counts correct it. Each one also posts to the books in the same transaction:
Receive: Dr Inventory, Cr Accounts payable (at the unit cost) Pay vendor: Dr Accounts payable, Cr the Cash Account Sale: Dr Cost of goods sold, Cr Inventory (at moving average cost) Adjust: Inventory against Inventory shrinkage, or Opening balance equity for opening stock
Registers get each location's StockLevel through the sync feed, so they show what is left while offline. See docs/adr/0007-inventory.md.
Each location keeps its stock in storage areas: the sales floor the registers sell from, and any store rooms, cold rooms or bars beside it. Transfers move stock between areas (and locations) at its average cost. Recipes link sold items, prepared items and modifiers to the ingredients they use, so a sale takes its ingredients out of stock and an item's cost follows what its ingredients cost. See docs/adr/0027-storage-and-recipes.md.
ListStockLevels#
Request body
locationIdstringlocation_idquerystringMatches item name, variant name or SKU.
lowOnlybooleanlow_onlyareaIdstringarea_idOne storage area; empty for the whole location, with each row's areas.
Response
rowsStockRow[]Every variant that tracks stock, including ones with no stock yet.
totalValueint64 stringtotal_valuecurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListStockLevels \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"rows": [
{
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"sku": "",
"value": "0",
"averageCost": "150000",
"lastCost": "150000",
"reorderQty": "0",
"price": "150000",
"unit": "",
"unitPrecision": 0,
"ingredient": false,
"hasRecipe": false
}
],
"totalValue": "0"
}ExportStockLevels#
ExportStockLevels pages through a location's stock for a register's first sync, with the feed cursor to pull from afterwards.
Request body
locationIdstringlocation_idResponse
levelsStockLevel[]cursorint64 stringcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ExportStockLevels \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"levels": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"variantId": "",
"onHand": "0",
"reorderPoint": "0",
"areaId": ""
}
],
"cursor": "0"
}GetStockHistory#
Request body
locationIdstringlocation_idvariantIdstringvariant_idpageSizeintegerpage_sizepageTokenstringpage_tokenareaIdstringarea_idOne storage area; empty for every area at the location.
Response
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetStockHistory \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"pageSize": 50
}'{
"row": {
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"sku": "",
"value": "0",
"averageCost": "150000",
"lastCost": "150000",
"reorderQty": "0",
"price": "150000",
"unit": "",
"unitPrecision": 0,
"ingredient": false,
"hasRecipe": false
},
"movements": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"kind": "MOVEMENT_KIND_SALE",
"quantity": 1,
"value": "0",
"onHandAfter": "0",
"source": "",
"sourceId": "",
"reference": "",
"reason": "",
"occurredAt": "",
"areaId": "",
"areaName": "Amina Mushi",
"variantId": "",
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"sku": "",
"unit": "",
"unitPrecision": 0,
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"byName": "Amina Mushi",
"forVariantId": "",
"forItemName": "Amina Mushi"
}
],
"nextPageToken": ""
}SetReorderPoint#
Request body
locationIdstringlocation_idvariantIdstringvariant_idreorderPointint64 stringreorder_pointreorderQtyint64 stringreorder_qtyareaIdstringarea_idThe area whose level it is; empty for the sales floor.
Response
rowStockRowcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SetReorderPoint \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"row": {
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"sku": "",
"value": "0",
"averageCost": "150000",
"lastCost": "150000",
"reorderQty": "0",
"price": "150000",
"unit": "",
"unitPrecision": 0,
"ingredient": false,
"hasRecipe": false
}
}AdjustStock#
Request body
idstringClient-chosen UUID, so a retry adjusts once.
locationIdstringlocation_idreasonAdjustReasonlinesAdjustLine[]notestringareaIdstringarea_idThe area adjusted; empty for the sales floor.
allowBelowZerobooleanallow_below_zeroGo ahead when the business warns about stock below zero.
Response
rowsStockRow[]curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/AdjustStock \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"reason": "ADJUST_REASON_INITIAL",
"lines": [
{
"quantity": 1,
"unitCost": "150000"
}
]
}'{
"rows": [
{
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"sku": "",
"value": "0",
"averageCost": "150000",
"lastCost": "150000",
"reorderQty": "0",
"price": "150000",
"unit": "",
"unitPrecision": 0,
"ingredient": false,
"hasRecipe": false
}
]
}TransferStock#
Request body
idstringfromLocationIdstringfrom_location_idtoLocationIdstringto_location_idlinesTransferLine[]notestringfromAreaIdstringfrom_area_idtoAreaIdstringto_area_idallowBelowZerobooleanallow_below_zeroResponse
transferStockTransfercurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/TransferStock \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"lines": [
{
"quantity": 1
}
]
}'{
"transfer": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "TRANSFER_STATUS_REQUESTED",
"fromLocationId": "",
"fromLocationName": "Amina Mushi",
"fromAreaId": "",
"fromAreaName": "Amina Mushi",
"toLocationId": "",
"toLocationName": "Amina Mushi",
"toAreaId": "",
"toAreaName": "Amina Mushi",
"note": "",
"requestedByName": "Amina Mushi",
"requestedAt": "",
"closedByName": "Amina Mushi",
"closedAt": "",
"value": "0",
"lineCount": 1
}
}ListStockCounts#
Request body
locationIdstringlocation_idResponse
countsStockCount[]Without lines.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListStockCounts \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"counts": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"status": "COUNT_STATUS_OPEN",
"note": "",
"createdAt": "",
"finishedAt": "",
"countedLines": 1,
"valueChange": "0",
"areaId": "",
"areaName": "Amina Mushi"
}
]
}GetStockCount#
Request body
idstringResponse
countStockCountcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetStockCount \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"count": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"status": "COUNT_STATUS_OPEN",
"note": "",
"createdAt": "",
"finishedAt": "",
"countedLines": 1,
"valueChange": "0",
"areaId": "",
"areaName": "Amina Mushi"
}
}StartStockCount#
StartStockCount lists every tracked variant at the location (or in one category) to count.
Request body
idstringlocationIdstringlocation_idnamestringcategoryIdstringcategory_idOptional: count only this category.
areaIdstringarea_idThe area counted; empty for the sales floor.
Response
countStockCountcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/StartStockCount \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi"
}'{
"count": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"status": "COUNT_STATUS_OPEN",
"note": "",
"createdAt": "",
"finishedAt": "",
"countedLines": 1,
"valueChange": "0",
"areaId": "",
"areaName": "Amina Mushi"
}
}RecordCounts#
Request body
countIdstringcount_identriesCountEntry[]Response
countStockCountcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/RecordCounts \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"entries": [
{
"counted": 1
}
]
}'{
"count": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"status": "COUNT_STATUS_OPEN",
"note": "",
"createdAt": "",
"finishedAt": "",
"countedLines": 1,
"valueChange": "0",
"areaId": "",
"areaName": "Amina Mushi"
}
}FinishStockCount#
FinishStockCount sets each counted variant's stock to what was counted.
Request body
idstringResponse
countStockCountcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/FinishStockCount \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"count": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"status": "COUNT_STATUS_OPEN",
"note": "",
"createdAt": "",
"finishedAt": "",
"countedLines": 1,
"valueChange": "0",
"areaId": "",
"areaName": "Amina Mushi"
}
}CancelStockCount#
Request body
idstringResponse
countStockCountcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/CancelStockCount \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"count": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"status": "COUNT_STATUS_OPEN",
"note": "",
"createdAt": "",
"finishedAt": "",
"countedLines": 1,
"valueChange": "0",
"areaId": "",
"areaName": "Amina Mushi"
}
}ListPurchaseOrders#
Request body
statusPurchaseOrderStatusUnspecified lists all but cancelled ones.
vendorIdstringvendor_idlocationIdstringlocation_idowingOnlybooleanowing_onlyOnly ones with a balance owed.
pageSizeintegerpage_sizepageTokenstringpage_tokenResponse
Without lines, receipts or payments.
nextPageTokenstringnext_page_tokencurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListPurchaseOrders \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"pageSize": 50
}'{
"purchaseOrders": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"vendorId": "",
"vendorName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"expectedDate": "2026-12-05",
"note": "",
"total": "150000",
"receivedValue": "0",
"amountPaid": "0",
"balance": "150000",
"orderedAt": "",
"createdAt": "",
"vendorEmail": "amina@example.co.tz",
"areaId": "",
"areaName": "Amina Mushi",
"source": "",
"edited": false,
"saving": "0",
"vendorPhone": "+255712345678"
}
],
"nextPageToken": ""
}GetPurchaseOrder#
Request body
idstringResponse
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetPurchaseOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"purchaseOrder": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"vendorId": "",
"vendorName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"expectedDate": "2026-12-05",
"note": "",
"total": "150000",
"receivedValue": "0",
"amountPaid": "0",
"balance": "150000",
"orderedAt": "",
"createdAt": "",
"vendorEmail": "amina@example.co.tz",
"areaId": "",
"areaName": "Amina Mushi",
"source": "",
"edited": false,
"saving": "0",
"vendorPhone": "+255712345678"
}
}CreatePurchaseOrder#
Request body
idstringdraftPurchaseOrderDraftResponse
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/CreatePurchaseOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"draft": {
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"expectedDate": "2026-12-05",
"lines": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"quantity": 1,
"unitCost": "150000",
"unitPrice": "150000"
}
]
}
}'{
"purchaseOrder": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"vendorId": "",
"vendorName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"expectedDate": "2026-12-05",
"note": "",
"total": "150000",
"receivedValue": "0",
"amountPaid": "0",
"balance": "150000",
"orderedAt": "",
"createdAt": "",
"vendorEmail": "amina@example.co.tz",
"areaId": "",
"areaName": "Amina Mushi",
"source": "",
"edited": false,
"saving": "0",
"vendorPhone": "+255712345678"
}
}UpdatePurchaseOrder#
UpdatePurchaseOrder replaces a draft's contents.
Request body
idstringdraftPurchaseOrderDraftResponse
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/UpdatePurchaseOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"draft": {
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"expectedDate": "2026-12-05",
"lines": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"quantity": 1,
"unitCost": "150000",
"unitPrice": "150000"
}
]
}
}'{
"purchaseOrder": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"vendorId": "",
"vendorName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"expectedDate": "2026-12-05",
"note": "",
"total": "150000",
"receivedValue": "0",
"amountPaid": "0",
"balance": "150000",
"orderedAt": "",
"createdAt": "",
"vendorEmail": "amina@example.co.tz",
"areaId": "",
"areaName": "Amina Mushi",
"source": "",
"edited": false,
"saving": "0",
"vendorPhone": "+255712345678"
}
}MarkOrdered#
MarkOrdered records that a draft was placed with the vendor.
Request body
idstringResponse
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/MarkOrdered \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"purchaseOrder": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"vendorId": "",
"vendorName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"expectedDate": "2026-12-05",
"note": "",
"total": "150000",
"receivedValue": "0",
"amountPaid": "0",
"balance": "150000",
"orderedAt": "",
"createdAt": "",
"vendorEmail": "amina@example.co.tz",
"areaId": "",
"areaName": "Amina Mushi",
"source": "",
"edited": false,
"saving": "0",
"vendorPhone": "+255712345678"
}
}SendPurchaseOrder#
SendPurchaseOrder emails it to the vendor, marking a draft ordered.
Request body
idstringemailstringDefaults to the vendor's email.
channelstringemail (the default) or whatsapp (ADR 78).
phonestringFor whatsapp; defaults to the vendor's phone.
languagestringen (the default) or sw: the language the vendor reads it in.
Response
whatsappSentbooleanwhatsapp_sentFor whatsapp: true when it went from the business number on the server; otherwise whatsapp_url opens WhatsApp with the order written, for the person to send from their own phone.
whatsappUrlstringwhatsapp_urlcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SendPurchaseOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"email": "amina@example.co.tz",
"phone": "+255712345678"
}'{
"purchaseOrder": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"vendorId": "",
"vendorName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"expectedDate": "2026-12-05",
"note": "",
"total": "150000",
"receivedValue": "0",
"amountPaid": "0",
"balance": "150000",
"orderedAt": "",
"createdAt": "",
"vendorEmail": "amina@example.co.tz",
"areaId": "",
"areaName": "Amina Mushi",
"source": "",
"edited": false,
"saving": "0",
"vendorPhone": "+255712345678"
},
"whatsappSent": false,
"whatsappUrl": ""
}ReceivePurchaseOrder#
Request body
idstringClient-chosen receipt id, so a retry receives once.
purchaseOrderIdstringpurchase_order_idlinesReceiveLine[]notestringreceivedAtstringreceived_atRFC 3339; defaults to now.
Response
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ReceivePurchaseOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"lines": [
{
"quantity": 1,
"unitCost": "150000"
}
]
}'{
"purchaseOrder": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"vendorId": "",
"vendorName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"expectedDate": "2026-12-05",
"note": "",
"total": "150000",
"receivedValue": "0",
"amountPaid": "0",
"balance": "150000",
"orderedAt": "",
"createdAt": "",
"vendorEmail": "amina@example.co.tz",
"areaId": "",
"areaName": "Amina Mushi",
"source": "",
"edited": false,
"saving": "0",
"vendorPhone": "+255712345678"
}
}ClosePurchaseOrder#
ClosePurchaseOrder stops waiting for lines that will not arrive.
Request body
idstringResponse
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ClosePurchaseOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"purchaseOrder": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"vendorId": "",
"vendorName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"expectedDate": "2026-12-05",
"note": "",
"total": "150000",
"receivedValue": "0",
"amountPaid": "0",
"balance": "150000",
"orderedAt": "",
"createdAt": "",
"vendorEmail": "amina@example.co.tz",
"areaId": "",
"areaName": "Amina Mushi",
"source": "",
"edited": false,
"saving": "0",
"vendorPhone": "+255712345678"
}
}CancelPurchaseOrder#
CancelPurchaseOrder cancels one that has received nothing.
Request body
idstringResponse
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/CancelPurchaseOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"purchaseOrder": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"vendorId": "",
"vendorName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"expectedDate": "2026-12-05",
"note": "",
"total": "150000",
"receivedValue": "0",
"amountPaid": "0",
"balance": "150000",
"orderedAt": "",
"createdAt": "",
"vendorEmail": "amina@example.co.tz",
"areaId": "",
"areaName": "Amina Mushi",
"source": "",
"edited": false,
"saving": "0",
"vendorPhone": "+255712345678"
}
}RecordVendorPayment#
Request body
idstringpurchaseOrderIdstringpurchase_order_idcashAccountIdstringcash_account_idamountint64 stringpaidAtstringpaid_atRFC 3339; defaults to now.
referencestringResponse
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/RecordVendorPayment \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"amount": "150000"
}'{
"purchaseOrder": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"vendorId": "",
"vendorName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"expectedDate": "2026-12-05",
"note": "",
"total": "150000",
"receivedValue": "0",
"amountPaid": "0",
"balance": "150000",
"orderedAt": "",
"createdAt": "",
"vendorEmail": "amina@example.co.tz",
"areaId": "",
"areaName": "Amina Mushi",
"source": "",
"edited": false,
"saving": "0",
"vendorPhone": "+255712345678"
}
}VoidVendorPayment#
Request body
purchaseOrderIdstringpurchase_order_idpaymentIdstringpayment_idResponse
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/VoidVendorPayment \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"purchaseOrder": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"vendorId": "",
"vendorName": "Amina Mushi",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "PURCHASE_ORDER_STATUS_DRAFT",
"expectedDate": "2026-12-05",
"note": "",
"total": "150000",
"receivedValue": "0",
"amountPaid": "0",
"balance": "150000",
"orderedAt": "",
"createdAt": "",
"vendorEmail": "amina@example.co.tz",
"areaId": "",
"areaName": "Amina Mushi",
"source": "",
"edited": false,
"saving": "0",
"vendorPhone": "+255712345678"
}
}ListSupplierInvoices#
Supplier invoices (ADR 68). A vendor's invoice, uploaded, photographed or forwarded by email, is read line by line in English or Swahili (TRA EFD receipts and 18% VAT included), matched to its purchase order and what was received, and posted to Accounts payable. Price and quantity differences become agent actions and a credit request.
Request body
locationIdstringlocation_idEmpty for every location the caller can see.
statusesstring[]Empty for every status.
limitintegerAt most 200; 50 when unset.
Response
invoicesSupplierInvoice[]curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListSupplierInvoices \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"statuses": [
""
]
}'{
"invoices": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"vendorId": "",
"vendorName": "Amina Mushi",
"vendorEmail": "amina@example.co.tz",
"vendorPhone": "+255712345678",
"purchaseOrderId": "",
"purchaseOrderNumber": "",
"number": "",
"invoiceDate": "2026-12-05",
"dueDate": "2026-12-05",
"subtotal": "150000",
"tax": "150000",
"total": "150000",
"expected": "0",
"overbilled": "0",
"status": "",
"problem": "",
"source": "",
"attachmentId": "",
"sellerTin": "",
"sellerVrn": "",
"receiptNumber": "",
"creditRequestedAt": "",
"creditRequestTo": "",
"postedAt": "",
"createdAt": ""
}
]
}GetSupplierInvoice#
Request body
idstringResponse
invoiceSupplierInvoicecurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetSupplierInvoice \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"invoice": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"vendorId": "",
"vendorName": "Amina Mushi",
"vendorEmail": "amina@example.co.tz",
"vendorPhone": "+255712345678",
"purchaseOrderId": "",
"purchaseOrderNumber": "",
"number": "",
"invoiceDate": "2026-12-05",
"dueDate": "2026-12-05",
"subtotal": "150000",
"tax": "150000",
"total": "150000",
"expected": "0",
"overbilled": "0",
"status": "",
"problem": "",
"source": "",
"attachmentId": "",
"sellerTin": "",
"sellerVrn": "",
"receiptNumber": "",
"creditRequestedAt": "",
"creditRequestTo": "",
"postedAt": "",
"createdAt": ""
}
}CaptureSupplierInvoice#
CaptureSupplierInvoice reads an uploaded file (expenses' UploadAttachment) and matches it. It needs AI to be on for the business.
Request body
idstringClient-made, so a retry captures once.
attachmentIdstringattachment_idlocationIdstringlocation_idvendorIdstringvendor_idOptional: when the person already knows.
purchaseOrderIdstringpurchase_order_idsourcestringupload or photo.
Response
invoiceSupplierInvoicecurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/CaptureSupplierInvoice \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"invoice": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"vendorId": "",
"vendorName": "Amina Mushi",
"vendorEmail": "amina@example.co.tz",
"vendorPhone": "+255712345678",
"purchaseOrderId": "",
"purchaseOrderNumber": "",
"number": "",
"invoiceDate": "2026-12-05",
"dueDate": "2026-12-05",
"subtotal": "150000",
"tax": "150000",
"total": "150000",
"expected": "0",
"overbilled": "0",
"status": "",
"problem": "",
"source": "",
"attachmentId": "",
"sellerTin": "",
"sellerVrn": "",
"receiptNumber": "",
"creditRequestedAt": "",
"creditRequestTo": "",
"postedAt": "",
"createdAt": ""
}
}MatchSupplierInvoice#
MatchSupplierInvoice links an invoice to a vendor or purchase order a person chose, and matches it again.
Request body
idstringvendorIdstringvendor_idpurchaseOrderIdstringpurchase_order_idEmpty to match without an order.
Response
invoiceSupplierInvoicecurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/MatchSupplierInvoice \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"invoice": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"vendorId": "",
"vendorName": "Amina Mushi",
"vendorEmail": "amina@example.co.tz",
"vendorPhone": "+255712345678",
"purchaseOrderId": "",
"purchaseOrderNumber": "",
"number": "",
"invoiceDate": "2026-12-05",
"dueDate": "2026-12-05",
"subtotal": "150000",
"tax": "150000",
"total": "150000",
"expected": "0",
"overbilled": "0",
"status": "",
"problem": "",
"source": "",
"attachmentId": "",
"sellerTin": "",
"sellerVrn": "",
"receiptNumber": "",
"creditRequestedAt": "",
"creditRequestTo": "",
"postedAt": "",
"createdAt": ""
}
}SendCreditRequest#
SendCreditRequest emails the vendor what was billed beyond what was delivered at the ordered price, and asks for a credit note.
Request body
idstringtostringDefaults to the vendor's email.
messagestringAdded above the list of differences.
channelstringemail (the default) or whatsapp. On whatsapp it goes from the server's business number when there is one and the vendor has a phone; otherwise the person sends it from their own phone.
phonestringFor whatsapp; defaults to the vendor's phone.
languagestringen (the default) or sw.
Response
invoiceSupplierInvoicetextstringThe same request as plain text, for sending on WhatsApp.
whatsappSentbooleanwhatsapp_sentwhatsappUrlstringwhatsapp_urlOpens WhatsApp with the text written, when the server didn't send it.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SendCreditRequest \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"phone": "+255712345678"
}'{
"invoice": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"vendorId": "",
"vendorName": "Amina Mushi",
"vendorEmail": "amina@example.co.tz",
"vendorPhone": "+255712345678",
"purchaseOrderId": "",
"purchaseOrderNumber": "",
"number": "",
"invoiceDate": "2026-12-05",
"dueDate": "2026-12-05",
"subtotal": "150000",
"tax": "150000",
"total": "150000",
"expected": "0",
"overbilled": "0",
"status": "",
"problem": "",
"source": "",
"attachmentId": "",
"sellerTin": "",
"sellerVrn": "",
"receiptNumber": "",
"creditRequestedAt": "",
"creditRequestTo": "",
"postedAt": "",
"createdAt": ""
},
"text": "",
"whatsappSent": false,
"whatsappUrl": ""
}PostSupplierInvoice#
PostSupplierInvoice records the invoice in the books: its VAT as reclaimable and any difference from the value received in cost of goods, both owed to the vendor on the order.
Request body
idstringResponse
invoiceSupplierInvoicecurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/PostSupplierInvoice \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"invoice": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"vendorId": "",
"vendorName": "Amina Mushi",
"vendorEmail": "amina@example.co.tz",
"vendorPhone": "+255712345678",
"purchaseOrderId": "",
"purchaseOrderNumber": "",
"number": "",
"invoiceDate": "2026-12-05",
"dueDate": "2026-12-05",
"subtotal": "150000",
"tax": "150000",
"total": "150000",
"expected": "0",
"overbilled": "0",
"status": "",
"problem": "",
"source": "",
"attachmentId": "",
"sellerTin": "",
"sellerVrn": "",
"receiptNumber": "",
"creditRequestedAt": "",
"creditRequestTo": "",
"postedAt": "",
"createdAt": ""
}
}VoidSupplierInvoice#
Request body
idstringResponse
invoiceSupplierInvoicecurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/VoidSupplierInvoice \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"invoice": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"vendorId": "",
"vendorName": "Amina Mushi",
"vendorEmail": "amina@example.co.tz",
"vendorPhone": "+255712345678",
"purchaseOrderId": "",
"purchaseOrderNumber": "",
"number": "",
"invoiceDate": "2026-12-05",
"dueDate": "2026-12-05",
"subtotal": "150000",
"tax": "150000",
"total": "150000",
"expected": "0",
"overbilled": "0",
"status": "",
"problem": "",
"source": "",
"attachmentId": "",
"sellerTin": "",
"sellerVrn": "",
"receiptNumber": "",
"creditRequestedAt": "",
"creditRequestTo": "",
"postedAt": "",
"createdAt": ""
}
}GetInvoiceInbox#
GetInvoiceInbox is the business's address for forwarding invoice emails, made on first ask.
Request body
No fields: send {}.
Response
addressstringEmpty when the server has no inbound mail domain set up.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetInvoiceInbox \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"address": ""
}GetPrepSheet#
Prep sheets (ADR 69): each day, per kitchen station, how much of each batch-made item to prepare, from the item forecast, its recipes and what's on hand, plus prepared food left past its shelf life to throw away. Anyone who sells, clocks in or keeps stock at the location can read the sheet and tick it off.
Request body
locationIdstringlocation_iddaystringYYYY-MM-DD; empty for today at the location.
stationIdstringstation_idOnly this station's tasks and those for any station; empty for all.
refreshbooleanWork the sheet out again from the latest forecast and stock. Tasks already done or skipped stay as they are.
Response
sheetPrepSheetcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetPrepSheet \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"sheet": {
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"day": "",
"builtAt": "",
"hasForecast": false
}
}UpdatePrepTask#
UpdatePrepTask ticks a task off: a batch made goes into stock from its recipe; a leftover thrown away is logged as waste.
Request body
idstringactionstringdone: made (or, for a leftover, thrown away). skip: not made (or kept).
quantityint64 stringFor done: how much was made or thrown away, in stock units; 0 for the task's quantity.
Response
taskPrepTaskcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/UpdatePrepTask \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"quantity": 1
}'{
"task": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"kind": "",
"variantId": "",
"itemName": "Amina Mushi",
"stationId": "",
"stationName": "Amina Mushi",
"needed": "0",
"onHand": "0",
"quantity": 1,
"batch": "0",
"basis": "",
"status": "",
"made": "0",
"doneByName": "Amina Mushi",
"doneAt": "",
"unit": "",
"unitPrecision": 0
}
}SuggestCounts#
SuggestCounts reads counts said (dictated or typed, in English or Swahili) or a photo of a shelf against an open count's items, and proposes an amount for each, for the person to confirm with RecordCounts (ADR 70). It needs AI to be on for the business.
Request body
countIdstringcount_idtextstringWhat was said: "unga mifuko mitatu, sukari kilo tano na nusu".
attachmentIdstringattachment_idA photo of the shelf, from expenses' UploadAttachment.
Response
suggestionsCountSuggestion[]unmatchedstring[]What was heard or seen that isn't on this count.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SuggestCounts \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"suggestions": [
{
"variantId": "",
"itemName": "Amina Mushi",
"heard": "",
"amount": "",
"counted": 1,
"expected": "0",
"confidence": "",
"problem": ""
}
],
"unmatched": [
""
]
}ReadStockWords#
ReadStockWords reads what was said, or a photo of labels, for voice receiving, waste and expiry dates (ADR 119): against an order's lines when receiving, or the location's stock items for waste. Each amount is worked out in stock units with the item's own units, as a typed one would be. Nothing is recorded; the app then calls ReceivePurchaseOrder or LogWaste with what the person confirmed.
Request body
purposestringreceive: what arrived, against purchase_order_id's lines. expiry: a photo of labels (attachment_id), against the order's lines, for lot codes and expiry dates. waste: what was thrown out, against the location's stock items.
locationIdstringlocation_idpurchaseOrderIdstringpurchase_order_idtextstringattachmentIdstringattachment_idFrom expenses' UploadAttachment.
Response
linesStockWordsLine[]unmatchedstring[]What was heard or seen that isn't on the order or in stock.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ReadStockWords \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"lines": [
{
"variantId": "",
"itemName": "Amina Mushi",
"heard": "",
"amount": "",
"quantity": 1,
"unit": "",
"unitPrecision": 0,
"confidence": "",
"problem": "",
"lineId": "",
"outstanding": "0",
"reason": "WASTE_REASON_SPOILAGE",
"lotCode": "",
"expiresOn": ""
}
],
"unmatched": [
""
]
}ListVendorTerms#
Supplier terms for best-vendor ordering (ADR 71): the least each vendor takes in an order and how long it takes to arrive.
Request body
No fields: send {}.
Response
termsVendorTerms[]curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListVendorTerms \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"terms": [
{
"vendorId": "",
"vendorName": "Amina Mushi",
"minOrder": "0",
"leadTimeDays": 0
}
]
}SaveVendorTerms#
Request body
termsVendorTermsResponse
termsVendorTermscurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SaveVendorTerms \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"terms": {
"vendorName": "Amina Mushi"
}
}'{
"terms": {
"vendorId": "",
"vendorName": "Amina Mushi",
"minOrder": "0",
"leadTimeDays": 0
}
}GetFoodCostBridge#
GetFoodCostBridge explains how food cost moved between a period and the one before it: menu mix, menu prices, ingredient prices, waste and what nothing explains (ADR 72).
Request body
locationIdstringlocation_idfromstringYYYY-MM-DD, local, both included. Empty for the last 28 days. It is compared with the same number of days before it.
tostringResponse
bridgeFoodCostBridgecurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetFoodCostBridge \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"bridge": {
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"from": "",
"to": "",
"prevFrom": "",
"prevTo": "",
"netSales": "0",
"prevNetSales": "0",
"cost": "150000",
"prevCost": "150000",
"startBp": 0,
"endBp": 0,
"summary": "",
"uncostedSales": "0"
}
}GetMenuEngineering#
GetMenuEngineering places each menu item by popularity and margin and drafts price and placement changes (ADR 73).
Request body
locationIdstringlocation_idfromstringtostringResponse
fromstringtostringitemsMenuItemPlace[]popularBpintegerpopular_bpThe lines between the four groups: an item is popular at or above popular_bp of items sold, and has a good margin at or above average_margin.
averageMarginint64 stringaverage_marginsuggestionsMenuSuggestion[]curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetMenuEngineering \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"from": "",
"to": "",
"items": [
{
"variantId": "",
"name": "Amina Mushi",
"sold": "0",
"netSales": "0",
"cost": "150000",
"unitMargin": "0",
"price": "150000",
"mixBp": 0,
"costBp": 0,
"class": ""
}
],
"popularBp": 0,
"averageMargin": "0",
"suggestions": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"variantId": "",
"name": "Amina Mushi",
"kind": "",
"class": "",
"title": "",
"detail": "",
"basis": "",
"oldPrice": "150000",
"newPrice": "150000",
"amount": "150000",
"status": ""
}
]
}ActOnMenuSuggestion#
ActOnMenuSuggestion applies (a price change is made in the catalog), dismisses or undoes a menu suggestion.
Request body
idstringactionstringapply, dismiss or undo.
Response
suggestionMenuSuggestioncurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ActOnMenuSuggestion \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"suggestion": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"variantId": "",
"name": "Amina Mushi",
"kind": "",
"class": "",
"title": "",
"detail": "",
"basis": "",
"oldPrice": "150000",
"newPrice": "150000",
"amount": "150000",
"status": ""
}
}SuggestReorder#
SuggestReorder lists stock at or below its reorder point, or selling fast enough to run out within a week, with how many to order and why.
Request body
locationIdstringlocation_idResponse
suggestionsReorderSuggestion[]curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SuggestReorder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"suggestions": [
{
"quantity": 1,
"dailySales": 0,
"daysLeft": 0,
"reason": ""
}
]
}ListStorageAreas#
Storage areas. Every location has a sales floor, made with it, which the registers sell from; store rooms and the like are added beside it.
Request body
locationIdstringlocation_idEmpty for every location the person can see.
includeArchivedbooleaninclude_archivedResponse
areasStorageArea[]The sales floor first in each location, then by sort order and name.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListStorageAreas \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"areas": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"note": "",
"sells": false,
"sortOrder": 0,
"archived": false,
"stockValue": "0",
"itemCount": 1,
"lowCount": 1
}
]
}SaveStorageArea#
SaveStorageArea adds an area or renames one.
Request body
idstringClient-chosen for a new area.
locationIdstringlocation_idFixed once the area exists.
namestringnotestringsortOrderintegersort_orderResponse
areaStorageAreacurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SaveStorageArea \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi"
}'{
"area": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"note": "",
"sells": false,
"sortOrder": 0,
"archived": false,
"stockValue": "0",
"itemCount": 1,
"lowCount": 1
}
}ArchiveStorageArea#
ArchiveStorageArea hides an empty area, or brings one back.
Request body
idstringarchivedbooleanFalse brings it back.
Response
areaStorageAreacurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ArchiveStorageArea \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"area": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"note": "",
"sells": false,
"sortOrder": 0,
"archived": false,
"stockValue": "0",
"itemCount": 1,
"lowCount": 1
}
}ListStockTransfers#
Transfers move stock from one area to another, at the same location or another one. A transfer can be requested (by the floor, say) and completed later by whoever sends it, or made at once.
Request body
locationIdstringlocation_idTransfers from or to this location; empty for every location.
statusTransferStatusUnspecified lists every status.
pageSizeintegerpage_sizepageTokenstringpage_tokenResponse
transfersStockTransfer[]nextPageTokenstringnext_page_tokencurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListStockTransfers \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "TRANSFER_STATUS_REQUESTED",
"pageSize": 50
}'{
"transfers": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "TRANSFER_STATUS_REQUESTED",
"fromLocationId": "",
"fromLocationName": "Amina Mushi",
"fromAreaId": "",
"fromAreaName": "Amina Mushi",
"toLocationId": "",
"toLocationName": "Amina Mushi",
"toAreaId": "",
"toAreaName": "Amina Mushi",
"note": "",
"requestedByName": "Amina Mushi",
"requestedAt": "",
"closedByName": "Amina Mushi",
"closedAt": "",
"value": "0",
"lineCount": 1
}
],
"nextPageToken": ""
}GetStockTransfer#
Request body
idstringResponse
transferStockTransfercurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetStockTransfer \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"transfer": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "TRANSFER_STATUS_REQUESTED",
"fromLocationId": "",
"fromLocationName": "Amina Mushi",
"fromAreaId": "",
"fromAreaName": "Amina Mushi",
"toLocationId": "",
"toLocationName": "Amina Mushi",
"toAreaId": "",
"toAreaName": "Amina Mushi",
"note": "",
"requestedByName": "Amina Mushi",
"requestedAt": "",
"closedByName": "Amina Mushi",
"closedAt": "",
"value": "0",
"lineCount": 1
}
}CreateStockTransfer#
Request body
idstringClient-chosen, so a retry creates one transfer.
fromAreaIdstringfrom_area_idtoAreaIdstringto_area_idlinesTransferLine[]notestringcompletebooleanMove the stock now, rather than leaving it requested.
allowBelowZerobooleanallow_below_zeroResponse
transferStockTransfercurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/CreateStockTransfer \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"lines": [
{
"quantity": 1
}
]
}'{
"transfer": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "TRANSFER_STATUS_REQUESTED",
"fromLocationId": "",
"fromLocationName": "Amina Mushi",
"fromAreaId": "",
"fromAreaName": "Amina Mushi",
"toLocationId": "",
"toLocationName": "Amina Mushi",
"toAreaId": "",
"toAreaName": "Amina Mushi",
"note": "",
"requestedByName": "Amina Mushi",
"requestedAt": "",
"closedByName": "Amina Mushi",
"closedAt": "",
"value": "0",
"lineCount": 1
}
}CompleteStockTransfer#
CompleteTransfer moves the stock, as requested or as actually sent.
Request body
idstringlinesTransferLine[]What was actually sent, by variant; leave out to send what was asked. A line sent as 0 moves nothing.
allowBelowZerobooleanallow_below_zeroResponse
transferStockTransfercurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/CompleteStockTransfer \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"lines": [
{
"quantity": 1
}
]
}'{
"transfer": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "TRANSFER_STATUS_REQUESTED",
"fromLocationId": "",
"fromLocationName": "Amina Mushi",
"fromAreaId": "",
"fromAreaName": "Amina Mushi",
"toLocationId": "",
"toLocationName": "Amina Mushi",
"toAreaId": "",
"toAreaName": "Amina Mushi",
"note": "",
"requestedByName": "Amina Mushi",
"requestedAt": "",
"closedByName": "Amina Mushi",
"closedAt": "",
"value": "0",
"lineCount": 1
}
}CancelStockTransfer#
Request body
idstringResponse
transferStockTransfercurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/CancelStockTransfer \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"transfer": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "TRANSFER_STATUS_REQUESTED",
"fromLocationId": "",
"fromLocationName": "Amina Mushi",
"fromAreaId": "",
"fromAreaName": "Amina Mushi",
"toLocationId": "",
"toLocationName": "Amina Mushi",
"toAreaId": "",
"toAreaName": "Amina Mushi",
"note": "",
"requestedByName": "Amina Mushi",
"requestedAt": "",
"closedByName": "Amina Mushi",
"closedAt": "",
"value": "0",
"lineCount": 1
}
}SuggestRestock#
SuggestRestock lists areas at or below their reorder point that another area at the location can top up, such as the sales floor from the store.
Request body
locationIdstringlocation_idResponse
suggestionsRestockSuggestion[]The sales floor's first.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SuggestRestock \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"suggestions": [
{
"variantId": "",
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"fromAreaId": "",
"fromAreaName": "Amina Mushi",
"toAreaId": "",
"toAreaName": "Amina Mushi",
"quantity": 1,
"toOnHand": "0",
"toReorderPoint": "0",
"fromOnHand": "0",
"reason": ""
}
]
}ListMovements#
ListMovements is the stock ledger: every movement at a location, newest first, with what caused it and who.
Request body
locationIdstringlocation_idareaIdstringarea_idOptional filters.
variantIdstringvariant_idkindsMovementKind[]fromstringYYYY-MM-DD in the location's time zone, both included.
tostringquerystringMatches item name, variant name, SKU or reference.
pageSizeintegerpage_sizepageTokenstringpage_tokenResponse
movementsStockMovement[]nextPageTokenstringnext_page_tokencurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListMovements \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"kinds": [
"MOVEMENT_KIND_SALE"
],
"pageSize": 50
}'{
"movements": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"kind": "MOVEMENT_KIND_SALE",
"quantity": 1,
"value": "0",
"onHandAfter": "0",
"source": "",
"sourceId": "",
"reference": "",
"reason": "",
"occurredAt": "",
"areaId": "",
"areaName": "Amina Mushi",
"variantId": "",
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"sku": "",
"unit": "",
"unitPrecision": 0,
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"byName": "Amina Mushi",
"forVariantId": "",
"forItemName": "Amina Mushi"
}
],
"nextPageToken": ""
}ListRecipes#
Recipes. A variant's recipe says what making it uses; a modifier's says what choosing it adds (or, with a negative quantity, uses less of).
Request body
locationIdstringlocation_idCosts are worked out at this location; empty for the first one.
Response
recipesRecipe[]With their lines.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListRecipes \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"recipes": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"variantId": "",
"modifierId": "",
"yield": "0",
"note": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"price": "150000",
"unitCost": "150000",
"margin": "0",
"costBp": 0,
"tracksStock": false,
"ingredient": false,
"costMissing": false,
"updatedAt": "2026-12-05",
"usedBy": [
""
],
"versionId": "",
"versionNumber": 0,
"status": "RECIPE_STATUS_DRAFT",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"effectiveFrom": "",
"changeNote": "",
"reviewNote": "",
"draftId": "",
"canPublish": false,
"approvalRequired": false,
"baseScaleBp": 0,
"baseVariantId": "",
"baseVariantName": "Amina Mushi"
}
]
}GetRecipe#
Request body
variantIdstringvariant_idOne of the two.
modifierIdstringmodifier_idlocationIdstringlocation_idversionIdstringversion_idA version to show; empty for the open draft, else the one live at the location.
Response
recipeRecipeWithout an id when there is no recipe yet.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetRecipe \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"recipe": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"variantId": "",
"modifierId": "",
"yield": "0",
"note": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"price": "150000",
"unitCost": "150000",
"margin": "0",
"costBp": 0,
"tracksStock": false,
"ingredient": false,
"costMissing": false,
"updatedAt": "2026-12-05",
"usedBy": [
""
],
"versionId": "",
"versionNumber": 0,
"status": "RECIPE_STATUS_DRAFT",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"effectiveFrom": "",
"changeNote": "",
"reviewNote": "",
"draftId": "",
"canPublish": false,
"approvalRequired": false,
"baseScaleBp": 0,
"baseVariantId": "",
"baseVariantName": "Amina Mushi"
}
}SaveRecipe#
SaveRecipe saves a draft version of a recipe, creating the recipe the first time, and publishes it when asked (ADR 44).
Request body
recipeRecipeThe draft to save: version_id names an open draft to update, else a new draft is made from it. location_id in it scopes the version.
locationIdstringlocation_idFor the costs in the answer.
publishbooleanPublish it too (or send it for approval).
effectiveFromstringeffective_fromWhen it takes effect if published: RFC 3339, empty for now.
Response
recipeRecipecurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SaveRecipe \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"recipe": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"lines": [
{
"quantity": 1,
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"unitCost": "150000",
"cost": "150000",
"op": "MODIFIER_OP_ADD",
"replacementName": "Amina Mushi"
}
],
"name": "Amina Mushi",
"price": "150000",
"unitCost": "150000",
"updatedAt": "2026-12-05",
"usedBy": [
""
],
"status": "RECIPE_STATUS_DRAFT",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"versions": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"status": "RECIPE_STATUS_DRAFT",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"locationName": "Amina Mushi",
"createdByName": "Amina Mushi",
"publishedByName": "Amina Mushi",
"lineCount": 1
}
],
"baseVariantName": "Amina Mushi"
},
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"recipe": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"variantId": "",
"modifierId": "",
"yield": "0",
"note": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"price": "150000",
"unitCost": "150000",
"margin": "0",
"costBp": 0,
"tracksStock": false,
"ingredient": false,
"costMissing": false,
"updatedAt": "2026-12-05",
"usedBy": [
""
],
"versionId": "",
"versionNumber": 0,
"status": "RECIPE_STATUS_DRAFT",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"effectiveFrom": "",
"changeNote": "",
"reviewNote": "",
"draftId": "",
"canPublish": false,
"approvalRequired": false,
"baseScaleBp": 0,
"baseVariantId": "",
"baseVariantName": "Amina Mushi"
}
}PublishRecipeVersion#
PublishRecipeVersion makes a draft live, or sends it for approval when the business asks for approval and the caller can't give it.
Request body
versionIdstringversion_ideffectiveFromstringeffective_fromRFC 3339, empty for now. Not before now.
locationIdstringlocation_idResponse
recipeRecipecurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/PublishRecipeVersion \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"recipe": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"variantId": "",
"modifierId": "",
"yield": "0",
"note": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"price": "150000",
"unitCost": "150000",
"margin": "0",
"costBp": 0,
"tracksStock": false,
"ingredient": false,
"costMissing": false,
"updatedAt": "2026-12-05",
"usedBy": [
""
],
"versionId": "",
"versionNumber": 0,
"status": "RECIPE_STATUS_DRAFT",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"effectiveFrom": "",
"changeNote": "",
"reviewNote": "",
"draftId": "",
"canPublish": false,
"approvalRequired": false,
"baseScaleBp": 0,
"baseVariantId": "",
"baseVariantName": "Amina Mushi"
}
}SendBackRecipeVersion#
SendBackRecipeVersion returns a version waiting for approval to draft.
Request body
versionIdstringversion_idnotestringlocationIdstringlocation_idResponse
recipeRecipecurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SendBackRecipeVersion \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"recipe": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"variantId": "",
"modifierId": "",
"yield": "0",
"note": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"price": "150000",
"unitCost": "150000",
"margin": "0",
"costBp": 0,
"tracksStock": false,
"ingredient": false,
"costMissing": false,
"updatedAt": "2026-12-05",
"usedBy": [
""
],
"versionId": "",
"versionNumber": 0,
"status": "RECIPE_STATUS_DRAFT",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"effectiveFrom": "",
"changeNote": "",
"reviewNote": "",
"draftId": "",
"canPublish": false,
"approvalRequired": false,
"baseScaleBp": 0,
"baseVariantId": "",
"baseVariantName": "Amina Mushi"
}
}DiscardRecipeDraft#
Request body
versionIdstringversion_idResponse
No fields: send {}.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/DiscardRecipeDraft \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{}DeleteRecipe#
DeleteRecipe retires a recipe's live versions; its history stays.
Request body
idstringResponse
No fields: send {}.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/DeleteRecipe \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{}ListRecipeUses#
ListRecipeUses says which recipe versions a sale or batch used.
Request body
sourcestring"order", "invoice" or "production", and its id.
sourceIdstringsource_idResponse
usesRecipeUse[]curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListRecipeUses \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"uses": [
{
"lineRef": "",
"versionId": "",
"versionNumber": 0,
"recipeId": "",
"name": "Amina Mushi",
"variantId": "",
"modifierId": ""
}
]
}ResolveSaleLine#
ResolveSaleLine works out what an item with modifiers would use, cost and earn at a location now (ADR 46): the item's recipe, sized, with ingredients taken away, swapped and added.
Request body
locationIdstringlocation_idEmpty for the first location the caller can see.
variantIdstringvariant_idmodifierIdsstring[]modifier_idsIn the order chosen.
quantityint64 stringPieces; 0 is 1.
draftVersionIdstringdraft_version_idA draft version of one of the chosen modifiers' recipes, used in place of its live one: the editor previews a change before it goes live.
Response
namestringingredientsResolvedIngredient[]priceint64 stringItem price plus modifiers, times quantity, before tax and discounts.
costint64 stringbaseCostint64 stringbase_costWhat the item alone would cost.
marginint64 stringcostBpintegercost_bpCost as a share of price, in basis points.
costMissingbooleancost_missingnotesstring[]Plain sentences about what could not apply: "No onions: onions aren't in Chicken burger's recipe."
noEffectstring[]no_effectModifiers chosen that have no stock effect.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ResolveSaleLine \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"modifierIds": [
""
],
"quantity": 1
}'{
"name": "Amina Mushi",
"ingredients": [
{
"variantId": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"quantity": 1,
"baseQuantity": 1,
"change": "",
"cost": "150000",
"costKnown": false
}
],
"price": "150000",
"cost": "150000",
"baseCost": "150000",
"margin": "0",
"costBp": 0,
"costMissing": false,
"notes": [
""
],
"noEffect": [
""
]
}GetIngredient#
Ingredients: details and unit conversions ("1 bag = 25 kg").
Request body
variantIdstringvariant_idResponse
ingredientIngredientcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetIngredient \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"ingredient": {
"variantId": "",
"kind": "INGREDIENT_KIND_RAW",
"brand": "",
"allergens": [
""
],
"allergenNote": "",
"shelfLifeDays": 0,
"storageNote": "",
"vendorId": "",
"purchaseUnit": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"updatedAt": "2026-12-05",
"leadTimeDays": 0,
"categoryId": "",
"standardCost": "150000",
"categoryName": "Amina Mushi",
"sellable": false
}
}SaveIngredient#
Request body
ingredientIngredientConversions replace the ingredient's.
Response
ingredientIngredientcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SaveIngredient \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ingredient": {
"kind": "INGREDIENT_KIND_RAW",
"allergens": [
""
],
"name": "Amina Mushi",
"updatedAt": "2026-12-05",
"standardCost": "150000",
"categoryName": "Amina Mushi"
}
}'{
"ingredient": {
"variantId": "",
"kind": "INGREDIENT_KIND_RAW",
"brand": "",
"allergens": [
""
],
"allergenNote": "",
"shelfLifeDays": 0,
"storageNote": "",
"vendorId": "",
"purchaseUnit": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"updatedAt": "2026-12-05",
"leadTimeDays": 0,
"categoryId": "",
"standardCost": "150000",
"categoryName": "Amina Mushi",
"sellable": false
}
}ListIngredients#
Ingredients as their own catalog (ADR 45): every ingredient with its category, unit, cost per unit, stock, supplier and whether it is sold.
Request body
locationIdstringlocation_idStock and cost are read at this location; blank for the first one the caller can see.
querystringMatches name, SKU, barcode or brand.
categoryIdstringcategory_idBlank for every category; "none" for those with no category.
kindIngredientKindincludeArchivedbooleaninclude_archivedResponse
ingredientsIngredientRow[]byCategorymap<string, integer>by_categoryLive ingredients per category id ("" for none), before the category filter.
stockValueint64 stringstock_valueValue of every ingredient's stock on hand at the location.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListIngredients \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"kind": "INGREDIENT_KIND_RAW"
}'{
"ingredients": [
{
"variantId": "",
"itemId": "",
"name": "Amina Mushi",
"sku": "",
"unit": "",
"unitPrecision": 0,
"kind": "INGREDIENT_KIND_RAW",
"categoryId": "",
"categoryName": "Amina Mushi",
"sellable": false,
"price": "150000",
"archived": false,
"onHand": "0",
"trackStock": false,
"unitCost": "150000",
"costSource": "",
"vendorName": "Amina Mushi",
"purchaseUnit": "",
"recipes": 0,
"allergens": [
""
],
"low": false,
"brand": "",
"standardCost": "150000",
"stockValue": "0"
}
],
"byCategory": {
"key": 0
},
"stockValue": "0"
}ListIngredientCategories#
Request body
No fields: send {}.
Response
categoriesIngredientCategory[]curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListIngredientCategories \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"categories": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"sortOrder": 0,
"archived": false,
"ingredients": 0
}
]
}SaveIngredientCategory#
Request body
categoryIngredientCategoryA new id (UUID) to add one.
Response
categoryIngredientCategorycurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SaveIngredientCategory \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"category": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi"
}
}'{
"category": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"sortOrder": 0,
"archived": false,
"ingredients": 0
}
}ListUnitConversions#
ListUnitConversions lists every ingredient's conversions, for typing amounts in any unit.
Request body
No fields: send {}.
Response
conversionsUnitConversion[]curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListUnitConversions \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"conversions": [
{
"variantId": "",
"unit": "",
"amount": "",
"equals": "",
"entered": ""
}
]
}GetInventorySettings#
How stock behaves for the business.
Request body
No fields: send {}.
Response
settingsInventorySettingscurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetInventorySettings \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"settings": {
"recipeApproval": false,
"refundIngredients": "",
"negativeStock": "",
"wasteApprovalOver": "0",
"stockTiming": ""
}
}SaveInventorySettings#
Request body
settingsInventorySettingsResponse
settingsInventorySettingscurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SaveInventorySettings \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"settings": {
"recipeApproval": false,
"refundIngredients": "",
"negativeStock": "",
"wasteApprovalOver": "0",
"stockTiming": ""
}
}LogWaste#
Waste (ADR 44): what was thrown away and why. Above the business's limit it waits for someone with inventory.approve.
Request body
idstringClient-chosen, so a retry logs once.
areaIdstringarea_idEmpty for the sales floor of location_id.
locationIdstringlocation_idvariantIdstringvariant_idamountstringHow much, as typed: "2 bags", "1.5 kg", "3" (servings of a menu item).
reasonWasteReasonresponsibleIdstringresponsible_idnotestringoccurredAtstringoccurred_atWhen it happened, RFC 3339; empty for now. Not in the future.
allowBelowZerobooleanallow_below_zeroResponse
entryWasteEntrycurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/LogWaste \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"reason": "WASTE_REASON_SPOILAGE"
}'{
"entry": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"areaId": "",
"areaName": "Amina Mushi",
"variantId": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"quantity": 1,
"entered": "",
"reason": "WASTE_REASON_SPOILAGE",
"responsibleId": "",
"responsibleName": "Amina Mushi",
"note": "",
"status": "WASTE_STATUS_RECORDED",
"value": "0",
"occurredAt": "",
"createdByName": "Amina Mushi",
"decidedByName": "Amina Mushi",
"reviewNote": "",
"ingredients": [
""
],
"canDecide": false
}
}ListSupplierPrices#
What each supplier charged for an item over time (ADR 44).
Request body
variantIdstringvariant_idResponse
historySupplierPrice[]Newest first, at most 50.
latestSupplierPrice[]Each supplier's latest price, cheapest first.
changeBpintegerchange_bpThe latest price against the one before it, in basis points (1000 = up 10%); 0 with fewer than two prices.
unitstringcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListSupplierPrices \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"history": [
{
"vendorId": "",
"vendorName": "Amina Mushi",
"unitCost": "150000",
"priceUnit": "",
"unitPrice": "150000",
"recordedAt": "",
"purchaseOrderNumber": ""
}
],
"latest": [
{
"vendorId": "",
"vendorName": "Amina Mushi",
"unitCost": "150000",
"priceUnit": "",
"unitPrice": "150000",
"recordedAt": "",
"purchaseOrderNumber": ""
}
],
"changeBp": 0,
"unit": ""
}ListStockLots#
Lots with stock left, soonest expiry first: what to use first.
Request body
locationIdstringlocation_idareaIdstringarea_idvariantIdstringvariant_idexpiringWithinDaysintegerexpiring_within_daysOnly lots expiring within this many days (and expired ones); 0 for all.
Response
lotsStockLot[]curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListStockLots \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"lots": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"areaId": "",
"areaName": "Amina Mushi",
"variantId": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"code": "",
"expiresOn": "",
"quantity": 1,
"remaining": "0",
"receivedAt": "",
"daysLeft": 0,
"value": "0"
}
]
}ListWaste#
Request body
locationIdstringlocation_idpendingOnlybooleanpending_onlyOnly those waiting for approval.
fromstringRFC 3339; empty for the last 28 days.
tostringpageSizeintegerpage_sizeResponse
entriesWasteEntry[]valueByReasonmap<string, int64 string>value_by_reasonRecorded waste in the period, by reason, in minor units.
totalValueint64 stringtotal_valuependingintegercurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListWaste \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"pageSize": 50
}'{
"entries": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"areaId": "",
"areaName": "Amina Mushi",
"variantId": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"quantity": 1,
"entered": "",
"reason": "WASTE_REASON_SPOILAGE",
"responsibleId": "",
"responsibleName": "Amina Mushi",
"note": "",
"status": "WASTE_STATUS_RECORDED",
"value": "0",
"occurredAt": "",
"createdByName": "Amina Mushi",
"decidedByName": "Amina Mushi",
"reviewNote": "",
"ingredients": [
""
],
"canDecide": false
}
],
"valueByReason": {
"key": "0"
},
"totalValue": "0",
"pending": 0
}DecideWaste#
Request body
idstringapprovebooleannotestringWhy it was turned down.
allowBelowZerobooleanallow_below_zeroResponse
entryWasteEntrycurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/DecideWaste \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"entry": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"areaId": "",
"areaName": "Amina Mushi",
"variantId": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"quantity": 1,
"entered": "",
"reason": "WASTE_REASON_SPOILAGE",
"responsibleId": "",
"responsibleName": "Amina Mushi",
"note": "",
"status": "WASTE_STATUS_RECORDED",
"value": "0",
"occurredAt": "",
"createdByName": "Amina Mushi",
"decidedByName": "Amina Mushi",
"reviewNote": "",
"ingredients": [
""
],
"canDecide": false
}
}ProduceStock#
ProduceStock makes a batch of a prepared item that keeps stock: its ingredients come out of the area and the batch goes in at their cost.
Request body
idstringClient-chosen, so a retry makes one batch.
areaIdstringarea_idvariantIdstringvariant_idquantityint64 stringHow much was made, in the variant's stock quantity.
notestringallowBelowZerobooleanallow_below_zeroResponse
movementsStockMovement[]What was made, then what it used.
valueint64 stringWhat the batch cost.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ProduceStock \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"quantity": 1
}'{
"movements": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"kind": "MOVEMENT_KIND_SALE",
"quantity": 1,
"value": "0",
"onHandAfter": "0",
"source": "",
"sourceId": "",
"reference": "",
"reason": "",
"occurredAt": "",
"areaId": "",
"areaName": "Amina Mushi",
"variantId": "",
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"sku": "",
"unit": "",
"unitPrecision": 0,
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"byName": "Amina Mushi",
"forVariantId": "",
"forItemName": "Amina Mushi"
}
],
"value": "0"
}GetUsageReport#
Reports. Usage shows each item's stock from opening to closing over a period, what recipes and sales explain and what they don't (variance).
Request body
locationIdstringlocation_idareaIdstringarea_idOne area; empty for the whole location, where moves between its own areas cancel out.
fromstringYYYY-MM-DD in the location's time zone, both included.
tostringingredientsOnlybooleaningredients_onlyOnly items whose item is an ingredient, or that recipes use.
Response
rowsUsageRow[]totalsUsageRowValues only: quantities in different units do not add up.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetUsageReport \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"rows": [
{
"variantId": "",
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"sku": "",
"unit": "",
"unitPrecision": 0,
"ingredient": false,
"opening": "0",
"openingValue": "0",
"purchased": "0",
"purchasedValue": "0",
"transferredIn": "0",
"transferredInValue": "0",
"transferredOut": "0",
"transferredOutValue": "0",
"produced": "0",
"producedValue": "0",
"used": "0",
"usedValue": "0",
"sold": "0",
"soldValue": "0",
"wasted": "0",
"wastedValue": "0",
"adjusted": "0",
"adjustedValue": "0",
"closing": "0",
"closingValue": "0",
"theoretical": "0",
"theoreticalValue": "0",
"actual": "0",
"actualValue": "0",
"variance": "0",
"varianceValue": "0",
"varianceBp": 0
}
],
"totals": {
"variantId": "",
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"sku": "",
"unit": "",
"unitPrecision": 0,
"ingredient": false,
"opening": "0",
"openingValue": "0",
"purchased": "0",
"purchasedValue": "0",
"transferredIn": "0",
"transferredInValue": "0",
"transferredOut": "0",
"transferredOutValue": "0",
"produced": "0",
"producedValue": "0",
"used": "0",
"usedValue": "0",
"sold": "0",
"soldValue": "0",
"wasted": "0",
"wastedValue": "0",
"adjusted": "0",
"adjustedValue": "0",
"closing": "0",
"closingValue": "0",
"theoretical": "0",
"theoreticalValue": "0",
"actual": "0",
"actualValue": "0",
"variance": "0",
"varianceValue": "0",
"varianceBp": 0
}
}GetItemCostReport#
GetItemCostReport shows what each item sold, cost and earned.
Request body
locationIdstringlocation_idfromstringtostringResponse
rowsItemCostRow[]Costliest first. Items with neither a recipe nor stock cost nothing here and are left out.
totalsItemCostRowuncostedSalesint64 stringuncosted_salesNet sales of items with no recipe and no stock, whose cost is unknown.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetItemCostReport \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"rows": [
{
"variantId": "",
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"sold": "0",
"netSales": "0",
"cost": "150000",
"margin": "0",
"costBp": 0,
"unitCostNow": "0",
"price": "150000",
"hasRecipe": false,
"tracksStock": false
}
],
"totals": {
"variantId": "",
"itemName": "Amina Mushi",
"variantName": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"sold": "0",
"netSales": "0",
"cost": "150000",
"margin": "0",
"costBp": 0,
"unitCostNow": "0",
"price": "150000",
"hasRecipe": false,
"tracksStock": false
},
"uncostedSales": "0"
}GetStockInsights#
GetStockInsights finds what needs attention and forecasts usage. The assistant's ExplainStock puts it into words.
Request body
locationIdstringlocation_idResponse
insightsStockInsightscurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetStockInsights \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"insights": {
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"generatedAt": "",
"stockValue": "0",
"usageCost7d": "0",
"usageCostPrev7d": "0",
"wasteCost28d": "0",
"varianceCost28d": "0",
"costBp28d": 0
}
}GetStockForecast#
What each item will use over the next two weeks, when it runs out, and what to order by when (ADR 44, slice 4).
Request body
locationIdstringlocation_idallbooleanInclude items that need nothing ordered.
Response
rowsOrderForecast[]What to order soonest first, then what runs out soonest.
orderTotalint64 stringorder_totalWhat the suggested orders cost together.
todaystringThe location's date the forecast starts from.
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetStockForecast \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"rows": [
{
"variantId": "",
"name": "Amina Mushi",
"unit": "",
"unitPrecision": 0,
"onHand": "0",
"onOrder": "0",
"nextDays": [
"0"
],
"nextTwoWeeks": "0",
"perDay": "0",
"daysLeft": 0,
"runsOutOn": "",
"orderBy": "",
"leadTimeDays": 0,
"leadTimeAssumed": false,
"order": "0",
"orderText": "",
"unitCost": "150000",
"orderValue": "0",
"vendorId": "",
"vendorName": "Amina Mushi",
"confidence": "",
"basis": "",
"historyDays": 0
}
],
"orderTotal": "150000",
"today": ""
}GetStockTrend#
Day by day: what came in, was used, sold and wasted, at cost.
Request body
locationIdstringlocation_idareaIdstringarea_idOne area; empty for the whole location.
fromstringYYYY-MM-DD, both included; the last 28 days when empty.
tostringvariantIdstringvariant_idOne item; empty for all.
Response
daysStockTrendDay[]Every day in the period, oldest first.
totalsStockTrendDaycurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetStockTrend \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"days": [
{
"day": "",
"received": "0",
"used": "0",
"sold": "0",
"wasted": "0",
"adjusted": "0",
"produced": "0"
}
],
"totals": {
"day": "",
"received": "0",
"used": "0",
"sold": "0",
"wasted": "0",
"adjusted": "0",
"produced": "0"
}
}ListStockFindings#
What needs attention, kept as findings people can assign, dismiss and resolve (ADR 44, slice 5). Listing refreshes them when they are stale.
Request body
locationIdstringlocation_idviewstringEmpty for open ones; or dismissed, resolved, mine, all.
refreshbooleanWork them out again now, not only when stale.
Response
findingsStockFinding[]openintegerOpen findings, and those assigned to the caller.
mineintegerrefreshedAtstringrefreshed_atcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListStockFindings \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"findings": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "FINDING_STATUS_OPEN",
"assignedTo": "",
"assignedName": "Amina Mushi",
"aiHeadline": "",
"aiSuggestion": "",
"aiModel": "",
"firstSeenAt": "",
"lastSeenAt": "",
"snoozedUntil": "",
"resolvedAt": "",
"reopened": 0
}
],
"open": 0,
"mine": 0,
"refreshedAt": ""
}ActOnStockFinding#
Request body
idstringactionstringassign, unassign, dismiss, resolve, reopen, note.
userIdstringuser_idassign: the person.
notestringsnoozeDaysintegersnooze_daysdismiss: days to keep it hidden if still true; 0 means 14.
Response
findingStockFindingcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ActOnStockFinding \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"finding": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "FINDING_STATUS_OPEN",
"assignedTo": "",
"assignedName": "Amina Mushi",
"aiHeadline": "",
"aiSuggestion": "",
"aiModel": "",
"firstSeenAt": "",
"lastSeenAt": "",
"snoozedUntil": "",
"resolvedAt": "",
"reopened": 0
}
}GetStockFinding#
Request body
idstringResponse
findingStockFindingcurl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetStockFinding \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"finding": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"status": "FINDING_STATUS_OPEN",
"assignedTo": "",
"assignedName": "Amina Mushi",
"aiHeadline": "",
"aiSuggestion": "",
"aiModel": "",
"firstSeenAt": "",
"lastSeenAt": "",
"snoozedUntil": "",
"resolvedAt": "",
"reopened": 0
}
}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.
ListStockLevelsRequest
holygrail.inventory.v1.ListStockLevelsRequest
locationIdstringlocation_idquerystringMatches item name, variant name or SKU.
lowOnlybooleanlow_onlyareaIdstringarea_idOne storage area; empty for the whole location, with each row's areas.
ListStockLevelsResponse
holygrail.inventory.v1.ListStockLevelsResponse
rowsStockRow[]Every variant that tracks stock, including ones with no stock yet.
totalValueint64 stringtotal_valueExportStockLevelsRequest
holygrail.inventory.v1.ExportStockLevelsRequest
locationIdstringlocation_idExportStockLevelsResponse
holygrail.inventory.v1.ExportStockLevelsResponse
levelsStockLevel[]cursorint64 stringGetStockHistoryRequest
holygrail.inventory.v1.GetStockHistoryRequest
locationIdstringlocation_idvariantIdstringvariant_idpageSizeintegerpage_sizepageTokenstringpage_tokenareaIdstringarea_idOne storage area; empty for every area at the location.
GetStockHistoryResponse
holygrail.inventory.v1.GetStockHistoryResponse
rowStockRowmovementsStockMovement[]nextPageTokenstringnext_page_tokenSetReorderPointRequest
holygrail.inventory.v1.SetReorderPointRequest
locationIdstringlocation_idvariantIdstringvariant_idreorderPointint64 stringreorder_pointreorderQtyint64 stringreorder_qtyareaIdstringarea_idThe area whose level it is; empty for the sales floor.
AdjustStockRequest
holygrail.inventory.v1.AdjustStockRequest
idstringClient-chosen UUID, so a retry adjusts once.
locationIdstringlocation_idreasonAdjustReasonlinesAdjustLine[]notestringareaIdstringarea_idThe area adjusted; empty for the sales floor.
allowBelowZerobooleanallow_below_zeroGo ahead when the business warns about stock below zero.
TransferStockRequest
holygrail.inventory.v1.TransferStockRequest
TransferStockRequest moves stock at once, as a completed transfer. Empty areas mean each location's sales floor. CreateTransfer does more.
idstringfromLocationIdstringfrom_location_idtoLocationIdstringto_location_idlinesTransferLine[]notestringfromAreaIdstringfrom_area_idtoAreaIdstringto_area_idallowBelowZerobooleanallow_below_zeroListStockCountsRequest
holygrail.inventory.v1.ListStockCountsRequest
locationIdstringlocation_idListStockCountsResponse
holygrail.inventory.v1.ListStockCountsResponse
countsStockCount[]Without lines.
GetStockCountRequest
holygrail.inventory.v1.GetStockCountRequest
idstringStartStockCountRequest
holygrail.inventory.v1.StartStockCountRequest
idstringlocationIdstringlocation_idnamestringcategoryIdstringcategory_idOptional: count only this category.
areaIdstringarea_idThe area counted; empty for the sales floor.
RecordCountsRequest
holygrail.inventory.v1.RecordCountsRequest
countIdstringcount_identriesCountEntry[]FinishStockCountRequest
holygrail.inventory.v1.FinishStockCountRequest
idstringCancelStockCountRequest
holygrail.inventory.v1.CancelStockCountRequest
idstringListPurchaseOrdersRequest
holygrail.inventory.v1.ListPurchaseOrdersRequest
statusPurchaseOrderStatusUnspecified lists all but cancelled ones.
vendorIdstringvendor_idlocationIdstringlocation_idowingOnlybooleanowing_onlyOnly ones with a balance owed.
pageSizeintegerpage_sizepageTokenstringpage_tokenListPurchaseOrdersResponse
holygrail.inventory.v1.ListPurchaseOrdersResponse
Without lines, receipts or payments.
nextPageTokenstringnext_page_tokenGetPurchaseOrderRequest
holygrail.inventory.v1.GetPurchaseOrderRequest
idstringGetPurchaseOrderResponse
holygrail.inventory.v1.GetPurchaseOrderResponse
CreatePurchaseOrderRequest
holygrail.inventory.v1.CreatePurchaseOrderRequest
idstringdraftPurchaseOrderDraftCreatePurchaseOrderResponse
holygrail.inventory.v1.CreatePurchaseOrderResponse
UpdatePurchaseOrderRequest
holygrail.inventory.v1.UpdatePurchaseOrderRequest
idstringdraftPurchaseOrderDraftUpdatePurchaseOrderResponse
holygrail.inventory.v1.UpdatePurchaseOrderResponse
MarkOrderedRequest
holygrail.inventory.v1.MarkOrderedRequest
idstringMarkOrderedResponse
holygrail.inventory.v1.MarkOrderedResponse
SendPurchaseOrderRequest
holygrail.inventory.v1.SendPurchaseOrderRequest
idstringemailstringDefaults to the vendor's email.
channelstringemail (the default) or whatsapp (ADR 78).
phonestringFor whatsapp; defaults to the vendor's phone.
languagestringen (the default) or sw: the language the vendor reads it in.
SendPurchaseOrderResponse
holygrail.inventory.v1.SendPurchaseOrderResponse
whatsappSentbooleanwhatsapp_sentFor whatsapp: true when it went from the business number on the server; otherwise whatsapp_url opens WhatsApp with the order written, for the person to send from their own phone.
whatsappUrlstringwhatsapp_urlReceivePurchaseOrderRequest
holygrail.inventory.v1.ReceivePurchaseOrderRequest
idstringClient-chosen receipt id, so a retry receives once.
purchaseOrderIdstringpurchase_order_idlinesReceiveLine[]notestringreceivedAtstringreceived_atRFC 3339; defaults to now.
ReceivePurchaseOrderResponse
holygrail.inventory.v1.ReceivePurchaseOrderResponse
ClosePurchaseOrderRequest
holygrail.inventory.v1.ClosePurchaseOrderRequest
idstringClosePurchaseOrderResponse
holygrail.inventory.v1.ClosePurchaseOrderResponse
CancelPurchaseOrderRequest
holygrail.inventory.v1.CancelPurchaseOrderRequest
idstringCancelPurchaseOrderResponse
holygrail.inventory.v1.CancelPurchaseOrderResponse
RecordVendorPaymentRequest
holygrail.inventory.v1.RecordVendorPaymentRequest
idstringpurchaseOrderIdstringpurchase_order_idcashAccountIdstringcash_account_idamountint64 stringpaidAtstringpaid_atRFC 3339; defaults to now.
referencestringRecordVendorPaymentResponse
holygrail.inventory.v1.RecordVendorPaymentResponse
VoidVendorPaymentRequest
holygrail.inventory.v1.VoidVendorPaymentRequest
purchaseOrderIdstringpurchase_order_idpaymentIdstringpayment_idVoidVendorPaymentResponse
holygrail.inventory.v1.VoidVendorPaymentResponse
ListSupplierInvoicesRequest
holygrail.inventory.v1.ListSupplierInvoicesRequest
locationIdstringlocation_idEmpty for every location the caller can see.
statusesstring[]Empty for every status.
limitintegerAt most 200; 50 when unset.
ListSupplierInvoicesResponse
holygrail.inventory.v1.ListSupplierInvoicesResponse
invoicesSupplierInvoice[]GetSupplierInvoiceRequest
holygrail.inventory.v1.GetSupplierInvoiceRequest
idstringCaptureSupplierInvoiceRequest
holygrail.inventory.v1.CaptureSupplierInvoiceRequest
idstringClient-made, so a retry captures once.
attachmentIdstringattachment_idlocationIdstringlocation_idvendorIdstringvendor_idOptional: when the person already knows.
purchaseOrderIdstringpurchase_order_idsourcestringupload or photo.
CaptureSupplierInvoiceResponse
holygrail.inventory.v1.CaptureSupplierInvoiceResponse
invoiceSupplierInvoiceMatchSupplierInvoiceRequest
holygrail.inventory.v1.MatchSupplierInvoiceRequest
idstringvendorIdstringvendor_idpurchaseOrderIdstringpurchase_order_idEmpty to match without an order.
MatchSupplierInvoiceResponse
holygrail.inventory.v1.MatchSupplierInvoiceResponse
invoiceSupplierInvoiceSendCreditRequestRequest
holygrail.inventory.v1.SendCreditRequestRequest
idstringtostringDefaults to the vendor's email.
messagestringAdded above the list of differences.
channelstringemail (the default) or whatsapp. On whatsapp it goes from the server's business number when there is one and the vendor has a phone; otherwise the person sends it from their own phone.
phonestringFor whatsapp; defaults to the vendor's phone.
languagestringen (the default) or sw.
SendCreditRequestResponse
holygrail.inventory.v1.SendCreditRequestResponse
invoiceSupplierInvoicetextstringThe same request as plain text, for sending on WhatsApp.
whatsappSentbooleanwhatsapp_sentwhatsappUrlstringwhatsapp_urlOpens WhatsApp with the text written, when the server didn't send it.
PostSupplierInvoiceRequest
holygrail.inventory.v1.PostSupplierInvoiceRequest
idstringVoidSupplierInvoiceRequest
holygrail.inventory.v1.VoidSupplierInvoiceRequest
idstringGetInvoiceInboxRequest
holygrail.inventory.v1.GetInvoiceInboxRequest
No fields.
GetInvoiceInboxResponse
holygrail.inventory.v1.GetInvoiceInboxResponse
addressstringEmpty when the server has no inbound mail domain set up.
GetPrepSheetRequest
holygrail.inventory.v1.GetPrepSheetRequest
locationIdstringlocation_iddaystringYYYY-MM-DD; empty for today at the location.
stationIdstringstation_idOnly this station's tasks and those for any station; empty for all.
refreshbooleanWork the sheet out again from the latest forecast and stock. Tasks already done or skipped stay as they are.
UpdatePrepTaskRequest
holygrail.inventory.v1.UpdatePrepTaskRequest
idstringactionstringdone: made (or, for a leftover, thrown away). skip: not made (or kept).
quantityint64 stringFor done: how much was made or thrown away, in stock units; 0 for the task's quantity.
SuggestCountsRequest
holygrail.inventory.v1.SuggestCountsRequest
countIdstringcount_idtextstringWhat was said: "unga mifuko mitatu, sukari kilo tano na nusu".
attachmentIdstringattachment_idA photo of the shelf, from expenses' UploadAttachment.
SuggestCountsResponse
holygrail.inventory.v1.SuggestCountsResponse
suggestionsCountSuggestion[]unmatchedstring[]What was heard or seen that isn't on this count.
ReadStockWordsRequest
holygrail.inventory.v1.ReadStockWordsRequest
purposestringreceive: what arrived, against purchase_order_id's lines. expiry: a photo of labels (attachment_id), against the order's lines, for lot codes and expiry dates. waste: what was thrown out, against the location's stock items.
locationIdstringlocation_idpurchaseOrderIdstringpurchase_order_idtextstringattachmentIdstringattachment_idFrom expenses' UploadAttachment.
ReadStockWordsResponse
holygrail.inventory.v1.ReadStockWordsResponse
linesStockWordsLine[]unmatchedstring[]What was heard or seen that isn't on the order or in stock.
ListVendorTermsRequest
holygrail.inventory.v1.ListVendorTermsRequest
No fields.
GetFoodCostBridgeRequest
holygrail.inventory.v1.GetFoodCostBridgeRequest
locationIdstringlocation_idfromstringYYYY-MM-DD, local, both included. Empty for the last 28 days. It is compared with the same number of days before it.
tostringSuggestReorderRequest
holygrail.inventory.v1.SuggestReorderRequest
locationIdstringlocation_idListStorageAreasRequest
holygrail.inventory.v1.ListStorageAreasRequest
locationIdstringlocation_idEmpty for every location the person can see.
includeArchivedbooleaninclude_archivedListStorageAreasResponse
holygrail.inventory.v1.ListStorageAreasResponse
areasStorageArea[]The sales floor first in each location, then by sort order and name.
SaveStorageAreaRequest
holygrail.inventory.v1.SaveStorageAreaRequest
idstringClient-chosen for a new area.
locationIdstringlocation_idFixed once the area exists.
namestringnotestringsortOrderintegersort_orderArchiveStorageAreaRequest
holygrail.inventory.v1.ArchiveStorageAreaRequest
idstringarchivedbooleanFalse brings it back.
ListStockTransfersRequest
holygrail.inventory.v1.ListStockTransfersRequest
locationIdstringlocation_idTransfers from or to this location; empty for every location.
statusTransferStatusUnspecified lists every status.
pageSizeintegerpage_sizepageTokenstringpage_tokenListStockTransfersResponse
holygrail.inventory.v1.ListStockTransfersResponse
transfersStockTransfer[]nextPageTokenstringnext_page_tokenGetStockTransferRequest
holygrail.inventory.v1.GetStockTransferRequest
idstringCreateStockTransferRequest
holygrail.inventory.v1.CreateStockTransferRequest
idstringClient-chosen, so a retry creates one transfer.
fromAreaIdstringfrom_area_idtoAreaIdstringto_area_idlinesTransferLine[]notestringcompletebooleanMove the stock now, rather than leaving it requested.
allowBelowZerobooleanallow_below_zeroCompleteStockTransferRequest
holygrail.inventory.v1.CompleteStockTransferRequest
idstringlinesTransferLine[]What was actually sent, by variant; leave out to send what was asked. A line sent as 0 moves nothing.
allowBelowZerobooleanallow_below_zeroCompleteStockTransferResponse
holygrail.inventory.v1.CompleteStockTransferResponse
transferStockTransferCancelStockTransferRequest
holygrail.inventory.v1.CancelStockTransferRequest
idstringSuggestRestockRequest
holygrail.inventory.v1.SuggestRestockRequest
locationIdstringlocation_idSuggestRestockResponse
holygrail.inventory.v1.SuggestRestockResponse
suggestionsRestockSuggestion[]The sales floor's first.
ListMovementsRequest
holygrail.inventory.v1.ListMovementsRequest
locationIdstringlocation_idareaIdstringarea_idOptional filters.
variantIdstringvariant_idkindsMovementKind[]fromstringYYYY-MM-DD in the location's time zone, both included.
tostringquerystringMatches item name, variant name, SKU or reference.
pageSizeintegerpage_sizepageTokenstringpage_tokenListMovementsResponse
holygrail.inventory.v1.ListMovementsResponse
movementsStockMovement[]nextPageTokenstringnext_page_tokenListRecipesRequest
holygrail.inventory.v1.ListRecipesRequest
locationIdstringlocation_idCosts are worked out at this location; empty for the first one.
GetRecipeRequest
holygrail.inventory.v1.GetRecipeRequest
variantIdstringvariant_idOne of the two.
modifierIdstringmodifier_idlocationIdstringlocation_idversionIdstringversion_idA version to show; empty for the open draft, else the one live at the location.
GetRecipeResponse
holygrail.inventory.v1.GetRecipeResponse
recipeRecipeWithout an id when there is no recipe yet.
SaveRecipeRequest
holygrail.inventory.v1.SaveRecipeRequest
recipeRecipeThe draft to save: version_id names an open draft to update, else a new draft is made from it. location_id in it scopes the version.
locationIdstringlocation_idFor the costs in the answer.
publishbooleanPublish it too (or send it for approval).
effectiveFromstringeffective_fromWhen it takes effect if published: RFC 3339, empty for now.
PublishRecipeVersionRequest
holygrail.inventory.v1.PublishRecipeVersionRequest
versionIdstringversion_ideffectiveFromstringeffective_fromRFC 3339, empty for now. Not before now.
locationIdstringlocation_idSendBackRecipeVersionRequest
holygrail.inventory.v1.SendBackRecipeVersionRequest
versionIdstringversion_idnotestringlocationIdstringlocation_idDiscardRecipeDraftRequest
holygrail.inventory.v1.DiscardRecipeDraftRequest
versionIdstringversion_idDiscardRecipeDraftResponse
holygrail.inventory.v1.DiscardRecipeDraftResponse
No fields.
DeleteRecipeRequest
holygrail.inventory.v1.DeleteRecipeRequest
idstringDeleteRecipeResponse
holygrail.inventory.v1.DeleteRecipeResponse
No fields.
ListRecipeUsesRequest
holygrail.inventory.v1.ListRecipeUsesRequest
sourcestring"order", "invoice" or "production", and its id.
sourceIdstringsource_idResolveSaleLineRequest
holygrail.inventory.v1.ResolveSaleLineRequest
locationIdstringlocation_idEmpty for the first location the caller can see.
variantIdstringvariant_idmodifierIdsstring[]modifier_idsIn the order chosen.
quantityint64 stringPieces; 0 is 1.
draftVersionIdstringdraft_version_idA draft version of one of the chosen modifiers' recipes, used in place of its live one: the editor previews a change before it goes live.
ResolveSaleLineResponse
holygrail.inventory.v1.ResolveSaleLineResponse
namestringingredientsResolvedIngredient[]priceint64 stringItem price plus modifiers, times quantity, before tax and discounts.
costint64 stringbaseCostint64 stringbase_costWhat the item alone would cost.
marginint64 stringcostBpintegercost_bpCost as a share of price, in basis points.
costMissingbooleancost_missingnotesstring[]Plain sentences about what could not apply: "No onions: onions aren't in Chicken burger's recipe."
noEffectstring[]no_effectModifiers chosen that have no stock effect.
GetIngredientRequest
holygrail.inventory.v1.GetIngredientRequest
variantIdstringvariant_idSaveIngredientRequest
holygrail.inventory.v1.SaveIngredientRequest
ingredientIngredientConversions replace the ingredient's.
ListIngredientsRequest
holygrail.inventory.v1.ListIngredientsRequest
locationIdstringlocation_idStock and cost are read at this location; blank for the first one the caller can see.
querystringMatches name, SKU, barcode or brand.
categoryIdstringcategory_idBlank for every category; "none" for those with no category.
kindIngredientKindincludeArchivedbooleaninclude_archivedListIngredientsResponse
holygrail.inventory.v1.ListIngredientsResponse
ingredientsIngredientRow[]byCategorymap<string, integer>by_categoryLive ingredients per category id ("" for none), before the category filter.
stockValueint64 stringstock_valueValue of every ingredient's stock on hand at the location.
ListIngredientCategoriesRequest
holygrail.inventory.v1.ListIngredientCategoriesRequest
No fields.
ListIngredientCategoriesResponse
holygrail.inventory.v1.ListIngredientCategoriesResponse
categoriesIngredientCategory[]SaveIngredientCategoryRequest
holygrail.inventory.v1.SaveIngredientCategoryRequest
categoryIngredientCategoryA new id (UUID) to add one.
SaveIngredientCategoryResponse
holygrail.inventory.v1.SaveIngredientCategoryResponse
categoryIngredientCategoryListUnitConversionsRequest
holygrail.inventory.v1.ListUnitConversionsRequest
No fields.
ListUnitConversionsResponse
holygrail.inventory.v1.ListUnitConversionsResponse
conversionsUnitConversion[]GetInventorySettingsRequest
holygrail.inventory.v1.GetInventorySettingsRequest
No fields.
GetInventorySettingsResponse
holygrail.inventory.v1.GetInventorySettingsResponse
settingsInventorySettingsSaveInventorySettingsRequest
holygrail.inventory.v1.SaveInventorySettingsRequest
settingsInventorySettingsSaveInventorySettingsResponse
holygrail.inventory.v1.SaveInventorySettingsResponse
settingsInventorySettingsLogWasteRequest
holygrail.inventory.v1.LogWasteRequest
idstringClient-chosen, so a retry logs once.
areaIdstringarea_idEmpty for the sales floor of location_id.
locationIdstringlocation_idvariantIdstringvariant_idamountstringHow much, as typed: "2 bags", "1.5 kg", "3" (servings of a menu item).
reasonWasteReasonresponsibleIdstringresponsible_idnotestringoccurredAtstringoccurred_atWhen it happened, RFC 3339; empty for now. Not in the future.
allowBelowZerobooleanallow_below_zeroListSupplierPricesRequest
holygrail.inventory.v1.ListSupplierPricesRequest
variantIdstringvariant_idListSupplierPricesResponse
holygrail.inventory.v1.ListSupplierPricesResponse
historySupplierPrice[]Newest first, at most 50.
latestSupplierPrice[]Each supplier's latest price, cheapest first.
changeBpintegerchange_bpThe latest price against the one before it, in basis points (1000 = up 10%); 0 with fewer than two prices.
unitstringListStockLotsRequest
holygrail.inventory.v1.ListStockLotsRequest
locationIdstringlocation_idareaIdstringarea_idvariantIdstringvariant_idexpiringWithinDaysintegerexpiring_within_daysOnly lots expiring within this many days (and expired ones); 0 for all.
ListWasteRequest
holygrail.inventory.v1.ListWasteRequest
locationIdstringlocation_idpendingOnlybooleanpending_onlyOnly those waiting for approval.
fromstringRFC 3339; empty for the last 28 days.
tostringpageSizeintegerpage_sizeListWasteResponse
holygrail.inventory.v1.ListWasteResponse
entriesWasteEntry[]valueByReasonmap<string, int64 string>value_by_reasonRecorded waste in the period, by reason, in minor units.
totalValueint64 stringtotal_valuependingintegerDecideWasteRequest
holygrail.inventory.v1.DecideWasteRequest
idstringapprovebooleannotestringWhy it was turned down.
allowBelowZerobooleanallow_below_zeroProduceStockRequest
holygrail.inventory.v1.ProduceStockRequest
idstringClient-chosen, so a retry makes one batch.
areaIdstringarea_idvariantIdstringvariant_idquantityint64 stringHow much was made, in the variant's stock quantity.
notestringallowBelowZerobooleanallow_below_zeroProduceStockResponse
holygrail.inventory.v1.ProduceStockResponse
movementsStockMovement[]What was made, then what it used.
valueint64 stringWhat the batch cost.
GetUsageReportRequest
holygrail.inventory.v1.GetUsageReportRequest
locationIdstringlocation_idareaIdstringarea_idOne area; empty for the whole location, where moves between its own areas cancel out.
fromstringYYYY-MM-DD in the location's time zone, both included.
tostringingredientsOnlybooleaningredients_onlyOnly items whose item is an ingredient, or that recipes use.
GetUsageReportResponse
holygrail.inventory.v1.GetUsageReportResponse
rowsUsageRow[]totalsUsageRowValues only: quantities in different units do not add up.
GetItemCostReportRequest
holygrail.inventory.v1.GetItemCostReportRequest
locationIdstringlocation_idfromstringtostringGetItemCostReportResponse
holygrail.inventory.v1.GetItemCostReportResponse
rowsItemCostRow[]Costliest first. Items with neither a recipe nor stock cost nothing here and are left out.
totalsItemCostRowuncostedSalesint64 stringuncosted_salesNet sales of items with no recipe and no stock, whose cost is unknown.
GetStockInsightsRequest
holygrail.inventory.v1.GetStockInsightsRequest
locationIdstringlocation_idGetStockForecastRequest
holygrail.inventory.v1.GetStockForecastRequest
locationIdstringlocation_idallbooleanInclude items that need nothing ordered.
GetStockForecastResponse
holygrail.inventory.v1.GetStockForecastResponse
rowsOrderForecast[]What to order soonest first, then what runs out soonest.
orderTotalint64 stringorder_totalWhat the suggested orders cost together.
todaystringThe location's date the forecast starts from.
GetStockTrendRequest
holygrail.inventory.v1.GetStockTrendRequest
locationIdstringlocation_idareaIdstringarea_idOne area; empty for the whole location.
fromstringYYYY-MM-DD, both included; the last 28 days when empty.
tostringvariantIdstringvariant_idOne item; empty for all.
GetStockTrendResponse
holygrail.inventory.v1.GetStockTrendResponse
daysStockTrendDay[]Every day in the period, oldest first.
totalsStockTrendDayListStockFindingsRequest
holygrail.inventory.v1.ListStockFindingsRequest
locationIdstringlocation_idviewstringEmpty for open ones; or dismissed, resolved, mine, all.
refreshbooleanWork them out again now, not only when stale.
ListStockFindingsResponse
holygrail.inventory.v1.ListStockFindingsResponse
findingsStockFinding[]openintegerOpen findings, and those assigned to the caller.
mineintegerrefreshedAtstringrefreshed_atActOnStockFindingRequest
holygrail.inventory.v1.ActOnStockFindingRequest
idstringactionstringassign, unassign, dismiss, resolve, reopen, note.
userIdstringuser_idassign: the person.
notestringsnoozeDaysintegersnooze_daysdismiss: days to keep it hidden if still true; 0 means 14.
GetStockFindingRequest
holygrail.inventory.v1.GetStockFindingRequest
idstringStockRow
holygrail.inventory.v1.StockRow
StockRow is a stock level with what the dashboard shows beside it.
levelStockLevelitemNamestringitem_namevariantNamestringvariant_nameskustringvalueint64 stringWhat the stock on hand cost (moving average), in minor units.
averageCostint64 stringaverage_costvalue / on_hand, or the last unit cost when none is on hand.
lastCostint64 stringlast_costreorderQtyint64 stringreorder_qtypriceint64 stringunitstringThe variant's unit and its decimals. With decimals, every quantity of this variant (on hand, reorder levels, movements, counts, purchase order lines) is in thousandths of the unit, and costs are per one unit.
unitPrecisionintegerunit_precisionareasAreaStock[]For a whole location: its stock in each area. level then holds the location's total.
ingredientbooleanIts item is an ingredient: used by recipes, never sold at the register.
hasRecipebooleanhas_recipeIt has a recipe of its own (a prepared item).
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.
StockMovement
holygrail.inventory.v1.StockMovement
idstringkindMovementKindquantityint64 stringPositive for stock in, negative for stock out.
valueint64 stringonHandAfterint64 stringon_hand_aftersourcestringWhat caused it: "order", "invoice", "po_receipt", "adjustment", "count".
sourceIdstringsource_idreferencestringA person-readable reference: the receipt or document number.
reasonstringoccurredAtstringoccurred_atareaIdstringarea_idareaNamestringarea_namevariantIdstringvariant_iditemNamestringitem_namevariantNamestringvariant_nameskustringunitstringunitPrecisionintegerunit_precisionlocationIdstringlocation_idbyNamestringby_nameWho recorded it, when a person did.
forVariantIdstringfor_variant_idUsage only: the item whose recipe used it.
forItemNamestringfor_item_nameAdjustLine
holygrail.inventory.v1.AdjustLine
variantIdstringvariant_idquantityint64 stringPositive adds stock, negative removes it.
unitCostint64 stringunit_costRequired for opening stock; other stock in uses the average cost.
TransferLine
holygrail.inventory.v1.TransferLine
variantIdstringvariant_idquantityint64 stringStockTransfer
holygrail.inventory.v1.StockTransfer
idstringnumberstringTR-0001, numbered per business.
statusTransferStatusfromLocationIdstringfrom_location_idfromLocationNamestringfrom_location_namefromAreaIdstringfrom_area_idfromAreaNamestringfrom_area_nametoLocationIdstringto_location_idtoLocationNamestringto_location_nametoAreaIdstringto_area_idtoAreaNamestringto_area_namenotestringrequestedByNamestringrequested_by_namerequestedAtstringrequested_atclosedByNamestringclosed_by_nameCompleted or cancelled: by whom and when.
closedAtstringclosed_atvalueint64 stringWhat the stock moved was worth, at average cost.
lineCountintegerline_countlinesStockTransferLine[]Without lines in lists.
StockCount
holygrail.inventory.v1.StockCount
idstringlocationIdstringlocation_idnamestringstatusCountStatusnotestringcreatedAtstringcreated_atfinishedAtstringfinished_atlinesCountLine[]countedLinesintegercounted_linesvalueChangeint64 stringvalue_changeFinished counts: the value of the stock found over and short.
areaIdstringarea_idareaNamestringarea_nameCountEntry
holygrail.inventory.v1.CountEntry
variantIdstringvariant_idcountedint64 stringoptionalUnset clears the count.
PurchaseOrder
holygrail.inventory.v1.PurchaseOrder
idstringnumberstringvendorIdstringvendor_idvendorNamestringvendor_namelocationIdstringlocation_idstatusPurchaseOrderStatusexpectedDatestringexpected_dateYYYY-MM-DD, or empty.
notestringtotalint64 stringreceivedValueint64 stringreceived_valueamountPaidint64 stringamount_paidbalanceint64 stringreceived_value - amount_paid: what the business owes the vendor.
orderedAtstringordered_atcreatedAtstringcreated_atlinesPurchaseOrderLine[]receiptsPurchaseOrderReceipt[]paymentsVendorPayment[]vendorEmailstringvendor_emailareaIdstringarea_idWhere deliveries go.
areaNamestringarea_namesourcestringmanual, or forecast for a draft made from the demand forecast (ADR 56).
editedbooleanA forecast draft someone has changed; later drafts leave it alone.
savingint64 stringWhat a forecast draft saves against buying everything from each item's usual supplier (ADR 71).
vendorPhonestringvendor_phonePurchaseOrderDraft
holygrail.inventory.v1.PurchaseOrderDraft
vendorIdstringvendor_idlocationIdstringlocation_idexpectedDatestringexpected_datenotestringareaIdstringarea_idThe storage area deliveries go into; empty for the sales floor.
ReceiveLine
holygrail.inventory.v1.ReceiveLine
lineIdstringline_idquantityint64 stringunitCostint64 stringoptionalunit_costOptional: the cost on the delivery note, when it differs from the order.
amountstringHow much arrived, as typed ("3 bags"); overrides quantity when set.
lotCodestringlot_codeThe lot's code and expiry date (2026-12-31), when the delivery has them.
expiresOnstringexpires_onSupplierInvoice
holygrail.inventory.v1.SupplierInvoice
A vendor's invoice (ADR 68). Amounts are minor units of the business's currency.
idstringlocationIdstringlocation_idvendorIdstringvendor_idEmpty when no vendor on file matched; vendor_name is then as printed.
vendorNamestringvendor_namevendorEmailstringvendor_emailvendorPhonestringvendor_phonepurchaseOrderIdstringpurchase_order_idpurchaseOrderNumberstringpurchase_order_numbernumberstringThe invoice number as printed.
invoiceDatestringinvoice_dateYYYY-MM-DD, or empty.
dueDatestringdue_datesubtotalint64 stringNet of tax, the VAT, and the total.
taxint64 stringtotalint64 stringexpectedint64 stringWhat the order and its receipts say should be billed, net of tax.
overbilledint64 stringWhat was billed beyond that.
statusstringneeds_review, matched, differences, posted or void.
problemstringWhy it needs a person, in words.
sourcestringupload, photo or email.
attachmentIdstringattachment_idsellerTinstringseller_tinFrom a TRA EFD receipt or tax invoice.
sellerVrnstringseller_vrnreceiptNumberstringreceipt_numbercreditRequestedAtstringcredit_requested_atRFC 3339, or empty.
creditRequestTostringcredit_request_topostedAtstringposted_atcreatedAtstringcreated_atPrepSheet
holygrail.inventory.v1.PrepSheet
locationIdstringlocation_iddaystringYYYY-MM-DD, the location's business day.
builtAtstringbuilt_atRFC 3339: when the sheet was last worked out.
stationsPrepStation[]tasksPrepTask[]hasForecastbooleanhas_forecastFalse when there is no item forecast for the day yet, so nothing can be suggested to make.
PrepTask
holygrail.inventory.v1.PrepTask
idstringkindstringprep: make a batch. leftover: prepared food past its shelf life, to check and throw away.
variantIdstringvariant_iditemNamestringitem_namestationIdstringstation_idEmpty for any station.
stationNamestringstation_nameneededint64 stringIn the item's stock units: what the day needs, what's on hand, and what to make (for a leftover, what's left).
onHandint64 stringon_handquantityint64 stringbatchint64 stringWhat one batch of its recipe makes, in stock units; 0 if unknown.
basisstringWhy, in words: "For 40 Chicken pilau and 25 Chips forecast".
statusstringtodo, done or skipped.
madeint64 stringdoneByNamestringdone_by_namedoneAtstringdone_atunitstringunitPrecisionintegerunit_precisionCountSuggestion
holygrail.inventory.v1.CountSuggestion
variantIdstringvariant_iditemNamestringitem_nameheardstringWhat was heard or seen for it.
amountstringThe amount in digits: "3 bags", "5.5 kg".
countedint64 stringoptionalIn stock units; unset when the amount couldn't be worked out (see problem).
expectedint64 stringWhat the books say is on hand now.
confidencestringhigh, medium or low.
problemstringStockWordsLine
holygrail.inventory.v1.StockWordsLine
variantIdstringvariant_iditemNamestringitem_nameheardstringWhat was heard or seen for it.
amountstringIn digits with a unit: "3 bags", "5.5 kg"; empty for expiry.
quantityint64 stringoptionalIn stock units; unset when the amount couldn't be worked out (see problem) or none was said.
unitstringunitPrecisionintegerunit_precisionconfidencestringhigh, medium or low.
problemstringlineIdstringline_idReceiving: the order line, and what is still to come on it.
outstandingint64 stringreasonWasteReasonWaste: why, as a WasteReason.
lotCodestringlot_codeLabels: the lot code and expiry date (2026-12-31) read.
expiresOnstringexpires_onVendorTerms
holygrail.inventory.v1.VendorTerms
vendorIdstringvendor_idvendorNamestringvendor_nameminOrderint64 stringmin_orderThe least the vendor takes in one order, in minor units; 0 for none.
leadTimeDaysintegeroptionallead_time_daysDays from ordering to arriving; unset when not known, and each item's own lead time is used.
FoodCostBridge
holygrail.inventory.v1.FoodCostBridge
locationIdstringlocation_idfromstringtostringprevFromstringprev_fromprevTostringprev_tonetSalesint64 stringnet_salesprevNetSalesint64 stringprev_net_salescostint64 stringActual food cost: what recipes say was used, plus waste, plus what counts found missing, as a share of net sales.
prevCostint64 stringprev_coststartBpintegerstart_bpendBpintegerend_bpstepsBridgeStep[]summarystringOne or two sentences on the biggest move.
uncostedSalesint64 stringuncosted_salesNet sales of items with no recipe and no stock, left out.
ReorderSuggestion
holygrail.inventory.v1.ReorderSuggestion
rowStockRowquantityint64 stringdailySalesnumberdaily_salesNet units sold a day lately: the faster of the last 28 and last 7 days.
daysLeftnumberdays_leftHow long what is on hand lasts at that rate; negative when it isn't selling.
reasonstringWhy it is suggested, in a sentence.
StorageArea
holygrail.inventory.v1.StorageArea
idstringlocationIdstringlocation_idnamestringnotestringsellsbooleanThe sales floor: what the location's registers sell from and show. Every location has exactly one, and it cannot be archived.
sortOrderintegersort_orderarchivedbooleanstockValueint64 stringstock_valueOutput only: what its stock cost, how many variants it holds, and how many are at or below their reorder point there.
itemCountintegeritem_countlowCountintegerlow_countRestockSuggestion
holygrail.inventory.v1.RestockSuggestion
variantIdstringvariant_iditemNamestringitem_namevariantNamestringvariant_nameunitstringunitPrecisionintegerunit_precisionfromAreaIdstringfrom_area_idfromAreaNamestringfrom_area_nametoAreaIdstringto_area_idtoAreaNamestringto_area_namequantityint64 stringHow much to move, and the stock at either end now.
toOnHandint64 stringto_on_handtoReorderPointint64 stringto_reorder_pointfromOnHandint64 stringfrom_on_handreasonstringRecipe
holygrail.inventory.v1.Recipe
idstringvariantIdstringvariant_idWhat it is for: a variant, or a modifier.
modifierIdstringmodifier_idyieldint64 stringWhat one batch of the lines makes, in thousandths of the variant's unit (or of one piece): 1000 makes one. Always 1000 for a modifier.
notestringlinesRecipeLine[]namestringOutput only.
unitstringunitPrecisionintegerunit_precisionpriceint64 stringunitCostint64 stringunit_costWhat making one unit (one piece, or one of the unit) costs, at the location's current costs.
marginint64 stringprice - unit_cost, and unit_cost / price in basis points (the food or drink cost percentage); 0 without a price.
costBpintegercost_bptracksStockbooleantracks_stockThe variant keeps stock of its own: sales take it from stock and batches made with ProduceStock add to it.
ingredientbooleanIts item is an ingredient (a prepared one), not sold.
costMissingbooleancost_missingSome line has no cost yet, so unit_cost is too low.
updatedAtstringupdated_atusedBystring[]used_byRecipes that use this one's variant.
versionIdstringversion_idThe version shown: its id, number, status, scope and dates.
versionNumberintegerversion_numberstatusRecipeStatuslocationIdstringlocation_idEmpty for every location; else this version is for one location.
effectiveFromstringeffective_fromchangeNotestringchange_notereviewNotestringreview_noteversionsRecipeVersion[]Every version, newest first.
draftIdstringdraft_idAn open draft or pending version, if any.
canPublishbooleancan_publishThe caller may publish without approval.
approvalRequiredbooleanapproval_requiredThe business asks for approval before a recipe goes live.
baseScaleBpintegerbase_scale_bpOn a modifier (ADR 46): the item's own recipe times this, in basis points (a size: 15000 is half as much again); 0 for unchanged.
baseVariantIdstringbase_variant_idOn a modifier: use this item's recipe, or its stock, instead of the item's own.
baseVariantNamestringbase_variant_nameOutput only.
RecipeUse
holygrail.inventory.v1.RecipeUse
lineRefstringline_refThe sold line, or the batch.
versionIdstringversion_idversionNumberintegerversion_numberrecipeIdstringrecipe_idnamestringWhat the recipe is for.
variantIdstringvariant_idmodifierIdstringmodifier_idResolvedIngredient
holygrail.inventory.v1.ResolvedIngredient
One ingredient a resolved line uses.
variantIdstringvariant_idnamestringunitstringunitPrecisionintegerunit_precisionquantityint64 stringThousandths of the unit (or of a piece) the line uses; 0 when taken out entirely.
baseQuantityint64 stringbase_quantityWhat the item alone would use.
changestring"base", "added", "removed", "more", "less".
costint64 stringcostKnownbooleancost_knownIngredient
holygrail.inventory.v1.Ingredient
variantIdstringvariant_idkindIngredientKindbrandstringallergensstring[]Keys: gluten, crustaceans, eggs, fish, peanuts, soy, milk, nuts, celery, mustard, sesame, sulphites, lupin, molluscs.
allergenNotestringallergen_noteshelfLifeDaysintegershelf_life_days0 for not set.
storageNotestringstorage_notevendorIdstringvendor_idpurchaseUnitstringpurchase_unitThe unit it is bought in: one of its conversions, or blank for the stock unit.
conversionsUnitConversion[]namestringOutput only.
unitstringunitPrecisionintegerunit_precisionupdatedAtstringupdated_atleadTimeDaysintegerlead_time_daysDays from ordering to delivery; 0 for not set, which the forecast takes as 2.
categoryIdstringcategory_idIts ingredient category (ADR 45); blank for none.
standardCostint64 stringstandard_costWhat one stock unit is expected to cost, in minor units, until a delivery or a supplier price says otherwise. 0 for not set.
categoryNamestringcategory_nameOutput only.
sellablebooleanOutput only: sold at the register (its item is not an ingredient-only item).
IngredientRow
holygrail.inventory.v1.IngredientRow
One ingredient as the list shows it.
variantIdstringvariant_iditemIdstringitem_idnamestringskustringunitstringunitPrecisionintegerunit_precisionkindIngredientKindcategoryIdstringcategory_idcategoryNamestringcategory_namesellablebooleanpriceint64 stringSelling price at the location, when sellable.
archivedbooleanonHandint64 stringon_handAt the location, in stock units (thousandths for decimals).
trackStockbooleantrack_stockunitCostint64 stringunit_costCost of one stock unit in minor units, and where it came from: "average" (stock on hand), "last" (latest delivery), "supplier" (latest supplier price), "standard" (set on the ingredient), "recipe" (made here: what its recipe costs), or blank when not known.
costSourcestringcost_sourcevendorNamestringvendor_namepurchaseUnitstringpurchase_unitrecipesintegerPublished recipes that use it.
allergensstring[]lowbooleanAt or below its reorder point at the location.
brandstringstandardCostint64 stringstandard_coststockValueint64 stringstock_valueValue of the stock on hand at the location, in minor units.
IngredientCategory
holygrail.inventory.v1.IngredientCategory
idstringnamestringsortOrderintegersort_orderarchivedbooleaningredientsintegerOutput only: live ingredients in it.
UnitConversion
holygrail.inventory.v1.UnitConversion
UnitConversion says how much of a variant's stock unit one other unit is.
variantIdstringvariant_idunitstring"bag", "bottle", "cup".
amountstringHow much of the stock unit one unit is, as an exact decimal: "25".
equalsstringInput: what one unit is, typed in any unit: "25 kg", "750 ml".
enteredstringAs typed and stored.
InventorySettings
holygrail.inventory.v1.InventorySettings
recipeApprovalbooleanrecipe_approvalPublishing a recipe needs the recipes.approve permission.
refundIngredientsstringrefund_ingredientsOn a refund of something made from a recipe: "keep" (it was used) or "restock" (put the ingredients back).
negativeStockstringnegative_stockBack-office stock out below zero: "allow", "warn" or "block".
wasteApprovalOverint64 stringwaste_approval_overWaste costing more than this, in minor units, needs inventory.approve; 0 means never.
stockTimingstringstock_timingWhen a sale takes its stock (ADR 46): "payment", when the order is paid, or "fire", as each line is sent to the kitchen. Lines fired and then voided stay taken: they were made.
WasteEntry
holygrail.inventory.v1.WasteEntry
idstringlocationIdstringlocation_idareaIdstringarea_idareaNamestringarea_namevariantIdstringvariant_idnamestringunitstringunitPrecisionintegerunit_precisionquantityint64 stringIn the variant's stock quantity.
enteredstringreasonWasteReasonresponsibleIdstringresponsible_idresponsibleNamestringresponsible_namenotestringstatusWasteStatusvalueint64 stringWhat it cost; an estimate while pending.
occurredAtstringoccurred_atRFC 3339.
createdByNamestringcreated_by_namedecidedByNamestringdecided_by_namereviewNotestringreview_noteingredientsstring[]A menu item: the ingredients its recipe took, by name.
canDecidebooleancan_decideWhether the caller can approve it.
SupplierPrice
holygrail.inventory.v1.SupplierPrice
vendorIdstringvendor_idvendorNamestringvendor_nameunitCostint64 stringunit_costMinor units per stock unit.
priceUnitstringprice_unitunitPriceint64 stringunit_pricerecordedAtstringrecorded_atRFC 3339.
purchaseOrderNumberstringpurchase_order_numberThe purchase order it came in on, if any.
StockLot
holygrail.inventory.v1.StockLot
idstringareaIdstringarea_idareaNamestringarea_namevariantIdstringvariant_idnamestringunitstringunitPrecisionintegerunit_precisioncodestringexpiresOnstringexpires_on2026-12-31, or empty when it has none.
quantityint64 stringremainingint64 stringreceivedAtstringreceived_atdaysLeftintegerdays_leftDays until it expires; negative once expired.
valueint64 stringWhat remaining is worth at the area's average cost.
UsageRow
holygrail.inventory.v1.UsageRow
UsageRow follows one variant's stock over a period. Quantities are stock quantities, out movements as positive numbers; each comes with its value at cost.
variantIdstringvariant_iditemNamestringitem_namevariantNamestringvariant_nameskustringunitstringunitPrecisionintegerunit_precisioningredientbooleanopeningint64 stringopeningValueint64 stringopening_valuepurchasedint64 stringDelivered on purchase orders, and opening stock added.
purchasedValueint64 stringpurchased_valuetransferredInint64 stringtransferred_intransferredInValueint64 stringtransferred_in_valuetransferredOutint64 stringtransferred_outtransferredOutValueint64 stringtransferred_out_valueproducedint64 stringproducedValueint64 stringproduced_valueusedint64 stringUsed by recipes: for items sold and batches made.
usedValueint64 stringused_valuesoldint64 stringSold as itself, less returns and voids.
soldValueint64 stringsold_valuewastedint64 stringDamaged, lost, stolen, wasted, expired or given to staff.
wastedValueint64 stringwasted_valueadjustedint64 stringSigned: what counts and corrections found over (+) or short (-).
adjustedValueint64 stringadjusted_valueclosingint64 stringclosingValueint64 stringclosing_valuetheoreticalint64 stringtheoretical = used + sold: what recipes and sales explain. actual = opening + in - out - closing: what actually went. variance = actual - theoretical - wasted: what nothing explains.
theoreticalValueint64 stringtheoretical_valueactualint64 stringactualValueint64 stringactual_valuevarianceint64 stringvarianceValueint64 stringvariance_valuevarianceBpintegervariance_bpvariance / theoretical in basis points; 0 when nothing was explained.
ItemCostRow
holygrail.inventory.v1.ItemCostRow
variantIdstringvariant_iditemNamestringitem_namevariantNamestringvariant_nameunitstringunitPrecisionintegerunit_precisionsoldint64 stringPieces, or thousandths of the unit for a measured variant.
netSalesint64 stringnet_salescostint64 stringWhat its stock and ingredients cost at the time of each sale.
marginint64 stringcostBpintegercost_bpcost / net_sales in basis points.
unitCostNowint64 stringunit_cost_nowWhat one costs today by its recipe or average cost, and its price.
priceint64 stringhasRecipebooleanhas_recipetracksStockbooleantracks_stockIts costliest ingredients over the period.
StockInsights
holygrail.inventory.v1.StockInsights
locationIdstringlocation_idgeneratedAtstringgenerated_atstockValueint64 stringstock_valueusageCost7dint64 stringusage_cost_7dWhat ingredients and goods used and sold cost, the last seven days and the seven before.
usageCostPrev7dint64 stringusage_cost_prev_7dwasteCost28dint64 stringwaste_cost_28dThe last 28 days: waste, and unexplained variance found by counts.
varianceCost28dint64 stringvariance_cost_28dcostBp28dintegercost_bp_28dCost of goods over net sales for items with a recipe or stock, the last 28 days, in basis points.
insightsStockInsight[]Most urgent first.
forecastsStockForecast[]Soonest to run out first.
OrderForecast
holygrail.inventory.v1.OrderForecast
OrderForecast is one item's expected use and what to order: the same weekday over the last eight weeks, scaled by how the last two weeks compare with the eight, against what is on hand, what is on order and how long delivery takes.
variantIdstringvariant_idnamestringunitstringunitPrecisionintegerunit_precisiononHandint64 stringon_handAt the whole location, in stock quantity.
onOrderint64 stringon_orderOrdered and not yet received.
nextDaysint64 string[]next_daysExpected use on each of the next 14 days, today first.
nextTwoWeeksint64 stringnext_two_weeksThe next 14 days' expected use, and per day on average.
perDayint64 stringper_daydaysLeftintegerdays_leftWhole days what is on hand and on order lasts; -1 when it lasts beyond the forecast or is not being used.
runsOutOnstringruns_out_onYYYY-MM-DD, or empty.
orderBystringorder_byThe last day to order so it arrives in time; empty when nothing is needed. Today or earlier means order now.
leadTimeDaysintegerlead_time_daysleadTimeAssumedbooleanlead_time_assumedNo lead time is set, so 2 days was assumed.
orderint64 stringWhat to order to last until two weeks after it arrives, in stock quantity, rounded up to whole purchase units; 0 when nothing is needed.
orderTextstringorder_text"6 bags", or the stock quantity in words.
unitCostint64 stringunit_costAt the supplier's latest price, else the average cost.
orderValueint64 stringorder_valuevendorIdstringvendor_idvendorNamestringvendor_nameconfidencestring"high", "medium" or "low": how steady its use has been.
basisstringHow it was worked out, in plain words.
historyDaysintegerhistory_daysStockTrendDay
holygrail.inventory.v1.StockTrendDay
StockTrendDay is one day's stock movements at cost, in minor units. Out movements are positive here.
daystringYYYY-MM-DD in the location's time zone.
receivedint64 stringusedint64 stringBy recipes (ingredients) and sold as they are.
soldint64 stringwastedint64 stringadjustedint64 stringCounts and corrections: positive when stock was found.
producedint64 stringStockFinding
holygrail.inventory.v1.StockFinding
StockFinding is one thing that needs attention, worked out from the numbers and kept while it lasts. The plain title, detail and calculation come from the arithmetic; the assistant may add a headline and a suggestion, which only reword those numbers.
idstringlocationIdstringlocation_idinsightStockInsightstatusFindingStatusassignedTostringassigned_toassignedNamestringassigned_nameaiHeadlinestringai_headlineThe assistant's words; empty until written, or without a model.
aiSuggestionstringai_suggestionaiModelstringai_modelfirstSeenAtstringfirst_seen_atlastSeenAtstringlast_seen_atsnoozedUntilstringsnoozed_untilDismissed findings come back after this, if still true.
resolvedAtstringresolved_atreopenedintegerHow many times it was found again after being resolved.
historyFindingEvent[]Output of GetStockFinding only, oldest first.
AreaStock
holygrail.inventory.v1.AreaStock
AreaStock is a variant's stock in one storage area.
areaIdstringarea_idareaNamestringarea_nameonHandint64 stringon_handvalueint64 stringreorderPointint64 stringreorder_pointsellsbooleanThe sales floor.
StockTransferLine
holygrail.inventory.v1.StockTransferLine
variantIdstringvariant_iditemNamestringitem_namevariantNamestringvariant_nameskustringunitstringunitPrecisionintegerunit_precisionrequestedint64 stringsentint64 stringCompleted transfers: what was sent, and what it was worth.
valueint64 stringavailableint64 stringRequested transfers: what the area it comes from has now.
CountLine
holygrail.inventory.v1.CountLine
variantIdstringvariant_iditemNamestringitem_namevariantNamestringvariant_nameskustringexpectedint64 stringStock on hand now (open counts) or when the count finished.
countedint64 stringoptionalUnset until counted.
PurchaseOrderLine
holygrail.inventory.v1.PurchaseOrderLine
idstringvariantIdstringvariant_iddescriptionstringItem and variant name when the line was saved.
quantityint64 stringunitCostint64 stringunit_costreceivedint64 stringskustringenteredstringAs typed (ADR 44): "4 bags", and the price per bag.
priceUnitstringprice_unitunitPriceint64 stringunit_pricebasisstringOn a forecast draft, why this much (ADR 56).
PurchaseOrderReceipt
holygrail.inventory.v1.PurchaseOrderReceipt
idstringvalueint64 stringnotestringreceivedAtstringreceived_atVendorPayment
holygrail.inventory.v1.VendorPayment
idstringcashAccountIdstringcash_account_idamountint64 stringpaidAtstringpaid_atreferencestringvoidedbooleanPurchaseOrderDraftLine
holygrail.inventory.v1.PurchaseOrderDraftLine
idstringvariantIdstringvariant_idquantityint64 stringIn stock units; ignored when amount is set.
unitCostint64 stringunit_costPer stock unit; ignored when unit_price is set.
amountstringHow much, as typed in any of the item's units: "4 bags", "10 kg".
priceUnitstringprice_unitThe price per price_unit ("bag"); empty price_unit means per stock unit.
unitPriceint64 stringunit_priceSupplierInvoiceLine
holygrail.inventory.v1.SupplierInvoiceLine
idstringdescriptionstringquantityTextstringquantity_textAs printed: "4" and "bags".
unitstringquantityint64 stringBilled, in the item's stock units at its precision; 0 when unknown.
unitPriceint64 stringunit_pricePer printed unit, and the line's net amount.
amountint64 stringpurchaseOrderLineIdstringpurchase_order_line_idThe order line it matched; empty when it isn't on the order.
orderedint64 stringThe order line's ordered and received quantities, in stock units.
receivedint64 stringstockUnitstringstock_unitThe stock unit, for showing quantities: "kg".
unitPrecisionintegerunit_precisionexpectedint64 stringWhat this line should cost at the ordered price for what arrived.
overbilledint64 stringdifferencestringprice, quantity, not_ordered, not_received or empty.
confidencestringHow sure the reading is: high, medium or low.
PrepStation
holygrail.inventory.v1.PrepStation
idstringnamestringBridgeStep
holygrail.inventory.v1.BridgeStep
keystring"mix", "menu_price", "ingredient_price", "waste" or "unexplained".
labelstringbpintegerFood cost points it moved, in basis points of net sales: 120 is 1.2 points up.
amountint64 stringWhat that is in money at this period's sales.
detailstringdriversBridgeDriver[]RecipeLine
holygrail.inventory.v1.RecipeLine
ingredientIdstringingredient_idThe variant used: one that tracks stock, or a prepared item with a recipe of its own.
quantityint64 stringHow much one batch uses, in thousandths of the ingredient's unit (or of one piece). Negative only on a modifier: it uses that much less.
wasteBpintegerwaste_bpExtra lost in prep, such as trimming, in basis points: 1000 takes 10% more than quantity.
itemNamestringitem_nameOutput only.
variantNamestringvariant_nameunitstringunitPrecisionintegerunit_precisiontracksStockbooleantracks_stockhasRecipebooleanhas_recipeunitCostint64 stringunit_costWhat one unit (one piece, or one of the unit) of the ingredient costs now, and whether there is any cost for it yet.
costKnownbooleancost_knowncostint64 stringWhat this line costs for one unit of what the recipe makes.
amountstringInput: what was typed, such as "250 g" or "2 cups"; the server turns it into quantity. Empty to send quantity as is.
enteredQuantitystringentered_quantityWhat was typed, as stored: "250" and "g". Shown instead of quantity.
enteredUnitstringentered_unitroundedbooleanOutput: turning it into the stock unit rounded it by more than 1%.
On a modifier's recipe (ADR 46), what the line does. Empty is ADD.
replacementIdstringreplacement_idREPLACE: what goes in instead of the ingredient.
factorBpintegerfactor_bpREPLACE: how much of the replacement per one of what it replaces; SCALE: the factor. Basis points: 10000 the same, 20000 double. 0 is 10000.
withSizebooleanwith_sizeADD: grows with the size another modifier chooses.
replacementNamestringreplacement_nameOutput only.
RecipeVersion
holygrail.inventory.v1.RecipeVersion
RecipeVersion is one entry in a recipe's history.
idstringnumberintegerstatusRecipeStatuslocationIdstringlocation_idEmpty for every location.
locationNamestringlocation_nameeffectiveFromstringeffective_fromcreatedAtstringcreated_atcreatedByNamestringcreated_by_namepublishedAtstringpublished_atpublishedByNamestringpublished_by_nameretiredAtstringretired_atchangeNotestringchange_notereviewNotestringreview_notelivebooleanIn force now at the location asked about.
scheduledbooleanPublished but effective later.
replacedbooleanPublished, and a later version took over.
lineCountintegerline_countusesint64 stringSold lines and batches that used it.
yieldint64 stringIngredientUse
holygrail.inventory.v1.IngredientUse
variantIdstringvariant_idnamestringunitstringunitPrecisionintegerunit_precisionquantityint64 stringvalueint64 stringAreaValue
holygrail.inventory.v1.AreaValue
areaIdstringarea_idareaNamestringarea_namevalueint64 stringStockInsight
holygrail.inventory.v1.StockInsight
StockInsight is one thing worth looking at, worked out from the numbers.
kindstring"restock", "runout", "variance", "waste", "cost_rise", "margin", "no_recipe" or "dead_stock".
severitystring"high", "medium" or "low".
titlestringdetailstringlinkstringA dashboard path to act on it.
variantIdstringvariant_idamountint64 stringMoney at stake, in minor units, when there is a figure for it.
calculationstringHow it was worked out, with the numbers: "1.2 kg wasted of 18 kg used = 6.7%".
periodDaysintegerperiod_daysThe days of history it looks at; 0 for a reading of today.
keystringStays the same while it is the same problem: the kind and what it is about ("waste:<variant>", "expiring:<lot>").
StockForecast
holygrail.inventory.v1.StockForecast
StockForecast predicts a variant's use over the next week from the same weekday over the last four weeks and the last seven days.
variantIdstringvariant_iditemNamestringitem_namevariantNamestringvariant_nameunitstringunitPrecisionintegerunit_precisiononHandint64 stringon_handAt the whole location.
nextDaysint64 string[]next_daysExpected use on each of the next seven days, today first.
nextWeekint64 stringnext_weekdaysLeftnumberdays_leftHow long what is on hand lasts; negative when it is not being used.
runsOutOnstringruns_out_onYYYY-MM-DD, or empty when it lasts beyond the forecast.
orderint64 stringWhat to order to last two weeks, and what that costs at the last cost.
orderValueint64 stringorder_valueFindingEvent
holygrail.inventory.v1.FindingEvent
atstringactionstringfound, updated, assigned, unassigned, dismissed, resolved, reopened, noted, gone (no longer true), worded.
byNamestringby_namenotestringBridgeDriver
holygrail.inventory.v1.BridgeDriver
One thing that moved food cost and its biggest causes.
variantIdstringvariant_idnamestringamountint64 stringIn minor units over the period; positive raised food cost.
detailstringAdjustReason enum
holygrail.inventory.v1.AdjustReason
ADJUST_REASON_UNSPECIFIEDADJUST_REASON_INITIALStock the business already had, at what it cost. Posts against opening balance equity.
ADJUST_REASON_DAMAGEDADJUST_REASON_LOSTADJUST_REASON_THEFTADJUST_REASON_FOUNDADJUST_REASON_CORRECTIONADJUST_REASON_WASTEThrown away in prep or service: spilt, burnt, sent back.
ADJUST_REASON_EXPIREDPast its date.
ADJUST_REASON_STAFF_MEALGiven to the team.
PurchaseOrderStatus enum
holygrail.inventory.v1.PurchaseOrderStatus
PURCHASE_ORDER_STATUS_UNSPECIFIEDPURCHASE_ORDER_STATUS_DRAFTPURCHASE_ORDER_STATUS_ORDEREDPURCHASE_ORDER_STATUS_PARTIALSome of it has arrived.
PURCHASE_ORDER_STATUS_RECEIVEDPURCHASE_ORDER_STATUS_CLOSEDClosed before everything arrived.
PURCHASE_ORDER_STATUS_CANCELLEDTransferStatus enum
holygrail.inventory.v1.TransferStatus
TRANSFER_STATUS_UNSPECIFIEDTRANSFER_STATUS_REQUESTEDAsked for; nothing has moved yet.
TRANSFER_STATUS_COMPLETEDTRANSFER_STATUS_CANCELLEDMovementKind enum
holygrail.inventory.v1.MovementKind
MOVEMENT_KIND_UNSPECIFIEDMOVEMENT_KIND_SALEMOVEMENT_KIND_RETURNMOVEMENT_KIND_RECEIVEMOVEMENT_KIND_ADJUSTMOVEMENT_KIND_COUNTMOVEMENT_KIND_TRANSFER_INMOVEMENT_KIND_TRANSFER_OUTMOVEMENT_KIND_VOIDStock put back when an invoice was voided.
MOVEMENT_KIND_USAGEAn ingredient a recipe used: for an item sold, or a batch made.
MOVEMENT_KIND_PRODUCEA batch of a prepared item made from its recipe.
IngredientKind enum
holygrail.inventory.v1.IngredientKind
INGREDIENT_KIND_UNSPECIFIEDINGREDIENT_KIND_RAWBought and used as it is: flour, milk.
INGREDIENT_KIND_PACKAGINGCups, lids, boxes.
INGREDIENT_KIND_PREPAREDMade here from other ingredients: dough, sauce.
INGREDIENT_KIND_FINISHEDBought ready to sell: bottled drinks.
WasteReason enum
holygrail.inventory.v1.WasteReason
WASTE_REASON_UNSPECIFIEDWASTE_REASON_SPOILAGEWASTE_REASON_DAMAGEWASTE_REASON_PREP_LOSSWASTE_REASON_OVERPRODUCTIONWASTE_REASON_CUSTOMER_RETURNWASTE_REASON_EXPIRYWASTE_REASON_THEFTWASTE_REASON_OTHERCountStatus enum
holygrail.inventory.v1.CountStatus
COUNT_STATUS_UNSPECIFIEDCOUNT_STATUS_OPENCOUNT_STATUS_FINISHEDCOUNT_STATUS_CANCELLEDRecipeStatus enum
holygrail.inventory.v1.RecipeStatus
RECIPE_STATUS_UNSPECIFIEDRECIPE_STATUS_DRAFTBeing written; sales don't use it.
RECIPE_STATUS_PENDINGWaiting for someone who can approve recipes.
RECIPE_STATUS_PUBLISHEDLive from effective_from; it never changes again.
RECIPE_STATUS_RETIREDNo longer used from retired_at.
WasteStatus enum
holygrail.inventory.v1.WasteStatus
WASTE_STATUS_UNSPECIFIEDWASTE_STATUS_RECORDEDWASTE_STATUS_PENDINGWASTE_STATUS_REJECTEDFindingStatus enum
holygrail.inventory.v1.FindingStatus
FINDING_STATUS_UNSPECIFIEDFINDING_STATUS_OPENFINDING_STATUS_DISMISSEDFINDING_STATUS_RESOLVEDModifierOp enum
holygrail.inventory.v1.ModifierOp
What a modifier's recipe line does to the item's recipe (ADR 46).
MODIFIER_OP_UNSPECIFIEDMODIFIER_OP_ADDUses this too: extra cheese; a side such as fries is a prepared item.
MODIFIER_OP_REMOVETakes it out of the item's recipe: all of it (quantity 0) or that much.
MODIFIER_OP_REPLACEUses the replacement instead: oat milk for milk.
MODIFIER_OP_SCALEUses more or less of it: double patty.
Base URL https://api.buziin.tech. Every method is POST with a JSON body; see Making requests.