# List metrics

URL: https://docs.hanzo.ai/docs/openapi/books/get-books-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`

> [Books →](https://docs.hanzo.ai/docs/openapi/books) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                         |
| ------------- | --------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/books/metrics` |
| **Method**    | `GET`                                   |
| **Operation** | `get_books_metrics`                     |
| **Auth**      | `Authorization: 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.

| Field     | In    | Type   | Required | Description                                                       |
| --------- | ----- | ------ | -------- | ----------------------------------------------------------------- |
| `sandbox` | query | string | —        | Sandbox reads the org's SANDBOX ledger when it is exactly "true". |
| `from`    | query | string | —        | From is the RFC3339 start of the window, exclusive.               |
| `to`      | query | string | —        | To is the RFC3339 end of the window, inclusive.                   |

## Response

| Status    | Body                  | Meaning |
| --------- | --------------------- | ------- |
| `200`     | books.MetricsResponse | ok      |
| `default` | problem-details       | refused |

`200` body — 20 fields.

| Field              | In   | Type            | Always | Description                                                                                                  |
| ------------------ | ---- | --------------- | ------ | ------------------------------------------------------------------------------------------------------------ |
| `arr`              | body | integer (int64) | —      | ARR is annualized recurring revenue in cents (MRR × 12).                                                     |
| `burn`             | body | integer (int64) | —      | Burn is total expense in cents over the period.                                                              |
| `cash`             | body | integer (int64) | —      | Cash is the bank + processor-clearing balance in cents as of To.                                             |
| `cogs`             | body | integer (int64) | —      | COGS is cost of goods sold in cents over the period.                                                         |
| `deferredRevenue`  | body | integer (int64) | —      | DeferredRevenue is the customer-wallet liability in cents as of To.                                          |
| `figures`          | body | books.Figure\[] | —      | Figures is the same snapshot rendered through books' one money formatter.                                    |
| `figures[].label`  | body | string          | —      | Label names the metric, e.g. "MRR" or "Runway".                                                              |
| `figures[].period` | body | string          | —      | Period is the window the figure covers, e.g. "2026-07" or "all-time".                                        |
| `figures[].value`  | body | string          | —      | Value is the figure already formatted through books' own money formatter, so a consumer never re-derives it. |
| `from`             | body | string          | —      | From is the RFC3339 start of the reporting window, exclusive; absent for all time.                           |
| `grossMarginBps`   | body | integer (int64) | —      | GrossMarginBps is GrossProfit / Revenue in basis points (7000 = 70%).                                        |
| `grossProfit`      | body | integer (int64) | —      | GrossProfit is Revenue − COGS, in cents.                                                                     |
| `monthlyBurn`      | body | integer (int64) | —      | MonthlyBurn is net cash burned per month in cents; 0 when not losing cash.                                   |
| `months`           | body | integer (int64) | —      | Months is the window length in whole months used to normalize MRR and burn.                                  |
| `mrr`              | body | integer (int64) | —      | MRR is monthly recurring revenue in cents.                                                                   |
| `netIncome`        | body | integer (int64) | —      | NetIncome is Revenue − Burn, in cents.                                                                       |
| `period`           | body | string          | —      | Period is the human window label, e.g. "2026-07" or "all-time".                                              |
| `revenue`          | body | integer (int64) | —      | Revenue is recognized revenue in cents over the period.                                                      |
| `runwayMonths`     | body | integer (int64) | —      | RunwayMonths is Cash / MonthlyBurn; -1 means infinite (the org is not burning).                              |
| `to`               | body | string          | —      | To is the RFC3339 end of the reporting window, inclusive; absent for up to now.                              |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo books metrics
```

**SDK**

**.ts**

```ts
import { Configuration, BooksApi } from 'hanzoai';

const api = new BooksApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getBooksMetrics();
```

**.py**

```python
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()
```

**.go**

```go
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
}
```

**.rs**

```rust
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?;
```

**.java**

```java
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();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/books/metrics \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

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:

```bash
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](https://docs.hanzo.ai/docs/openapi/books) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
