Developers
Sign inGet API keys
API reference/Money and books

Accounting

AccountingService pushes the books to the business's accounting software: QuickBooks Online, Xero or Zoho Books (ADR 77). Once each business day ends, everything posted for it is summed by account into one journal and sent. The owner connects by signing in to the other software, and maps each of our accounts to one of theirs.

Reading needs finance.manage or reports.view; connecting, mapping and pushing need finance.manage.

holygrail.accounting.v1.AccountingService7 methodsbooks.read · books.write

GetAccountingConnection#

books.readRead
POST/holygrail.accounting.v1.AccountingService/GetAccountingConnection

Request body

No fields: send {}.

Response

Empty when not connected.

Request
curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/GetAccountingConnection \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "providers": [
    {
      "name": "Amina Mushi",
      "label": "",
      "available": false
    }
  ],
  "connection": {
    "provider": "",
    "tenantName": "Amina Mushi",
    "status": "",
    "startDay": "",
    "lastError": "",
    "connectedAt": "",
    "lastRunAt": "",
    "unmapped": 0
  }
}

StartAccountingConnect#

books.writeWrite
POST/holygrail.accounting.v1.AccountingService/StartAccountingConnect

StartAccountingConnect returns the address where the owner signs in to the provider. The provider sends them back to this API, which saves the connection and returns them to the dashboard.

Request body

providerstring
startDaystringstart_day

YYYY-MM-DD: the first business date to send; empty for today.

Response

authUrlstringauth_url
Request
curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/StartAccountingConnect \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "authUrl": ""
}

DisconnectAccounting#

books.writeWrite
POST/holygrail.accounting.v1.AccountingService/DisconnectAccounting

Request body

No fields: send {}.

Response

No fields: send {}.

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

GetAccountMap#

books.readRead
POST/holygrail.accounting.v1.AccountingService/GetAccountMap

Request body

No fields: send {}.

Response

remoteAccountsRemoteAccount[]remote_accounts
Request
curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/GetAccountMap \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "rows": [
    {
      "ledgerAccountId": "",
      "code": "",
      "name": "Amina Mushi",
      "type": "",
      "remoteId": "",
      "remoteName": "Amina Mushi",
      "suggestedId": "",
      "used": false
    }
  ],
  "remoteAccounts": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "code": "",
      "name": "Amina Mushi",
      "type": ""
    }
  ]
}

SaveAccountMap#

books.writeWrite
POST/holygrail.accounting.v1.AccountingService/SaveAccountMap

Request body

rowsRow[]

Response

Request
curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/SaveAccountMap \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "rows": [
    {
      "ledgerAccountId": "",
      "code": "",
      "name": "Amina Mushi",
      "type": "",
      "remoteId": "",
      "remoteName": "Amina Mushi",
      "suggestedId": "",
      "used": false
    }
  ]
}

PushAccountingNow#

books.writeWrite
POST/holygrail.accounting.v1.AccountingService/PushAccountingNow

PushAccountingNow sends every finished day not yet sent.

Request body

No fields: send {}.

Response

Request
curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/PushAccountingNow \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "pushes": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "day": "",
      "reference": "",
      "status": "",
      "remoteId": "",
      "entries": 0,
      "debits": "0",
      "error": "",
      "createdAt": ""
    }
  ]
}

ListAccountingPushes#

books.readRead
POST/holygrail.accounting.v1.AccountingService/ListAccountingPushes

Request body

No fields: send {}.

Response

Request
curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/ListAccountingPushes \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "pushes": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "day": "",
      "reference": "",
      "status": "",
      "remoteId": "",
      "entries": 0,
      "debits": "0",
      "error": "",
      "createdAt": ""
    }
  ]
}

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.

GetAccountingConnectionRequest

holygrail.accounting.v1.GetAccountingConnectionRequest

No fields.

GetAccountingConnectionResponse

holygrail.accounting.v1.GetAccountingConnectionResponse

Empty when not connected.

StartAccountingConnectRequest

holygrail.accounting.v1.StartAccountingConnectRequest

providerstring
startDaystringstart_day

YYYY-MM-DD: the first business date to send; empty for today.

StartAccountingConnectResponse

holygrail.accounting.v1.StartAccountingConnectResponse

authUrlstringauth_url

DisconnectAccountingRequest

holygrail.accounting.v1.DisconnectAccountingRequest

No fields.

DisconnectAccountingResponse

holygrail.accounting.v1.DisconnectAccountingResponse

No fields.

GetAccountMapRequest

holygrail.accounting.v1.GetAccountMapRequest

No fields.

GetAccountMapResponse

holygrail.accounting.v1.GetAccountMapResponse

remoteAccountsRemoteAccount[]remote_accounts

SaveAccountMapRequest

holygrail.accounting.v1.SaveAccountMapRequest

rowsRow[]

SaveAccountMapResponse

holygrail.accounting.v1.SaveAccountMapResponse

PushAccountingNowRequest

holygrail.accounting.v1.PushAccountingNowRequest

No fields.

PushAccountingNowResponse

holygrail.accounting.v1.PushAccountingNowResponse

ListAccountingPushesRequest

holygrail.accounting.v1.ListAccountingPushesRequest

No fields.

ListAccountingPushesResponse

holygrail.accounting.v1.ListAccountingPushesResponse

AccountingProvider

holygrail.accounting.v1.AccountingProvider

namestring

quickbooks, xero or zoho.

labelstring
availableboolean

Whether this server has an app registered with it.

AccountingConnection

holygrail.accounting.v1.AccountingConnection

providerstring
tenantNamestringtenant_name

The company, organisation or tenant in the other software.

statusstring

active, or reconnect when the owner has to sign in again.

startDaystringstart_day
lastErrorstringlast_error
connectedAtstringconnected_at
lastRunAtstringlast_run_at
unmappedinteger

Our accounts with activity and no account mapped yet.

AccountMapRow

holygrail.accounting.v1.AccountMapRow

ledgerAccountIdstringledger_account_id
codestring
namestring
typestring

asset, liability, equity, income or expense.

remoteIdstringremote_id

The account it goes to; empty when not mapped.

remoteNamestringremote_name
suggestedIdstringsuggested_id

A likely match by name and type, for an unmapped row.

usedboolean

Whether anything has been posted to it.

RemoteAccount

holygrail.accounting.v1.RemoteAccount

idstring
codestring
namestring
typestring

Row

holygrail.accounting.v1.SaveAccountMapRequest.Row

ledgerAccountIdstringledger_account_id
remoteIdstringremote_id

Empty to clear.

AccountingPush

holygrail.accounting.v1.AccountingPush

idstring
daystring
referencestring
statusstring

sending, sent or failed.

remoteIdstringremote_id
entriesinteger
debitsint64 string
errorstring
createdAtstringcreated_at

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