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

GET /v1/books/metrics

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

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
sandboxquerystring—Sandbox reads the org's SANDBOX ledger when it is exactly "true".
fromquerystring—From is the RFC3339 start of the window, exclusive.
toquerystring—To is the RFC3339 end of the window, inclusive.

Response

StatusBodyMeaning
200books.MetricsResponseok
defaultproblem-detailsrefused

200 body — 20 fields.

FieldInTypeAlwaysDescription
arrbodyinteger (int64)—ARR is annualized recurring revenue in cents (MRR × 12).
burnbodyinteger (int64)—Burn is total expense in cents over the period.
cashbodyinteger (int64)—Cash is the bank + processor-clearing balance in cents as of To.
cogsbodyinteger (int64)—COGS is cost of goods sold in cents over the period.
deferredRevenuebodyinteger (int64)—DeferredRevenue is the customer-wallet liability in cents as of To.
figuresbodybooks.Figure[]—Figures is the same snapshot rendered through books' one money formatter.
figures[].labelbodystring—Label names the metric, e.g. "MRR" or "Runway".
figures[].periodbodystring—Period is the window the figure covers, e.g. "2026-07" or "all-time".
figures[].valuebodystring—Value is the figure already formatted through books' own money formatter, so a consumer never re-derives it.
frombodystring—From is the RFC3339 start of the reporting window, exclusive; absent for all time.
grossMarginBpsbodyinteger (int64)—GrossMarginBps is GrossProfit / Revenue in basis points (7000 = 70%).
grossProfitbodyinteger (int64)—GrossProfit is Revenue − COGS, in cents.
monthlyBurnbodyinteger (int64)—MonthlyBurn is net cash burned per month in cents; 0 when not losing cash.
monthsbodyinteger (int64)—Months is the window length in whole months used to normalize MRR and burn.
mrrbodyinteger (int64)—MRR is monthly recurring revenue in cents.
netIncomebodyinteger (int64)—NetIncome is Revenue − Burn, in cents.
periodbodystring—Period is the human window label, e.g. "2026-07" or "all-time".
revenuebodyinteger (int64)—Revenue is recognized revenue in cents over the period.
runwayMonthsbodyinteger (int64)—RunwayMonths is Cash / MonthlyBurn; -1 means infinite (the org is not burning).
tobodystring—To 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
import { Configuration, BooksApi } from 'hanzoai';

const api = new BooksApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getBooksMetrics();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import BooksApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = BooksApi(client).get_books_metrics()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.BooksAPI.GetBooksMetrics(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, books_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = books_api::get_books_metrics(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.BooksApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new BooksApi(client).getBooksMetrics();
curl https://api.hanzo.ai/v1/books/metrics \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches books through the books tool, which names its 20 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_book_accounts"
         }
       }
     }'

Books API · All Hanzo APIs · Interactive reference

Was this page useful?