# List postpaid invoices

`GET https://console.advinservers.com/api/v1/client/postpaid-invoices`

### Overview

Lists the account's monthly postpaid invoices. One invoice a month covers every postpaid team the account owns, and each line names the team it was billed in. The current month comes first as a `draft`, its `total` worked out to this moment, followed by every earlier month, newest first. A month too small to invoice on its own is `deferred` and carried onto the next invoice. Once published, `invoice_id` names the invoice to pay with the invoice endpoints, and `can_pay` is true while it is owed. `id` is null while nothing has been billed this month.

### Permissions

Requires the account permission `invoices.read` (View invoices).

## Authorization

Send `Authorization: Bearer <token>` with the request. Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

## Response 200

The whole set, as a JSON array. There is no envelope and no paging.

- `id` (string | null, required): Null for a month with nothing billed yet, which has no row.
- `uuid_short` (string | null, required): The value of `uuid_short`.
- `month` (string, required): The value of `month`.
- `month_label` (string, required): The value of `month_label`.
- `status` (string, required): The value of `status`. One of: `draft`, `unpaid`, `credit_hold`, `suspended`, `termination_pending`, `paid`, `deferred`, `cancelled`.
- `status_label` (string, required): The value of `status_label`.
- `total` (string, required): The value of `total`.
- `currency` (string, required): The three-letter currency code used for monetary amounts.
- `invoice_date` (string | null, required): On a draft, the dates it will be issued (the next month's first day) and due.
- `due_date` (string | null, required): The value of `due_date`.
- `credit_hold_date` (string | null, required): The value of `credit_hold_date`.
- `suspension_date` (string | null, required): The value of `suspension_date`.
- `termination_date` (string | null, required): The value of `termination_date`.
- `paid_at` (string | null, required): When payment was recorded, in UTC.
- `invoice_id` (integer | null, required): The published invoice, paid like any other through the invoice endpoints. Null until it is published.
- `can_pay` (boolean, required): Whether the customer can pay.
- `lines` (object[] | null, required): The value of `lines`.
  - `type` (string, required): usage, monthly_cap, charge or rounding.
  - `description` (string, required): An optional description shown to customers.
  - `resource` (string | null, required): The kind of resource the line bills, such as "Virtual Server", which the invoice groups by. Null for the rounding line.
  - `team_name` (string | null, required): The team the line was billed in. Null for the rounding line and for a team since deleted.
  - `month` (string, required): The month the line was billed for, which is earlier than the invoice's on a carried-over line.
  - `hours` (integer | null, required): The value of `hours`.
  - `hourly_rate` (string | null, required): Five decimal places, as charged.
  - `monthly_rate` (string | null, required): The value of `monthly_rate`.
  - `amount` (string, required): Five decimal places; the invoice total is rounded up to the cent once, on its own line.
  - `started_at` (string | null, required): The date and time for started at, in UTC.
  - `ended_at` (string | null, required): The date and time for ended at, in UTC.

```json
[
  {
    "id": "8f9b2a4c-6d1e-4f3a-9b7c-2e5d8a1f4c6b",
    "uuid_short": "Uuid short",
    "month": "2026-09",
    "month_label": "September 2026",
    "status": "unpaid",
    "status_label": "Unpaid",
    "total": "16.00",
    "currency": "USD",
    "invoice_date": "Invoice date",
    "due_date": "2026-10-07",
    "credit_hold_date": "2026-10-14",
    "suspension_date": "2026-10-14",
    "termination_date": "2026-10-21",
    "paid_at": null,
    "invoice_id": 18342,
    "can_pay": true,
    "lines": [
      {
        "type": "usage",
        "description": "lambda-core",
        "resource": "Virtual Server",
        "team_name": "Anomalous Materials",
        "month": "2026-09",
        "hours": 672,
        "hourly_rate": "0.02381",
        "monthly_rate": "16.00",
        "amount": "16.00032",
        "started_at": "2026-09-01T00:00:00+00:00",
        "ended_at": "2026-09-30T23:59:59+00:00"
      },
      {
        "type": "monthly_cap",
        "description": "Monthly cap adjustment: lambda-core",
        "resource": "Virtual Server",
        "team_name": "Anomalous Materials",
        "month": "2026-09",
        "hours": null,
        "hourly_rate": null,
        "monthly_rate": null,
        "amount": "-0.00032",
        "started_at": null,
        "ended_at": null
      }
    ]
  }
]
```

## Errors

- `401`: The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- `403`: Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- `429`: Too many requests. The `Retry-After` header says how many seconds to wait. Limits are per account, so several keys on one account share them.

## Example request

```bash
curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/postpaid-invoices' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
