Get Subscription
const url = 'https://example.com/api/billing/subscription?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/billing/subscription?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --header 'Authorization: Bearer <token>'An org’s per-product entitlement state plus month-to-date usage.
Entitlement state is dunning-ladder normalized (_normalize_entitlement_state, app/core/deps.py) rather than the raw DB value, so this endpoint can never show a stale trial/grace row that the sweep job (entitlement_sweep.py) hasn’t persisted yet — same posture as RequireEntitlement.
Usage covers every (product, meter) with at least one
organization_usage_counters row this UTC calendar month. limit is the
EFFECTIVE ceiling, resolved in §13.6’s exact order (this field is asserted
on by billing_flows, so the order has to be unambiguous):
- product in
trial-> the S39 trial ceiling (app/config.py’s billing_trial_* settings viaingest_gate._trial_limit, the exact function the ingest gate enforces against), unchanged; - else, org on a tier -> that tier’s included amount for the meter;
- else — a grandfathered à la carte org, or a meter with no quota
dimension —
None, exactly as before. Such an org has no hard ceiling, only a billed overage.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “ Query Parameters ”Responses
Section titled “ Responses ”Successful Response
GET /api/billing/subscription — org-scoped entitlement + usage summary.
object
Month-to-date usage for one (product, meter) with any activity this month.
Example
{ "has_mcu_ota": false, "overage_enabled": false, "storage_used_bytes": 0, "usage": [ { "dropping": false, "overage_available": false } ]}Validation Error
object
object
object
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}