Developers
Sign inGet API keys
API reference/Commerce

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.

holygrail.inventory.v1.InventoryService82 methodsinventory.read · inventory.write

ListStockLevels#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/ListStockLevels

Request body

locationIdstringlocation_id
querystring

Matches item name, variant name or SKU.

lowOnlybooleanlow_only
areaIdstringarea_id

One storage area; empty for the whole location, with each row's areas.

Response

Every variant that tracks stock, including ones with no stock yet.

totalValueint64 stringtotal_value
Request
curl 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"
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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_id

Response

cursorint64 string
Request
curl 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"
}'
Response example
{
  "levels": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
      "variantId": "",
      "onHand": "0",
      "reorderPoint": "0",
      "areaId": ""
    }
  ],
  "cursor": "0"
}

GetStockHistory#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetStockHistory

Request body

locationIdstringlocation_id
variantIdstringvariant_id
pageSizeintegerpage_size
pageTokenstringpage_token
areaIdstringarea_id

One storage area; empty for every area at the location.

Response

nextPageTokenstringnext_page_token
Request
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
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/SetReorderPoint

Request body

locationIdstringlocation_id
variantIdstringvariant_id
reorderPointint64 stringreorder_point
reorderQtyint64 stringreorder_qty
areaIdstringarea_id

The area whose level it is; empty for the sales floor.

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/AdjustStock

Request body

idstring

Client-chosen UUID, so a retry adjusts once.

locationIdstringlocation_id
notestring
areaIdstringarea_id

The area adjusted; empty for the sales floor.

allowBelowZerobooleanallow_below_zero

Go ahead when the business warns about stock below zero.

Response

Request
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"
    }
  ]
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/TransferStock

Request body

idstring
fromLocationIdstringfrom_location_id
toLocationIdstringto_location_id
notestring
fromAreaIdstringfrom_area_id
toAreaIdstringto_area_id
allowBelowZerobooleanallow_below_zero

Response

Request
curl 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
    }
  ]
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/ListStockCounts

Request body

locationIdstringlocation_id

Response

Without lines.

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

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetStockCount

Request body

idstring

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/StartStockCount

StartStockCount lists every tracked variant at the location (or in one category) to count.

Request body

idstring
locationIdstringlocation_id
namestring
categoryIdstringcategory_id

Optional: count only this category.

areaIdstringarea_id

The area counted; empty for the sales floor.

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/RecordCounts

Request body

countIdstringcount_id

Response

Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/RecordCounts \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "entries": [
    {
      "counted": 1
    }
  ]
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/FinishStockCount

FinishStockCount sets each counted variant's stock to what was counted.

Request body

idstring

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/CancelStockCount

Request body

idstring

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/ListPurchaseOrders

Request body

Unspecified lists all but cancelled ones.

vendorIdstringvendor_id
locationIdstringlocation_id
owingOnlybooleanowing_only

Only ones with a balance owed.

pageSizeintegerpage_size
pageTokenstringpage_token

Response

purchaseOrdersPurchaseOrder[]purchase_orders

Without lines, receipts or payments.

nextPageTokenstringnext_page_token
Request
curl 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
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetPurchaseOrder

Request body

idstring

Response

purchaseOrderPurchaseOrderpurchase_order
Request
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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/CreatePurchaseOrder

Request body

idstring

Response

purchaseOrderPurchaseOrderpurchase_order
Request
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"
      }
    ]
  }
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/UpdatePurchaseOrder

UpdatePurchaseOrder replaces a draft's contents.

Request body

idstring

Response

purchaseOrderPurchaseOrderpurchase_order
Request
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"
      }
    ]
  }
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/MarkOrdered

MarkOrdered records that a draft was placed with the vendor.

Request body

idstring

Response

purchaseOrderPurchaseOrderpurchase_order
Request
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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/SendPurchaseOrder

SendPurchaseOrder emails it to the vendor, marking a draft ordered.

Request body

idstring
emailstring

Defaults to the vendor's email.

channelstring

email (the default) or whatsapp (ADR 78).

phonestring

For whatsapp; defaults to the vendor's phone.

languagestring

en (the default) or sw: the language the vendor reads it in.

Response

purchaseOrderPurchaseOrderpurchase_order
whatsappSentbooleanwhatsapp_sent

For 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_url
Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/ReceivePurchaseOrder

Request body

idstring

Client-chosen receipt id, so a retry receives once.

purchaseOrderIdstringpurchase_order_id
notestring
receivedAtstringreceived_at

RFC 3339; defaults to now.

Response

purchaseOrderPurchaseOrderpurchase_order
Request
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"
    }
  ]
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/ClosePurchaseOrder

ClosePurchaseOrder stops waiting for lines that will not arrive.

Request body

idstring

Response

purchaseOrderPurchaseOrderpurchase_order
Request
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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/CancelPurchaseOrder

CancelPurchaseOrder cancels one that has received nothing.

Request body

idstring

Response

purchaseOrderPurchaseOrderpurchase_order
Request
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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/RecordVendorPayment

Request body

idstring
purchaseOrderIdstringpurchase_order_id
cashAccountIdstringcash_account_id
amountint64 string
paidAtstringpaid_at

RFC 3339; defaults to now.

referencestring

Response

purchaseOrderPurchaseOrderpurchase_order
Request
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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/VoidVendorPayment

Request body

purchaseOrderIdstringpurchase_order_id
paymentIdstringpayment_id

Response

purchaseOrderPurchaseOrderpurchase_order
Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/VoidVendorPayment \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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_id

Empty for every location the caller can see.

statusesstring[]

Empty for every status.

limitinteger

At most 200; 50 when unset.

Response

Request
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": [
    ""
  ]
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetSupplierInvoice

Request body

idstring

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/CaptureSupplierInvoice

CaptureSupplierInvoice reads an uploaded file (expenses' UploadAttachment) and matches it. It needs AI to be on for the business.

Request body

idstring

Client-made, so a retry captures once.

attachmentIdstringattachment_id
locationIdstringlocation_id
vendorIdstringvendor_id

Optional: when the person already knows.

purchaseOrderIdstringpurchase_order_id
sourcestring

upload or photo.

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/MatchSupplierInvoice

MatchSupplierInvoice links an invoice to a vendor or purchase order a person chose, and matches it again.

Request body

idstring
vendorIdstringvendor_id
purchaseOrderIdstringpurchase_order_id

Empty to match without an order.

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/SendCreditRequest

SendCreditRequest emails the vendor what was billed beyond what was delivered at the ordered price, and asks for a credit note.

Request body

idstring
tostring

Defaults to the vendor's email.

messagestring

Added above the list of differences.

channelstring

email (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.

phonestring

For whatsapp; defaults to the vendor's phone.

languagestring

en (the default) or sw.

Response

textstring

The same request as plain text, for sending on WhatsApp.

whatsappSentbooleanwhatsapp_sent
whatsappUrlstringwhatsapp_url

Opens WhatsApp with the text written, when the server didn't send it.

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

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/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

idstring

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/VoidSupplierInvoice

Request body

idstring

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetInvoiceInbox

GetInvoiceInbox is the business's address for forwarding invoice emails, made on first ask.

Request body

No fields: send {}.

Response

addressstring

Empty when the server has no inbound mail domain set up.

Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetInvoiceInbox \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "address": ""
}

GetPrepSheet#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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_id
daystring

YYYY-MM-DD; empty for today at the location.

stationIdstringstation_id

Only this station's tasks and those for any station; empty for all.

refreshboolean

Work the sheet out again from the latest forecast and stock. Tasks already done or skipped stay as they are.

Response

Request
curl 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"
}'
Response example
{
  "sheet": {
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "day": "",
    "builtAt": "",
    "hasForecast": false
  }
}

UpdatePrepTask#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/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

idstring
actionstring

done: made (or, for a leftover, thrown away). skip: not made (or kept).

quantityint64 string

For done: how much was made or thrown away, in stock units; 0 for the task's quantity.

Response

Request
curl 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
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/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_id
textstring

What was said: "unga mifuko mitatu, sukari kilo tano na nusu".

attachmentIdstringattachment_id

A photo of the shelf, from expenses' UploadAttachment.

Response

unmatchedstring[]

What was heard or seen that isn't on this count.

Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SuggestCounts \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "suggestions": [
    {
      "variantId": "",
      "itemName": "Amina Mushi",
      "heard": "",
      "amount": "",
      "counted": 1,
      "expected": "0",
      "confidence": "",
      "problem": ""
    }
  ],
  "unmatched": [
    ""
  ]
}

ReadStockWords#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/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

purposestring

receive: 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_id
purchaseOrderIdstringpurchase_order_id
textstring
attachmentIdstringattachment_id

From expenses' UploadAttachment.

Response

unmatchedstring[]

What was heard or seen that isn't on the order or in stock.

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

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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

Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListVendorTerms \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "terms": [
    {
      "vendorId": "",
      "vendorName": "Amina Mushi",
      "minOrder": "0",
      "leadTimeDays": 0
    }
  ]
}

SaveVendorTerms#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/SaveVendorTerms

Request body

Response

Request
curl 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"
  }
}'
Response example
{
  "terms": {
    "vendorId": "",
    "vendorName": "Amina Mushi",
    "minOrder": "0",
    "leadTimeDays": 0
  }
}

GetFoodCostBridge#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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_id
fromstring

YYYY-MM-DD, local, both included. Empty for the last 28 days. It is compared with the same number of days before it.

tostring

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetMenuEngineering

GetMenuEngineering places each menu item by popularity and margin and drafts price and placement changes (ADR 73).

Request body

locationIdstringlocation_id
fromstring
tostring

Response

fromstring
tostring
popularBpintegerpopular_bp

The 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_margin
suggestionsMenuSuggestion[]
Request
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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/ActOnMenuSuggestion

ActOnMenuSuggestion applies (a price change is made in the catalog), dismisses or undoes a menu suggestion.

Request body

idstring
actionstring

apply, dismiss or undo.

Response

suggestionMenuSuggestion
Request
curl 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"
}'
Response example
{
  "suggestion": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "variantId": "",
    "name": "Amina Mushi",
    "kind": "",
    "class": "",
    "title": "",
    "detail": "",
    "basis": "",
    "oldPrice": "150000",
    "newPrice": "150000",
    "amount": "150000",
    "status": ""
  }
}

SuggestReorder#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/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_id

Response

Request
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"
}'
Response example
{
  "suggestions": [
    {
      "quantity": 1,
      "dailySales": 0,
      "daysLeft": 0,
      "reason": ""
    }
  ]
}

ListStorageAreas#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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_id

Empty for every location the person can see.

includeArchivedbooleaninclude_archived

Response

The sales floor first in each location, then by sort order and name.

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

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/SaveStorageArea

SaveStorageArea adds an area or renames one.

Request body

idstring

Client-chosen for a new area.

locationIdstringlocation_id

Fixed once the area exists.

namestring
notestring
sortOrderintegersort_order

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/ArchiveStorageArea

ArchiveStorageArea hides an empty area, or brings one back.

Request body

idstring
archivedboolean

False brings it back.

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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_id

Transfers from or to this location; empty for every location.

Unspecified lists every status.

pageSizeintegerpage_size
pageTokenstringpage_token

Response

nextPageTokenstringnext_page_token
Request
curl 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
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetStockTransfer

Request body

idstring

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/CreateStockTransfer

Request body

idstring

Client-chosen, so a retry creates one transfer.

fromAreaIdstringfrom_area_id
toAreaIdstringto_area_id
notestring
completeboolean

Move the stock now, rather than leaving it requested.

allowBelowZerobooleanallow_below_zero

Response

Request
curl 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
    }
  ]
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/CompleteStockTransfer

CompleteTransfer moves the stock, as requested or as actually sent.

Request body

idstring

What was actually sent, by variant; leave out to send what was asked. A line sent as 0 moves nothing.

allowBelowZerobooleanallow_below_zero

Response

Request
curl 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
    }
  ]
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/CancelStockTransfer

Request body

idstring

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/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_id

Response

The sales floor's first.

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

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/ListMovements

ListMovements is the stock ledger: every movement at a location, newest first, with what caused it and who.

Request body

locationIdstringlocation_id
areaIdstringarea_id

Optional filters.

variantIdstringvariant_id
fromstring

YYYY-MM-DD in the location's time zone, both included.

tostring
querystring

Matches item name, variant name, SKU or reference.

pageSizeintegerpage_size
pageTokenstringpage_token

Response

nextPageTokenstringnext_page_token
Request
curl 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
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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_id

Costs are worked out at this location; empty for the first one.

Response

recipesRecipe[]

With their lines.

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

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetRecipe

Request body

variantIdstringvariant_id

One of the two.

modifierIdstringmodifier_id
locationIdstringlocation_id
versionIdstringversion_id

A version to show; empty for the open draft, else the one live at the location.

Response

recipeRecipe

Without an id when there is no recipe yet.

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

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/SaveRecipe

SaveRecipe saves a draft version of a recipe, creating the recipe the first time, and publishes it when asked (ADR 44).

Request body

recipeRecipe

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

For the costs in the answer.

publishboolean

Publish it too (or send it for approval).

effectiveFromstringeffective_from

When it takes effect if published: RFC 3339, empty for now.

Response

recipeRecipe
Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/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_id
effectiveFromstringeffective_from

RFC 3339, empty for now. Not before now.

locationIdstringlocation_id

Response

recipeRecipe
Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/SendBackRecipeVersion

SendBackRecipeVersion returns a version waiting for approval to draft.

Request body

versionIdstringversion_id
notestring
locationIdstringlocation_id

Response

recipeRecipe
Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/DiscardRecipeDraft

Request body

versionIdstringversion_id

Response

No fields: send {}.

Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/DiscardRecipeDraft \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{}

DeleteRecipe#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/DeleteRecipe

DeleteRecipe retires a recipe's live versions; its history stays.

Request body

idstring

Response

No fields: send {}.

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

ListRecipeUses#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/ListRecipeUses

ListRecipeUses says which recipe versions a sale or batch used.

Request body

sourcestring

"order", "invoice" or "production", and its id.

sourceIdstringsource_id

Response

Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListRecipeUses \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "uses": [
    {
      "lineRef": "",
      "versionId": "",
      "versionNumber": 0,
      "recipeId": "",
      "name": "Amina Mushi",
      "variantId": "",
      "modifierId": ""
    }
  ]
}

ResolveSaleLine#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/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_id

Empty for the first location the caller can see.

variantIdstringvariant_id
modifierIdsstring[]modifier_ids

In the order chosen.

quantityint64 string

Pieces; 0 is 1.

draftVersionIdstringdraft_version_id

A 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

namestring
priceint64 string

Item price plus modifiers, times quantity, before tax and discounts.

costint64 string
baseCostint64 stringbase_cost

What the item alone would cost.

marginint64 string
costBpintegercost_bp

Cost as a share of price, in basis points.

costMissingbooleancost_missing
notesstring[]

Plain sentences about what could not apply: "No onions: onions aren't in Chicken burger's recipe."

noEffectstring[]no_effect

Modifiers chosen that have no stock effect.

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

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetIngredient

Ingredients: details and unit conversions ("1 bag = 25 kg").

Request body

variantIdstringvariant_id

Response

ingredientIngredient
Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetIngredient \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/SaveIngredient

Request body

ingredientIngredient

Conversions replace the ingredient's.

Response

ingredientIngredient
Request
curl 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"
  }
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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_id

Stock and cost are read at this location; blank for the first one the caller can see.

querystring

Matches name, SKU, barcode or brand.

categoryIdstringcategory_id

Blank for every category; "none" for those with no category.

includeArchivedbooleaninclude_archived

Response

ingredientsIngredientRow[]
byCategorymap<string, integer>by_category

Live ingredients per category id ("" for none), before the category filter.

stockValueint64 stringstock_value

Value of every ingredient's stock on hand at the location.

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

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/ListIngredientCategories

Request body

No fields: send {}.

Response

Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListIngredientCategories \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "categories": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "name": "Amina Mushi",
      "sortOrder": 0,
      "archived": false,
      "ingredients": 0
    }
  ]
}

SaveIngredientCategory#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/SaveIngredientCategory

Request body

A new id (UUID) to add one.

Response

Request
curl 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"
  }
}'
Response example
{
  "category": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "name": "Amina Mushi",
    "sortOrder": 0,
    "archived": false,
    "ingredients": 0
  }
}

ListUnitConversions#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/ListUnitConversions

ListUnitConversions lists every ingredient's conversions, for typing amounts in any unit.

Request body

No fields: send {}.

Response

conversionsUnitConversion[]
Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListUnitConversions \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "conversions": [
    {
      "variantId": "",
      "unit": "",
      "amount": "",
      "equals": "",
      "entered": ""
    }
  ]
}

GetInventorySettings#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetInventorySettings

How stock behaves for the business.

Request body

No fields: send {}.

Response

Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/GetInventorySettings \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "settings": {
    "recipeApproval": false,
    "refundIngredients": "",
    "negativeStock": "",
    "wasteApprovalOver": "0",
    "stockTiming": ""
  }
}

SaveInventorySettings#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/SaveInventorySettings

Request body

Response

Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/SaveInventorySettings \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "settings": {
    "recipeApproval": false,
    "refundIngredients": "",
    "negativeStock": "",
    "wasteApprovalOver": "0",
    "stockTiming": ""
  }
}

LogWaste#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/LogWaste

Waste (ADR 44): what was thrown away and why. Above the business's limit it waits for someone with inventory.approve.

Request body

idstring

Client-chosen, so a retry logs once.

areaIdstringarea_id

Empty for the sales floor of location_id.

locationIdstringlocation_id
variantIdstringvariant_id
amountstring

How much, as typed: "2 bags", "1.5 kg", "3" (servings of a menu item).

responsibleIdstringresponsible_id
notestring
occurredAtstringoccurred_at

When it happened, RFC 3339; empty for now. Not in the future.

allowBelowZerobooleanallow_below_zero

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/ListSupplierPrices

What each supplier charged for an item over time (ADR 44).

Request body

variantIdstringvariant_id

Response

Newest first, at most 50.

Each supplier's latest price, cheapest first.

changeBpintegerchange_bp

The latest price against the one before it, in basis points (1000 = up 10%); 0 with fewer than two prices.

unitstring
Request
curl https://api.buziin.tech/holygrail.inventory.v1.InventoryService/ListSupplierPrices \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/ListStockLots

Lots with stock left, soonest expiry first: what to use first.

Request body

locationIdstringlocation_id
areaIdstringarea_id
variantIdstringvariant_id
expiringWithinDaysintegerexpiring_within_days

Only lots expiring within this many days (and expired ones); 0 for all.

Response

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

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/ListWaste

Request body

locationIdstringlocation_id
pendingOnlybooleanpending_only

Only those waiting for approval.

fromstring

RFC 3339; empty for the last 28 days.

tostring
pageSizeintegerpage_size

Response

valueByReasonmap<string, int64 string>value_by_reason

Recorded waste in the period, by reason, in minor units.

totalValueint64 stringtotal_value
pendinginteger
Request
curl 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
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/DecideWaste

Request body

idstring
approveboolean
notestring

Why it was turned down.

allowBelowZerobooleanallow_below_zero

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/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

idstring

Client-chosen, so a retry makes one batch.

areaIdstringarea_id
variantIdstringvariant_id
quantityint64 string

How much was made, in the variant's stock quantity.

notestring
allowBelowZerobooleanallow_below_zero

Response

What was made, then what it used.

valueint64 string

What the batch cost.

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

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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_id
areaIdstringarea_id

One area; empty for the whole location, where moves between its own areas cancel out.

fromstring

YYYY-MM-DD in the location's time zone, both included.

tostring
ingredientsOnlybooleaningredients_only

Only items whose item is an ingredient, or that recipes use.

Response

totalsUsageRow

Values only: quantities in different units do not add up.

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

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetItemCostReport

GetItemCostReport shows what each item sold, cost and earned.

Request body

locationIdstringlocation_id
fromstring
tostring

Response

Costliest first. Items with neither a recipe nor stock cost nothing here and are left out.

uncostedSalesint64 stringuncosted_sales

Net sales of items with no recipe and no stock, whose cost is unknown.

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

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetStockInsights

GetStockInsights finds what needs attention and forecasts usage. The assistant's ExplainStock puts it into words.

Request body

locationIdstringlocation_id

Response

Request
curl 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"
}'
Response example
{
  "insights": {
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "generatedAt": "",
    "stockValue": "0",
    "usageCost7d": "0",
    "usageCostPrev7d": "0",
    "wasteCost28d": "0",
    "varianceCost28d": "0",
    "costBp28d": 0
  }
}

GetStockForecast#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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_id
allboolean

Include items that need nothing ordered.

Response

What to order soonest first, then what runs out soonest.

orderTotalint64 stringorder_total

What the suggested orders cost together.

todaystring

The location's date the forecast starts from.

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

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetStockTrend

Day by day: what came in, was used, sold and wasted, at cost.

Request body

locationIdstringlocation_id
areaIdstringarea_id

One area; empty for the whole location.

fromstring

YYYY-MM-DD, both included; the last 28 days when empty.

tostring
variantIdstringvariant_id

One item; empty for all.

Response

Every day in the period, oldest first.

Request
curl 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"
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/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_id
viewstring

Empty for open ones; or dismissed, resolved, mine, all.

refreshboolean

Work them out again now, not only when stale.

Response

openinteger

Open findings, and those assigned to the caller.

mineinteger
refreshedAtstringrefreshed_at
Request
curl 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"
}'
Response example
{
  "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#

inventory.writeWrite
POST/holygrail.inventory.v1.InventoryService/ActOnStockFinding

Request body

idstring
actionstring

assign, unassign, dismiss, resolve, reopen, note.

userIdstringuser_id

assign: the person.

notestring
snoozeDaysintegersnooze_days

dismiss: days to keep it hidden if still true; 0 means 14.

Response

Request
curl 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"
}'
Response example
{
  "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#

inventory.readRead
POST/holygrail.inventory.v1.InventoryService/GetStockFinding

Request body

idstring

Response

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

Matches item name, variant name or SKU.

lowOnlybooleanlow_only
areaIdstringarea_id

One storage area; empty for the whole location, with each row's areas.

ListStockLevelsResponse

holygrail.inventory.v1.ListStockLevelsResponse

Every variant that tracks stock, including ones with no stock yet.

totalValueint64 stringtotal_value

ExportStockLevelsRequest

holygrail.inventory.v1.ExportStockLevelsRequest

locationIdstringlocation_id

ExportStockLevelsResponse

holygrail.inventory.v1.ExportStockLevelsResponse

cursorint64 string

GetStockHistoryRequest

holygrail.inventory.v1.GetStockHistoryRequest

locationIdstringlocation_id
variantIdstringvariant_id
pageSizeintegerpage_size
pageTokenstringpage_token
areaIdstringarea_id

One storage area; empty for every area at the location.

GetStockHistoryResponse

holygrail.inventory.v1.GetStockHistoryResponse

nextPageTokenstringnext_page_token

SetReorderPointRequest

holygrail.inventory.v1.SetReorderPointRequest

locationIdstringlocation_id
variantIdstringvariant_id
reorderPointint64 stringreorder_point
reorderQtyint64 stringreorder_qty
areaIdstringarea_id

The area whose level it is; empty for the sales floor.

SetReorderPointResponse

holygrail.inventory.v1.SetReorderPointResponse

AdjustStockRequest

holygrail.inventory.v1.AdjustStockRequest

idstring

Client-chosen UUID, so a retry adjusts once.

locationIdstringlocation_id
notestring
areaIdstringarea_id

The area adjusted; empty for the sales floor.

allowBelowZerobooleanallow_below_zero

Go ahead when the business warns about stock below zero.

AdjustStockResponse

holygrail.inventory.v1.AdjustStockResponse

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.

idstring
fromLocationIdstringfrom_location_id
toLocationIdstringto_location_id
notestring
fromAreaIdstringfrom_area_id
toAreaIdstringto_area_id
allowBelowZerobooleanallow_below_zero

TransferStockResponse

holygrail.inventory.v1.TransferStockResponse

ListStockCountsRequest

holygrail.inventory.v1.ListStockCountsRequest

locationIdstringlocation_id

ListStockCountsResponse

holygrail.inventory.v1.ListStockCountsResponse

Without lines.

GetStockCountRequest

holygrail.inventory.v1.GetStockCountRequest

idstring

GetStockCountResponse

holygrail.inventory.v1.GetStockCountResponse

StartStockCountRequest

holygrail.inventory.v1.StartStockCountRequest

idstring
locationIdstringlocation_id
namestring
categoryIdstringcategory_id

Optional: count only this category.

areaIdstringarea_id

The area counted; empty for the sales floor.

StartStockCountResponse

holygrail.inventory.v1.StartStockCountResponse

RecordCountsRequest

holygrail.inventory.v1.RecordCountsRequest

countIdstringcount_id

RecordCountsResponse

holygrail.inventory.v1.RecordCountsResponse

FinishStockCountRequest

holygrail.inventory.v1.FinishStockCountRequest

idstring

FinishStockCountResponse

holygrail.inventory.v1.FinishStockCountResponse

CancelStockCountRequest

holygrail.inventory.v1.CancelStockCountRequest

idstring

CancelStockCountResponse

holygrail.inventory.v1.CancelStockCountResponse

ListPurchaseOrdersRequest

holygrail.inventory.v1.ListPurchaseOrdersRequest

Unspecified lists all but cancelled ones.

vendorIdstringvendor_id
locationIdstringlocation_id
owingOnlybooleanowing_only

Only ones with a balance owed.

pageSizeintegerpage_size
pageTokenstringpage_token

ListPurchaseOrdersResponse

holygrail.inventory.v1.ListPurchaseOrdersResponse

purchaseOrdersPurchaseOrder[]purchase_orders

Without lines, receipts or payments.

nextPageTokenstringnext_page_token

GetPurchaseOrderRequest

holygrail.inventory.v1.GetPurchaseOrderRequest

idstring

GetPurchaseOrderResponse

holygrail.inventory.v1.GetPurchaseOrderResponse

purchaseOrderPurchaseOrderpurchase_order

CreatePurchaseOrderRequest

holygrail.inventory.v1.CreatePurchaseOrderRequest

idstring

CreatePurchaseOrderResponse

holygrail.inventory.v1.CreatePurchaseOrderResponse

purchaseOrderPurchaseOrderpurchase_order

UpdatePurchaseOrderRequest

holygrail.inventory.v1.UpdatePurchaseOrderRequest

idstring

UpdatePurchaseOrderResponse

holygrail.inventory.v1.UpdatePurchaseOrderResponse

purchaseOrderPurchaseOrderpurchase_order

MarkOrderedRequest

holygrail.inventory.v1.MarkOrderedRequest

idstring

MarkOrderedResponse

holygrail.inventory.v1.MarkOrderedResponse

purchaseOrderPurchaseOrderpurchase_order

SendPurchaseOrderRequest

holygrail.inventory.v1.SendPurchaseOrderRequest

idstring
emailstring

Defaults to the vendor's email.

channelstring

email (the default) or whatsapp (ADR 78).

phonestring

For whatsapp; defaults to the vendor's phone.

languagestring

en (the default) or sw: the language the vendor reads it in.

SendPurchaseOrderResponse

holygrail.inventory.v1.SendPurchaseOrderResponse

purchaseOrderPurchaseOrderpurchase_order
whatsappSentbooleanwhatsapp_sent

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

ReceivePurchaseOrderRequest

holygrail.inventory.v1.ReceivePurchaseOrderRequest

idstring

Client-chosen receipt id, so a retry receives once.

purchaseOrderIdstringpurchase_order_id
notestring
receivedAtstringreceived_at

RFC 3339; defaults to now.

ReceivePurchaseOrderResponse

holygrail.inventory.v1.ReceivePurchaseOrderResponse

purchaseOrderPurchaseOrderpurchase_order

ClosePurchaseOrderRequest

holygrail.inventory.v1.ClosePurchaseOrderRequest

idstring

ClosePurchaseOrderResponse

holygrail.inventory.v1.ClosePurchaseOrderResponse

purchaseOrderPurchaseOrderpurchase_order

CancelPurchaseOrderRequest

holygrail.inventory.v1.CancelPurchaseOrderRequest

idstring

CancelPurchaseOrderResponse

holygrail.inventory.v1.CancelPurchaseOrderResponse

purchaseOrderPurchaseOrderpurchase_order

RecordVendorPaymentRequest

holygrail.inventory.v1.RecordVendorPaymentRequest

idstring
purchaseOrderIdstringpurchase_order_id
cashAccountIdstringcash_account_id
amountint64 string
paidAtstringpaid_at

RFC 3339; defaults to now.

referencestring

RecordVendorPaymentResponse

holygrail.inventory.v1.RecordVendorPaymentResponse

purchaseOrderPurchaseOrderpurchase_order

VoidVendorPaymentRequest

holygrail.inventory.v1.VoidVendorPaymentRequest

purchaseOrderIdstringpurchase_order_id
paymentIdstringpayment_id

VoidVendorPaymentResponse

holygrail.inventory.v1.VoidVendorPaymentResponse

purchaseOrderPurchaseOrderpurchase_order

ListSupplierInvoicesRequest

holygrail.inventory.v1.ListSupplierInvoicesRequest

locationIdstringlocation_id

Empty for every location the caller can see.

statusesstring[]

Empty for every status.

limitinteger

At most 200; 50 when unset.

ListSupplierInvoicesResponse

holygrail.inventory.v1.ListSupplierInvoicesResponse

GetSupplierInvoiceRequest

holygrail.inventory.v1.GetSupplierInvoiceRequest

idstring

GetSupplierInvoiceResponse

holygrail.inventory.v1.GetSupplierInvoiceResponse

CaptureSupplierInvoiceRequest

holygrail.inventory.v1.CaptureSupplierInvoiceRequest

idstring

Client-made, so a retry captures once.

attachmentIdstringattachment_id
locationIdstringlocation_id
vendorIdstringvendor_id

Optional: when the person already knows.

purchaseOrderIdstringpurchase_order_id
sourcestring

upload or photo.

CaptureSupplierInvoiceResponse

holygrail.inventory.v1.CaptureSupplierInvoiceResponse

MatchSupplierInvoiceRequest

holygrail.inventory.v1.MatchSupplierInvoiceRequest

idstring
vendorIdstringvendor_id
purchaseOrderIdstringpurchase_order_id

Empty to match without an order.

MatchSupplierInvoiceResponse

holygrail.inventory.v1.MatchSupplierInvoiceResponse

SendCreditRequestRequest

holygrail.inventory.v1.SendCreditRequestRequest

idstring
tostring

Defaults to the vendor's email.

messagestring

Added above the list of differences.

channelstring

email (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.

phonestring

For whatsapp; defaults to the vendor's phone.

languagestring

en (the default) or sw.

SendCreditRequestResponse

holygrail.inventory.v1.SendCreditRequestResponse

textstring

The same request as plain text, for sending on WhatsApp.

whatsappSentbooleanwhatsapp_sent
whatsappUrlstringwhatsapp_url

Opens WhatsApp with the text written, when the server didn't send it.

PostSupplierInvoiceRequest

holygrail.inventory.v1.PostSupplierInvoiceRequest

idstring

PostSupplierInvoiceResponse

holygrail.inventory.v1.PostSupplierInvoiceResponse

VoidSupplierInvoiceRequest

holygrail.inventory.v1.VoidSupplierInvoiceRequest

idstring

VoidSupplierInvoiceResponse

holygrail.inventory.v1.VoidSupplierInvoiceResponse

GetInvoiceInboxRequest

holygrail.inventory.v1.GetInvoiceInboxRequest

No fields.

GetInvoiceInboxResponse

holygrail.inventory.v1.GetInvoiceInboxResponse

addressstring

Empty when the server has no inbound mail domain set up.

GetPrepSheetRequest

holygrail.inventory.v1.GetPrepSheetRequest

locationIdstringlocation_id
daystring

YYYY-MM-DD; empty for today at the location.

stationIdstringstation_id

Only this station's tasks and those for any station; empty for all.

refreshboolean

Work the sheet out again from the latest forecast and stock. Tasks already done or skipped stay as they are.

GetPrepSheetResponse

holygrail.inventory.v1.GetPrepSheetResponse

UpdatePrepTaskRequest

holygrail.inventory.v1.UpdatePrepTaskRequest

idstring
actionstring

done: made (or, for a leftover, thrown away). skip: not made (or kept).

quantityint64 string

For done: how much was made or thrown away, in stock units; 0 for the task's quantity.

UpdatePrepTaskResponse

holygrail.inventory.v1.UpdatePrepTaskResponse

SuggestCountsRequest

holygrail.inventory.v1.SuggestCountsRequest

countIdstringcount_id
textstring

What was said: "unga mifuko mitatu, sukari kilo tano na nusu".

attachmentIdstringattachment_id

A photo of the shelf, from expenses' UploadAttachment.

SuggestCountsResponse

holygrail.inventory.v1.SuggestCountsResponse

unmatchedstring[]

What was heard or seen that isn't on this count.

ReadStockWordsRequest

holygrail.inventory.v1.ReadStockWordsRequest

purposestring

receive: 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_id
purchaseOrderIdstringpurchase_order_id
textstring
attachmentIdstringattachment_id

From expenses' UploadAttachment.

ReadStockWordsResponse

holygrail.inventory.v1.ReadStockWordsResponse

unmatchedstring[]

What was heard or seen that isn't on the order or in stock.

ListVendorTermsRequest

holygrail.inventory.v1.ListVendorTermsRequest

No fields.

ListVendorTermsResponse

holygrail.inventory.v1.ListVendorTermsResponse

SaveVendorTermsRequest

holygrail.inventory.v1.SaveVendorTermsRequest

SaveVendorTermsResponse

holygrail.inventory.v1.SaveVendorTermsResponse

GetFoodCostBridgeRequest

holygrail.inventory.v1.GetFoodCostBridgeRequest

locationIdstringlocation_id
fromstring

YYYY-MM-DD, local, both included. Empty for the last 28 days. It is compared with the same number of days before it.

tostring

GetFoodCostBridgeResponse

holygrail.inventory.v1.GetFoodCostBridgeResponse

GetMenuEngineeringRequest

holygrail.inventory.v1.GetMenuEngineeringRequest

locationIdstringlocation_id
fromstring
tostring

GetMenuEngineeringResponse

holygrail.inventory.v1.GetMenuEngineeringResponse

fromstring
tostring
popularBpintegerpopular_bp

The 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_margin
suggestionsMenuSuggestion[]

ActOnMenuSuggestionRequest

holygrail.inventory.v1.ActOnMenuSuggestionRequest

idstring
actionstring

apply, dismiss or undo.

ActOnMenuSuggestionResponse

holygrail.inventory.v1.ActOnMenuSuggestionResponse

suggestionMenuSuggestion

SuggestReorderRequest

holygrail.inventory.v1.SuggestReorderRequest

locationIdstringlocation_id

SuggestReorderResponse

holygrail.inventory.v1.SuggestReorderResponse

ListStorageAreasRequest

holygrail.inventory.v1.ListStorageAreasRequest

locationIdstringlocation_id

Empty for every location the person can see.

includeArchivedbooleaninclude_archived

ListStorageAreasResponse

holygrail.inventory.v1.ListStorageAreasResponse

The sales floor first in each location, then by sort order and name.

SaveStorageAreaRequest

holygrail.inventory.v1.SaveStorageAreaRequest

idstring

Client-chosen for a new area.

locationIdstringlocation_id

Fixed once the area exists.

namestring
notestring
sortOrderintegersort_order

SaveStorageAreaResponse

holygrail.inventory.v1.SaveStorageAreaResponse

ArchiveStorageAreaRequest

holygrail.inventory.v1.ArchiveStorageAreaRequest

idstring
archivedboolean

False brings it back.

ArchiveStorageAreaResponse

holygrail.inventory.v1.ArchiveStorageAreaResponse

ListStockTransfersRequest

holygrail.inventory.v1.ListStockTransfersRequest

locationIdstringlocation_id

Transfers from or to this location; empty for every location.

Unspecified lists every status.

pageSizeintegerpage_size
pageTokenstringpage_token

ListStockTransfersResponse

holygrail.inventory.v1.ListStockTransfersResponse

nextPageTokenstringnext_page_token

GetStockTransferRequest

holygrail.inventory.v1.GetStockTransferRequest

idstring

GetStockTransferResponse

holygrail.inventory.v1.GetStockTransferResponse

CreateStockTransferRequest

holygrail.inventory.v1.CreateStockTransferRequest

idstring

Client-chosen, so a retry creates one transfer.

fromAreaIdstringfrom_area_id
toAreaIdstringto_area_id
notestring
completeboolean

Move the stock now, rather than leaving it requested.

allowBelowZerobooleanallow_below_zero

CreateStockTransferResponse

holygrail.inventory.v1.CreateStockTransferResponse

CompleteStockTransferRequest

holygrail.inventory.v1.CompleteStockTransferRequest

idstring

What was actually sent, by variant; leave out to send what was asked. A line sent as 0 moves nothing.

allowBelowZerobooleanallow_below_zero

CompleteStockTransferResponse

holygrail.inventory.v1.CompleteStockTransferResponse

CancelStockTransferRequest

holygrail.inventory.v1.CancelStockTransferRequest

idstring

CancelStockTransferResponse

holygrail.inventory.v1.CancelStockTransferResponse

SuggestRestockRequest

holygrail.inventory.v1.SuggestRestockRequest

locationIdstringlocation_id

SuggestRestockResponse

holygrail.inventory.v1.SuggestRestockResponse

The sales floor's first.

ListMovementsRequest

holygrail.inventory.v1.ListMovementsRequest

locationIdstringlocation_id
areaIdstringarea_id

Optional filters.

variantIdstringvariant_id
fromstring

YYYY-MM-DD in the location's time zone, both included.

tostring
querystring

Matches item name, variant name, SKU or reference.

pageSizeintegerpage_size
pageTokenstringpage_token

ListMovementsResponse

holygrail.inventory.v1.ListMovementsResponse

nextPageTokenstringnext_page_token

ListRecipesRequest

holygrail.inventory.v1.ListRecipesRequest

locationIdstringlocation_id

Costs are worked out at this location; empty for the first one.

ListRecipesResponse

holygrail.inventory.v1.ListRecipesResponse

recipesRecipe[]

With their lines.

GetRecipeRequest

holygrail.inventory.v1.GetRecipeRequest

variantIdstringvariant_id

One of the two.

modifierIdstringmodifier_id
locationIdstringlocation_id
versionIdstringversion_id

A version to show; empty for the open draft, else the one live at the location.

GetRecipeResponse

holygrail.inventory.v1.GetRecipeResponse

recipeRecipe

Without an id when there is no recipe yet.

SaveRecipeRequest

holygrail.inventory.v1.SaveRecipeRequest

recipeRecipe

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

For the costs in the answer.

publishboolean

Publish it too (or send it for approval).

effectiveFromstringeffective_from

When it takes effect if published: RFC 3339, empty for now.

SaveRecipeResponse

holygrail.inventory.v1.SaveRecipeResponse

recipeRecipe

PublishRecipeVersionRequest

holygrail.inventory.v1.PublishRecipeVersionRequest

versionIdstringversion_id
effectiveFromstringeffective_from

RFC 3339, empty for now. Not before now.

locationIdstringlocation_id

PublishRecipeVersionResponse

holygrail.inventory.v1.PublishRecipeVersionResponse

recipeRecipe

SendBackRecipeVersionRequest

holygrail.inventory.v1.SendBackRecipeVersionRequest

versionIdstringversion_id
notestring
locationIdstringlocation_id

SendBackRecipeVersionResponse

holygrail.inventory.v1.SendBackRecipeVersionResponse

recipeRecipe

DiscardRecipeDraftRequest

holygrail.inventory.v1.DiscardRecipeDraftRequest

versionIdstringversion_id

DiscardRecipeDraftResponse

holygrail.inventory.v1.DiscardRecipeDraftResponse

No fields.

DeleteRecipeRequest

holygrail.inventory.v1.DeleteRecipeRequest

idstring

DeleteRecipeResponse

holygrail.inventory.v1.DeleteRecipeResponse

No fields.

ListRecipeUsesRequest

holygrail.inventory.v1.ListRecipeUsesRequest

sourcestring

"order", "invoice" or "production", and its id.

sourceIdstringsource_id

ListRecipeUsesResponse

holygrail.inventory.v1.ListRecipeUsesResponse

ResolveSaleLineRequest

holygrail.inventory.v1.ResolveSaleLineRequest

locationIdstringlocation_id

Empty for the first location the caller can see.

variantIdstringvariant_id
modifierIdsstring[]modifier_ids

In the order chosen.

quantityint64 string

Pieces; 0 is 1.

draftVersionIdstringdraft_version_id

A 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

namestring
priceint64 string

Item price plus modifiers, times quantity, before tax and discounts.

costint64 string
baseCostint64 stringbase_cost

What the item alone would cost.

marginint64 string
costBpintegercost_bp

Cost as a share of price, in basis points.

costMissingbooleancost_missing
notesstring[]

Plain sentences about what could not apply: "No onions: onions aren't in Chicken burger's recipe."

noEffectstring[]no_effect

Modifiers chosen that have no stock effect.

GetIngredientRequest

holygrail.inventory.v1.GetIngredientRequest

variantIdstringvariant_id

GetIngredientResponse

holygrail.inventory.v1.GetIngredientResponse

ingredientIngredient

SaveIngredientRequest

holygrail.inventory.v1.SaveIngredientRequest

ingredientIngredient

Conversions replace the ingredient's.

SaveIngredientResponse

holygrail.inventory.v1.SaveIngredientResponse

ingredientIngredient

ListIngredientsRequest

holygrail.inventory.v1.ListIngredientsRequest

locationIdstringlocation_id

Stock and cost are read at this location; blank for the first one the caller can see.

querystring

Matches name, SKU, barcode or brand.

categoryIdstringcategory_id

Blank for every category; "none" for those with no category.

includeArchivedbooleaninclude_archived

ListIngredientsResponse

holygrail.inventory.v1.ListIngredientsResponse

ingredientsIngredientRow[]
byCategorymap<string, integer>by_category

Live ingredients per category id ("" for none), before the category filter.

stockValueint64 stringstock_value

Value of every ingredient's stock on hand at the location.

ListIngredientCategoriesRequest

holygrail.inventory.v1.ListIngredientCategoriesRequest

No fields.

ListIngredientCategoriesResponse

holygrail.inventory.v1.ListIngredientCategoriesResponse

SaveIngredientCategoryRequest

holygrail.inventory.v1.SaveIngredientCategoryRequest

A new id (UUID) to add one.

SaveIngredientCategoryResponse

holygrail.inventory.v1.SaveIngredientCategoryResponse

ListUnitConversionsRequest

holygrail.inventory.v1.ListUnitConversionsRequest

No fields.

ListUnitConversionsResponse

holygrail.inventory.v1.ListUnitConversionsResponse

conversionsUnitConversion[]

GetInventorySettingsRequest

holygrail.inventory.v1.GetInventorySettingsRequest

No fields.

GetInventorySettingsResponse

holygrail.inventory.v1.GetInventorySettingsResponse

SaveInventorySettingsRequest

holygrail.inventory.v1.SaveInventorySettingsRequest

SaveInventorySettingsResponse

holygrail.inventory.v1.SaveInventorySettingsResponse

LogWasteRequest

holygrail.inventory.v1.LogWasteRequest

idstring

Client-chosen, so a retry logs once.

areaIdstringarea_id

Empty for the sales floor of location_id.

locationIdstringlocation_id
variantIdstringvariant_id
amountstring

How much, as typed: "2 bags", "1.5 kg", "3" (servings of a menu item).

responsibleIdstringresponsible_id
notestring
occurredAtstringoccurred_at

When it happened, RFC 3339; empty for now. Not in the future.

allowBelowZerobooleanallow_below_zero

LogWasteResponse

holygrail.inventory.v1.LogWasteResponse

ListSupplierPricesRequest

holygrail.inventory.v1.ListSupplierPricesRequest

variantIdstringvariant_id

ListSupplierPricesResponse

holygrail.inventory.v1.ListSupplierPricesResponse

Newest first, at most 50.

Each supplier's latest price, cheapest first.

changeBpintegerchange_bp

The latest price against the one before it, in basis points (1000 = up 10%); 0 with fewer than two prices.

unitstring

ListStockLotsRequest

holygrail.inventory.v1.ListStockLotsRequest

locationIdstringlocation_id
areaIdstringarea_id
variantIdstringvariant_id
expiringWithinDaysintegerexpiring_within_days

Only lots expiring within this many days (and expired ones); 0 for all.

ListStockLotsResponse

holygrail.inventory.v1.ListStockLotsResponse

ListWasteRequest

holygrail.inventory.v1.ListWasteRequest

locationIdstringlocation_id
pendingOnlybooleanpending_only

Only those waiting for approval.

fromstring

RFC 3339; empty for the last 28 days.

tostring
pageSizeintegerpage_size

ListWasteResponse

holygrail.inventory.v1.ListWasteResponse

valueByReasonmap<string, int64 string>value_by_reason

Recorded waste in the period, by reason, in minor units.

totalValueint64 stringtotal_value
pendinginteger

DecideWasteRequest

holygrail.inventory.v1.DecideWasteRequest

idstring
approveboolean
notestring

Why it was turned down.

allowBelowZerobooleanallow_below_zero

DecideWasteResponse

holygrail.inventory.v1.DecideWasteResponse

ProduceStockRequest

holygrail.inventory.v1.ProduceStockRequest

idstring

Client-chosen, so a retry makes one batch.

areaIdstringarea_id
variantIdstringvariant_id
quantityint64 string

How much was made, in the variant's stock quantity.

notestring
allowBelowZerobooleanallow_below_zero

ProduceStockResponse

holygrail.inventory.v1.ProduceStockResponse

What was made, then what it used.

valueint64 string

What the batch cost.

GetUsageReportRequest

holygrail.inventory.v1.GetUsageReportRequest

locationIdstringlocation_id
areaIdstringarea_id

One area; empty for the whole location, where moves between its own areas cancel out.

fromstring

YYYY-MM-DD in the location's time zone, both included.

tostring
ingredientsOnlybooleaningredients_only

Only items whose item is an ingredient, or that recipes use.

GetUsageReportResponse

holygrail.inventory.v1.GetUsageReportResponse

totalsUsageRow

Values only: quantities in different units do not add up.

GetItemCostReportRequest

holygrail.inventory.v1.GetItemCostReportRequest

locationIdstringlocation_id
fromstring
tostring

GetItemCostReportResponse

holygrail.inventory.v1.GetItemCostReportResponse

Costliest first. Items with neither a recipe nor stock cost nothing here and are left out.

uncostedSalesint64 stringuncosted_sales

Net sales of items with no recipe and no stock, whose cost is unknown.

GetStockInsightsRequest

holygrail.inventory.v1.GetStockInsightsRequest

locationIdstringlocation_id

GetStockInsightsResponse

holygrail.inventory.v1.GetStockInsightsResponse

GetStockForecastRequest

holygrail.inventory.v1.GetStockForecastRequest

locationIdstringlocation_id
allboolean

Include items that need nothing ordered.

GetStockForecastResponse

holygrail.inventory.v1.GetStockForecastResponse

What to order soonest first, then what runs out soonest.

orderTotalint64 stringorder_total

What the suggested orders cost together.

todaystring

The location's date the forecast starts from.

GetStockTrendRequest

holygrail.inventory.v1.GetStockTrendRequest

locationIdstringlocation_id
areaIdstringarea_id

One area; empty for the whole location.

fromstring

YYYY-MM-DD, both included; the last 28 days when empty.

tostring
variantIdstringvariant_id

One item; empty for all.

GetStockTrendResponse

holygrail.inventory.v1.GetStockTrendResponse

Every day in the period, oldest first.

ListStockFindingsRequest

holygrail.inventory.v1.ListStockFindingsRequest

locationIdstringlocation_id
viewstring

Empty for open ones; or dismissed, resolved, mine, all.

refreshboolean

Work them out again now, not only when stale.

ListStockFindingsResponse

holygrail.inventory.v1.ListStockFindingsResponse

openinteger

Open findings, and those assigned to the caller.

mineinteger
refreshedAtstringrefreshed_at

ActOnStockFindingRequest

holygrail.inventory.v1.ActOnStockFindingRequest

idstring
actionstring

assign, unassign, dismiss, resolve, reopen, note.

userIdstringuser_id

assign: the person.

notestring
snoozeDaysintegersnooze_days

dismiss: days to keep it hidden if still true; 0 means 14.

ActOnStockFindingResponse

holygrail.inventory.v1.ActOnStockFindingResponse

GetStockFindingRequest

holygrail.inventory.v1.GetStockFindingRequest

idstring

GetStockFindingResponse

holygrail.inventory.v1.GetStockFindingResponse

StockRow

holygrail.inventory.v1.StockRow

StockRow is a stock level with what the dashboard shows beside it.

itemNamestringitem_name
variantNamestringvariant_name
skustring
valueint64 string

What the stock on hand cost (moving average), in minor units.

averageCostint64 stringaverage_cost

value / on_hand, or the last unit cost when none is on hand.

lastCostint64 stringlast_cost
reorderQtyint64 stringreorder_qty
priceint64 string
unitstring

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

For a whole location: its stock in each area. level then holds the location's total.

ingredientboolean

Its item is an ingredient: used by recipes, never sold at the register.

hasRecipebooleanhas_recipe

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

idstring
locationIdstringlocation_id
variantIdstringvariant_id
onHandint64 stringon_hand

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

reorderPointint64 stringreorder_point
areaIdstringarea_id

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

StockMovement

holygrail.inventory.v1.StockMovement

idstring
quantityint64 string

Positive for stock in, negative for stock out.

valueint64 string
onHandAfterint64 stringon_hand_after
sourcestring

What caused it: "order", "invoice", "po_receipt", "adjustment", "count".

sourceIdstringsource_id
referencestring

A person-readable reference: the receipt or document number.

reasonstring
occurredAtstringoccurred_at
areaIdstringarea_id
areaNamestringarea_name
variantIdstringvariant_id
itemNamestringitem_name
variantNamestringvariant_name
skustring
unitstring
unitPrecisionintegerunit_precision
locationIdstringlocation_id
byNamestringby_name

Who recorded it, when a person did.

forVariantIdstringfor_variant_id

Usage only: the item whose recipe used it.

forItemNamestringfor_item_name

AdjustLine

holygrail.inventory.v1.AdjustLine

variantIdstringvariant_id
quantityint64 string

Positive adds stock, negative removes it.

unitCostint64 stringunit_cost

Required for opening stock; other stock in uses the average cost.

TransferLine

holygrail.inventory.v1.TransferLine

variantIdstringvariant_id
quantityint64 string

StockTransfer

holygrail.inventory.v1.StockTransfer

idstring
numberstring

TR-0001, numbered per business.

fromLocationIdstringfrom_location_id
fromLocationNamestringfrom_location_name
fromAreaIdstringfrom_area_id
fromAreaNamestringfrom_area_name
toLocationIdstringto_location_id
toLocationNamestringto_location_name
toAreaIdstringto_area_id
toAreaNamestringto_area_name
notestring
requestedByNamestringrequested_by_name
requestedAtstringrequested_at
closedByNamestringclosed_by_name

Completed or cancelled: by whom and when.

closedAtstringclosed_at
valueint64 string

What the stock moved was worth, at average cost.

lineCountintegerline_count

Without lines in lists.

StockCount

holygrail.inventory.v1.StockCount

idstring
locationIdstringlocation_id
namestring
notestring
createdAtstringcreated_at
finishedAtstringfinished_at
countedLinesintegercounted_lines
valueChangeint64 stringvalue_change

Finished counts: the value of the stock found over and short.

areaIdstringarea_id
areaNamestringarea_name

CountEntry

holygrail.inventory.v1.CountEntry

variantIdstringvariant_id
countedint64 stringoptional

Unset clears the count.

PurchaseOrder

holygrail.inventory.v1.PurchaseOrder

idstring
numberstring
vendorIdstringvendor_id
vendorNamestringvendor_name
locationIdstringlocation_id
expectedDatestringexpected_date

YYYY-MM-DD, or empty.

notestring
totalint64 string
receivedValueint64 stringreceived_value
amountPaidint64 stringamount_paid
balanceint64 string

received_value - amount_paid: what the business owes the vendor.

orderedAtstringordered_at
createdAtstringcreated_at
vendorEmailstringvendor_email
areaIdstringarea_id

Where deliveries go.

areaNamestringarea_name
sourcestring

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

editedboolean

A forecast draft someone has changed; later drafts leave it alone.

savingint64 string

What a forecast draft saves against buying everything from each item's usual supplier (ADR 71).

vendorPhonestringvendor_phone

PurchaseOrderDraft

holygrail.inventory.v1.PurchaseOrderDraft

vendorIdstringvendor_id
locationIdstringlocation_id
expectedDatestringexpected_date
notestring
areaIdstringarea_id

The storage area deliveries go into; empty for the sales floor.

ReceiveLine

holygrail.inventory.v1.ReceiveLine

lineIdstringline_id
quantityint64 string
unitCostint64 stringoptionalunit_cost

Optional: the cost on the delivery note, when it differs from the order.

amountstring

How much arrived, as typed ("3 bags"); overrides quantity when set.

lotCodestringlot_code

The lot's code and expiry date (2026-12-31), when the delivery has them.

expiresOnstringexpires_on

SupplierInvoice

holygrail.inventory.v1.SupplierInvoice

A vendor's invoice (ADR 68). Amounts are minor units of the business's currency.

idstring
locationIdstringlocation_id
vendorIdstringvendor_id

Empty when no vendor on file matched; vendor_name is then as printed.

vendorNamestringvendor_name
vendorEmailstringvendor_email
vendorPhonestringvendor_phone
purchaseOrderIdstringpurchase_order_id
purchaseOrderNumberstringpurchase_order_number
numberstring

The invoice number as printed.

invoiceDatestringinvoice_date

YYYY-MM-DD, or empty.

dueDatestringdue_date
subtotalint64 string

Net of tax, the VAT, and the total.

taxint64 string
totalint64 string
expectedint64 string

What the order and its receipts say should be billed, net of tax.

overbilledint64 string

What was billed beyond that.

statusstring

needs_review, matched, differences, posted or void.

problemstring

Why it needs a person, in words.

sourcestring

upload, photo or email.

attachmentIdstringattachment_id
sellerTinstringseller_tin

From a TRA EFD receipt or tax invoice.

sellerVrnstringseller_vrn
receiptNumberstringreceipt_number
creditRequestedAtstringcredit_requested_at

RFC 3339, or empty.

creditRequestTostringcredit_request_to
postedAtstringposted_at
createdAtstringcreated_at

PrepSheet

holygrail.inventory.v1.PrepSheet

locationIdstringlocation_id
daystring

YYYY-MM-DD, the location's business day.

builtAtstringbuilt_at

RFC 3339: when the sheet was last worked out.

hasForecastbooleanhas_forecast

False when there is no item forecast for the day yet, so nothing can be suggested to make.

PrepTask

holygrail.inventory.v1.PrepTask

idstring
kindstring

prep: make a batch. leftover: prepared food past its shelf life, to check and throw away.

variantIdstringvariant_id
itemNamestringitem_name
stationIdstringstation_id

Empty for any station.

stationNamestringstation_name
neededint64 string

In 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_hand
quantityint64 string
batchint64 string

What one batch of its recipe makes, in stock units; 0 if unknown.

basisstring

Why, in words: "For 40 Chicken pilau and 25 Chips forecast".

statusstring

todo, done or skipped.

madeint64 string
doneByNamestringdone_by_name
doneAtstringdone_at
unitstring
unitPrecisionintegerunit_precision

CountSuggestion

holygrail.inventory.v1.CountSuggestion

variantIdstringvariant_id
itemNamestringitem_name
heardstring

What was heard or seen for it.

amountstring

The amount in digits: "3 bags", "5.5 kg".

countedint64 stringoptional

In stock units; unset when the amount couldn't be worked out (see problem).

expectedint64 string

What the books say is on hand now.

confidencestring

high, medium or low.

problemstring

StockWordsLine

holygrail.inventory.v1.StockWordsLine

variantIdstringvariant_id
itemNamestringitem_name
heardstring

What was heard or seen for it.

amountstring

In digits with a unit: "3 bags", "5.5 kg"; empty for expiry.

quantityint64 stringoptional

In stock units; unset when the amount couldn't be worked out (see problem) or none was said.

unitstring
unitPrecisionintegerunit_precision
confidencestring

high, medium or low.

problemstring
lineIdstringline_id

Receiving: the order line, and what is still to come on it.

outstandingint64 string

Waste: why, as a WasteReason.

lotCodestringlot_code

Labels: the lot code and expiry date (2026-12-31) read.

expiresOnstringexpires_on

VendorTerms

holygrail.inventory.v1.VendorTerms

vendorIdstringvendor_id
vendorNamestringvendor_name
minOrderint64 stringmin_order

The least the vendor takes in one order, in minor units; 0 for none.

leadTimeDaysintegeroptionallead_time_days

Days from ordering to arriving; unset when not known, and each item's own lead time is used.

FoodCostBridge

holygrail.inventory.v1.FoodCostBridge

locationIdstringlocation_id
fromstring
tostring
prevFromstringprev_from
prevTostringprev_to
netSalesint64 stringnet_sales
prevNetSalesint64 stringprev_net_sales
costint64 string

Actual food cost: what recipes say was used, plus waste, plus what counts found missing, as a share of net sales.

prevCostint64 stringprev_cost
startBpintegerstart_bp
endBpintegerend_bp
summarystring

One or two sentences on the biggest move.

uncostedSalesint64 stringuncosted_sales

Net sales of items with no recipe and no stock, left out.

MenuItemPlace

holygrail.inventory.v1.MenuItemPlace

variantIdstringvariant_id
namestring
soldint64 string
netSalesint64 stringnet_sales
costint64 string
unitMarginint64 stringunit_margin

Per one sold, in minor units.

priceint64 string
mixBpintegermix_bp

Its share of all items sold, in basis points.

costBpintegercost_bp
classstring

star (popular, good margin), plowhorse (popular, thin margin), puzzle (good margin, few sold) or dog (neither).

MenuSuggestion

holygrail.inventory.v1.MenuSuggestion

idstring
variantIdstringvariant_id
namestring
kindstring

price, feature or review.

classstring
titlestring
detailstring
basisstring
oldPriceint64 stringold_price
newPriceint64 stringnew_price
amountint64 string
statusstring

open, applied, dismissed, gone or undone.

ReorderSuggestion

holygrail.inventory.v1.ReorderSuggestion

quantityint64 string
dailySalesnumberdaily_sales

Net units sold a day lately: the faster of the last 28 and last 7 days.

daysLeftnumberdays_left

How long what is on hand lasts at that rate; negative when it isn't selling.

reasonstring

Why it is suggested, in a sentence.

StorageArea

holygrail.inventory.v1.StorageArea

idstring
locationIdstringlocation_id
namestring
notestring
sellsboolean

The sales floor: what the location's registers sell from and show. Every location has exactly one, and it cannot be archived.

sortOrderintegersort_order
archivedboolean
stockValueint64 stringstock_value

Output only: what its stock cost, how many variants it holds, and how many are at or below their reorder point there.

itemCountintegeritem_count
lowCountintegerlow_count

RestockSuggestion

holygrail.inventory.v1.RestockSuggestion

variantIdstringvariant_id
itemNamestringitem_name
variantNamestringvariant_name
unitstring
unitPrecisionintegerunit_precision
fromAreaIdstringfrom_area_id
fromAreaNamestringfrom_area_name
toAreaIdstringto_area_id
toAreaNamestringto_area_name
quantityint64 string

How much to move, and the stock at either end now.

toOnHandint64 stringto_on_hand
toReorderPointint64 stringto_reorder_point
fromOnHandint64 stringfrom_on_hand
reasonstring

Recipe

holygrail.inventory.v1.Recipe

idstring
variantIdstringvariant_id

What it is for: a variant, or a modifier.

modifierIdstringmodifier_id
yieldint64 string

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

notestring
namestring

Output only.

unitstring
unitPrecisionintegerunit_precision
priceint64 string
unitCostint64 stringunit_cost

What making one unit (one piece, or one of the unit) costs, at the location's current costs.

marginint64 string

price - unit_cost, and unit_cost / price in basis points (the food or drink cost percentage); 0 without a price.

costBpintegercost_bp
tracksStockbooleantracks_stock

The variant keeps stock of its own: sales take it from stock and batches made with ProduceStock add to it.

ingredientboolean

Its item is an ingredient (a prepared one), not sold.

costMissingbooleancost_missing

Some line has no cost yet, so unit_cost is too low.

updatedAtstringupdated_at
usedBystring[]used_by

Recipes that use this one's variant.

versionIdstringversion_id

The version shown: its id, number, status, scope and dates.

versionNumberintegerversion_number
locationIdstringlocation_id

Empty for every location; else this version is for one location.

effectiveFromstringeffective_from
changeNotestringchange_note
reviewNotestringreview_note

Every version, newest first.

draftIdstringdraft_id

An open draft or pending version, if any.

canPublishbooleancan_publish

The caller may publish without approval.

approvalRequiredbooleanapproval_required

The business asks for approval before a recipe goes live.

baseScaleBpintegerbase_scale_bp

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

On a modifier: use this item's recipe, or its stock, instead of the item's own.

baseVariantNamestringbase_variant_name

Output only.

RecipeUse

holygrail.inventory.v1.RecipeUse

lineRefstringline_ref

The sold line, or the batch.

versionIdstringversion_id
versionNumberintegerversion_number
recipeIdstringrecipe_id
namestring

What the recipe is for.

variantIdstringvariant_id
modifierIdstringmodifier_id

ResolvedIngredient

holygrail.inventory.v1.ResolvedIngredient

One ingredient a resolved line uses.

variantIdstringvariant_id
namestring
unitstring
unitPrecisionintegerunit_precision
quantityint64 string

Thousandths of the unit (or of a piece) the line uses; 0 when taken out entirely.

baseQuantityint64 stringbase_quantity

What the item alone would use.

changestring

"base", "added", "removed", "more", "less".

costint64 string
costKnownbooleancost_known

Ingredient

holygrail.inventory.v1.Ingredient

variantIdstringvariant_id
brandstring
allergensstring[]

Keys: gluten, crustaceans, eggs, fish, peanuts, soy, milk, nuts, celery, mustard, sesame, sulphites, lupin, molluscs.

allergenNotestringallergen_note
shelfLifeDaysintegershelf_life_days

0 for not set.

storageNotestringstorage_note
vendorIdstringvendor_id
purchaseUnitstringpurchase_unit

The unit it is bought in: one of its conversions, or blank for the stock unit.

conversionsUnitConversion[]
namestring

Output only.

unitstring
unitPrecisionintegerunit_precision
updatedAtstringupdated_at
leadTimeDaysintegerlead_time_days

Days from ordering to delivery; 0 for not set, which the forecast takes as 2.

categoryIdstringcategory_id

Its ingredient category (ADR 45); blank for none.

standardCostint64 stringstandard_cost

What one stock unit is expected to cost, in minor units, until a delivery or a supplier price says otherwise. 0 for not set.

categoryNamestringcategory_name

Output only.

sellableboolean

Output 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_id
itemIdstringitem_id
namestring
skustring
unitstring
unitPrecisionintegerunit_precision
categoryIdstringcategory_id
categoryNamestringcategory_name
sellableboolean
priceint64 string

Selling price at the location, when sellable.

archivedboolean
onHandint64 stringon_hand

At the location, in stock units (thousandths for decimals).

trackStockbooleantrack_stock
unitCostint64 stringunit_cost

Cost 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_source
vendorNamestringvendor_name
purchaseUnitstringpurchase_unit
recipesinteger

Published recipes that use it.

allergensstring[]
lowboolean

At or below its reorder point at the location.

brandstring
standardCostint64 stringstandard_cost
stockValueint64 stringstock_value

Value of the stock on hand at the location, in minor units.

IngredientCategory

holygrail.inventory.v1.IngredientCategory

idstring
namestring
sortOrderintegersort_order
archivedboolean
ingredientsinteger

Output 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_id
unitstring

"bag", "bottle", "cup".

amountstring

How much of the stock unit one unit is, as an exact decimal: "25".

equalsstring

Input: what one unit is, typed in any unit: "25 kg", "750 ml".

enteredstring

As typed and stored.

InventorySettings

holygrail.inventory.v1.InventorySettings

recipeApprovalbooleanrecipe_approval

Publishing a recipe needs the recipes.approve permission.

refundIngredientsstringrefund_ingredients

On a refund of something made from a recipe: "keep" (it was used) or "restock" (put the ingredients back).

negativeStockstringnegative_stock

Back-office stock out below zero: "allow", "warn" or "block".

wasteApprovalOverint64 stringwaste_approval_over

Waste costing more than this, in minor units, needs inventory.approve; 0 means never.

stockTimingstringstock_timing

When 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

idstring
locationIdstringlocation_id
areaIdstringarea_id
areaNamestringarea_name
variantIdstringvariant_id
namestring
unitstring
unitPrecisionintegerunit_precision
quantityint64 string

In the variant's stock quantity.

enteredstring
responsibleIdstringresponsible_id
responsibleNamestringresponsible_name
notestring
valueint64 string

What it cost; an estimate while pending.

occurredAtstringoccurred_at

RFC 3339.

createdByNamestringcreated_by_name
decidedByNamestringdecided_by_name
reviewNotestringreview_note
ingredientsstring[]

A menu item: the ingredients its recipe took, by name.

canDecidebooleancan_decide

Whether the caller can approve it.

SupplierPrice

holygrail.inventory.v1.SupplierPrice

vendorIdstringvendor_id
vendorNamestringvendor_name
unitCostint64 stringunit_cost

Minor units per stock unit.

priceUnitstringprice_unit
unitPriceint64 stringunit_price
recordedAtstringrecorded_at

RFC 3339.

purchaseOrderNumberstringpurchase_order_number

The purchase order it came in on, if any.

StockLot

holygrail.inventory.v1.StockLot

idstring
areaIdstringarea_id
areaNamestringarea_name
variantIdstringvariant_id
namestring
unitstring
unitPrecisionintegerunit_precision
codestring
expiresOnstringexpires_on

2026-12-31, or empty when it has none.

quantityint64 string
remainingint64 string
receivedAtstringreceived_at
daysLeftintegerdays_left

Days until it expires; negative once expired.

valueint64 string

What 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_id
itemNamestringitem_name
variantNamestringvariant_name
skustring
unitstring
unitPrecisionintegerunit_precision
ingredientboolean
openingint64 string
openingValueint64 stringopening_value
purchasedint64 string

Delivered on purchase orders, and opening stock added.

purchasedValueint64 stringpurchased_value
transferredInint64 stringtransferred_in
transferredInValueint64 stringtransferred_in_value
transferredOutint64 stringtransferred_out
transferredOutValueint64 stringtransferred_out_value
producedint64 string
producedValueint64 stringproduced_value
usedint64 string

Used by recipes: for items sold and batches made.

usedValueint64 stringused_value
soldint64 string

Sold as itself, less returns and voids.

soldValueint64 stringsold_value
wastedint64 string

Damaged, lost, stolen, wasted, expired or given to staff.

wastedValueint64 stringwasted_value
adjustedint64 string

Signed: what counts and corrections found over (+) or short (-).

adjustedValueint64 stringadjusted_value
closingint64 string
closingValueint64 stringclosing_value
theoreticalint64 string

theoretical = used + sold: what recipes and sales explain. actual = opening + in - out - closing: what actually went. variance = actual - theoretical - wasted: what nothing explains.

theoreticalValueint64 stringtheoretical_value
actualint64 string
actualValueint64 stringactual_value
varianceint64 string
varianceValueint64 stringvariance_value
varianceBpintegervariance_bp

variance / theoretical in basis points; 0 when nothing was explained.

ItemCostRow

holygrail.inventory.v1.ItemCostRow

variantIdstringvariant_id
itemNamestringitem_name
variantNamestringvariant_name
unitstring
unitPrecisionintegerunit_precision
soldint64 string

Pieces, or thousandths of the unit for a measured variant.

netSalesint64 stringnet_sales
costint64 string

What its stock and ingredients cost at the time of each sale.

marginint64 string
costBpintegercost_bp

cost / net_sales in basis points.

unitCostNowint64 stringunit_cost_now

What one costs today by its recipe or average cost, and its price.

priceint64 string
hasRecipebooleanhas_recipe
tracksStockbooleantracks_stock
topIngredientsIngredientUse[]top_ingredients

Its costliest ingredients over the period.

StockInsights

holygrail.inventory.v1.StockInsights

locationIdstringlocation_id
generatedAtstringgenerated_at
stockValueint64 stringstock_value
byAreaAreaValue[]by_area
usageCost7dint64 stringusage_cost_7d

What ingredients and goods used and sold cost, the last seven days and the seven before.

usageCostPrev7dint64 stringusage_cost_prev_7d
wasteCost28dint64 stringwaste_cost_28d

The last 28 days: waste, and unexplained variance found by counts.

varianceCost28dint64 stringvariance_cost_28d
costBp28dintegercost_bp_28d

Cost of goods over net sales for items with a recipe or stock, the last 28 days, in basis points.

Most urgent first.

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_id
namestring
unitstring
unitPrecisionintegerunit_precision
onHandint64 stringon_hand

At the whole location, in stock quantity.

onOrderint64 stringon_order

Ordered and not yet received.

nextDaysint64 string[]next_days

Expected use on each of the next 14 days, today first.

nextTwoWeeksint64 stringnext_two_weeks

The next 14 days' expected use, and per day on average.

perDayint64 stringper_day
daysLeftintegerdays_left

Whole days what is on hand and on order lasts; -1 when it lasts beyond the forecast or is not being used.

runsOutOnstringruns_out_on

YYYY-MM-DD, or empty.

orderBystringorder_by

The last day to order so it arrives in time; empty when nothing is needed. Today or earlier means order now.

leadTimeDaysintegerlead_time_days
leadTimeAssumedbooleanlead_time_assumed

No lead time is set, so 2 days was assumed.

orderint64 string

What 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_cost

At the supplier's latest price, else the average cost.

orderValueint64 stringorder_value
vendorIdstringvendor_id
vendorNamestringvendor_name
confidencestring

"high", "medium" or "low": how steady its use has been.

basisstring

How it was worked out, in plain words.

historyDaysintegerhistory_days

StockTrendDay

holygrail.inventory.v1.StockTrendDay

StockTrendDay is one day's stock movements at cost, in minor units. Out movements are positive here.

daystring

YYYY-MM-DD in the location's time zone.

receivedint64 string
usedint64 string

By recipes (ingredients) and sold as they are.

soldint64 string
wastedint64 string
adjustedint64 string

Counts and corrections: positive when stock was found.

producedint64 string

StockFinding

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.

idstring
locationIdstringlocation_id
assignedTostringassigned_to
assignedNamestringassigned_name
aiHeadlinestringai_headline

The assistant's words; empty until written, or without a model.

aiSuggestionstringai_suggestion
aiModelstringai_model
firstSeenAtstringfirst_seen_at
lastSeenAtstringlast_seen_at
snoozedUntilstringsnoozed_until

Dismissed findings come back after this, if still true.

resolvedAtstringresolved_at
reopenedinteger

How many times it was found again after being resolved.

Output of GetStockFinding only, oldest first.

AreaStock

holygrail.inventory.v1.AreaStock

AreaStock is a variant's stock in one storage area.

areaIdstringarea_id
areaNamestringarea_name
onHandint64 stringon_hand
valueint64 string
reorderPointint64 stringreorder_point
sellsboolean

The sales floor.

StockTransferLine

holygrail.inventory.v1.StockTransferLine

variantIdstringvariant_id
itemNamestringitem_name
variantNamestringvariant_name
skustring
unitstring
unitPrecisionintegerunit_precision
requestedint64 string
sentint64 string

Completed transfers: what was sent, and what it was worth.

valueint64 string
availableint64 string

Requested transfers: what the area it comes from has now.

CountLine

holygrail.inventory.v1.CountLine

variantIdstringvariant_id
itemNamestringitem_name
variantNamestringvariant_name
skustring
expectedint64 string

Stock on hand now (open counts) or when the count finished.

countedint64 stringoptional

Unset until counted.

PurchaseOrderLine

holygrail.inventory.v1.PurchaseOrderLine

idstring
variantIdstringvariant_id
descriptionstring

Item and variant name when the line was saved.

quantityint64 string
unitCostint64 stringunit_cost
receivedint64 string
skustring
enteredstring

As typed (ADR 44): "4 bags", and the price per bag.

priceUnitstringprice_unit
unitPriceint64 stringunit_price
basisstring

On a forecast draft, why this much (ADR 56).

PurchaseOrderReceipt

holygrail.inventory.v1.PurchaseOrderReceipt

idstring
valueint64 string
notestring
receivedAtstringreceived_at

VendorPayment

holygrail.inventory.v1.VendorPayment

idstring
cashAccountIdstringcash_account_id
amountint64 string
paidAtstringpaid_at
referencestring
voidedboolean

PurchaseOrderDraftLine

holygrail.inventory.v1.PurchaseOrderDraftLine

idstring
variantIdstringvariant_id
quantityint64 string

In stock units; ignored when amount is set.

unitCostint64 stringunit_cost

Per stock unit; ignored when unit_price is set.

amountstring

How much, as typed in any of the item's units: "4 bags", "10 kg".

priceUnitstringprice_unit

The price per price_unit ("bag"); empty price_unit means per stock unit.

unitPriceint64 stringunit_price

SupplierInvoiceLine

holygrail.inventory.v1.SupplierInvoiceLine

idstring
descriptionstring
quantityTextstringquantity_text

As printed: "4" and "bags".

unitstring
quantityint64 string

Billed, in the item's stock units at its precision; 0 when unknown.

unitPriceint64 stringunit_price

Per printed unit, and the line's net amount.

amountint64 string
purchaseOrderLineIdstringpurchase_order_line_id

The order line it matched; empty when it isn't on the order.

orderedint64 string

The order line's ordered and received quantities, in stock units.

receivedint64 string
stockUnitstringstock_unit

The stock unit, for showing quantities: "kg".

unitPrecisionintegerunit_precision
expectedint64 string

What this line should cost at the ordered price for what arrived.

overbilledint64 string
differencestring

price, quantity, not_ordered, not_received or empty.

confidencestring

How sure the reading is: high, medium or low.

PrepStation

holygrail.inventory.v1.PrepStation

idstring
namestring

BridgeStep

holygrail.inventory.v1.BridgeStep

keystring

"mix", "menu_price", "ingredient_price", "waste" or "unexplained".

labelstring
bpinteger

Food cost points it moved, in basis points of net sales: 120 is 1.2 points up.

amountint64 string

What that is in money at this period's sales.

detailstring

RecipeLine

holygrail.inventory.v1.RecipeLine

ingredientIdstringingredient_id

The variant used: one that tracks stock, or a prepared item with a recipe of its own.

quantityint64 string

How 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_bp

Extra lost in prep, such as trimming, in basis points: 1000 takes 10% more than quantity.

itemNamestringitem_name

Output only.

variantNamestringvariant_name
unitstring
unitPrecisionintegerunit_precision
tracksStockbooleantracks_stock
hasRecipebooleanhas_recipe
unitCostint64 stringunit_cost

What one unit (one piece, or one of the unit) of the ingredient costs now, and whether there is any cost for it yet.

costKnownbooleancost_known
costint64 string

What this line costs for one unit of what the recipe makes.

amountstring

Input: what was typed, such as "250 g" or "2 cups"; the server turns it into quantity. Empty to send quantity as is.

enteredQuantitystringentered_quantity

What was typed, as stored: "250" and "g". Shown instead of quantity.

enteredUnitstringentered_unit
roundedboolean

Output: 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_id

REPLACE: what goes in instead of the ingredient.

factorBpintegerfactor_bp

REPLACE: 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_size

ADD: grows with the size another modifier chooses.

replacementNamestringreplacement_name

Output only.

RecipeVersion

holygrail.inventory.v1.RecipeVersion

RecipeVersion is one entry in a recipe's history.

idstring
numberinteger
locationIdstringlocation_id

Empty for every location.

locationNamestringlocation_name
effectiveFromstringeffective_from
createdAtstringcreated_at
createdByNamestringcreated_by_name
publishedAtstringpublished_at
publishedByNamestringpublished_by_name
retiredAtstringretired_at
changeNotestringchange_note
reviewNotestringreview_note
liveboolean

In force now at the location asked about.

scheduledboolean

Published but effective later.

replacedboolean

Published, and a later version took over.

lineCountintegerline_count
usesint64 string

Sold lines and batches that used it.

yieldint64 string

IngredientUse

holygrail.inventory.v1.IngredientUse

variantIdstringvariant_id
namestring
unitstring
unitPrecisionintegerunit_precision
quantityint64 string
valueint64 string

AreaValue

holygrail.inventory.v1.AreaValue

areaIdstringarea_id
areaNamestringarea_name
valueint64 string

StockInsight

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

titlestring
detailstring
linkstring

A dashboard path to act on it.

variantIdstringvariant_id
amountint64 string

Money at stake, in minor units, when there is a figure for it.

calculationstring

How it was worked out, with the numbers: "1.2 kg wasted of 18 kg used = 6.7%".

periodDaysintegerperiod_days

The days of history it looks at; 0 for a reading of today.

keystring

Stays 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_id
itemNamestringitem_name
variantNamestringvariant_name
unitstring
unitPrecisionintegerunit_precision
onHandint64 stringon_hand

At the whole location.

nextDaysint64 string[]next_days

Expected use on each of the next seven days, today first.

nextWeekint64 stringnext_week
daysLeftnumberdays_left

How long what is on hand lasts; negative when it is not being used.

runsOutOnstringruns_out_on

YYYY-MM-DD, or empty when it lasts beyond the forecast.

orderint64 string

What to order to last two weeks, and what that costs at the last cost.

orderValueint64 stringorder_value

FindingEvent

holygrail.inventory.v1.FindingEvent

atstring
actionstring

found, updated, assigned, unassigned, dismissed, resolved, reopened, noted, gone (no longer true), worded.

byNamestringby_name
notestring

BridgeDriver

holygrail.inventory.v1.BridgeDriver

One thing that moved food cost and its biggest causes.

variantIdstringvariant_id
namestring
amountint64 string

In minor units over the period; positive raised food cost.

detailstring

AdjustReason enum

holygrail.inventory.v1.AdjustReason

ADJUST_REASON_UNSPECIFIED
ADJUST_REASON_INITIAL

Stock the business already had, at what it cost. Posts against opening balance equity.

ADJUST_REASON_DAMAGED
ADJUST_REASON_LOST
ADJUST_REASON_THEFT
ADJUST_REASON_FOUND
ADJUST_REASON_CORRECTION
ADJUST_REASON_WASTE

Thrown away in prep or service: spilt, burnt, sent back.

ADJUST_REASON_EXPIRED

Past its date.

ADJUST_REASON_STAFF_MEAL

Given to the team.

PurchaseOrderStatus enum

holygrail.inventory.v1.PurchaseOrderStatus

PURCHASE_ORDER_STATUS_UNSPECIFIED
PURCHASE_ORDER_STATUS_DRAFT
PURCHASE_ORDER_STATUS_ORDERED
PURCHASE_ORDER_STATUS_PARTIAL

Some of it has arrived.

PURCHASE_ORDER_STATUS_RECEIVED
PURCHASE_ORDER_STATUS_CLOSED

Closed before everything arrived.

PURCHASE_ORDER_STATUS_CANCELLED

TransferStatus enum

holygrail.inventory.v1.TransferStatus

TRANSFER_STATUS_UNSPECIFIED
TRANSFER_STATUS_REQUESTED

Asked for; nothing has moved yet.

TRANSFER_STATUS_COMPLETED
TRANSFER_STATUS_CANCELLED

MovementKind enum

holygrail.inventory.v1.MovementKind

MOVEMENT_KIND_UNSPECIFIED
MOVEMENT_KIND_SALE
MOVEMENT_KIND_RETURN
MOVEMENT_KIND_RECEIVE
MOVEMENT_KIND_ADJUST
MOVEMENT_KIND_COUNT
MOVEMENT_KIND_TRANSFER_IN
MOVEMENT_KIND_TRANSFER_OUT
MOVEMENT_KIND_VOID

Stock put back when an invoice was voided.

MOVEMENT_KIND_USAGE

An ingredient a recipe used: for an item sold, or a batch made.

MOVEMENT_KIND_PRODUCE

A batch of a prepared item made from its recipe.

IngredientKind enum

holygrail.inventory.v1.IngredientKind

INGREDIENT_KIND_UNSPECIFIED
INGREDIENT_KIND_RAW

Bought and used as it is: flour, milk.

INGREDIENT_KIND_PACKAGING

Cups, lids, boxes.

INGREDIENT_KIND_PREPARED

Made here from other ingredients: dough, sauce.

INGREDIENT_KIND_FINISHED

Bought ready to sell: bottled drinks.

WasteReason enum

holygrail.inventory.v1.WasteReason

WASTE_REASON_UNSPECIFIED
WASTE_REASON_SPOILAGE
WASTE_REASON_DAMAGE
WASTE_REASON_PREP_LOSS
WASTE_REASON_OVERPRODUCTION
WASTE_REASON_CUSTOMER_RETURN
WASTE_REASON_EXPIRY
WASTE_REASON_THEFT
WASTE_REASON_OTHER

CountStatus enum

holygrail.inventory.v1.CountStatus

COUNT_STATUS_UNSPECIFIED
COUNT_STATUS_OPEN
COUNT_STATUS_FINISHED
COUNT_STATUS_CANCELLED

RecipeStatus enum

holygrail.inventory.v1.RecipeStatus

RECIPE_STATUS_UNSPECIFIED
RECIPE_STATUS_DRAFT

Being written; sales don't use it.

RECIPE_STATUS_PENDING

Waiting for someone who can approve recipes.

RECIPE_STATUS_PUBLISHED

Live from effective_from; it never changes again.

RECIPE_STATUS_RETIRED

No longer used from retired_at.

WasteStatus enum

holygrail.inventory.v1.WasteStatus

WASTE_STATUS_UNSPECIFIED
WASTE_STATUS_RECORDED
WASTE_STATUS_PENDING
WASTE_STATUS_REJECTED

FindingStatus enum

holygrail.inventory.v1.FindingStatus

FINDING_STATUS_UNSPECIFIED
FINDING_STATUS_OPEN
FINDING_STATUS_DISMISSED
FINDING_STATUS_RESOLVED

ModifierOp enum

holygrail.inventory.v1.ModifierOp

What a modifier's recipe line does to the item's recipe (ADR 46).

MODIFIER_OP_UNSPECIFIED
MODIFIER_OP_ADD

Uses this too: extra cheese; a side such as fries is a prepared item.

MODIFIER_OP_REMOVE

Takes it out of the item's recipe: all of it (quantity 0) or that much.

MODIFIER_OP_REPLACE

Uses the replacement instead: oat milk for milk.

MODIFIER_OP_SCALE

Uses more or less of it: double patty.

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