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.
GetAccountingConnection#
Request body
No fields: send {}.
Response
providersAccountingProvider[]connectionAccountingConnectionEmpty when not connected.
curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/GetAccountingConnection \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"providers": [
{
"name": "Amina Mushi",
"label": "",
"available": false
}
],
"connection": {
"provider": "",
"tenantName": "Amina Mushi",
"status": "",
"startDay": "",
"lastError": "",
"connectedAt": "",
"lastRunAt": "",
"unmapped": 0
}
}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
providerstringstartDaystringstart_dayYYYY-MM-DD: the first business date to send; empty for today.
Response
authUrlstringauth_urlcurl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/StartAccountingConnect \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"authUrl": ""
}DisconnectAccounting#
Request body
No fields: send {}.
Response
No fields: send {}.
curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/DisconnectAccounting \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{}GetAccountMap#
Request body
No fields: send {}.
Response
rowsAccountMapRow[]curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/GetAccountMap \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"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#
Request body
rowsRow[]Response
rowsAccountMapRow[]curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/SaveAccountMap \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"rows": [
{
"ledgerAccountId": "",
"code": "",
"name": "Amina Mushi",
"type": "",
"remoteId": "",
"remoteName": "Amina Mushi",
"suggestedId": "",
"used": false
}
]
}PushAccountingNow#
PushAccountingNow sends every finished day not yet sent.
Request body
No fields: send {}.
Response
pushesAccountingPush[]curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/PushAccountingNow \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"pushes": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"day": "",
"reference": "",
"status": "",
"remoteId": "",
"entries": 0,
"debits": "0",
"error": "",
"createdAt": ""
}
]
}ListAccountingPushes#
Request body
No fields: send {}.
Response
pushesAccountingPush[]curl https://api.buziin.tech/holygrail.accounting.v1.AccountingService/ListAccountingPushes \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"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
providersAccountingProvider[]connectionAccountingConnectionEmpty when not connected.
StartAccountingConnectRequest
holygrail.accounting.v1.StartAccountingConnectRequest
providerstringstartDaystringstart_dayYYYY-MM-DD: the first business date to send; empty for today.
StartAccountingConnectResponse
holygrail.accounting.v1.StartAccountingConnectResponse
authUrlstringauth_urlDisconnectAccountingRequest
holygrail.accounting.v1.DisconnectAccountingRequest
No fields.
DisconnectAccountingResponse
holygrail.accounting.v1.DisconnectAccountingResponse
No fields.
GetAccountMapRequest
holygrail.accounting.v1.GetAccountMapRequest
No fields.
PushAccountingNowRequest
holygrail.accounting.v1.PushAccountingNowRequest
No fields.
ListAccountingPushesRequest
holygrail.accounting.v1.ListAccountingPushesRequest
No fields.
ListAccountingPushesResponse
holygrail.accounting.v1.ListAccountingPushesResponse
pushesAccountingPush[]AccountingProvider
holygrail.accounting.v1.AccountingProvider
namestringquickbooks, xero or zoho.
labelstringavailablebooleanWhether this server has an app registered with it.
AccountingConnection
holygrail.accounting.v1.AccountingConnection
providerstringtenantNamestringtenant_nameThe company, organisation or tenant in the other software.
statusstringactive, or reconnect when the owner has to sign in again.
startDaystringstart_daylastErrorstringlast_errorconnectedAtstringconnected_atlastRunAtstringlast_run_atunmappedintegerOur accounts with activity and no account mapped yet.
AccountMapRow
holygrail.accounting.v1.AccountMapRow
ledgerAccountIdstringledger_account_idcodestringnamestringtypestringasset, liability, equity, income or expense.
remoteIdstringremote_idThe account it goes to; empty when not mapped.
remoteNamestringremote_namesuggestedIdstringsuggested_idA likely match by name and type, for an unmapped row.
usedbooleanWhether anything has been posted to it.
RemoteAccount
holygrail.accounting.v1.RemoteAccount
idstringcodestringnamestringtypestringRow
holygrail.accounting.v1.SaveAccountMapRequest.Row
ledgerAccountIdstringledger_account_idremoteIdstringremote_idEmpty to clear.
AccountingPush
holygrail.accounting.v1.AccountingPush
idstringdaystringreferencestringstatusstringsending, sent or failed.
remoteIdstringremote_identriesintegerdebitsint64 stringerrorstringcreatedAtstringcreated_atBase URL https://api.buziin.tech. Every method is POST with a JSON body; see Making requests.