# List transactions — GET /v1/books/transactions

URL: https://docs.hanzo.ai/docs/openapi/books/get-books-transactions

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

`GET /v1/books/transactions`

> [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/transactions` |
| **Method**    | `GET`                                        |
| **Operation** | `get_books_transactions`                     |
| **Auth**      | `Authorization: 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.

| 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 posting-time window, inclusive.                                |
| `to`       | query | string  | —        | To is the RFC3339 end of the posting-time window, inclusive.                                    |
| `category` | query | string  | —        | Category filters to one COA account, named by number ("5300") or by category slug ("software"). |
| `vendor`   | query | string  | —        | Vendor filters to rows whose vendor or description contains this text, case-insensitively.      |
| `limit`    | query | integer | —        | Limit caps how many rows come back; 200 when absent or not positive.                            |

## Response

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

`200` body — 9 fields.

| Field                         | In   | Type            | Always | Description                                                                                                                                                                  |
| ----------------------------- | ---- | --------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `transactions`                | body | books.Txn\[]    | —      | Transactions is the matching register rows, newest first.                                                                                                                    |
| `transactions[].amountCents`  | body | integer (int64) | —      | AmountCents is the voucher's total, in whole cents — its total debit, which equals its total credit because every voucher balances.                                          |
| `transactions[].category`     | body | string          | —      | Category 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[].categoryName` | body | string          | —      | CategoryName is that account's human name, so a caller need not carry the chart to render the row.                                                                           |
| `transactions[].date`         | body | string          | —      | Date 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[].description`  | body | string          | —      | Description is the line a person reads: the memo carried in from the source.                                                                                                 |
| `transactions[].source`       | body | string          | —      | Source 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 the store. |
| `transactions[].vendor`       | body | string          | —      | Vendor is the counterparty, resolved from whatever the source knew — a bank row's merchant, a scanned bill's supplier.                                                       |
| `transactions[].voucherId`    | body | integer (int64) | —      | VoucherID 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](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo books transactions
```

**SDK**

**.ts**

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

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

**.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_transactions()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.BooksAPI.GetBooksTransactions(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_transactions(&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).getBooksTransactions();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/books/transactions \
  -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)
