Get a postpaid invoice
Overview
Returns one postpaid invoice with its lines. A usage line is one resource's stretch of the month: hours (part hours count as whole ones, at least one and at most 672 a month) at hourly_rate, which is the monthly price over 672 hours rounded up to five decimal places. A monthly_cap line hands back what the rounded rate charged above the monthly price, a charge line is a one-off purchase such as a bandwidth block, and a rounding line takes the total up to the next cent. A draft's lines are worked out to this moment.
Permissions
Requires the account permission invoices.read (View invoices).
Authorization
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>.
Path parameters
The invoice uuid short
Response 200
application/jsonThe record, as a JSON object. There is no envelope.
Null for a month with nothing billed yet, which has no row.
The value of uuid_short.
The value of month.
The value of month_label.
The value of status.
One of: draft, unpaid, credit_hold, suspended, termination_pending, paid, deferred, cancelled
The value of status_label.
The value of total.
The three-letter currency code used for monetary amounts.
On a draft, the dates it will be issued (the next month's first day) and due.
The value of due_date.
The value of credit_hold_date.
The value of suspension_date.
The value of termination_date.
When payment was recorded, in UTC.
The published invoice, paid like any other through the invoice endpoints. Null until it is published.
Whether the customer can pay.
The value of lines.
Show child attributesHide child attributes
usage, monthly_cap, charge or rounding.
An optional description shown to customers.
The kind of resource the line bills, such as "Virtual Server", which the invoice groups by. Null for the rounding line.
The team the line was billed in. Null for the rounding line and for a team since deleted.
The month the line was billed for, which is earlier than the invoice's on a carried-over line.
The value of hours.
Five decimal places, as charged.
The value of monthly_rate.
Five decimal places; the invoice total is rounded up to the cent once, on its own line.
The date and time for started at, in UTC.
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.
- 404
- The resource was not found in the selected team. Resources in another account or team also return 404.
- 429
- Too many requests. The
Retry-Afterheader says how many seconds to wait. Limits are per account, so several keys on one account share them.
Still stuck? Contact our team
View as Markdown