Billing Markup Breakdown
GET /api/v1/billing/markup-breakdown
Performs the account operation at /api/v1/billing/markup-breakdown.
Authenticate with a portal session token.
Responses
200 Usage-record billing breakdown for the current calendar month; receipts provide mode attributes only.
application/json object
currencystring requiredCurrency of raw usage_records and receipt provider micros.
Value:"USD"monthstring requiredmonth_labelstring requiredcovers_legacy_usageboolean requiredTrue when monthly totals include all usage_records, including rows without receipts.
modesarray of object requiredEach item:
has_receiptboolean requiredWhether the usage rows in this breakdown line have linked signed receipts.
unitemisedboolean requiredTrue when a usage row cannot be assigned to a billing mode.
total_cost_microsinteger requiredExact billed amount in USD micros from usage_records; receipt amounts do not replace it.
total_callsinteger requiredtotal_fee_microsinteger requiredExact fee total in USD micros from usage_records.
total_fee_centsinteger requiredtotal_feestring requiredtotal_billed_microsinteger requiredExact total in USD micros from usage_records.
total_billed_centsinteger requiredtotal_billedstring requiredno_receipt_callsinteger requiredhas_trafficboolean requiredcache_usageCacheUsageBreakdown required
Generated sample
{
"currency": "USD",
"month": "string",
"month_label": "string",
"covers_legacy_usage": true,
"modes": [
{
"has_receipt": true,
"unitemised": true,
"total_cost_micros": 0
}
],
"total_calls": 0,
"total_fee_micros": 0,
"total_fee_cents": 0,
"total_fee": "string",
"total_billed_micros": 0,
"total_billed_cents": 0,
"total_billed": "string",
"no_receipt_calls": 0,
"has_traffic": true,
"cache_usage": {
"read": {
"tokens": 0,
"rate_cents_per_million": 0,
"provider_cost_micros": 0,
"unpriced_tokens": 0
},
"write_5m": {
"tokens": 0,
"rate_cents_per_million": 0,
"provider_cost_micros": 0,
"unpriced_tokens": 0
},
"write_1h": {
"tokens": 0,
"rate_cents_per_million": 0,
"provider_cost_micros": 0,
"unpriced_tokens": 0
},
"write_30m": {
"tokens": 0,
"rate_cents_per_million": 0,
"provider_cost_micros": 0,
"unpriced_tokens": 0
},
"write_12h": {
"tokens": 0,
"rate_cents_per_million": 0,
"provider_cost_micros": 0,
"unpriced_tokens": 0
},
"write_total_tokens": 0,
"per_type_available": true,
"records_without_audit_detail": 0
}
}401 Missing or invalid bearer token.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
403 Error response.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
429 The request was rate limited. API-generated responses are JSON;
Response headers
Retry-Afterstring headerSeconds to wait before retrying, when provided.
X-RateLimit-Scopestring headerIdentifies the scope of the request limit, when provided.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
text/html string