List invoices
import requests
url = "https://platform.ankra.app/api/v1/org/billing/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/billing/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/billing/invoices \
--header 'Authorization: Bearer <token>'{
"invoices": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stripe_invoice_id": "<string>",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"total_vcpu_hours": 123,
"free_vcpu_hours": 123,
"billable_vcpu_hours": 123,
"amount_cents": 123,
"playground_cents": 123,
"currency": "<string>",
"status": "<string>",
"pdf_url": "<string>",
"hosted_invoice_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"due_date": "2023-11-07T05:31:56Z"
}
],
"total_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Billing
List invoices
Lists the invoices of the organisation the token acts in, newest first, with the hosted invoice page and PDF links Stripe issued. Open invoices are refreshed from Stripe before they are returned. Requires billing.read.
GET
/
api
/
v1
/
org
/
billing
/
invoices
List invoices
import requests
url = "https://platform.ankra.app/api/v1/org/billing/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/billing/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/billing/invoices \
--header 'Authorization: Bearer <token>'{
"invoices": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stripe_invoice_id": "<string>",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"total_vcpu_hours": 123,
"free_vcpu_hours": 123,
"billable_vcpu_hours": 123,
"amount_cents": 123,
"playground_cents": 123,
"currency": "<string>",
"status": "<string>",
"pdf_url": "<string>",
"hosted_invoice_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"due_date": "2023-11-07T05:31:56Z"
}
],
"total_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Act in another organisation the token's owner is an active member of; defaults to the token's own organisation.
Query Parameters
Required range:
1 <= x <= 200Required range:
x >= 0Only invoices in this status, such as paid or open.
Match the invoice id, Stripe invoice id, status or amount.