# income_statement

`POST /api/v1/queries/income_statement`

Base URL: `https://boringbooks.io`.



## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `from_date` | string (date) | yes | The first date included in the statement. |
| `ledger_id` | string (uuid) | yes |  |
| `to_date` | string (date) | yes | The last date included in the statement. Must be on or after `from_date`. |

Example:

```json
{
  "from_date": "2026-01-01",
  "ledger_id": "11111111-1111-4111-8111-111111111111",
  "to_date": "2026-09-15"
}
```

## Response (200)

| Field | Type | Required | Description |
|---|---|---|---|
| `currency` | `Currency` | yes |  |
| `expenses` | `Amount` | yes |  |
| `from_date` | string (date) | yes |  |
| `net_income` | `Amount` | yes |  |
| `revenue` | `Amount` | yes |  |
| `rows` | array of object | yes |  |
| `rows[].account_id` | string (uuid) | yes |  |
| `rows[].amount` | `Amount` | yes |  |
| `rows[].code` | string | yes |  |
| `rows[].name` | string | yes |  |
| `rows[].type` | string | yes |  |
| `to_date` | string (date) | yes |  |

## Shared types

Fields typed with one of these names refer to it.

- `Amount` (string): A monetary amount as a decimal string, fixed to the currency's scale — two fraction digits for most supported currencies, none for JPY, e.g. "1000.00" or "1000" for JPY. Never a JSON number. Report figures may be negative; a journal line's `debit` and `credit` are always non-negative, with "0.00" ("0" for JPY) on the side the line is not on.
- `Currency` (string): An ISO 4217 alphabetic currency code — a ledger's own functional currency. The supported set is additive, so do not treat it as closed.

## Errors

Every error response is a single `error` object with a closed `type` and a refining
`code`. The codes, and the conventions every operation shares, are in
[llms-full.txt](https://boringbooks.io/llms-full.txt).
