Expenses
ExpensesService records money the business spends, who it paid and what for, with photos of the receipts.
Recording an expense posts it to the ledger: its category's expense account (and any reclaimable tax) is debited and the Cash Account it was paid from is credited. Amounts never change afterwards; voiding posts the reversing entry, and the expense can be entered again.
Managers, admins and owners use it. Voiding needs owner or admin.
ListCategories#
Request body
No fields: send {}.
Response
categoriesExpenseCategory[]A business starts with a set of common categories.
curl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/ListCategories \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"categories": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"ledgerAccountId": "",
"code": "",
"archived": false
}
]
}CreateCategory#
Request body
namestringResponse
categoryExpenseCategorycurl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/CreateCategory \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Amina Mushi"
}'{
"category": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"ledgerAccountId": "",
"code": "",
"archived": false
}
}UpdateCategory#
Request body
idstringnamestringarchivedbooleanResponse
categoryExpenseCategorycurl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/UpdateCategory \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi"
}'{
"category": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"ledgerAccountId": "",
"code": "",
"archived": false
}
}ListVendors#
Request body
No fields: send {}.
Response
vendorsVendor[]curl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/ListVendors \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"vendors": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"email": "amina@example.co.tz",
"phone": "+255712345678",
"notes": "",
"archived": false
}
]
}CreateVendor#
Request body
namestringemailstringphonestringnotesstringResponse
vendorVendorcurl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/CreateVendor \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Amina Mushi",
"email": "amina@example.co.tz",
"phone": "+255712345678"
}'{
"vendor": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"email": "amina@example.co.tz",
"phone": "+255712345678",
"notes": "",
"archived": false
}
}UpdateVendor#
Request body
idstringnamestringemailstringphonestringnotesstringarchivedbooleanResponse
vendorVendorcurl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/UpdateVendor \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"email": "amina@example.co.tz",
"phone": "+255712345678"
}'{
"vendor": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"email": "amina@example.co.tz",
"phone": "+255712345678",
"notes": "",
"archived": false
}
}ListExpenses#
Request body
categoryIdstringcategory_idOptional filters.
vendorIdstringvendor_idcashAccountIdstringcash_account_idlocationIdstringlocation_idincludeVoidedbooleaninclude_voidedpageSizeintegerpage_sizeNewest first; pass the previous response's next_page_token.
pageTokenstringpage_tokenfromDatestringfrom_dateOptional: only expenses on these local dates (YYYY-MM-DD, both inclusive) in time_zone. Both dates or neither.
toDatestringto_datetimeZonestringtime_zoneResponse
expensesExpense[]nextPageTokenstringnext_page_tokencurl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/ListExpenses \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"pageSize": 50,
"fromDate": "2026-12-05",
"toDate": "2026-12-05"
}'{
"expenses": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"categoryId": "",
"vendorId": "",
"cashAccountId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"occurredAt": "",
"amount": "150000",
"tax": "150000",
"reference": "",
"note": "",
"voided": false,
"voidedAt": "",
"voidReason": "",
"createdAt": ""
}
],
"nextPageToken": ""
}GetExpense#
Request body
idstringResponse
expenseExpensejournalEntryIdstringjournal_entry_idThe ledger entry it posted, for the Books link.
curl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/GetExpense \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"expense": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"categoryId": "",
"vendorId": "",
"cashAccountId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"occurredAt": "",
"amount": "150000",
"tax": "150000",
"reference": "",
"note": "",
"voided": false,
"voidedAt": "",
"voidReason": "",
"createdAt": ""
},
"journalEntryId": ""
}CreateExpense#
Request body
idstringClient-chosen UUID, so a retried request records one expense.
categoryIdstringcategory_idvendorIdstringvendor_idcashAccountIdstringcash_account_idlocationIdstringlocation_idoccurredAtstringoccurred_atRFC 3339. Defaults to now.
amountint64 stringtaxint64 stringreferencestringnotestringattachmentIdsstring[]attachment_idsResponse
expenseExpensecurl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/CreateExpense \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"amount": "150000",
"tax": "150000",
"attachmentIds": [
""
]
}'{
"expense": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"categoryId": "",
"vendorId": "",
"cashAccountId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"occurredAt": "",
"amount": "150000",
"tax": "150000",
"reference": "",
"note": "",
"voided": false,
"voidedAt": "",
"voidReason": "",
"createdAt": ""
}
}UpdateExpense#
UpdateExpense changes what does not touch the books: vendor, location, reference, note, and adds attachments.
Request body
idstringvendorIdstringvendor_idlocationIdstringlocation_idreferencestringnotestringaddAttachmentIdsstring[]add_attachment_idsAttachments to add; existing ones stay.
Response
expenseExpensecurl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/UpdateExpense \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"addAttachmentIds": [
""
]
}'{
"expense": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"categoryId": "",
"vendorId": "",
"cashAccountId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"occurredAt": "",
"amount": "150000",
"tax": "150000",
"reference": "",
"note": "",
"voided": false,
"voidedAt": "",
"voidReason": "",
"createdAt": ""
}
}VoidExpense#
Request body
idstringreasonstringResponse
expenseExpensecurl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/VoidExpense \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"expense": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"categoryId": "",
"vendorId": "",
"cashAccountId": "",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"occurredAt": "",
"amount": "150000",
"tax": "150000",
"reference": "",
"note": "",
"voided": false,
"voidedAt": "",
"voidReason": "",
"createdAt": ""
}
}UploadAttachment#
UploadAttachment stores a receipt photo or PDF of up to 10 MB. Attach it by id when creating or updating an expense.
Request body
database64 stringJPEG, PNG, WebP, HEIC or PDF, at most 10 MB.
contentTypestringcontent_typefilenamestringResponse
attachmentAttachmentcurl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/UploadAttachment \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"attachment": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"contentType": "",
"sizeBytes": "0",
"filename": "",
"createdAt": ""
}
}GetAttachment#
Request body
idstringResponse
attachmentAttachmentdatabase64 stringcurl https://api.buziin.tech/holygrail.expenses.v1.ExpensesService/GetAttachment \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"attachment": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"contentType": "",
"sizeBytes": "0",
"filename": "",
"createdAt": ""
},
"data": ""
}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.
ListCategoriesRequest
holygrail.expenses.v1.ListCategoriesRequest
No fields.
ListCategoriesResponse
holygrail.expenses.v1.ListCategoriesResponse
categoriesExpenseCategory[]A business starts with a set of common categories.
CreateCategoryRequest
holygrail.expenses.v1.CreateCategoryRequest
namestringUpdateCategoryRequest
holygrail.expenses.v1.UpdateCategoryRequest
idstringnamestringarchivedbooleanListVendorsRequest
holygrail.expenses.v1.ListVendorsRequest
No fields.
CreateVendorRequest
holygrail.expenses.v1.CreateVendorRequest
namestringemailstringphonestringnotesstringUpdateVendorRequest
holygrail.expenses.v1.UpdateVendorRequest
idstringnamestringemailstringphonestringnotesstringarchivedbooleanListExpensesRequest
holygrail.expenses.v1.ListExpensesRequest
categoryIdstringcategory_idOptional filters.
vendorIdstringvendor_idcashAccountIdstringcash_account_idlocationIdstringlocation_idincludeVoidedbooleaninclude_voidedpageSizeintegerpage_sizeNewest first; pass the previous response's next_page_token.
pageTokenstringpage_tokenfromDatestringfrom_dateOptional: only expenses on these local dates (YYYY-MM-DD, both inclusive) in time_zone. Both dates or neither.
toDatestringto_datetimeZonestringtime_zoneListExpensesResponse
holygrail.expenses.v1.ListExpensesResponse
expensesExpense[]nextPageTokenstringnext_page_tokenGetExpenseRequest
holygrail.expenses.v1.GetExpenseRequest
idstringGetExpenseResponse
holygrail.expenses.v1.GetExpenseResponse
expenseExpensejournalEntryIdstringjournal_entry_idThe ledger entry it posted, for the Books link.
CreateExpenseRequest
holygrail.expenses.v1.CreateExpenseRequest
idstringClient-chosen UUID, so a retried request records one expense.
categoryIdstringcategory_idvendorIdstringvendor_idcashAccountIdstringcash_account_idlocationIdstringlocation_idoccurredAtstringoccurred_atRFC 3339. Defaults to now.
amountint64 stringtaxint64 stringreferencestringnotestringattachmentIdsstring[]attachment_idsUpdateExpenseRequest
holygrail.expenses.v1.UpdateExpenseRequest
idstringvendorIdstringvendor_idlocationIdstringlocation_idreferencestringnotestringaddAttachmentIdsstring[]add_attachment_idsAttachments to add; existing ones stay.
VoidExpenseRequest
holygrail.expenses.v1.VoidExpenseRequest
idstringreasonstringUploadAttachmentRequest
holygrail.expenses.v1.UploadAttachmentRequest
database64 stringJPEG, PNG, WebP, HEIC or PDF, at most 10 MB.
contentTypestringcontent_typefilenamestringGetAttachmentRequest
holygrail.expenses.v1.GetAttachmentRequest
idstringGetAttachmentResponse
holygrail.expenses.v1.GetAttachmentResponse
attachmentAttachmentdatabase64 stringExpenseCategory
holygrail.expenses.v1.ExpenseCategory
idstringnamestringledgerAccountIdstringledger_account_idThe expense account behind it in the chart of accounts.
codestringarchivedbooleanVendor
holygrail.expenses.v1.Vendor
idstringnamestringemailstringphonestringnotesstringarchivedbooleanExpense
holygrail.expenses.v1.Expense
Amounts are integer minor units in the organization's currency.
idstringcategoryIdstringcategory_idvendorIdstringvendor_idEmpty when no vendor was recorded.
cashAccountIdstringcash_account_idThe Cash Account the money came out of.
locationIdstringlocation_idEmpty for the whole business.
occurredAtstringoccurred_atRFC 3339.
amountint64 stringTotal paid, including tax.
taxint64 stringReclaimable tax included in amount.
referencestringnotestringattachmentsAttachment[]voidedbooleanvoidedAtstringvoided_atvoidReasonstringvoid_reasoncreatedAtstringcreated_atAttachment
holygrail.expenses.v1.Attachment
idstringcontentTypestringcontent_typesizeBytesint64 stringsize_bytesfilenamestringcreatedAtstringcreated_atBase URL https://api.buziin.tech. Every method is POST with a JSON body; see Making requests.