Get usage and fees for a month
GET/v1/orgs/{orgId}/billing/usage
Usage and fees by product for a month, fees already charged, and the estimated charges for the month (billing:view). Platforms also get usage per end-customer.
Before you call it
- Permission
billing:view
Parameters
| Parameter | What it does |
|---|---|
orgIdpath, uuidrequired | The organization the call acts on. For platform calls, your platform's id; for customer calls, the customer's organization id. Get them from getMe or the customer list. |
periodquery, string | YYYY-MM (UTC month); defaults to the current month |
Response 200
Usage
| Field | What it does |
|---|---|
org_idstring (uuid)required | No description in the spec yet. |
period_startstring (date)required | No description in the spec yet. |
period_endstring (date)required | No description in the spec yet. |
currencystringrequired | No description in the spec yet. |
itemsBillingUsageLine[]required | No description in the spec yet. |
items[].product_codestringrequired | No description in the spec yet. |
items[].product_namestringrequired | No description in the spec yet. |
items[].categorystringrequired | No description in the spec yet. |
items[].eventsintegerrequired | No description in the spec yet. |
items[].quantitystringrequired | No description in the spec yet. |
items[].volumestringrequired | No description in the spec yet. |
items[].feesstringrequired | No description in the spec yet. |
items[].chargedstringrequired | Collected when the transaction settled |
items[].accruedstringrequired | Billed at the end of the month |
totalsobjectrequired | No description in the spec yet. |
totals.feesstringrequired | No description in the spec yet. |
totals.chargedstringrequired | No description in the spec yet. |
totals.accruedstringrequired | No description in the spec yet. |
estimateBillingEstimaterequired | No description in the spec yet. |
estimate.usage_feesstringrequired | No description in the spec yet. |
estimate.recurring_feesstringrequired | No description in the spec yet. |
estimate.adjustmentsstringrequired | Monthly minimums and caps |
estimate.creditsstringrequired | No description in the spec yet. |
estimate.totalstringrequired | No description in the spec yet. |
estimate.already_chargedstringrequired | No description in the spec yet. |
estimate.remainingstringrequired | What the month-end statement or invoice would ask for |
customersBillingCustomerUsage[] | Platforms only |
customers[].org_idstring (uuid)required | No description in the spec yet. |
customers[].namestringrequired | No description in the spec yet. |
customers[].eventsintegerrequired | No description in the spec yet. |
customers[].volumestringrequired | No description in the spec yet. |
customers[].feesstringrequired | No description in the spec yet. |