Hanzo
OpenapiBooks

Returns the org's booked ledger as a single-line register, newest first: one…

Returns the org's booked ledger as a single-line register, newest first: one row per voucher, with its date, description, vendor, category, source and…

GET /v1/books/transactions

Addresshttps://api.hanzo.ai/v1/books/transactions
MethodGET
Operationget_books_transactions
AuthAuthorization: Bearer $HANZO_API_KEY

Returns the org's booked ledger as a single-line register, newest first: one row per voucher, with its date, description, vendor, category, source and amount in exact cents. It is the double-entry ledger projected to the register a human reads, filterable by posting-time window, category and vendor. Strictly read-only — it restates the books, it never moves them.

Request

6 fields.

FieldInTypeRequiredDescription
sandboxquerystringSandbox reads the org's SANDBOX ledger when it is exactly "true".
fromquerystringFrom is the RFC3339 start of the posting-time window, inclusive.
toquerystringTo is the RFC3339 end of the posting-time window, inclusive.
categoryquerystringCategory filters to one COA account, named by number ("5300") or by category slug ("software").
vendorquerystringVendor filters to rows whose vendor or description contains this text, case-insensitively.
limitqueryintegerLimit caps how many rows come back; 200 when absent or not positive.

Response

StatusBodyMeaning
200transactionsOutok

200 body — 9 fields.

FieldInTypeAlwaysDescription
transactionsbodyTxn[]Transactions is the matching register rows, newest first.
transactions[].amountCentsbodyintegerAmountCents is the voucher's total, in whole cents — its total debit, which equals its total credit because every voucher balances.
transactions[].categorybodystringCategory is the chart-of-accounts NUMBER of the income or expense account this voucher touched — where it lands on the P&L, not a free-text label.
transactions[].categoryNamebodystringCategoryName is that account's human name, so a caller need not carry the chart to render the row.
transactions[].datebodystringDate is when the voucher POSTED — the accounting date the reports window on, which for an imported bank row is the bank's date and not the day it landed here.
transactions[].descriptionbodystringDescription is the line a person reads: the memo carried in from the source.
transactions[].sourcebodystringSource is where the entry came from: bank_txn for an imported statement line, scan for a receipt or bill read by the scanner, commerce_txn for a sale booked by…
transactions[].vendorbodystringVendor is the counterparty, resolved from whatever the source knew — a bank row's merchant, a scanned bill's supplier.
transactions[].voucherIdbodyintegerVoucherID identifies the underlying double-entry voucher, so a caller can open the full set of legs behind this single register line.

Failure carries the platform error shape — see Errors.

Examples

hanzo books transactions

Books API · All Hanzo APIs · Interactive reference

How is this guide?

On this page