Developers
Sign inGet API keys
API reference/Money and books

Ledger and cash accounts

LedgerService is the business's books: Cash Accounts, the chart of accounts and the double-entry journal behind them.

Sales, tips, tax and cash drawer activity post to the journal by themselves as registers sync. People add Cash Accounts, record opening balances and move money between accounts here. Journal entries never change; a mistake is undone with a reversing entry.

Reading needs the owner, admin or manager role. Adding or archiving Cash Accounts needs owner or admin.

holygrail.ledger.v1.LedgerService53 methodsbooks.read · books.write

ListCashAccounts#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListCashAccounts

Request body

includeArchivedbooleaninclude_archived

Response

currencyCodestringcurrency_code
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListCashAccounts \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "accounts": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "name": "Amina Mushi",
      "kind": "CASH_ACCOUNT_KIND_BANK",
      "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
      "notes": "",
      "balance": "150000",
      "ledgerAccountId": "",
      "code": "",
      "archived": false,
      "system": false,
      "institution": "",
      "accountNumber": "",
      "color": "",
      "lowBalance": "150000",
      "reconciledThrough": "",
      "reconciledBalance": "150000",
      "in30d": "0",
      "out30d": "0",
      "currencyCode": "TZS",
      "foreignBalance": "150000",
      "valueNow": "0",
      "rate": "",
      "unmatchedRows": 0
    }
  ],
  "currencyCode": "TZS"
}

CreateCashAccount#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/CreateCashAccount

Request body

namestring

Any kind but CASH_DRAWER and CARD_CLEARING, which the system creates.

notesstring
openingBalanceint64 stringopening_balance

Money already in the account, posted against opening balance equity. Zero or more.

openingAtstringopening_at

RFC 3339 time the opening balance is as of. Defaults to now.

institutionstring
accountNumberstringaccount_number
colorstring
lowBalanceint64 stringlow_balance
currencyCodestringcurrency_code

Another currency it holds; the opening balance is then in it, at opening_rate (or the latest rate).

openingRatestringopening_rate
atRegisterbooleanat_register

Also add it to the register as a way to pay, named after the account, so payments taken with it land here. Needs owner or admin and a platform that allows the business's own methods.

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/CreateCashAccount \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Amina Mushi",
  "kind": "CASH_ACCOUNT_KIND_BANK",
  "openingBalance": "150000",
  "lowBalance": "150000",
  "currencyCode": "TZS"
}'
Response example
{
  "account": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "name": "Amina Mushi",
    "kind": "CASH_ACCOUNT_KIND_BANK",
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "notes": "",
    "balance": "150000",
    "ledgerAccountId": "",
    "code": "",
    "archived": false,
    "system": false,
    "institution": "",
    "accountNumber": "",
    "color": "",
    "lowBalance": "150000",
    "reconciledThrough": "",
    "reconciledBalance": "150000",
    "in30d": "0",
    "out30d": "0",
    "currencyCode": "TZS",
    "foreignBalance": "150000",
    "valueNow": "0",
    "rate": "",
    "unmatchedRows": 0
  }
}

UpdateCashAccount#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/UpdateCashAccount

Request body

idstring
namestring
notesstring
archivedboolean

An archived account is hidden and takes no new transfers. Archiving needs a zero balance and no checkout method paying into it.

institutionstring
accountNumberstringaccount_number
colorstring
lowBalanceint64 stringlow_balance
atRegisterbooleanoptionalat_register

Set to show the account at the register as a way to pay (adding a method named after it if none pays into it yet) or to hide the methods that pay into it. Unset leaves them as they are.

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/UpdateCashAccount \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
  "name": "Amina Mushi",
  "lowBalance": "150000"
}'
Response example
{
  "account": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "name": "Amina Mushi",
    "kind": "CASH_ACCOUNT_KIND_BANK",
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "notes": "",
    "balance": "150000",
    "ledgerAccountId": "",
    "code": "",
    "archived": false,
    "system": false,
    "institution": "",
    "accountNumber": "",
    "color": "",
    "lowBalance": "150000",
    "reconciledThrough": "",
    "reconciledBalance": "150000",
    "in30d": "0",
    "out30d": "0",
    "currencyCode": "TZS",
    "foreignBalance": "150000",
    "valueNow": "0",
    "rate": "",
    "unmatchedRows": 0
  }
}

CreateTransfer#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/CreateTransfer

CreateTransfer moves money from one Cash Account to another, such as a bank deposit of the day's cash.

Request body

idstring

Client-chosen UUID, so a retried request records one transfer.

fromAccountIdstringfrom_account_id
toAccountIdstringto_account_id
amountint64 string
occurredAtstringoccurred_at

RFC 3339. Defaults to now.

memostring
feeint64 string

What the bank or mobile money provider charged for the move, taken from the account the money left on top of amount and booked as a charge.

toAmountint64 stringto_amount

amount and fee are in the from account's currency. When the two accounts hold different currencies, to_amount is what arrives, in the to account's.

Response

Unset when it waits for approval.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/CreateTransfer \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
  "amount": "150000",
  "fee": "150000",
  "toAmount": "150000"
}'
Response example
{
  "entry": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "occurredAt": "",
    "source": "",
    "sourceId": "",
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "memo": "",
    "reversesId": "",
    "reversedById": "",
    "reversible": false,
    "reference": "",
    "createdByName": "Amina Mushi"
  },
  "request": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "kind": "",
    "cashAccountId": "",
    "cashAccountName": "Amina Mushi",
    "toAccountId": "",
    "toAccountName": "Amina Mushi",
    "categoryAccountId": "",
    "categoryName": "Amina Mushi",
    "amount": "150000",
    "toAmount": "150000",
    "fee": "150000",
    "bookAmount": "150000",
    "currencyCode": "TZS",
    "memo": "",
    "reference": "",
    "status": "TRANSFER_REQUEST_STATUS_PENDING",
    "requestedBy": "",
    "requestedByName": "Amina Mushi",
    "requestedAt": "",
    "decidedByName": "Amina Mushi",
    "decidedAt": "",
    "decisionNote": "",
    "entryId": "",
    "recurringId": "",
    "canDecide": false
  }
}

ListAccountActivity#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListAccountActivity

ListAccountActivity pages through one Cash Account's journal lines.

Request body

cashAccountIdstringcash_account_id
pageSizeintegerpage_size
pageTokenstringpage_token

Response

nextPageTokenstringnext_page_token
balanceint64 string
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListAccountActivity \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "pageSize": 50
}'
Response example
{
  "activity": [
    {
      "entryId": "",
      "occurredAt": "",
      "source": "",
      "sourceId": "",
      "memo": "",
      "amount": "150000",
      "balanceAfter": "0",
      "reversible": false
    }
  ],
  "nextPageToken": "",
  "balance": "150000"
}

ListJournalEntries#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListJournalEntries

Request body

pageSizeintegerpage_size
pageTokenstringpage_token

Response

nextPageTokenstringnext_page_token
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListJournalEntries \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "pageSize": 50
}'
Response example
{
  "entries": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "occurredAt": "",
      "source": "",
      "sourceId": "",
      "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
      "memo": "",
      "reversesId": "",
      "reversedById": "",
      "reversible": false,
      "reference": "",
      "createdByName": "Amina Mushi"
    }
  ],
  "nextPageToken": ""
}

ReverseEntry#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/ReverseEntry

ReverseEntry undoes a transfer or opening balance with an equal and opposite entry. Entries the system posted, such as sales, cannot be reversed by hand.

Request body

entryIdstringentry_id
memostring

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ReverseEntry \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "entry": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "occurredAt": "",
    "source": "",
    "sourceId": "",
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "memo": "",
    "reversesId": "",
    "reversedById": "",
    "reversible": false,
    "reference": "",
    "createdByName": "Amina Mushi"
  }
}

GetTrialBalance#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetTrialBalance

GetTrialBalance reports every ledger account over a range of local dates. It is the source of the profit and loss and the balance sheet.

Request body

fromDatestringfrom_date

Local dates, YYYY-MM-DD, both inclusive.

toDatestringto_date
timeZonestringtime_zone

IANA time zone the dates are in.

locationIdstringlocation_id

Only entries of this location; empty for the whole business.

Response

currencyCodestringcurrency_code
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetTrialBalance \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fromDate": "2026-12-05",
  "toDate": "2026-12-05",
  "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'
Response example
{
  "rows": [
    {
      "accountId": "",
      "code": "",
      "name": "Amina Mushi",
      "type": "LEDGER_ACCOUNT_TYPE_ASSET",
      "opening": "0",
      "debits": "0",
      "credits": "0",
      "closing": "0",
      "archived": false
    }
  ],
  "currencyCode": "TZS"
}

GetProfitAndLoss#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetProfitAndLoss

GetProfitAndLoss is the business's profit and loss statement over a range of local dates: revenue, cost of sales, labor and operating expenses from the books, with a comparison period, margins, a trend, and breakdowns by location and department. Labor not yet in a posted pay run is estimated from timecards unless books_only is set. Needs reports.profit.

Request body

fromDatestringfrom_date

Local dates, YYYY-MM-DD, both inclusive; at most 366 days.

toDatestringto_date
timeZonestringtime_zone

IANA time zone the dates are in.

locationIdstringlocation_id

One location only; empty for the whole business. Costs not tied to a location (payroll, business-wide expenses) are left out of a single location's figures unless allocate_shared is set.

Unspecified means the previous period.

booksOnlybooleanbooks_only

Leave out labor estimated from timecards, so every figure is in the books.

allocateSharedbooleanallocate_shared

Share costs not tied to a location among locations by net sales.

Response

currencyCodestringcurrency_code
periodPnlPeriod
comparisonPnlPeriod

Unset when no comparison was asked for.

locationsPnlLocation[]
departmentsPnlDepartment[]

By day for up to 31 days, by week up to 120 days, else by month.

trendUnitstringtrend_unit

"day", "week" or "month".

passThroughPnlPassThroughpass_through
cashFlowPnlCashFlowcash_flow
notesstring[]

Plain-words notes on what the figures include and leave out.

generatedAtstringgenerated_at
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetProfitAndLoss \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fromDate": "2026-12-05",
  "toDate": "2026-12-05",
  "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
  "compare": "PNL_COMPARISON_PREVIOUS_PERIOD"
}'
Response example
{
  "currencyCode": "TZS",
  "period": {
    "fromDate": "2026-12-05",
    "toDate": "2026-12-05"
  },
  "comparison": {
    "fromDate": "2026-12-05",
    "toDate": "2026-12-05"
  },
  "lines": [
    {
      "key": "",
      "accountId": "",
      "code": "",
      "name": "Amina Mushi",
      "section": "PNL_SECTION_REVENUE",
      "amount": "150000",
      "compareAmount": "150000",
      "estimated": false,
      "systemKey": "",
      "percentOfRevenueBp": 0
    }
  ],
  "locations": [
    {
      "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
      "name": "Amina Mushi",
      "amounts": {
        "key": "0"
      }
    }
  ],
  "departments": [
    {
      "departmentId": "",
      "name": "Amina Mushi",
      "netSales": "0",
      "costOfGoods": "0",
      "grossProfit": "0",
      "grossMarginBp": 0,
      "quantity": 1
    }
  ],
  "trend": [
    {
      "key": "",
      "revenue": "0",
      "costOfSales": "0",
      "labor": "0",
      "operatingExpenses": "0",
      "netProfit": "0"
    }
  ],
  "trendUnit": "",
  "passThrough": {
    "salesTaxCollected": "0",
    "tipsCollected": "0",
    "taxOnPurchases": "0"
  },
  "labor": {
    "workedMinutes": "0",
    "overtimeMinutes": "0",
    "daysCoveredByPayroll": 0,
    "days": 0,
    "unratedPeople": 0
  },
  "cashFlow": {
    "cashIn": "0",
    "cashOut": "0",
    "netChange": "0",
    "closingBalance": "150000"
  },
  "notes": [
    ""
  ],
  "generatedAt": ""
}

ListProfitAndLossEntries#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListProfitAndLossEntries

ListProfitAndLossEntries is the drill-down behind one profit and loss line: the journal entries that make it up, or for estimated labor, the people whose timecards do.

Request body

fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone
keystring

A PnlLine.key from GetProfitAndLoss.

locationIdstringlocation_id

Empty for every location; "none" for entries tied to no location.

pageSizeintegerpage_size
pageTokenstringpage_token

Response

entriesPnlEntry[]
nextPageTokenstringnext_page_token
totalint64 string

The line's total over the whole range, for checking the page against.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListProfitAndLossEntries \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fromDate": "2026-12-05",
  "toDate": "2026-12-05",
  "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
  "pageSize": 50
}'
Response example
{
  "entries": [
    {
      "entryId": "",
      "occurredAt": "",
      "source": "",
      "sourceId": "",
      "memo": "",
      "amount": "150000",
      "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
      "locationName": "Amina Mushi",
      "teamMemberId": "",
      "workedMinutes": "0",
      "overtimeMinutes": "0"
    }
  ],
  "nextPageToken": "",
  "total": "150000"
}

GetAccountsOverview#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetAccountsOverview

GetAccountsOverview is the money position across Cash Accounts over a range of local dates: balances by kind, money in and out (leaving out moves between the business's own accounts) by where it came from and went, a daily trend, and each account's flows.

Request body

fromDatestringfrom_date

Local dates, YYYY-MM-DD, both inclusive; at most 366 days.

toDatestringto_date
timeZonestringtime_zone

Response

currencyCodestringcurrency_code
totalBalanceint64 stringtotal_balance

All open Cash Accounts now.

byKindKindTotal[]by_kind
openingint64 string

Over the range.

moneyInint64 stringmoney_in
moneyOutint64 stringmoney_out
closingint64 string
inflowsFlow[]
outflowsFlow[]
lowBalanceAccountIdsstring[]low_balance_account_ids

Accounts below their low balance warning now.

previousMoneyInint64 stringprevious_money_in

The same totals for the same number of days just before.

previousMoneyOutint64 stringprevious_money_out
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetAccountsOverview \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fromDate": "2026-12-05",
  "toDate": "2026-12-05"
}'
Response example
{
  "currencyCode": "TZS",
  "totalBalance": "150000",
  "byKind": [
    {
      "kind": "CASH_ACCOUNT_KIND_BANK",
      "balance": "150000",
      "accounts": 1
    }
  ],
  "opening": "0",
  "moneyIn": "0",
  "moneyOut": "0",
  "closing": "0",
  "inflows": [
    {
      "source": "",
      "amount": "150000",
      "count": 1
    }
  ],
  "outflows": [
    {
      "source": "",
      "amount": "150000",
      "count": 1
    }
  ],
  "days": [
    {
      "date": "2026-12-05",
      "moneyIn": "0",
      "moneyOut": "0",
      "closing": "0"
    }
  ],
  "accounts": [
    {
      "cashAccountId": "",
      "opening": "0",
      "moneyIn": "0",
      "moneyOut": "0",
      "transfersIn": "0",
      "transfersOut": "0",
      "closing": "0"
    }
  ],
  "lowBalanceAccountIds": [
    ""
  ],
  "previousMoneyIn": "0",
  "previousMoneyOut": "0"
}

GetAccountStatement#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetAccountStatement

GetAccountStatement is one Cash Account's statement over a range of local dates: opening balance, every line with the balance after it, and the closing balance.

Request body

cashAccountIdstringcash_account_id
fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

Response

currencyCodestringcurrency_code
openingint64 string
moneyInint64 stringmoney_in
moneyOutint64 stringmoney_out
closingint64 string

Oldest first. At most 5000; truncated is set when there were more.

truncatedboolean
inflowsFlow[]
outflowsFlow[]
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetAccountStatement \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fromDate": "2026-12-05",
  "toDate": "2026-12-05"
}'
Response example
{
  "account": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "name": "Amina Mushi",
    "kind": "CASH_ACCOUNT_KIND_BANK",
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "notes": "",
    "balance": "150000",
    "ledgerAccountId": "",
    "code": "",
    "archived": false,
    "system": false,
    "institution": "",
    "accountNumber": "",
    "color": "",
    "lowBalance": "150000",
    "reconciledThrough": "",
    "reconciledBalance": "150000",
    "in30d": "0",
    "out30d": "0",
    "currencyCode": "TZS",
    "foreignBalance": "150000",
    "valueNow": "0",
    "rate": "",
    "unmatchedRows": 0
  },
  "currencyCode": "TZS",
  "opening": "0",
  "moneyIn": "0",
  "moneyOut": "0",
  "closing": "0",
  "lines": [
    {
      "entryId": "",
      "lineNo": 0,
      "occurredAt": "",
      "source": "",
      "sourceId": "",
      "memo": "",
      "amount": "150000",
      "balanceAfter": "0",
      "reversible": false,
      "cleared": false,
      "counterpart": "",
      "matched": false,
      "bookAmount": "150000"
    }
  ],
  "truncated": false,
  "inflows": [
    {
      "source": "",
      "amount": "150000",
      "count": 1
    }
  ],
  "outflows": [
    {
      "source": "",
      "amount": "150000",
      "count": 1
    }
  ],
  "days": [
    {
      "date": "2026-12-05",
      "moneyIn": "0",
      "moneyOut": "0",
      "closing": "0"
    }
  ]
}

RecordAccountTransaction#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/RecordAccountTransaction

RecordAccountTransaction is a deposit into or withdrawal from one Cash Account that is not a sale, expense or transfer: the owner putting money in or taking it out, a loan, interest, bank or mobile money charges. The other side is a ledger account from ListCategoryAccounts.

Request body

idstring

Client-chosen UUID, so a retried request records once.

cashAccountIdstringcash_account_id
amountint64 string
categoryAccountIdstringcategory_account_id

The ledger account on the other side, from ListCategoryAccounts.

occurredAtstringoccurred_at

RFC 3339. Defaults to now.

memostring
referencestring

Slip, transaction or cheque number.

ratestring

For an account in another currency: amount is in it, at this rate (units of the business's currency per unit). Empty uses the latest.

Response

Unset when it waits for approval.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/RecordAccountTransaction \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
  "direction": "TRANSACTION_DIRECTION_DEPOSIT",
  "amount": "150000"
}'
Response example
{
  "entry": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "occurredAt": "",
    "source": "",
    "sourceId": "",
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "memo": "",
    "reversesId": "",
    "reversedById": "",
    "reversible": false,
    "reference": "",
    "createdByName": "Amina Mushi"
  },
  "request": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "kind": "",
    "cashAccountId": "",
    "cashAccountName": "Amina Mushi",
    "toAccountId": "",
    "toAccountName": "Amina Mushi",
    "categoryAccountId": "",
    "categoryName": "Amina Mushi",
    "amount": "150000",
    "toAmount": "150000",
    "fee": "150000",
    "bookAmount": "150000",
    "currencyCode": "TZS",
    "memo": "",
    "reference": "",
    "status": "TRANSFER_REQUEST_STATUS_PENDING",
    "requestedBy": "",
    "requestedByName": "Amina Mushi",
    "requestedAt": "",
    "decidedByName": "Amina Mushi",
    "decidedAt": "",
    "decisionNote": "",
    "entryId": "",
    "recurringId": "",
    "canDecide": false
  }
}

ListCategoryAccounts#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListCategoryAccounts

ListCategoryAccounts lists the ledger accounts a deposit or withdrawal can be booked against.

Request body

No fields: send {}.

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListCategoryAccounts \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "accounts": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "code": "",
      "name": "Amina Mushi",
      "type": "LEDGER_ACCOUNT_TYPE_ASSET",
      "forDeposit": false,
      "forWithdrawal": false,
      "systemKey": ""
    }
  ]
}

ListPaymentMethodAccounts#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListPaymentMethodAccounts

ListPaymentMethodAccounts lists the business's checkout methods and the Cash Account each pays into.

Request body

No fields: send {}.

Response

customMethodsAllowedbooleancustom_methods_allowed

Whether the business may add methods of its own, which at_register needs.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListPaymentMethodAccounts \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "methods": [
    {
      "cashAccountId": ""
    }
  ],
  "customMethodsAllowed": false
}

SetPaymentMethodAccount#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/SetPaymentMethodAccount

SetPaymentMethodAccount makes a checkout method pay into a Cash Account from now on. Payments already taken stay where they were posted. Needs owner or admin.

Request body

methodIdstringmethod_id
cashAccountIdstringcash_account_id

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/SetPaymentMethodAccount \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "method": {
    "cashAccountId": ""
  }
}

GetReconciliation#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetReconciliation

GetReconciliation is the worksheet for reconciling a Cash Account with its statement up to a date: the last reconciliation and the lines not yet cleared.

Request body

cashAccountIdstringcash_account_id
statementDatestringstatement_date

YYYY-MM-DD: the statement's end date. Lines up to its end count.

timeZonestringtime_zone

Response

The latest reconciliation; unset for the first one, which starts from 0.

Lines up to the statement date not cleared yet, oldest first.

bookBalanceint64 stringbook_balance

The account's balance in the books at the end of the statement date.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetReconciliation \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "statementDate": "2026-12-05"
}'
Response example
{
  "account": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "name": "Amina Mushi",
    "kind": "CASH_ACCOUNT_KIND_BANK",
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "notes": "",
    "balance": "150000",
    "ledgerAccountId": "",
    "code": "",
    "archived": false,
    "system": false,
    "institution": "",
    "accountNumber": "",
    "color": "",
    "lowBalance": "150000",
    "reconciledThrough": "",
    "reconciledBalance": "150000",
    "in30d": "0",
    "out30d": "0",
    "currencyCode": "TZS",
    "foreignBalance": "150000",
    "valueNow": "0",
    "rate": "",
    "unmatchedRows": 0
  },
  "last": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "cashAccountId": "",
    "statementDate": "2026-12-05",
    "statementBalance": "150000",
    "clearedBalance": "150000",
    "bookBalance": "150000",
    "adjustment": "0",
    "linesCleared": 0,
    "note": "",
    "createdAt": "",
    "createdByName": "Amina Mushi"
  },
  "lines": [
    {
      "entryId": "",
      "lineNo": 0,
      "occurredAt": "",
      "source": "",
      "sourceId": "",
      "memo": "",
      "amount": "150000",
      "balanceAfter": "0",
      "reversible": false,
      "cleared": false,
      "counterpart": "",
      "matched": false,
      "bookAmount": "150000"
    }
  ],
  "bookBalance": "150000"
}

CompleteReconciliation#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/CompleteReconciliation

CompleteReconciliation clears the lines ticked off and posts any difference left. Needs owner or admin.

Request body

idstring

Client-chosen UUID.

cashAccountIdstringcash_account_id
statementDatestringstatement_date
timeZonestringtime_zone
statementBalanceint64 stringstatement_balance

The closing balance printed on the statement.

clearedLineRef[]
notestring
postDifferencebooleanpost_difference

Post what is left between the statement and the cleared balance to "Reconciliation differences". Without it the cleared lines must match the statement exactly.

Response

reconciliationReconciliation
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/CompleteReconciliation \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
  "statementDate": "2026-12-05",
  "statementBalance": "150000"
}'
Response example
{
  "reconciliation": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "cashAccountId": "",
    "statementDate": "2026-12-05",
    "statementBalance": "150000",
    "clearedBalance": "150000",
    "bookBalance": "150000",
    "adjustment": "0",
    "linesCleared": 0,
    "note": "",
    "createdAt": "",
    "createdByName": "Amina Mushi"
  }
}

ListReconciliations#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListReconciliations

Request body

cashAccountIdstringcash_account_id

Response

reconciliationsReconciliation[]
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListReconciliations \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "reconciliations": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "cashAccountId": "",
      "statementDate": "2026-12-05",
      "statementBalance": "150000",
      "clearedBalance": "150000",
      "bookBalance": "150000",
      "adjustment": "0",
      "linesCleared": 0,
      "note": "",
      "createdAt": "",
      "createdByName": "Amina Mushi"
    }
  ]
}

ListExchangeRates#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListExchangeRates

Exchange rates for accounts in other currencies: units of the business's currency per unit of another, from a date on.

Request body

No fields: send {}.

Response

baseCurrencystringbase_currency

Newest first.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListExchangeRates \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "baseCurrency": "TZS",
  "rates": [
    {
      "currencyCode": "TZS",
      "asOf": "",
      "rate": ""
    }
  ]
}

SetExchangeRate#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/SetExchangeRate

Request body

currencyCodestringcurrency_code
asOfstringas_of

Defaults to today.

ratestring

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/SetExchangeRate \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "currencyCode": "TZS"
}'
Response example
{
  "rate": {
    "currencyCode": "TZS",
    "asOf": "",
    "rate": ""
  }
}

RevalueAccount#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/RevalueAccount

RevalueAccount books the gain or loss on an account in another currency at the latest rate, so its book value matches what it is worth. Needs owner or admin.

Request body

cashAccountIdstringcash_account_id
occurredAtstringoccurred_at

RFC 3339. Defaults to now.

Response

Unset when the book value already matched.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/RevalueAccount \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "entry": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "occurredAt": "",
    "source": "",
    "sourceId": "",
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "memo": "",
    "reversesId": "",
    "reversedById": "",
    "reversible": false,
    "reference": "",
    "createdByName": "Amina Mushi"
  },
  "account": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "name": "Amina Mushi",
    "kind": "CASH_ACCOUNT_KIND_BANK",
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "notes": "",
    "balance": "150000",
    "ledgerAccountId": "",
    "code": "",
    "archived": false,
    "system": false,
    "institution": "",
    "accountNumber": "",
    "color": "",
    "lowBalance": "150000",
    "reconciledThrough": "",
    "reconciledBalance": "150000",
    "in30d": "0",
    "out30d": "0",
    "currencyCode": "TZS",
    "foreignBalance": "150000",
    "valueNow": "0",
    "rate": "",
    "unmatchedRows": 0
  }
}

GetAccountSettings#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetAccountSettings

Request body

No fields: send {}.

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetAccountSettings \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "settings": {
    "approvalThreshold": "0",
    "approvalsEnabled": false
  }
}

UpdateAccountSettings#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/UpdateAccountSettings

UpdateAccountSettings needs owner or admin.

Request body

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/UpdateAccountSettings \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "settings": {
    "approvalThreshold": "0",
    "approvalsEnabled": false
  }
}

ListTransferRequests#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListTransferRequests

Transfers and withdrawals at or over the approval threshold, by anyone but an owner, wait here for an owner or admin other than who asked.

Request body

Unspecified lists all, newest first.

Response

pendinginteger
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListTransferRequests \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "TRANSFER_REQUEST_STATUS_PENDING"
}'
Response example
{
  "requests": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "kind": "",
      "cashAccountId": "",
      "cashAccountName": "Amina Mushi",
      "toAccountId": "",
      "toAccountName": "Amina Mushi",
      "categoryAccountId": "",
      "categoryName": "Amina Mushi",
      "amount": "150000",
      "toAmount": "150000",
      "fee": "150000",
      "bookAmount": "150000",
      "currencyCode": "TZS",
      "memo": "",
      "reference": "",
      "status": "TRANSFER_REQUEST_STATUS_PENDING",
      "requestedBy": "",
      "requestedByName": "Amina Mushi",
      "requestedAt": "",
      "decidedByName": "Amina Mushi",
      "decidedAt": "",
      "decisionNote": "",
      "entryId": "",
      "recurringId": "",
      "canDecide": false
    }
  ],
  "pending": 0
}

DecideTransferRequest#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/DecideTransferRequest

Request body

idstring
approveboolean
notestring

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/DecideTransferRequest \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'
Response example
{
  "request": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "kind": "",
    "cashAccountId": "",
    "cashAccountName": "Amina Mushi",
    "toAccountId": "",
    "toAccountName": "Amina Mushi",
    "categoryAccountId": "",
    "categoryName": "Amina Mushi",
    "amount": "150000",
    "toAmount": "150000",
    "fee": "150000",
    "bookAmount": "150000",
    "currencyCode": "TZS",
    "memo": "",
    "reference": "",
    "status": "TRANSFER_REQUEST_STATUS_PENDING",
    "requestedBy": "",
    "requestedByName": "Amina Mushi",
    "requestedAt": "",
    "decidedByName": "Amina Mushi",
    "decidedAt": "",
    "decisionNote": "",
    "entryId": "",
    "recurringId": "",
    "canDecide": false
  }
}

CancelTransferRequest#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/CancelTransferRequest

CancelTransferRequest withdraws one's own pending request.

Request body

idstring

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/CancelTransferRequest \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'
Response example
{
  "request": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "kind": "",
    "cashAccountId": "",
    "cashAccountName": "Amina Mushi",
    "toAccountId": "",
    "toAccountName": "Amina Mushi",
    "categoryAccountId": "",
    "categoryName": "Amina Mushi",
    "amount": "150000",
    "toAmount": "150000",
    "fee": "150000",
    "bookAmount": "150000",
    "currencyCode": "TZS",
    "memo": "",
    "reference": "",
    "status": "TRANSFER_REQUEST_STATUS_PENDING",
    "requestedBy": "",
    "requestedByName": "Amina Mushi",
    "requestedAt": "",
    "decidedByName": "Amina Mushi",
    "decidedAt": "",
    "decisionNote": "",
    "entryId": "",
    "recurringId": "",
    "canDecide": false
  }
}

ListRecurringTransactions#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListRecurringTransactions

Recurring transfers, deposits and withdrawals, posted on their dates.

Request body

No fields: send {}.

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListRecurringTransactions \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "recurring": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "kind": "",
      "cashAccountId": "",
      "toAccountId": "",
      "categoryAccountId": "",
      "amount": "150000",
      "toAmount": "150000",
      "fee": "150000",
      "memo": "",
      "frequency": "RECURRING_FREQUENCY_DAILY",
      "every": 0,
      "nextDate": "2026-12-05",
      "endDate": "2026-12-05",
      "paused": false,
      "lastDate": "2026-12-05",
      "runs": 0,
      "lastError": "",
      "cashAccountName": "Amina Mushi",
      "toAccountName": "Amina Mushi",
      "categoryName": "Amina Mushi"
    }
  ]
}

SaveRecurringTransaction#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/SaveRecurringTransaction

Request body

Client-chosen UUID; saving it again updates it.

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/SaveRecurringTransaction \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "recurring": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "amount": "150000",
    "toAmount": "150000",
    "fee": "150000",
    "frequency": "RECURRING_FREQUENCY_DAILY",
    "nextDate": "2026-12-05",
    "endDate": "2026-12-05",
    "lastDate": "2026-12-05",
    "cashAccountName": "Amina Mushi",
    "toAccountName": "Amina Mushi",
    "categoryName": "Amina Mushi"
  }
}'
Response example
{
  "recurring": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "kind": "",
    "cashAccountId": "",
    "toAccountId": "",
    "categoryAccountId": "",
    "amount": "150000",
    "toAmount": "150000",
    "fee": "150000",
    "memo": "",
    "frequency": "RECURRING_FREQUENCY_DAILY",
    "every": 0,
    "nextDate": "2026-12-05",
    "endDate": "2026-12-05",
    "paused": false,
    "lastDate": "2026-12-05",
    "runs": 0,
    "lastError": "",
    "cashAccountName": "Amina Mushi",
    "toAccountName": "Amina Mushi",
    "categoryName": "Amina Mushi"
  }
}

DeleteRecurringTransaction#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/DeleteRecurringTransaction

Request body

idstring

Response

No fields: send {}.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/DeleteRecurringTransaction \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'
Response example
{}

ImportStatement#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/ImportStatement

ImportStatement adds a bank or mobile money statement's lines to an account and matches each to the books where it can. Lines seen before (same external id) are skipped.

Request body

idstring

Client-chosen UUID.

cashAccountIdstringcash_account_id
fileNamestringfile_name
timeZonestringtime_zone

The business's time zone, for dates without a time.

Response

addedinteger
matchedinteger
skippedinteger

Lines already imported.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ImportStatement \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
  "fileName": "Amina Mushi",
  "rows": [
    {
      "amount": "150000",
      "balance": "150000"
    }
  ]
}'
Response example
{
  "added": 0,
  "matched": 0,
  "skipped": 0,
  "rows": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "cashAccountId": "",
      "occurredAt": "",
      "description": "",
      "reference": "",
      "amount": "150000",
      "balance": "150000",
      "hasBalance": false,
      "externalId": "",
      "status": "STATEMENT_ROW_STATUS_UNMATCHED",
      "entryId": "",
      "lineNo": 0,
      "matchedBy": "",
      "origin": "",
      "matchMemo": "",
      "matchOccurredAt": ""
    }
  ]
}

ListStatementRows#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListStatementRows

ListStatementRows lists an account's imported and fed statement lines.

Request body

cashAccountIdstringcash_account_id

Unspecified lists all.

Response

unmatchedinteger
matchedinteger
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListStatementRows \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "STATEMENT_ROW_STATUS_UNMATCHED"
}'
Response example
{
  "rows": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "cashAccountId": "",
      "occurredAt": "",
      "description": "",
      "reference": "",
      "amount": "150000",
      "balance": "150000",
      "hasBalance": false,
      "externalId": "",
      "status": "STATEMENT_ROW_STATUS_UNMATCHED",
      "entryId": "",
      "lineNo": 0,
      "matchedBy": "",
      "origin": "",
      "matchMemo": "",
      "matchOccurredAt": ""
    }
  ],
  "unmatched": 0,
  "matched": 0
}

ResolveStatementRow#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/ResolveStatementRow

ResolveStatementRow matches a line to a line in the books, unmatches it, ignores it, or records it as a deposit or withdrawal.

Request body

idstring
entryIdstringentry_id
lineNointegerline_no
categoryAccountIdstringcategory_account_id
memostring

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ResolveStatementRow \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
  "action": "STATEMENT_ROW_ACTION_MATCH"
}'
Response example
{
  "row": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "cashAccountId": "",
    "occurredAt": "",
    "description": "",
    "reference": "",
    "amount": "150000",
    "balance": "150000",
    "hasBalance": false,
    "externalId": "",
    "status": "STATEMENT_ROW_STATUS_UNMATCHED",
    "entryId": "",
    "lineNo": 0,
    "matchedBy": "",
    "origin": "",
    "matchMemo": "",
    "matchOccurredAt": ""
  }
}

ListAccountFeeds#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListAccountFeeds

Live feeds: a webhook per account that a bank, M-Pesa or an aggregator pushes transactions to. Needs owner or admin.

Request body

cashAccountIdstringcash_account_id

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListAccountFeeds \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "feeds": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "cashAccountId": "",
      "provider": "",
      "name": "Amina Mushi",
      "active": false,
      "webhookUrl": "",
      "secret": "",
      "lastEventAt": "",
      "events": 0,
      "createdAt": ""
    }
  ]
}

CreateAccountFeed#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/CreateAccountFeed

Request body

cashAccountIdstringcash_account_id
providerstring
namestring

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/CreateAccountFeed \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Amina Mushi"
}'
Response example
{
  "feed": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "cashAccountId": "",
    "provider": "",
    "name": "Amina Mushi",
    "active": false,
    "webhookUrl": "",
    "secret": "",
    "lastEventAt": "",
    "events": 0,
    "createdAt": ""
  }
}

UpdateAccountFeed#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/UpdateAccountFeed

Request body

idstring
activeboolean
rotateSecretbooleanrotate_secret

Issue a new secret; the old one stops working.

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/UpdateAccountFeed \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'
Response example
{
  "feed": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "cashAccountId": "",
    "provider": "",
    "name": "Amina Mushi",
    "active": false,
    "webhookUrl": "",
    "secret": "",
    "lastEventAt": "",
    "events": 0,
    "createdAt": ""
  }
}

DeleteAccountFeed#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/DeleteAccountFeed

Request body

idstring

Response

No fields: send {}.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/DeleteAccountFeed \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'
Response example
{}

ListBudgets#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListBudgets

Monthly budgets for income and expense accounts, against what happened.

Request body

monthstring

YYYY-MM. Defaults to this month.

timeZonestringtime_zone

Response

monthstring
budgetsBudget[]

Every income and expense account, budgeted or not.

elapsednumber

Of the month that has gone so far, 0 to 1.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListBudgets \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "month": "",
  "budgets": [
    {
      "ledgerAccountId": "",
      "code": "",
      "name": "Amina Mushi",
      "type": "LEDGER_ACCOUNT_TYPE_ASSET",
      "amount": "150000",
      "actual": "0",
      "previous": "0"
    }
  ],
  "elapsed": 0
}

SetBudget#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/SetBudget

Request body

ledgerAccountIdstringledger_account_id
amountint64 string

0 removes it.

Response

budgetBudget
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/SetBudget \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": "150000"
}'
Response example
{
  "budget": {
    "ledgerAccountId": "",
    "code": "",
    "name": "Amina Mushi",
    "type": "LEDGER_ACCOUNT_TYPE_ASSET",
    "amount": "150000",
    "actual": "0",
    "previous": "0"
  }
}

GetCashForecast#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetCashForecast

GetCashForecast projects the total across accounts day by day: the usual takings and spending by weekday, invoices due, recurring transactions and pay runs.

Request body

daysinteger

7 to 180; defaults to 30.

timeZonestringtime_zone

Response

currencyCodestringcurrency_code
openingint64 string

The scheduled things in it, by date. The usual takings and spending are summed per weekday, not listed.

lowestint64 string

The lowest closing and its day.

lowestDatestringlowest_date
usualInint64 stringusual_in

Average money in and out a day over the last eight weeks.

usualOutint64 stringusual_out
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetCashForecast \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "currencyCode": "TZS",
  "opening": "0",
  "days": [
    {
      "date": "2026-12-05",
      "moneyIn": "0",
      "moneyOut": "0",
      "closing": "0"
    }
  ],
  "items": [
    {
      "date": "2026-12-05",
      "kind": "",
      "description": "",
      "amount": "150000",
      "refId": ""
    }
  ],
  "lowest": "0",
  "lowestDate": "2026-12-05",
  "usualIn": "0",
  "usualOut": "0"
}

ListLedgerAccounts#

books.readRead
POST/holygrail.ledger.v1.LedgerService/ListLedgerAccounts

ListLedgerAccounts is the chart of accounts with each account's balance at the end of a local date.

Request body

asOfDatestringas_of_date

Local date, YYYY-MM-DD; empty for today.

timeZonestringtime_zone
includeArchivedbooleaninclude_archived

Response

currencyCodestringcurrency_code
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/ListLedgerAccounts \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "asOfDate": "2026-12-05"
}'
Response example
{
  "accounts": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "code": "",
      "name": "Amina Mushi",
      "type": "LEDGER_ACCOUNT_TYPE_ASSET",
      "group": "ACCOUNT_GROUP_CURRENT",
      "description": "",
      "systemKey": "",
      "archived": false,
      "balance": "150000",
      "cashAccountId": "",
      "used": false,
      "editable": false
    }
  ],
  "currencyCode": "TZS"
}

CreateLedgerAccount#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/CreateLedgerAccount

CreateLedgerAccount adds an account to the chart. Needs finance.admin.

Request body

codestring

4 to 6 digits, in the type's range: 1 assets, 2 liabilities, 3 equity, 4 income, 5 to 9 costs.

namestring
descriptionstring

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/CreateLedgerAccount \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Amina Mushi",
  "type": "LEDGER_ACCOUNT_TYPE_ASSET",
  "group": "ACCOUNT_GROUP_CURRENT"
}'
Response example
{
  "account": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "code": "",
    "name": "Amina Mushi",
    "type": "LEDGER_ACCOUNT_TYPE_ASSET",
    "group": "ACCOUNT_GROUP_CURRENT",
    "description": "",
    "systemKey": "",
    "archived": false,
    "balance": "150000",
    "cashAccountId": "",
    "used": false,
    "editable": false
  }
}

UpdateLedgerAccount#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/UpdateLedgerAccount

UpdateLedgerAccount changes an account's code, name, description and group, or archives it. Accounts the system posts to and those behind Cash Accounts keep their code and name and stay open. An account with a balance cannot be archived. Needs finance.admin.

Request body

idstring
codestring
namestring
descriptionstring
archivedboolean

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/UpdateLedgerAccount \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
  "name": "Amina Mushi",
  "group": "ACCOUNT_GROUP_CURRENT"
}'
Response example
{
  "account": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "code": "",
    "name": "Amina Mushi",
    "type": "LEDGER_ACCOUNT_TYPE_ASSET",
    "group": "ACCOUNT_GROUP_CURRENT",
    "description": "",
    "systemKey": "",
    "archived": false,
    "balance": "150000",
    "cashAccountId": "",
    "used": false,
    "editable": false
  }
}

CreateJournalEntry#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/CreateJournalEntry

CreateJournalEntry posts a manual journal entry: two or more lines that balance, dated after the lock date. Needs finance.admin.

Request body

idstring

Client-chosen UUID, so a retried request posts once.

datestring

Local date, YYYY-MM-DD.

timeZonestringtime_zone
memostring
referencestring
locationIdstringlocation_id

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/CreateJournalEntry \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
  "date": "2026-12-05",
  "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'
Response example
{
  "entry": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "occurredAt": "",
    "source": "",
    "sourceId": "",
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "memo": "",
    "reversesId": "",
    "reversedById": "",
    "reversible": false,
    "reference": "",
    "createdByName": "Amina Mushi"
  }
}

GetBooksSettings#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetBooksSettings

Lock date and tax registration.

Request body

No fields: send {}.

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetBooksSettings \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "settings": {
    "lockDate": "2026-12-05",
    "lockDateSetBy": "2026-12-05",
    "lockDateSetAt": "2026-12-05",
    "vatRegistered": false,
    "tin": "",
    "vrn": ""
  }
}

SetLockDate#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/SetLockDate

SetLockDate closes the books up to and including a date; empty opens them. Needs finance.admin.

Request body

lockDatestringlock_date

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/SetLockDate \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "lockDate": "2026-12-05"
}'
Response example
{
  "settings": {
    "lockDate": "2026-12-05",
    "lockDateSetBy": "2026-12-05",
    "lockDateSetAt": "2026-12-05",
    "vatRegistered": false,
    "tin": "",
    "vrn": ""
  }
}

SetTaxRegistration#

books.writeWrite
POST/holygrail.ledger.v1.LedgerService/SetTaxRegistration

SetTaxRegistration records whether the business is VAT registered and its TIN and VRN. Needs finance.admin.

Request body

vatRegisteredbooleanvat_registered
tinstring
vrnstring

Response

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/SetTaxRegistration \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "settings": {
    "lockDate": "2026-12-05",
    "lockDateSetBy": "2026-12-05",
    "lockDateSetAt": "2026-12-05",
    "vatRegistered": false,
    "tin": "",
    "vrn": ""
  }
}

GetBooksOverview#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetBooksOverview

GetBooksOverview is the headline position for a period with the prior period beside it, and the books' health.

Request body

fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

Response

currencyCodestringcurrency_code

Balances at the end of each period.

receivableOverviewFigure
vatOwedOverviewFigurevat_owed

VAT charged less VAT paid, owed to the tax authority.

Flows over each period.

netProfitOverviewFigurenet_profit
currentRatioint64 stringcurrent_ratio

Current assets over current liabilities, times 100.

outOfBalanceint64 stringout_of_balance

Health.

latePostsintegerlate_posts
overdueInvoicesintegeroverdue_invoices
overdueAmountint64 stringoverdue_amount
staleAccountsStaleAccount[]stale_accounts
manualEntriesintegermanual_entries
previousFromstringprevious_from
previousTostringprevious_to
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetBooksOverview \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fromDate": "2026-12-05",
  "toDate": "2026-12-05"
}'
Response example
{
  "currencyCode": "TZS",
  "cash": {
    "current": "0",
    "previous": "0"
  },
  "receivable": {
    "current": "0",
    "previous": "0"
  },
  "payable": {
    "current": "0",
    "previous": "0"
  },
  "vatOwed": {
    "current": "0",
    "previous": "0"
  },
  "revenue": {
    "current": "0",
    "previous": "0"
  },
  "expenses": {
    "current": "0",
    "previous": "0"
  },
  "netProfit": {
    "current": "0",
    "previous": "0"
  },
  "currentRatio": "0",
  "outOfBalance": "150000",
  "settings": {
    "lockDate": "2026-12-05",
    "lockDateSetBy": "2026-12-05",
    "lockDateSetAt": "2026-12-05",
    "vatRegistered": false,
    "tin": "",
    "vrn": ""
  },
  "latePosts": 0,
  "overdueInvoices": 0,
  "overdueAmount": "150000",
  "staleAccounts": [
    {
      "cashAccountId": "",
      "name": "Amina Mushi",
      "lastReconciled": ""
    }
  ],
  "manualEntries": 0,
  "previousFrom": "",
  "previousTo": ""
}

GetGeneralLedger#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetGeneralLedger

GetGeneralLedger is one ledger account's lines over a period with the running balance.

Request body

accountIdstringaccount_id
fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

Response

openingint64 string
debitsint64 string
creditsint64 string
closingint64 string
truncatedboolean

More lines than shown; narrow the dates.

currencyCodestringcurrency_code
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetGeneralLedger \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fromDate": "2026-12-05",
  "toDate": "2026-12-05"
}'
Response example
{
  "account": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "code": "",
    "name": "Amina Mushi",
    "type": "LEDGER_ACCOUNT_TYPE_ASSET",
    "group": "ACCOUNT_GROUP_CURRENT",
    "description": "",
    "systemKey": "",
    "archived": false,
    "balance": "150000",
    "cashAccountId": "",
    "used": false,
    "editable": false
  },
  "opening": "0",
  "debits": "0",
  "credits": "0",
  "closing": "0",
  "lines": [
    {
      "entryId": "",
      "lineNo": 0,
      "occurredAt": "",
      "source": "",
      "sourceId": "",
      "memo": "",
      "reference": "",
      "amount": "150000",
      "balanceAfter": "0",
      "reversed": false
    }
  ],
  "truncated": false,
  "currencyCode": "TZS"
}

GetCashFlowStatement#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetCashFlowStatement

GetCashFlowStatement is the statement of cash flows over a period, by the indirect method.

Request body

fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

Response

currencyCodestringcurrency_code
netProfitint64 stringnet_profit
netChangeint64 stringnet_change
openingCashint64 stringopening_cash
closingCashint64 stringclosing_cash
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetCashFlowStatement \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fromDate": "2026-12-05",
  "toDate": "2026-12-05"
}'
Response example
{
  "currencyCode": "TZS",
  "netProfit": "0",
  "operating": {
    "title": "",
    "total": "150000"
  },
  "investing": {
    "title": "",
    "total": "150000"
  },
  "financing": {
    "title": "",
    "total": "150000"
  },
  "netChange": "0",
  "openingCash": "0",
  "closingCash": "0"
}

GetAgeing#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetAgeing

GetAgeing is what customers owe (receivables) or what is owed to suppliers (payables), by how long past due.

Request body

asOfDatestringas_of_date

Local date; empty for today. Payables are always as of today.

timeZonestringtime_zone

Response

currencyCodestringcurrency_code
asOfDatestringas_of_date
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetAgeing \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "kind": "AGEING_KIND_RECEIVABLE",
  "asOfDate": "2026-12-05"
}'
Response example
{
  "currencyCode": "TZS",
  "rows": [
    {
      "partyId": "",
      "partyName": "Amina Mushi"
    }
  ],
  "totals": {
    "current": "0",
    "days130": "0",
    "days3160": "0",
    "days6190": "0",
    "over90": "0",
    "total": "150000"
  },
  "asOfDate": "2026-12-05"
}

GetCustomerStatement#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetCustomerStatement

GetCustomerStatement is one customer's invoices and payments over a period with the balance after each.

Request body

customerIdstringcustomer_id
fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

Response

customerNamestringcustomer_name
customerEmailstringcustomer_email
currencyCodestringcurrency_code
openingint64 string
closingint64 string
Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetCustomerStatement \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fromDate": "2026-12-05",
  "toDate": "2026-12-05"
}'
Response example
{
  "customerName": "Amina Mushi",
  "customerEmail": "amina@example.co.tz",
  "currencyCode": "TZS",
  "opening": "0",
  "lines": [
    {
      "date": "2026-12-05",
      "kind": "",
      "number": "",
      "description": "",
      "amount": "150000",
      "balanceAfter": "0"
    }
  ],
  "closing": "0",
  "ageing": {
    "current": "0",
    "days130": "0",
    "days3160": "0",
    "days6190": "0",
    "over90": "0",
    "total": "150000"
  }
}

GetVatReturn#

books.readRead
POST/holygrail.ledger.v1.LedgerService/GetVatReturn

GetVatReturn prepares the VAT return for a period: output VAT, input VAT, what is payable, and the purchases schedule.

Request body

fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

Response

currencyCodestringcurrency_code
salesint64 string

From the books: sales and other income net of VAT.

standardRatedSalesint64 stringstandard_rated_sales

Sales the VAT was charged on, at the standard rate (18%), and the rest (zero-rated, exempt or below the rate).

otherSalesint64 stringother_sales
outputVatint64 stringoutput_vat
inputVatint64 stringinput_vat

VAT paid on purchases, from the books.

netVatint64 stringnet_vat

output - input; negative is carried forward.

purchasesVatPurchase[]
unscheduledInputVatint64 stringunscheduled_input_vat

Input VAT in the books that is not on the purchases schedule.

standardRateBpintegerstandard_rate_bp

Basis points: 1800 for 18%.

Request
curl https://api.buziin.tech/holygrail.ledger.v1.LedgerService/GetVatReturn \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fromDate": "2026-12-05",
  "toDate": "2026-12-05"
}'
Response example
{
  "currencyCode": "TZS",
  "settings": {
    "lockDate": "2026-12-05",
    "lockDateSetBy": "2026-12-05",
    "lockDateSetAt": "2026-12-05",
    "vatRegistered": false,
    "tin": "",
    "vrn": ""
  },
  "sales": "0",
  "standardRatedSales": "0",
  "otherSales": "0",
  "outputVat": "0",
  "inputVat": "0",
  "netVat": "0",
  "purchases": [
    {
      "kind": "",
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "date": "2026-12-05",
      "supplier": "",
      "tin": "",
      "vrn": "",
      "number": "",
      "receiptNumber": "",
      "net": "0",
      "vat": "0",
      "total": "150000"
    }
  ],
  "unscheduledInputVat": "0",
  "standardRateBp": 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.

ListCashAccountsRequest

holygrail.ledger.v1.ListCashAccountsRequest

includeArchivedbooleaninclude_archived

ListCashAccountsResponse

holygrail.ledger.v1.ListCashAccountsResponse

currencyCodestringcurrency_code

CreateCashAccountRequest

holygrail.ledger.v1.CreateCashAccountRequest

namestring

Any kind but CASH_DRAWER and CARD_CLEARING, which the system creates.

notesstring
openingBalanceint64 stringopening_balance

Money already in the account, posted against opening balance equity. Zero or more.

openingAtstringopening_at

RFC 3339 time the opening balance is as of. Defaults to now.

institutionstring
accountNumberstringaccount_number
colorstring
lowBalanceint64 stringlow_balance
currencyCodestringcurrency_code

Another currency it holds; the opening balance is then in it, at opening_rate (or the latest rate).

openingRatestringopening_rate
atRegisterbooleanat_register

Also add it to the register as a way to pay, named after the account, so payments taken with it land here. Needs owner or admin and a platform that allows the business's own methods.

CreateCashAccountResponse

holygrail.ledger.v1.CreateCashAccountResponse

UpdateCashAccountRequest

holygrail.ledger.v1.UpdateCashAccountRequest

idstring
namestring
notesstring
archivedboolean

An archived account is hidden and takes no new transfers. Archiving needs a zero balance and no checkout method paying into it.

institutionstring
accountNumberstringaccount_number
colorstring
lowBalanceint64 stringlow_balance
atRegisterbooleanoptionalat_register

Set to show the account at the register as a way to pay (adding a method named after it if none pays into it yet) or to hide the methods that pay into it. Unset leaves them as they are.

UpdateCashAccountResponse

holygrail.ledger.v1.UpdateCashAccountResponse

CreateTransferRequest

holygrail.ledger.v1.CreateTransferRequest

idstring

Client-chosen UUID, so a retried request records one transfer.

fromAccountIdstringfrom_account_id
toAccountIdstringto_account_id
amountint64 string
occurredAtstringoccurred_at

RFC 3339. Defaults to now.

memostring
feeint64 string

What the bank or mobile money provider charged for the move, taken from the account the money left on top of amount and booked as a charge.

toAmountint64 stringto_amount

amount and fee are in the from account's currency. When the two accounts hold different currencies, to_amount is what arrives, in the to account's.

CreateTransferResponse

holygrail.ledger.v1.CreateTransferResponse

Unset when it waits for approval.

ListAccountActivityRequest

holygrail.ledger.v1.ListAccountActivityRequest

cashAccountIdstringcash_account_id
pageSizeintegerpage_size
pageTokenstringpage_token

ListAccountActivityResponse

holygrail.ledger.v1.ListAccountActivityResponse

nextPageTokenstringnext_page_token
balanceint64 string

ListJournalEntriesRequest

holygrail.ledger.v1.ListJournalEntriesRequest

pageSizeintegerpage_size
pageTokenstringpage_token

ListJournalEntriesResponse

holygrail.ledger.v1.ListJournalEntriesResponse

nextPageTokenstringnext_page_token

ReverseEntryRequest

holygrail.ledger.v1.ReverseEntryRequest

entryIdstringentry_id
memostring

ReverseEntryResponse

holygrail.ledger.v1.ReverseEntryResponse

GetTrialBalanceRequest

holygrail.ledger.v1.GetTrialBalanceRequest

fromDatestringfrom_date

Local dates, YYYY-MM-DD, both inclusive.

toDatestringto_date
timeZonestringtime_zone

IANA time zone the dates are in.

locationIdstringlocation_id

Only entries of this location; empty for the whole business.

GetTrialBalanceResponse

holygrail.ledger.v1.GetTrialBalanceResponse

currencyCodestringcurrency_code

GetProfitAndLossRequest

holygrail.ledger.v1.GetProfitAndLossRequest

fromDatestringfrom_date

Local dates, YYYY-MM-DD, both inclusive; at most 366 days.

toDatestringto_date
timeZonestringtime_zone

IANA time zone the dates are in.

locationIdstringlocation_id

One location only; empty for the whole business. Costs not tied to a location (payroll, business-wide expenses) are left out of a single location's figures unless allocate_shared is set.

Unspecified means the previous period.

booksOnlybooleanbooks_only

Leave out labor estimated from timecards, so every figure is in the books.

allocateSharedbooleanallocate_shared

Share costs not tied to a location among locations by net sales.

GetProfitAndLossResponse

holygrail.ledger.v1.GetProfitAndLossResponse

currencyCodestringcurrency_code
periodPnlPeriod
comparisonPnlPeriod

Unset when no comparison was asked for.

locationsPnlLocation[]
departmentsPnlDepartment[]

By day for up to 31 days, by week up to 120 days, else by month.

trendUnitstringtrend_unit

"day", "week" or "month".

passThroughPnlPassThroughpass_through
cashFlowPnlCashFlowcash_flow
notesstring[]

Plain-words notes on what the figures include and leave out.

generatedAtstringgenerated_at

ListProfitAndLossEntriesRequest

holygrail.ledger.v1.ListProfitAndLossEntriesRequest

fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone
keystring

A PnlLine.key from GetProfitAndLoss.

locationIdstringlocation_id

Empty for every location; "none" for entries tied to no location.

pageSizeintegerpage_size
pageTokenstringpage_token

ListProfitAndLossEntriesResponse

holygrail.ledger.v1.ListProfitAndLossEntriesResponse

entriesPnlEntry[]
nextPageTokenstringnext_page_token
totalint64 string

The line's total over the whole range, for checking the page against.

GetAccountsOverviewRequest

holygrail.ledger.v1.GetAccountsOverviewRequest

fromDatestringfrom_date

Local dates, YYYY-MM-DD, both inclusive; at most 366 days.

toDatestringto_date
timeZonestringtime_zone

GetAccountsOverviewResponse

holygrail.ledger.v1.GetAccountsOverviewResponse

currencyCodestringcurrency_code
totalBalanceint64 stringtotal_balance

All open Cash Accounts now.

byKindKindTotal[]by_kind
openingint64 string

Over the range.

moneyInint64 stringmoney_in
moneyOutint64 stringmoney_out
closingint64 string
inflowsFlow[]
outflowsFlow[]
lowBalanceAccountIdsstring[]low_balance_account_ids

Accounts below their low balance warning now.

previousMoneyInint64 stringprevious_money_in

The same totals for the same number of days just before.

previousMoneyOutint64 stringprevious_money_out

GetAccountStatementRequest

holygrail.ledger.v1.GetAccountStatementRequest

cashAccountIdstringcash_account_id
fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

GetAccountStatementResponse

holygrail.ledger.v1.GetAccountStatementResponse

currencyCodestringcurrency_code
openingint64 string
moneyInint64 stringmoney_in
moneyOutint64 stringmoney_out
closingint64 string

Oldest first. At most 5000; truncated is set when there were more.

truncatedboolean
inflowsFlow[]
outflowsFlow[]

RecordAccountTransactionRequest

holygrail.ledger.v1.RecordAccountTransactionRequest

idstring

Client-chosen UUID, so a retried request records once.

cashAccountIdstringcash_account_id
amountint64 string
categoryAccountIdstringcategory_account_id

The ledger account on the other side, from ListCategoryAccounts.

occurredAtstringoccurred_at

RFC 3339. Defaults to now.

memostring
referencestring

Slip, transaction or cheque number.

ratestring

For an account in another currency: amount is in it, at this rate (units of the business's currency per unit). Empty uses the latest.

RecordAccountTransactionResponse

holygrail.ledger.v1.RecordAccountTransactionResponse

Unset when it waits for approval.

ListCategoryAccountsRequest

holygrail.ledger.v1.ListCategoryAccountsRequest

No fields.

ListCategoryAccountsResponse

holygrail.ledger.v1.ListCategoryAccountsResponse

ListPaymentMethodAccountsRequest

holygrail.ledger.v1.ListPaymentMethodAccountsRequest

No fields.

ListPaymentMethodAccountsResponse

holygrail.ledger.v1.ListPaymentMethodAccountsResponse

customMethodsAllowedbooleancustom_methods_allowed

Whether the business may add methods of its own, which at_register needs.

SetPaymentMethodAccountRequest

holygrail.ledger.v1.SetPaymentMethodAccountRequest

methodIdstringmethod_id
cashAccountIdstringcash_account_id

SetPaymentMethodAccountResponse

holygrail.ledger.v1.SetPaymentMethodAccountResponse

GetReconciliationRequest

holygrail.ledger.v1.GetReconciliationRequest

cashAccountIdstringcash_account_id
statementDatestringstatement_date

YYYY-MM-DD: the statement's end date. Lines up to its end count.

timeZonestringtime_zone

GetReconciliationResponse

holygrail.ledger.v1.GetReconciliationResponse

The latest reconciliation; unset for the first one, which starts from 0.

Lines up to the statement date not cleared yet, oldest first.

bookBalanceint64 stringbook_balance

The account's balance in the books at the end of the statement date.

CompleteReconciliationRequest

holygrail.ledger.v1.CompleteReconciliationRequest

idstring

Client-chosen UUID.

cashAccountIdstringcash_account_id
statementDatestringstatement_date
timeZonestringtime_zone
statementBalanceint64 stringstatement_balance

The closing balance printed on the statement.

clearedLineRef[]
notestring
postDifferencebooleanpost_difference

Post what is left between the statement and the cleared balance to "Reconciliation differences". Without it the cleared lines must match the statement exactly.

CompleteReconciliationResponse

holygrail.ledger.v1.CompleteReconciliationResponse

reconciliationReconciliation

ListReconciliationsRequest

holygrail.ledger.v1.ListReconciliationsRequest

cashAccountIdstringcash_account_id

ListReconciliationsResponse

holygrail.ledger.v1.ListReconciliationsResponse

reconciliationsReconciliation[]

ListExchangeRatesRequest

holygrail.ledger.v1.ListExchangeRatesRequest

No fields.

ListExchangeRatesResponse

holygrail.ledger.v1.ListExchangeRatesResponse

baseCurrencystringbase_currency

Newest first.

SetExchangeRateRequest

holygrail.ledger.v1.SetExchangeRateRequest

currencyCodestringcurrency_code
asOfstringas_of

Defaults to today.

ratestring

SetExchangeRateResponse

holygrail.ledger.v1.SetExchangeRateResponse

RevalueAccountRequest

holygrail.ledger.v1.RevalueAccountRequest

cashAccountIdstringcash_account_id
occurredAtstringoccurred_at

RFC 3339. Defaults to now.

RevalueAccountResponse

holygrail.ledger.v1.RevalueAccountResponse

Unset when the book value already matched.

GetAccountSettingsRequest

holygrail.ledger.v1.GetAccountSettingsRequest

No fields.

GetAccountSettingsResponse

holygrail.ledger.v1.GetAccountSettingsResponse

UpdateAccountSettingsRequest

holygrail.ledger.v1.UpdateAccountSettingsRequest

UpdateAccountSettingsResponse

holygrail.ledger.v1.UpdateAccountSettingsResponse

ListTransferRequestsRequest

holygrail.ledger.v1.ListTransferRequestsRequest

Unspecified lists all, newest first.

ListTransferRequestsResponse

holygrail.ledger.v1.ListTransferRequestsResponse

pendinginteger

DecideTransferRequestRequest

holygrail.ledger.v1.DecideTransferRequestRequest

idstring
approveboolean
notestring

DecideTransferRequestResponse

holygrail.ledger.v1.DecideTransferRequestResponse

CancelTransferRequestRequest

holygrail.ledger.v1.CancelTransferRequestRequest

idstring

CancelTransferRequestResponse

holygrail.ledger.v1.CancelTransferRequestResponse

ListRecurringTransactionsRequest

holygrail.ledger.v1.ListRecurringTransactionsRequest

No fields.

ListRecurringTransactionsResponse

holygrail.ledger.v1.ListRecurringTransactionsResponse

SaveRecurringTransactionRequest

holygrail.ledger.v1.SaveRecurringTransactionRequest

Client-chosen UUID; saving it again updates it.

SaveRecurringTransactionResponse

holygrail.ledger.v1.SaveRecurringTransactionResponse

DeleteRecurringTransactionRequest

holygrail.ledger.v1.DeleteRecurringTransactionRequest

idstring

DeleteRecurringTransactionResponse

holygrail.ledger.v1.DeleteRecurringTransactionResponse

No fields.

ImportStatementRequest

holygrail.ledger.v1.ImportStatementRequest

idstring

Client-chosen UUID.

cashAccountIdstringcash_account_id
fileNamestringfile_name
timeZonestringtime_zone

The business's time zone, for dates without a time.

ImportStatementResponse

holygrail.ledger.v1.ImportStatementResponse

addedinteger
matchedinteger
skippedinteger

Lines already imported.

ListStatementRowsRequest

holygrail.ledger.v1.ListStatementRowsRequest

cashAccountIdstringcash_account_id

Unspecified lists all.

ListStatementRowsResponse

holygrail.ledger.v1.ListStatementRowsResponse

unmatchedinteger
matchedinteger

ResolveStatementRowRequest

holygrail.ledger.v1.ResolveStatementRowRequest

idstring
entryIdstringentry_id
lineNointegerline_no
categoryAccountIdstringcategory_account_id
memostring

ResolveStatementRowResponse

holygrail.ledger.v1.ResolveStatementRowResponse

ListAccountFeedsRequest

holygrail.ledger.v1.ListAccountFeedsRequest

cashAccountIdstringcash_account_id

ListAccountFeedsResponse

holygrail.ledger.v1.ListAccountFeedsResponse

CreateAccountFeedRequest

holygrail.ledger.v1.CreateAccountFeedRequest

cashAccountIdstringcash_account_id
providerstring
namestring

CreateAccountFeedResponse

holygrail.ledger.v1.CreateAccountFeedResponse

UpdateAccountFeedRequest

holygrail.ledger.v1.UpdateAccountFeedRequest

idstring
activeboolean
rotateSecretbooleanrotate_secret

Issue a new secret; the old one stops working.

UpdateAccountFeedResponse

holygrail.ledger.v1.UpdateAccountFeedResponse

DeleteAccountFeedRequest

holygrail.ledger.v1.DeleteAccountFeedRequest

idstring

DeleteAccountFeedResponse

holygrail.ledger.v1.DeleteAccountFeedResponse

No fields.

ListBudgetsRequest

holygrail.ledger.v1.ListBudgetsRequest

monthstring

YYYY-MM. Defaults to this month.

timeZonestringtime_zone

ListBudgetsResponse

holygrail.ledger.v1.ListBudgetsResponse

monthstring
budgetsBudget[]

Every income and expense account, budgeted or not.

elapsednumber

Of the month that has gone so far, 0 to 1.

SetBudgetRequest

holygrail.ledger.v1.SetBudgetRequest

ledgerAccountIdstringledger_account_id
amountint64 string

0 removes it.

SetBudgetResponse

holygrail.ledger.v1.SetBudgetResponse

budgetBudget

GetCashForecastRequest

holygrail.ledger.v1.GetCashForecastRequest

daysinteger

7 to 180; defaults to 30.

timeZonestringtime_zone

GetCashForecastResponse

holygrail.ledger.v1.GetCashForecastResponse

currencyCodestringcurrency_code
openingint64 string

The scheduled things in it, by date. The usual takings and spending are summed per weekday, not listed.

lowestint64 string

The lowest closing and its day.

lowestDatestringlowest_date
usualInint64 stringusual_in

Average money in and out a day over the last eight weeks.

usualOutint64 stringusual_out

ListLedgerAccountsRequest

holygrail.ledger.v1.ListLedgerAccountsRequest

asOfDatestringas_of_date

Local date, YYYY-MM-DD; empty for today.

timeZonestringtime_zone
includeArchivedbooleaninclude_archived

ListLedgerAccountsResponse

holygrail.ledger.v1.ListLedgerAccountsResponse

currencyCodestringcurrency_code

CreateLedgerAccountRequest

holygrail.ledger.v1.CreateLedgerAccountRequest

codestring

4 to 6 digits, in the type's range: 1 assets, 2 liabilities, 3 equity, 4 income, 5 to 9 costs.

namestring
descriptionstring

CreateLedgerAccountResponse

holygrail.ledger.v1.CreateLedgerAccountResponse

UpdateLedgerAccountRequest

holygrail.ledger.v1.UpdateLedgerAccountRequest

idstring
codestring
namestring
descriptionstring
archivedboolean

UpdateLedgerAccountResponse

holygrail.ledger.v1.UpdateLedgerAccountResponse

CreateJournalEntryRequest

holygrail.ledger.v1.CreateJournalEntryRequest

idstring

Client-chosen UUID, so a retried request posts once.

datestring

Local date, YYYY-MM-DD.

timeZonestringtime_zone
memostring
referencestring
locationIdstringlocation_id

CreateJournalEntryResponse

holygrail.ledger.v1.CreateJournalEntryResponse

GetBooksSettingsRequest

holygrail.ledger.v1.GetBooksSettingsRequest

No fields.

GetBooksSettingsResponse

holygrail.ledger.v1.GetBooksSettingsResponse

SetLockDateRequest

holygrail.ledger.v1.SetLockDateRequest

lockDatestringlock_date

SetLockDateResponse

holygrail.ledger.v1.SetLockDateResponse

SetTaxRegistrationRequest

holygrail.ledger.v1.SetTaxRegistrationRequest

vatRegisteredbooleanvat_registered
tinstring
vrnstring

SetTaxRegistrationResponse

holygrail.ledger.v1.SetTaxRegistrationResponse

GetBooksOverviewRequest

holygrail.ledger.v1.GetBooksOverviewRequest

fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

GetBooksOverviewResponse

holygrail.ledger.v1.GetBooksOverviewResponse

currencyCodestringcurrency_code

Balances at the end of each period.

receivableOverviewFigure
vatOwedOverviewFigurevat_owed

VAT charged less VAT paid, owed to the tax authority.

Flows over each period.

netProfitOverviewFigurenet_profit
currentRatioint64 stringcurrent_ratio

Current assets over current liabilities, times 100.

outOfBalanceint64 stringout_of_balance

Health.

latePostsintegerlate_posts
overdueInvoicesintegeroverdue_invoices
overdueAmountint64 stringoverdue_amount
staleAccountsStaleAccount[]stale_accounts
manualEntriesintegermanual_entries
previousFromstringprevious_from
previousTostringprevious_to

GetGeneralLedgerRequest

holygrail.ledger.v1.GetGeneralLedgerRequest

accountIdstringaccount_id
fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

GetGeneralLedgerResponse

holygrail.ledger.v1.GetGeneralLedgerResponse

openingint64 string
debitsint64 string
creditsint64 string
closingint64 string
truncatedboolean

More lines than shown; narrow the dates.

currencyCodestringcurrency_code

GetCashFlowStatementRequest

holygrail.ledger.v1.GetCashFlowStatementRequest

fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

GetCashFlowStatementResponse

holygrail.ledger.v1.GetCashFlowStatementResponse

currencyCodestringcurrency_code
netProfitint64 stringnet_profit
netChangeint64 stringnet_change
openingCashint64 stringopening_cash
closingCashint64 stringclosing_cash

GetAgeingRequest

holygrail.ledger.v1.GetAgeingRequest

asOfDatestringas_of_date

Local date; empty for today. Payables are always as of today.

timeZonestringtime_zone

GetAgeingResponse

holygrail.ledger.v1.GetAgeingResponse

currencyCodestringcurrency_code
asOfDatestringas_of_date

GetCustomerStatementRequest

holygrail.ledger.v1.GetCustomerStatementRequest

customerIdstringcustomer_id
fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

GetCustomerStatementResponse

holygrail.ledger.v1.GetCustomerStatementResponse

customerNamestringcustomer_name
customerEmailstringcustomer_email
currencyCodestringcurrency_code
openingint64 string
closingint64 string

GetVatReturnRequest

holygrail.ledger.v1.GetVatReturnRequest

fromDatestringfrom_date
toDatestringto_date
timeZonestringtime_zone

GetVatReturnResponse

holygrail.ledger.v1.GetVatReturnResponse

currencyCodestringcurrency_code
salesint64 string

From the books: sales and other income net of VAT.

standardRatedSalesint64 stringstandard_rated_sales

Sales the VAT was charged on, at the standard rate (18%), and the rest (zero-rated, exempt or below the rate).

otherSalesint64 stringother_sales
outputVatint64 stringoutput_vat
inputVatint64 stringinput_vat

VAT paid on purchases, from the books.

netVatint64 stringnet_vat

output - input; negative is carried forward.

purchasesVatPurchase[]
unscheduledInputVatint64 stringunscheduled_input_vat

Input VAT in the books that is not on the purchases schedule.

standardRateBpintegerstandard_rate_bp

Basis points: 1800 for 18%.

CashAccount

holygrail.ledger.v1.CashAccount

Amounts are integer minor units in the organization's currency.

idstring
namestring
locationIdstringlocation_id

Set for a location's cash on hand.

notesstring
balanceint64 string

Sum of the account's journal lines: what should be there now.

ledgerAccountIdstringledger_account_id

The ledger account behind it, and its code in the chart of accounts.

codestring
archivedboolean
systemboolean

True for accounts the system created and posts to, which cannot be archived.

institutionstring

The bank or provider that holds it, e.g. "CRDB Bank" or "Vodacom M-Pesa".

accountNumberstringaccount_number

Account, till or wallet number.

colorstring

#RRGGBB, or empty for the kind's colour.

lowBalanceint64 stringlow_balance

Warn when the balance falls below this; 0 for no warning.

The checkout methods that pay into it. Cash on hand lists the cash methods, which always pay into the drawer.

reconciledThroughstringreconciled_through

The latest reconciliation, if any: its statement date (YYYY-MM-DD) and balance.

reconciledBalanceint64 stringreconciled_balance
in30dint64 stringin_30d

Money in and out over the last 30 days, transfers included and opening balances left out.

out30dint64 stringout_30d
currencyCodestringcurrency_code

Another currency it holds (ISO 4217), or empty for the business's own. balance and the figures above are always book value in the business's currency; foreign_balance is what the account holds in its own.

foreignBalanceint64 stringforeign_balance
valueNowint64 stringvalue_now

foreign_balance at the latest exchange rate, in the business's currency; 0 when there is no rate yet.

ratestring

The latest rate (units of the business's currency per unit), as text.

unmatchedRowsintegerunmatched_rows

Statement lines not matched to the books yet.

JournalEntry

holygrail.ledger.v1.JournalEntry

idstring
occurredAtstringoccurred_at
sourcestring

What produced it: order, drawer_close, drawer_movement, transfer, opening_balance or reversal.

sourceIdstringsource_id

The order, drawer session, transfer, ... it came from.

locationIdstringlocation_id
memostring
reversesIdstringreverses_id

Set on a reversing entry: the entry it undoes.

reversedByIdstringreversed_by_id

Set when a later entry undid this one.

reversibleboolean

Whether ReverseEntry accepts it.

referencestring

The accountant's own reference on a manual entry.

createdByNamestringcreated_by_name

Who posted it by hand, when someone did.

TransferRequest

holygrail.ledger.v1.TransferRequest

idstring
kindstring

"transfer" or "withdrawal".

cashAccountIdstringcash_account_id
cashAccountNamestringcash_account_name
toAccountIdstringto_account_id
toAccountNamestringto_account_name
categoryAccountIdstringcategory_account_id
categoryNamestringcategory_name
amountint64 string

In the from account's currency.

toAmountint64 stringto_amount
feeint64 string
bookAmountint64 stringbook_amount

In the business's currency.

currencyCodestringcurrency_code
memostring
referencestring
requestedBystringrequested_by
requestedByNamestringrequested_by_name
requestedAtstringrequested_at
decidedByNamestringdecided_by_name
decidedAtstringdecided_at
decisionNotestringdecision_note
entryIdstringentry_id
recurringIdstringrecurring_id

From a recurring transaction.

canDecidebooleancan_decide

Whether the person asking may approve or reject it.

AccountActivity

holygrail.ledger.v1.AccountActivity

entryIdstringentry_id
occurredAtstringoccurred_at
sourcestring
sourceIdstringsource_id
memostring
amountint64 string

Into the account positive, out negative.

balanceAfterint64 stringbalance_after
reversibleboolean

Whether ReverseEntry accepts the entry.

TrialBalanceRow

holygrail.ledger.v1.TrialBalanceRow

accountIdstringaccount_id
codestring
namestring
openingint64 string

Balance before from_date, debit positive.

debitsint64 string

Debits and credits in the period, both positive.

creditsint64 string
closingint64 string

opening + debits - credits.

archivedboolean

PnlPeriod

holygrail.ledger.v1.PnlPeriod

fromDatestringfrom_date
toDatestringto_date
totalsPnlTotals

PnlLine

holygrail.ledger.v1.PnlLine

PnlLine is one row of the statement. Amounts are positive when they add to their section: revenue for income sections, cost for cost sections. A contra line such as discounts or refunds is negative.

keystring

Stable within a response: an account id, or "sales_gross", "discounts" and "estimated_labor" for lines not one account.

accountIdstringaccount_id

The ledger account behind it; empty for estimated labor.

codestring
namestring
sectionPnlSection
amountint64 string
compareAmountint64 stringcompare_amount
estimatedboolean

Not in the books: estimated from timecards.

systemKeystringsystem_key

The ledger's system key, such as "cost_of_goods"; empty for accounts people added.

percentOfRevenueBpintegerpercent_of_revenue_bp

Basis points of net revenue, e.g. 3150 = 31.5%.

PnlLocation

holygrail.ledger.v1.PnlLocation

PnlLocation is the statement for one location, or for costs tied to no location (empty location_id) when they are not allocated.

locationIdstringlocation_id
namestring
totalsPnlTotals
amountsmap<string, int64 string>

Line amounts by PnlLine.key; lines with nothing here are left out.

PnlDepartment

holygrail.ledger.v1.PnlDepartment

departmentIdstringdepartment_id

Empty for sales and costs not in a department.

namestring
netSalesint64 stringnet_sales
costOfGoodsint64 stringcost_of_goods
grossProfitint64 stringgross_profit
grossMarginBpintegergross_margin_bp
quantityint64 string

PnlTrendPoint

holygrail.ledger.v1.PnlTrendPoint

keystring

YYYY-MM-DD for a day or the Monday of a week, YYYY-MM for a month.

revenueint64 string
costOfSalesint64 stringcost_of_sales
laborint64 string
operatingExpensesint64 stringoperating_expenses
netProfitint64 stringnet_profit

PnlPassThrough

holygrail.ledger.v1.PnlPassThrough

Money that went through the business but is not its income or cost.

salesTaxCollectedint64 stringsales_tax_collected
tipsCollectedint64 stringtips_collected
taxOnPurchasesint64 stringtax_on_purchases

PnlLabor

holygrail.ledger.v1.PnlLabor

workedMinutesint64 stringworked_minutes
overtimeMinutesint64 stringovertime_minutes
daysCoveredByPayrollintegerdays_covered_by_payroll

Days of the period that posted pay runs cover; the rest are estimated.

daysinteger
unratedPeopleintegerunrated_people

People whose timecards have no hourly rate, so cost nothing here.

PnlCashFlow

holygrail.ledger.v1.PnlCashFlow

cashInint64 stringcash_in

Money into and out of Cash Accounts in the period, transfers between them left out.

cashOutint64 stringcash_out
netChangeint64 stringnet_change
closingBalanceint64 stringclosing_balance

PnlEntry

holygrail.ledger.v1.PnlEntry

entryIdstringentry_id

The journal entry; empty for an estimated labor row.

occurredAtstringoccurred_at
sourcestring

What posted it (order, expense, invoice, ...) and its id, for a link.

sourceIdstringsource_id
memostring
amountint64 string

Signed like the line: positive adds to its section.

locationIdstringlocation_id
locationNamestringlocation_name
teamMemberIdstringteam_member_id

Estimated labor: the person and their time.

workedMinutesint64 stringworked_minutes
overtimeMinutesint64 stringovertime_minutes

KindTotal

holygrail.ledger.v1.KindTotal

balanceint64 string
accountsinteger

Flow

holygrail.ledger.v1.Flow

Flow is money in or out of Cash Accounts grouped by where it came from or went: "order" (sales), "invoice_payment", "expense", "refund", ...

sourcestring
amountint64 string
countinteger

DayFlow

holygrail.ledger.v1.DayFlow

datestring

YYYY-MM-DD.

moneyInint64 stringmoney_in
moneyOutint64 stringmoney_out
closingint64 string

All Cash Accounts at the end of the day.

AccountFlow

holygrail.ledger.v1.AccountFlow

cashAccountIdstringcash_account_id
openingint64 string
moneyInint64 stringmoney_in
moneyOutint64 stringmoney_out
transfersInint64 stringtransfers_in

Moves between the business's own accounts and opening balances, in and out.

transfersOutint64 stringtransfers_out
closingint64 string

StatementLine

holygrail.ledger.v1.StatementLine

entryIdstringentry_id
lineNointegerline_no
occurredAtstringoccurred_at
sourcestring
sourceIdstringsource_id
memostring
amountint64 string

Into the account positive, out negative.

balanceAfterint64 stringbalance_after
reversibleboolean
clearedboolean

Ticked off in a reconciliation.

counterpartstring

For a transfer: the other account's name.

matchedboolean

Matched to an imported or fed statement line.

bookAmountint64 stringbook_amount

For an account in another currency, amount and balance_after are in it and this is the book value.

CategoryAccount

holygrail.ledger.v1.CategoryAccount

idstring
codestring
namestring
forDepositbooleanfor_deposit

Offered for deposits, withdrawals or both.

forWithdrawalbooleanfor_withdrawal
systemKeystringsystem_key

The ledger's system key, e.g. "owner_contributions"; empty for accounts people added (expense categories).

PaymentMethodAccount

holygrail.ledger.v1.PaymentMethodAccount

cashAccountIdstringcash_account_id

Empty for cash (always the location's cash on hand) and for a method with no payments and no link yet.

Reconciliation

holygrail.ledger.v1.Reconciliation

idstring
cashAccountIdstringcash_account_id
statementDatestringstatement_date
statementBalanceint64 stringstatement_balance
clearedBalanceint64 stringcleared_balance
bookBalanceint64 stringbook_balance
adjustmentint64 string
linesClearedintegerlines_cleared
notestring
createdAtstringcreated_at
createdByNamestringcreated_by_name

LineRef

holygrail.ledger.v1.LineRef

entryIdstringentry_id
lineNointegerline_no

ExchangeRate

holygrail.ledger.v1.ExchangeRate

currencyCodestringcurrency_code
asOfstringas_of

YYYY-MM-DD it applies from.

ratestring

Units of the business's currency per unit, as decimal text: "2650.5".

AccountSettings

holygrail.ledger.v1.AccountSettings

approvalThresholdint64 stringapproval_threshold

Book value at or over which transfers and withdrawals need approval while approvals_enabled is on.

approvalsEnabledbooleanapprovals_enabled

Whether transfers and withdrawals over the threshold wait for approval; off, they post at once and the threshold is kept for later.

RecurringTransaction

holygrail.ledger.v1.RecurringTransaction

idstring
kindstring

"transfer", "deposit" or "withdrawal".

cashAccountIdstringcash_account_id
toAccountIdstringto_account_id
categoryAccountIdstringcategory_account_id
amountint64 string
toAmountint64 stringto_amount
feeint64 string
memostring
everyinteger

Every this many days, weeks or months.

nextDatestringnext_date

YYYY-MM-DD, local to the business.

endDatestringend_date
pausedboolean
lastDatestringlast_date
runsinteger
lastErrorstringlast_error

Why the last run did not post, if it did not.

cashAccountNamestringcash_account_name

Filled in for lists.

toAccountNamestringto_account_name
categoryNamestringcategory_name

ImportRow

holygrail.ledger.v1.ImportRow

occurredAtstringoccurred_at

RFC 3339 or YYYY-MM-DD.

descriptionstring
referencestring
amountint64 string
balanceint64 string
hasBalancebooleanhas_balance
externalIdstringexternal_id

The bank's own transaction id. Empty derives one from the date, amount, reference and description.

StatementRow

holygrail.ledger.v1.StatementRow

idstring
cashAccountIdstringcash_account_id
occurredAtstringoccurred_at
descriptionstring
referencestring
amountint64 string

In the account's currency; into the account positive.

balanceint64 string

The balance the bank printed after it, if any.

hasBalancebooleanhas_balance
externalIdstringexternal_id
entryIdstringentry_id

The line in the books it matched.

lineNointegerline_no
matchedBystringmatched_by

"auto", "manual" or "created".

originstring

"file" or the feed's provider.

matchMemostringmatch_memo

The matched line's description and date, for showing side by side.

matchOccurredAtstringmatch_occurred_at
candidatesStatementLine[]

For an unmatched line: lines in the books that could be it, best first.

AccountFeed

holygrail.ledger.v1.AccountFeed

idstring
cashAccountIdstringcash_account_id
providerstring

"generic", "mpesa", "airtel" or "selcom".

namestring
activeboolean
webhookUrlstringwebhook_url

Where the provider sends transactions.

secretstring

Shown once, when the feed is created; send it as the X-Feed-Key header or the key query parameter.

lastEventAtstringlast_event_at
eventsinteger
createdAtstringcreated_at

Budget

holygrail.ledger.v1.Budget

ledgerAccountIdstringledger_account_id
codestring
namestring
amountint64 string

Monthly; 0 for none.

actualint64 string

What happened in the month, and the month before.

previousint64 string

ForecastDay

holygrail.ledger.v1.ForecastDay

datestring
moneyInint64 stringmoney_in
moneyOutint64 stringmoney_out
closingint64 string

ForecastItem

holygrail.ledger.v1.ForecastItem

datestring
kindstring

"invoice", "recurring", "payroll", "usual_in" or "usual_out".

descriptionstring
amountint64 string

Into the business positive.

refIdstringref_id

LedgerAccount

holygrail.ledger.v1.LedgerAccount

idstring
codestring
namestring
descriptionstring
systemKeystringsystem_key

Set for accounts the system posts to by itself.

archivedboolean
balanceint64 string

Debit positive, at the end of as_of_date.

cashAccountIdstringcash_account_id

The Cash Account behind it, when there is one.

usedboolean

Whether any entry has used it.

editableboolean

Whether its code and name can change and it can be archived.

ManualJournalLine

holygrail.ledger.v1.ManualJournalLine

accountIdstringaccount_id
debitint64 string

One of the two, positive.

creditint64 string
memostring

BooksSettings

holygrail.ledger.v1.BooksSettings

lockDatestringlock_date

YYYY-MM-DD, or empty when the books are open.

lockDateSetBystringlock_date_set_by
lockDateSetAtstringlock_date_set_at
vatRegisteredbooleanvat_registered
tinstring
vrnstring

OverviewFigure

holygrail.ledger.v1.OverviewFigure

A headline figure now and in the period before, of the same length.

currentint64 string
previousint64 string

StaleAccount

holygrail.ledger.v1.StaleAccount

cashAccountIdstringcash_account_id
namestring
lastReconciledstringlast_reconciled

YYYY-MM-DD, or empty when never reconciled.

GeneralLedgerLine

holygrail.ledger.v1.GeneralLedgerLine

entryIdstringentry_id
lineNointegerline_no
occurredAtstringoccurred_at
sourcestring
sourceIdstringsource_id
memostring
referencestring
amountint64 string

Debit positive.

balanceAfterint64 stringbalance_after
reversedboolean

CashFlowSection

holygrail.ledger.v1.CashFlowSection

titlestring
totalint64 string

AgeingRow

holygrail.ledger.v1.AgeingRow

partyIdstringparty_id

The customer or supplier.

partyNamestringparty_name

AgeingBuckets

holygrail.ledger.v1.AgeingBuckets

Owed amounts by days past due: not yet due, 1-30, 31-60, 61-90, over 90.

currentint64 string
days130int64 stringdays_1_30
days3160int64 stringdays_31_60
days6190int64 stringdays_61_90
over90int64 stringover_90
totalint64 string

CustomerStatementLine

holygrail.ledger.v1.CustomerStatementLine

datestring
kindstring

invoice, payment or void.

numberstring
descriptionstring
amountint64 string

What the customer owes more (invoice) positive, less (payment) negative.

balanceAfterint64 stringbalance_after

VatPurchase

holygrail.ledger.v1.VatPurchase

kindstring

supplier_invoice or expense.

idstring
datestring
supplierstring
tinstring
vrnstring
numberstring
receiptNumberstringreceipt_number
netint64 string
vatint64 string
totalint64 string

LinkedMethod

holygrail.ledger.v1.LinkedMethod

LinkedMethod is a checkout method as an account shows it.

idstring
namestring
kindstring

cash, card, mobile_money, bank_transfer, voucher or other.

enabledboolean

Offered at the register.

JournalLine

holygrail.ledger.v1.JournalLine

accountIdstringaccount_id
accountCodestringaccount_code
accountNamestringaccount_name
amountint64 string

Debit positive, credit negative.

memostring

PnlTotals

holygrail.ledger.v1.PnlTotals

revenueint64 string

Net revenue.

costOfSalesint64 stringcost_of_sales
grossProfitint64 stringgross_profit
laborint64 string
operatingExpensesint64 stringoperating_expenses
operatingProfitint64 stringoperating_profit

Gross profit less labor and operating expenses.

otherIncomeint64 stringother_income
netProfitint64 stringnet_profit
estimatedLaborint64 stringestimated_labor

Part of labor that is estimated from timecards.

grossMarginBpintegergross_margin_bp

Margins and ratios in basis points of revenue; 0 when there is no revenue.

operatingMarginBpintegeroperating_margin_bp
netMarginBpintegernet_margin_bp
laborBpintegerlabor_bp
primeCostBpintegerprime_cost_bp

Cost of sales plus labor, the restaurant "prime cost".

grossSalesint64 stringgross_sales
discountsint64 string
refundsint64 string

CashFlowLine

holygrail.ledger.v1.CashFlowLine

labelstring
amountint64 string

Into cash positive.

accountIdstringaccount_id

AgeingDocument

holygrail.ledger.v1.AgeingDocument

idstring
numberstring
datestring
dueDatestringdue_date
totalint64 string
owedint64 string
daysPastDueintegerdays_past_due

CashAccountKind enum

holygrail.ledger.v1.CashAccountKind

CASH_ACCOUNT_KIND_UNSPECIFIED
CASH_ACCOUNT_KIND_BANK
CASH_ACCOUNT_KIND_CASH_DRAWER

A location's cash on hand: its drawers and safe. Register cash sales, pay-ins, pay-outs and drawer variances post here.

CASH_ACCOUNT_KIND_PETTY_CASH
CASH_ACCOUNT_KIND_MOBILE_MONEY
CASH_ACCOUNT_KIND_CARD_CLEARING

Card payments taken but not yet paid out by the processor.

CASH_ACCOUNT_KIND_CUSTOM

PnlComparison enum

holygrail.ledger.v1.PnlComparison

PNL_COMPARISON_UNSPECIFIED
PNL_COMPARISON_PREVIOUS_PERIOD

The same number of days just before the period.

PNL_COMPARISON_PREVIOUS_YEAR

The same dates a year earlier.

PNL_COMPARISON_NONE

TransactionDirection enum

holygrail.ledger.v1.TransactionDirection

TRANSACTION_DIRECTION_UNSPECIFIED
TRANSACTION_DIRECTION_DEPOSIT

Money into the account.

TRANSACTION_DIRECTION_WITHDRAWAL

Money out of it.

TransferRequestStatus enum

holygrail.ledger.v1.TransferRequestStatus

TRANSFER_REQUEST_STATUS_UNSPECIFIED
TRANSFER_REQUEST_STATUS_PENDING
TRANSFER_REQUEST_STATUS_APPROVED
TRANSFER_REQUEST_STATUS_REJECTED
TRANSFER_REQUEST_STATUS_CANCELLED

StatementRowStatus enum

holygrail.ledger.v1.StatementRowStatus

STATEMENT_ROW_STATUS_UNSPECIFIED
STATEMENT_ROW_STATUS_UNMATCHED
STATEMENT_ROW_STATUS_MATCHED
STATEMENT_ROW_STATUS_CREATED

Recorded in the books from the statement.

STATEMENT_ROW_STATUS_IGNORED

StatementRowAction enum

holygrail.ledger.v1.StatementRowAction

STATEMENT_ROW_ACTION_UNSPECIFIED
STATEMENT_ROW_ACTION_MATCH

Match to entry_id and line_no.

STATEMENT_ROW_ACTION_UNMATCH
STATEMENT_ROW_ACTION_IGNORE
STATEMENT_ROW_ACTION_CREATE

Record as a deposit or withdrawal against category_account_id.

LedgerAccountType enum

holygrail.ledger.v1.LedgerAccountType

LEDGER_ACCOUNT_TYPE_UNSPECIFIED
LEDGER_ACCOUNT_TYPE_ASSET
LEDGER_ACCOUNT_TYPE_LIABILITY
LEDGER_ACCOUNT_TYPE_EQUITY
LEDGER_ACCOUNT_TYPE_INCOME
LEDGER_ACCOUNT_TYPE_EXPENSE

AccountGroup enum

holygrail.ledger.v1.AccountGroup

ACCOUNT_GROUP_UNSPECIFIED
ACCOUNT_GROUP_CURRENT

Cash, stock, what customers owe; what is owed within the year.

ACCOUNT_GROUP_NON_CURRENT

Equipment, vehicles, long-term loans.

AgeingKind enum

holygrail.ledger.v1.AgeingKind

AGEING_KIND_UNSPECIFIED
AGEING_KIND_RECEIVABLE
AGEING_KIND_PAYABLE

PnlSection enum

holygrail.ledger.v1.PnlSection

PNL_SECTION_UNSPECIFIED
PNL_SECTION_REVENUE

Sales less discounts and refunds, room revenue.

PNL_SECTION_COST_OF_SALES

Cost of goods sold, waste and stock shrinkage.

PNL_SECTION_LABOR

Wages and employer payroll costs from posted pay runs, and labor estimated from timecards for days no pay run covers.

PNL_SECTION_OPERATING_EXPENSES

Expense categories, payment fees, cash over and short, paid outs.

PNL_SECTION_OTHER_INCOME

Kept deposits and other income outside trading.

RecurringFrequency enum

holygrail.ledger.v1.RecurringFrequency

RECURRING_FREQUENCY_UNSPECIFIED
RECURRING_FREQUENCY_DAILY
RECURRING_FREQUENCY_WEEKLY
RECURRING_FREQUENCY_MONTHLY

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