# List inbox

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

> Returns the org's open document queue — everything uploaded but not yet booked, newest first, each with its extracted summary and the confidence the scanner resolved its category at.

`GET /v1/books/inbox`

> [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/inbox`  |
| **Method**    | `GET`                                  |
| **Operation** | `get_books_inbox`                      |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Returns the org's open document queue — everything uploaded but not yet
booked, newest first, each with its extracted summary and the confidence the scanner
resolved its category at. A booked document drops out of the queue.

## Request

1 field.

| Field     | In    | Type   | Required | Description                                                                                         |
| --------- | ----- | ------ | -------- | --------------------------------------------------------------------------------------------------- |
| `sandbox` | query | string | —        | Sandbox reads the org's SANDBOX ledger when it is exactly "true"; anything else reads the live one. |

## Response

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

`200` body — 19 fields.

| Field                                       | In   | Type               | Always | Description                                                                                                                                                               |
| ------------------------------------------- | ---- | ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `items`                                     | body | books.InboxItem\[] | —      | Items is every document still unsorted or in draft, newest first.                                                                                                         |
| `items[].category`                          | body | string             | —      | Category is the expense account the scanner proposed, as a chart number — a PROPOSAL, not a posting: nothing is booked until it is accepted.                              |
| `items[].confidence`                        | body | string             | —      | Confidence is how sure the scanner is of that reading, and is the signal for whether a person needs to check it before it is booked.                                      |
| `items[].createdAt`                         | body | string             | —      | CreatedAt is when the document was uploaded.                                                                                                                              |
| `items[].extracted`                         | body | books.Extracted    | —      |                                                                                                                                                                           |
| `items[].extracted.category`                | body | string             | —      | Category is the expense bucket the SCANNER guessed, as a slug — a hint only.                                                                                              |
| `items[].extracted.currency`                | body | string             | —      | Currency is the ISO code the document is denominated in.                                                                                                                  |
| `items[].extracted.issuedAt`                | body | string             | —      | IssuedAt is the document's OWN date as YYYY-MM-DD — when the bill was issued, which is not when it was uploaded or when it will post.                                     |
| `items[].extracted.lineItems`               | body | books.LineItem\[]  | —      | LineItems are the individual lines read off the document, where it had any.                                                                                               |
| `items[].extracted.lineItems[].amountCents` | body | integer (int64)    | —      | AmountCents is that line's amount in whole cents.                                                                                                                         |
| `items[].extracted.lineItems[].description` | body | string             | —      | Description is the line as it appears on the document.                                                                                                                    |
| `items[].extracted.merchant`                | body | string             | —      | Merchant is the supplier as printed on the document.                                                                                                                      |
| `items[].extracted.note`                    | body | string             | —      | Note is anything else worth carrying from the document that has no field of its own.                                                                                      |
| `items[].extracted.taxCents`                | body | integer (int64)    | —      | TaxCents is how much of that total is tax, in cents.                                                                                                                      |
| `items[].extracted.totalCents`              | body | integer (int64)    | —      | TotalCents is the document total in whole cents, tax INCLUDED.                                                                                                            |
| `items[].filename`                          | body | string             | —      | Filename is the name the document was uploaded under, for a person to recognise it by.                                                                                    |
| `items[].id`                                | body | string             | —      | ID is the CONTENT HASH of the uploaded bytes, which is what makes the queue idempotent: re-uploading the same document returns this item rather than adding a second one. |
| `items[].status`                            | body | string             | —      | Status is where the document is in the queue — unsorted until the scanner has read it, and thereafter whether it is waiting on a person or has been booked.               |
| `items[].vendor`                            | body | string             | —      | Vendor is the supplier the scanner identified, surfaced beside the item so a queue renders without opening each document.                                                 |

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

## Examples

**CLI**

```bash
hanzo books inbox get
```

**SDK**

**.ts**

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

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

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

**.go**

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

resp, _, err := client.BooksAPI.GetBooksInbox(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_inbox(&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).getBooksInbox();
```

**HTTP**

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