# List statements

`GET https://evohub.io/api/v1/billing/statements`

Part of the [Billing API](https://docs.evohub.io/billing.md) reference · operationId `listStatements`.

The organization's monthly statements, newest period first, without
their lines (read one statement for those).

`total_usd` is the period's own usage; `amount_due_usd` is what the
statement actually asks for, adding amounts carried in from earlier
months that were too small to charge on their own.

Requires the `billing:invoice:read` scope.

## Authorization

Any one of:

- `bearerKey`
- `headerKey`

Where:

- `bearerKey`: HTTP Bearer — An EvoHub API key (`evohub_…`) as a bearer token.
- `headerKey`: API key in the header `X-API-Key` — An EvoHub API key (`evohub_…`).

## Query parameters

- `limit` (integer, default `24`, min 1, max 100): How many statements, 1–100. Any other value means 24.

## Responses

### 200 — The statements.

Content type: `application/json`

Type: `object`

- `data` (object)
  - `statements` (array of Statement)
    - `id` (string)
    - `org_id` (string)
    - `period_start` (string (date-time))
    - `period_end` (string (date-time)): The first instant of the next month (exclusive).
    - `status` (string, one of `open`, `predicted`, `finalized`): `open` for the month in progress, `predicted` for a closed month computed but not yet charged, `finalized` once the amount is frozen.
    - `rate_version` (integer): The rate card version that priced the period.
    - `pricing_tier` (string, one of `on_demand`, `commitment`, `prepaid`)
    - `total_ehu` (number): Exact usage for the period, before rounding and the free allowance.
    - `billed_ehu` (number): `total_ehu` rounded up to a whole EHU.
    - `allowance_ehu` (number): How much the free allowance covered.
    - `chargeable_ehu` (number): `billed_ehu` minus `allowance_ehu`.
    - `credit_ehu` (number): How much of that was paid from the credit balance.
    - `commitment_ehu` (number): The committed volume billed, used or not.
    - `overage_ehu` (number): Usage beyond what the tier covered, priced on demand.
    - `total_usd` (number): The period's own charge. A month covered by the allowance costs 0.
    - `carried_in_usd` (number): Amounts owed by earlier months that were too small to charge alone, collected with this one.
    - `carried_periods` (array of string (date-time)): The months carried in. Left out when there are none.
    - `settled_by_period` (string (date-time)): The month whose payment collected this one, when it was carried forward. Left out while still owed.
    - `generated_at` (string (date-time))
    - `finalized_at` (string (date-time)): When the amount was frozen. Left out while it can still change.
    - `charge_status` (string, one of `not_required`, `below_minimum`, `no_payment_method`, `invoiced`, `paid`, `failed`): What became of the money. Left out until collection has run. `not_required`: nothing was owed. `below_minimum`: too small to charge, carried forward. `no_payment_method`: owed with no card on file. `invoiced`: invoice raised and payment attempted. `paid`. `failed`: the card was declined or the invoice refused.
    - `charged_at` (string (date-time))
    - `hosted_invoice_url` (string (uri))
    - `invoice_pdf_url` (string (uri))
    - `receipt_url` (string (uri))
    - `lines` (array of object): One line per metric. Only on a single statement, and left out when it has none.
      - `metric_key` (string)
      - `quantity` (number)
      - `ehu` (number)
      - `ehu_billed` (number)
      - `usd` (number)
    - `amount_due_usd` (number): What the statement asks for — `total_usd` plus `carried_in_usd`.

### 401 — No API key was sent, or it is unknown, revoked or expired (`UNAUTHORIZED`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `STATEMENT_NOT_FOUND`)
  - `message` (string, required, example `No statement for that period.`)
  - `request_id` (string)

### 403 — The key lacks the scope this endpoint needs (`FORBIDDEN`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `STATEMENT_NOT_FOUND`)
  - `message` (string, required, example `No statement for that period.`)
  - `request_id` (string)

### 429 — Too many requests (`RATE_LIMITED`). Wait for `Retry-After` seconds.

Headers:

- `Retry-After` (integer): Seconds to wait before retrying.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `STATEMENT_NOT_FOUND`)
  - `message` (string, required, example `No statement for that period.`)
  - `request_id` (string)

### 500 — Statements could not be loaded (`STATEMENTS_FAILED`). Retry later.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `STATEMENT_NOT_FOUND`)
  - `message` (string, required, example `No statement for that period.`)
  - `request_id` (string)

## Example request

```bash
curl -X GET 'https://evohub.io/api/v1/billing/statements' \
  -H 'Authorization: Bearer <TOKEN>'
```
