Hanzo
OpenapiBooks

Metrics returns the org's deterministic SaaS-metrics snapshot over an optional…

Metrics returns the org's deterministic SaaS-metrics snapshot over an optional (from, to] window — MRR, ARR, revenue, COGS, burn, gross margin, net…

GET /v1/books/metrics

Addresshttps://api.hanzo.ai/v1/books/metrics
MethodGET
Operationget_books_metrics
AuthAuthorization: Bearer $HANZO_API_KEY

Metrics returns the org's deterministic SaaS-metrics snapshot over an optional (from, to] window — MRR, ARR, revenue, COGS, burn, gross margin, net income, cash, deferred revenue, monthly burn and runway — as raw int64-cent figures AND the same figures already formatted. Every number is the ledger, aggregated the one way the books define it, never a guess; it is the grounded read the unified /v1/ask advisor replays.

Request

3 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.

Response

StatusBodyMeaning
200MetricsResponseok

200 body — 20 fields.

FieldInTypeAlwaysDescription
arrbodyintegerARR is annualized recurring revenue in cents (MRR × 12).
burnbodyintegerBurn is total expense in cents over the period.
cashbodyintegerCash is the bank + processor-clearing balance in cents as of To.
cogsbodyintegerCOGS is cost of goods sold in cents over the period.
deferredRevenuebodyintegerDeferredRevenue is the customer-wallet liability in cents as of To.
figuresbodyFigure[]Figures is the same snapshot rendered through books' one money formatter.
figures[].labelbodystringLabel names the metric, e.g.
figures[].periodbodystringPeriod is the window the figure covers, e.g.
figures[].valuebodystringValue is the figure already formatted through books' own money formatter, so a consumer never re-derives it.
frombodystringFrom is the RFC3339 start of the reporting window, exclusive; absent for all time.
grossMarginBpsbodyintegerGrossMarginBps is GrossProfit / Revenue in basis points (7000 = 70%).
grossProfitbodyintegerGrossProfit is Revenue − COGS, in cents.
monthlyBurnbodyintegerMonthlyBurn is net cash burned per month in cents; 0 when not losing cash.
monthsbodyintegerMonths is the window length in whole months used to normalize MRR and burn.
mrrbodyintegerMRR is monthly recurring revenue in cents.
netIncomebodyintegerNetIncome is Revenue − Burn, in cents.
periodbodystringPeriod is the human window label, e.g.
revenuebodyintegerRevenue is recognized revenue in cents over the period.
runwayMonthsbodyintegerRunwayMonths is Cash / MonthlyBurn; -1 means infinite (the org is not burning).
tobodystringTo is the RFC3339 end of the reporting window, inclusive; absent for up to now.

Failure carries the platform error shape — see Errors.

Examples

hanzo books metrics

Books API · All Hanzo APIs · Interactive reference

How is this guide?

On this page