Billing fields
Look up every field of the GraphQL API billing datasets, with its type, what it holds, and a response for each dataset.
The GraphQL API billing endpoint, https://api.azion.com/v4/billing/graphql, serves three datasets: balanceFinancialEntry, paymentsClientDebt, and billDetail. The table of each dataset lists the fields a query can select, with the type the schema declares. Send the query in a POST request with the header Authorization: Token [TOKEN VALUE].
Every billing dataset accepts the filter, aggregate, groupBy, orderBy, offset, and limit arguments, with limit set to 10 and offset to 0 by default. The arguments are described on Datasets and query arguments.
balanceFinancialEntry
The balanceFinancialEntry dataset holds the financial entries of an account, such as debits and trial credits, with the amount and currency of each one:
| Field | Type | Description |
|---|---|---|
clientId | String | Unique identifier of the client on Azion. Example: 8437r. |
entryType | String | Type of the financial entry. Examples: debit, trial_credit, remaining_trial_credit, closing_month_debit. |
description | String | Description of the entry that appears on the client bill and invoice. Can be an empty string. |
amount | Float | Amount registered in the financial entry, in the currency of currency. Examples: 18750, 0.04. |
currency | String | Currency of the financial entry. Examples: BRL, USD. |
created | Date | Date the financial entry was created. |
expirationDate | Date | Date the financial entry expires. |
A balanceFinancialEntry query needs no filter. This query returns up to five financial entries of the account:
The response is cut after the third row:
paymentsClientDebt
The paymentsClientDebt dataset holds the client debts of an account: the amount owed for an accounted period, and the date and card of its payment:
| Field | Type | Description |
|---|---|---|
clientId | String | Unique identifier of the client on Azion. Example: 8437r. |
created | Date | Date the client debt was created, in year-month-day format. Example: 2023-07-31. |
amount | Float | Total value accounted for the client debt, in the currency of currency. Examples: 625, 0.0. |
currency | String | Currency of the client debt. Examples: BRL, USD. |
startDate | Date | Start date of the accounted period, in year-month-day format. Example: 2022-06-01. |
endDate | Date | End date of the accounted period, in year-month-day format. Example: 2022-06-30. |
paymentDate | Date | Date of the client payment, in year-month-day format. Example: 2023-07-10. |
cardBrand | String | Brand of the card the client used for the payment. Example: VISA. |
cardLast4Digits | String | Last four digits of the client card. Example: 4456. |
A paymentsClientDebt query needs no filter. This query returns up to five client debts of the account, with the period each one covers:
The response holds one row per client debt:
billDetail
The billDetail dataset holds the bill details of an account. Each row is the usage accounted for one product, metric, and region in a billing period, with its bill and invoice:
| Field | Type | Description |
|---|---|---|
clientId | String | Unique identifier of the client. Example: 0001a. |
periodFrom | Date | Start date of the accounted period, in year-month-day format. Example: 2023-07-01. |
periodTo | Date | End date of the accounted period, in year-month-day format. Example: 2023-07-31. |
productSlug | String | Identifier of the product. Examples: edge_functions, application. |
metricSlug | String | Identifier of the metric. Examples: invocations, data_transferred. |
regionName | String | Region where the metric was accounted. Example: Brazil. |
accounted | Float | Total usage accounted for the bill detail. Examples: 1767504904, 0.024962217. |
billId | Int | Unique identifier of the bill. Example: 1000. |
billDetailId | Int | Unique identifier of the bill detail. Example: 100000. |
createdDate | Date | Creation date of the bill, in year-month-day format. Example: 2023-07-01. |
temporaryBill | Boolean | Whether the bill is for the current month, which makes it temporary. Example: false. |
invoiceNumber | String | Unique identifier of the invoice generated for the client bill. Example: BRLTDA-2769z072023. |
value | Decimal | Monetary value of the bill detail. |
totalValue | Decimal | Total monetary value of the bill. |
currency | String | Currency of the monetary values. |
This query returns up to five bill details whose period starts inside the range set in periodFromRange:
The response holds five rows, cut here after the third: