Sazabi
APIBilling

Get rated usage

Estimate gross USD consumption value and net usage cost for eight non-AI products from corrected observed ledger quantities. Every period uses the current effective commercial plan prices and recurring allowances on the current billing schedule. Omit dates for its current cycle; without a current plan the UTC month is native-only. This read-only simulation excludes promotional first-cycle bonuses, subscription fees, taxes, AI tokens, and operational activity; it never recalculates or represents historical invoices and never converts credit prices to USD.

GET https://api.sazabi.com/v1/billing/usage/rated

GET
/billing/usage/rated

Query Parameters

cycleStartsAt?string
Formatdate-time
occurredAtFrom?string
Formatdate-time
occurredAtBefore?string
Formatdate-time
bucketMinutes*number
bucketOriginStartsAt?string
Formatdate-time
organizationId?string

Response Body

application/json

curl -X GET "https://example.com/billing/usage/rated?bucketMinutes=0"
{  "calculationBasis": "current_plan",  "range": {    "startsAt": "2019-08-24T14:15:22Z",    "endsAt": "2019-08-24T14:15:22Z",    "isCurrentCycle": true  },  "cycle": {    "startsAt": "2019-08-24T14:15:22Z",    "endsAt": "2019-08-24T14:15:22Z"  },  "currency": "USD",  "products": [    {      "productKey": "issues_created",      "quantity": "string",      "includedQuantity": "string",      "valueCents": "string",      "chargeCents": "string",      "pricingStatus": "complete",      "chargeStatus": "estimated"    }  ],  "buckets": [    {      "bucketStartsAt": "2019-08-24T14:15:22Z",      "productKey": "issues_created",      "quantity": "string",      "valueCents": "string"    }  ],  "totalValueCents": "string",  "totalChargeCents": "string"}