Skip to content

List postpaid invoices

GET/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).

curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/postpaid-invoices' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/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
      }
    ]
  }
]

Authorization

Authorizationstringheaderrequired

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.

Send it as Bearer <token>.

Response 200

application/json

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

idstring | nullrequired

Null for a month with nothing billed yet, which has no row.

uuid_shortstring | nullrequired

The value of uuid_short.

monthstringrequired

The value of month.

month_labelstringrequired

The value of month_label.

statusstringrequired

The value of status.

One of: draft, unpaid, credit_hold, suspended, termination_pending, paid, deferred, cancelled

status_labelstringrequired

The value of status_label.

totalstringrequired

The value of total.

currencystringrequired

The three-letter currency code used for monetary amounts.

invoice_datestring | nullrequired

On a draft, the dates it will be issued (the next month's first day) and due.

due_datestring | nullrequired

The value of due_date.

credit_hold_datestring | nullrequired

The value of credit_hold_date.

suspension_datestring | nullrequired

The value of suspension_date.

termination_datestring | nullrequired

The value of termination_date.

paid_atstring | nullrequired

When payment was recorded, in UTC.

invoice_idinteger | nullrequired

The published invoice, paid like any other through the invoice endpoints. Null until it is published.

can_paybooleanrequired

Whether the customer can pay.

linesobject[] | nullrequired

The value of lines.

Show child attributes
typestringrequired

usage, monthly_cap, charge or rounding.

descriptionstringrequired

An optional description shown to customers.

resourcestring | nullrequired

The kind of resource the line bills, such as "Virtual Server", which the invoice groups by. Null for the rounding line.

team_namestring | nullrequired

The team the line was billed in. Null for the rounding line and for a team since deleted.

monthstringrequired

The month the line was billed for, which is earlier than the invoice's on a carried-over line.

hoursinteger | nullrequired

The value of hours.

hourly_ratestring | nullrequired

Five decimal places, as charged.

monthly_ratestring | nullrequired

The value of monthly_rate.

amountstringrequired

Five decimal places; the invoice total is rounded up to the cent once, on its own line.

started_atstring | nullrequired

The date and time for started at, in UTC.

ended_atstring | nullrequired

The date and time for ended at, in UTC.

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.