Hanzo
OpenapiBooks

Returns the complete financial package for the caller's org over (from, to]:…

Returns the complete financial package for the caller's org over (from, to]: the trial balance, the P&L, the balance sheet, and the GL detail behind them…

GET /v1/books/export

Addresshttps://api.hanzo.ai/v1/books/export
MethodGET
Operationget_books_export
AuthAuthorization: Bearer $HANZO_API_KEY

Returns the complete financial package for the caller's org over (from, to]: the trial balance, the P&L, the balance sheet, and the GL detail behind them — the four statements a tax preparer or an investor asks for, assembled from the one ledger in a single read so they cannot disagree with each other.

Request

5 fields.

FieldInTypeRequiredDescription
sandboxquerystringSandbox reads the org's SANDBOX ledger when it is exactly "true".
fromquerystringFrom is the RFC3339 start of the window, exclusive.
toquerystringTo is the RFC3339 end of the window, inclusive.
formatquerystringFormat is the export encoding.
limitqueryintegerLimit caps the GL detail rows included as the audit trail; 5000 when absent or not positive.

Response

StatusBodyMeaning
200FinancialPackageok

200 body — 67 fields.

FieldInTypeAlwaysDescription
balanceSheetbodyBalanceSheet
balanceSheet.asOfbodystringAsOf is the posting time the statement is taken at, inclusive.
balanceSheet.assetsbodyBalanceLine[]Assets are what the org OWNS at that instant, one line per account that has a balance.
balanceSheet.assets[].accountbodystringAccount is the chart-of-accounts number this line reports on.
balanceSheet.assets[].amountbodyintegerAmount is the balance as of the statement date, in whole cents, in its NATURAL sign: positive when the account behaved normally, on all three sides.
balanceSheet.assets[].namebodystringName is the account's human name, or the derived line's own name.
balanceSheet.assets[].typebodystringType is the account's fundamental class.
balanceSheet.balancedbodybooleanBalanced is whether assets equal liabilities plus equity — the accounting equation, computed from the totals above rather than assumed.
balanceSheet.equitybodyBalanceLine[]Equity is what is left over for the owners.
balanceSheet.equity[].accountbodystringAccount is the chart-of-accounts number this line reports on.
balanceSheet.equity[].amountbodyintegerAmount is the balance as of the statement date, in whole cents, in its NATURAL sign: positive when the account behaved normally, on all three sides.
balanceSheet.equity[].namebodystringName is the account's human name, or the derived line's own name.
balanceSheet.equity[].typebodystringType is the account's fundamental class.
balanceSheet.liabilitiesbodyBalanceLine[]Liabilities are what the org OWES — including customers' unspent prepaid credit, which is their money until it is consumed and so is carried here rather than…
balanceSheet.liabilities[].accountbodystringAccount is the chart-of-accounts number this line reports on.
balanceSheet.liabilities[].amountbodyintegerAmount is the balance as of the statement date, in whole cents, in its NATURAL sign: positive when the account behaved normally, on all three sides.
balanceSheet.liabilities[].namebodystringName is the account's human name, or the derived line's own name.
balanceSheet.liabilities[].typebodystringType is the account's fundamental class.
balanceSheet.totalAssetsbodyintegerTotalAssets is the sum of the asset lines, in cents.
balanceSheet.totalEquitybodyintegerTotalEquity is the sum of the equity lines including retained earnings, in cents.
balanceSheet.totalLiabilitiesbodyintegerTotalLiabilities is the sum of the liability lines, in cents.
frombodystringFrom opens the reporting period.
generatedAtbodystringGeneratedAt is when the bundle was assembled — the moment the statements were struck, which is what makes two exports of the same period comparable.
glbodyGLRow[]GL is the newest slice of ledger detail, as the audit trail behind the statements.
gl[].accountbodystringAccount is the chart-of-accounts number this leg posts to.
gl[].againstbodystringAgainst names the OTHER accounts in the same voucher — the contra side of this leg — so a single row reads as an entry rather than as half of one.
gl[].creditbodyintegerCredit is the amount credited to that account, in whole cents.
gl[].debitbodyintegerDebit is the amount debited to that account, in whole cents.
gl[].idbodyintegerID is the entry's position in the ledger.
gl[].postingAtbodystringPostingAt is the accounting date this entry belongs to — what the reports window on, which need not be when the row was written.
gl[].remarksbodystringRemarks is the memo carried onto the entry, for a human reading the ledger.
gl[].sourceIdbodystringSourceID identifies that originating record within its kind.
gl[].sourceKindbodystringSourceKind is what caused the posting: a bank line, a scanned document, a commerce sale.
orgbodystringOrg is the organisation whose books these are — the validated caller's own, stamped so a downloaded bundle still says whose it is.
pnlbodyPnL
pnl.expensebodyPnLLine[]Expense is the cost lines that moved in the period, one per account.
pnl.expense[].accountbodystringAccount is the chart-of-accounts number this line reports on.
pnl.expense[].amountbodyintegerAmount is the account's movement over the period in whole cents, in its NATURAL sign: positive when the account behaved normally, for income and expense alike.
pnl.expense[].namebodystringName is that account's human name from the fixed chart.
pnl.expense[].typebodystringType is the account's fundamental class, which on this statement is always income or expense — it tells a reader which half of the statement the line came from…
pnl.frombodystringFrom opens the period and is EXCLUSIVE — movement strictly after it, matching the trial balance's opening boundary so the two reports agree on what belongs to…
pnl.incomebodyPnLLine[]Income is the revenue lines that moved in the period, one per account.
pnl.income[].accountbodystringAccount is the chart-of-accounts number this line reports on.
pnl.income[].amountbodyintegerAmount is the account's movement over the period in whole cents, in its NATURAL sign: positive when the account behaved normally, for income and expense alike.
pnl.income[].namebodystringName is that account's human name from the fixed chart.
pnl.income[].typebodystringType is the account's fundamental class, which on this statement is always income or expense — it tells a reader which half of the statement the line came from…
pnl.netIncomebodyintegerNetIncome is totalIncome minus totalExpense, in cents.
pnl.tobodystringTo closes the period and is inclusive.
pnl.totalExpensebodyintegerTotalExpense is cost MATCHED to that revenue, in cents, including accrued infrastructure that has not been billed yet.
pnl.totalIncomebodyintegerTotalIncome is revenue RECOGNIZED in the period, in cents — accrual, not cash, so a prepaid top-up is not in it until the credit is consumed.
tobodystringTo closes it.
trialBalancebodyTrialBalance
trialBalance.balancedbodybooleanBalanced is the proof this report exists to give: whether total debits equal total credits.
trialBalance.frombodystringFrom is the posting time the window opens at, as it was asked for.
trialBalance.rowsbodyTrialBalanceRow[]Rows are the accounts that MOVED in one of the windows.
trialBalance.rows[].accountbodystringAccount is the chart-of-accounts NUMBER this line reports on ("1000", "4000") — the stable posting key, not a display label.
trialBalance.rows[].closingCreditbodyintegerClosingCredit is that closing balance in cents when it is a credit balance.
trialBalance.rows[].closingDebitbodyintegerClosingDebit is the balance at the end of the window, in cents, when it is a debit balance.
trialBalance.rows[].creditbodyintegerCredit is the same window movement in cents when it was net credit.
trialBalance.rows[].debitbodyintegerDebit is the account's MOVEMENT within the window — closing minus opening, not the closing balance — in cents, when that movement was net debit.
trialBalance.rows[].namebodystringName is that account's human name from the fixed chart.
trialBalance.rows[].openingCreditbodyintegerOpeningCredit is the same opening balance in cents when it fell on the credit side.
trialBalance.rows[].openingDebitbodyintegerOpeningDebit is the account's balance before the window began, in whole cents, when that balance was on the debit side.
trialBalance.rows[].typebodystringType is the account's fundamental class — asset, liability, income, expense or equity — which is also its normal balance side.
trialBalance.tobodystringTo is the posting time the window closes at, inclusive.
trialBalance.totalCreditbodyintegerTotalCredit is the sum of every row's closing credit column, in cents.
trialBalance.totalDebitbodyintegerTotalDebit is the sum of every row's CLOSING debit column, in cents.

Failure carries the platform error shape — see Errors.

Examples

hanzo books export

Books API · All Hanzo APIs · Interactive reference

How is this guide?

On this page