Sazabi
APIBilling

Get billing summary

Get a billing summary for the current organization, including plan, balance, and cycle information.

GET https://api.sazabi.com/v1/billing/summary

GET
/billing/summary

Query Parameters

organizationId?string

Organization to query billing for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).

Length1 <= length

Response Body

application/json

curl -X GET "https://example.com/billing/summary"
{  "usageAccess": [    {      "product": "logs_ingested_bytes",      "used": "string",      "included": "string",      "resetAt": "2019-08-24T14:15:22Z",      "enforced": true,      "allowed": true    }  ],  "billingModel": "credit-balance-v1",  "billable": true,  "nonBillableReason": "string",  "status": "string",  "planName": "string",  "planSlug": "string",  "currency": "string",  "currentBalance": "string",  "cycleCredits": "string",  "targetCreditBalance": "string",  "currentCycle": {    "startsAt": "2019-08-24T14:15:22Z",    "endsAt": "2019-08-24T14:15:22Z",    "billableStartsAt": "2019-08-24T14:15:22Z"  },  "currentPeriodEstimate": {    "subscriptionChargeAmount": "string",    "creditDeficitAmount": "string",    "creditDeficitChargeAmount": "string",    "totalAmount": "string",    "currency": "string"  },  "pendingDowngrade": {    "billingSubscriptionChangeId": "string",    "effectiveAt": "2019-08-24T14:15:22Z",    "planSlug": "string",    "planName": "string",    "price": "string",    "currency": "string",    "cycleCredits": "string",    "targetCreditBalance": "string"  },  "subscription": {    "id": "string",    "status": "string",    "billingPlanId": "string",    "cycleType": "string",    "cancelAt": "2019-08-24T14:15:22Z",    "canceledAt": "2019-08-24T14:15:22Z"  },  "entitlements": [    {      "label": "string",      "description": "string",      "type": "binary",      "value": true,      "id": "string",      "source": "plan",      "cycleId": "string",      "preview": true,      "pending": {        "value": true,        "source": "plan",        "effective": "next_cycle"      }    }  ],  "currentPlan": {    "slug": "string",    "name": "string",    "price": "string",    "currency": "string",    "cycleCredits": "string",    "targetCreditBalance": "string",    "subscriptionStatus": "string",    "cycleStartsAt": "2019-08-24T14:15:22Z",    "cycleEndsAt": "2019-08-24T14:15:22Z",    "renewalAt": "2019-08-24T14:15:22Z",    "pendingSwitch": {      "billingSubscriptionChangeId": "string",      "effectiveAt": "2019-08-24T14:15:22Z",      "planSlug": "string",      "planName": "string",      "price": "string",      "currency": "string",      "cycleCredits": "string",      "targetCreditBalance": "string"    },    "pendingCancellation": {      "effectiveAt": "2019-08-24T14:15:22Z"    },    "entitlements": [      {        "label": "string",        "description": "string",        "type": "binary",        "value": true,        "id": "string",        "source": "plan",        "cycleId": "string",        "preview": true,        "pending": {          "value": true,          "source": "plan",          "effective": "next_cycle"        }      }    ]  }}