List invoices
The organization's invoices, newest first, read from the billing provider at the time of the call.
The organization's invoices, newest first, read from the billing provider at the time of the call. Amounts are the billing provider's, in the currency's minor unit; usage itself stays seconds and bytes (GET /v1/usage). With billing off, or before the billing provider has the organization's customer, the list is empty. The billing provider not answering is upstream.
For people only: a signed-in person's token makes this call. An API key is refused with person_required. The person's role must be one that may read billing.
Request
curl "https://api.pod.mapier.ai/v1/billing/invoices" \
-H "Authorization: Bearer $POD_PERSON_TOKEN"Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
limit | query | integer | No | |
cursor | query | string | No | The next_cursor of the page before. Valid for 24 hours. |
Answer
200. A page of invoices, newest first.
{
"data": [
{
"id": "example",
"number": "example",
"issued_on": "example",
"due_on": null,
"status": "draft",
"payment_status": "pending",
"overdue": false,
"currency": "example",
"total_cents": 1,
"file_url": null
}
],
"next_cursor": null
}| Field | Type | Always | What it is |
|---|---|---|---|
data | Invoice[] | Yes | |
next_cursor | string | null | Yes |
Errors
The refusals this call is known for: invalid, person_required, upstream. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.
In the SDKs
| Client | Call |
|---|---|
| TypeScript | pod.billing.invoices() |
| Python | pod.billing.invoices() |