# Reading the books

Statements, ageing, open items and the change feed.

## GET /v1/accounts/{code}/statement

**Statement with settlement trace**

Each payment line carries settlement_trace: which invoices it settled, for how much, and the branch number for chain customers.

Parameters:

- `code` (path, required)
- `from` (query)
- `to` (query)

Answers:

- `200` Statement lines
- `404` Unknown account

## GET /v1/accounts/{code}/aged

**Aged analysis**

Ages off due_date, which honours the billing party's terms basis. Statement-terms customers age as one block.

Parameters:

- `code` (path, required)
- `asOf` (query)

Answers:

- `200` Buckets

## GET /v1/accounts/{code}/open-items

**Unsettled documents**

Parameters:

- `code` (path, required)

Answers:

- `200` Open items

## GET /v1/changes

**Change feed**

Everything that moved since a cursor. One call instead of polling six endpoints. Cursor-paged, because offsets shift under concurrent writes and a syncing client silently skips rows.

Parameters:

- `since` (query)
- `limit` (query)

Answers:

- `200` Changes plus next_cursor
