GET/v2/organizations/{organizationId}/billing/self-hosted-ee/subscriptions/{subscriptionId}/expected-usage

Get expected usage for a self-hosted subscription

Retrieves expected usage for the current month for a self-hosted Enterprise Edition subscription. Use organizationId and subscriptionId to identify the subscription whose projected usage and costs you want to review.

2 parameters
organizationIdintegerrequired
The integer identifier of the organization that owns the subscription.
subscriptionIdintegerrequired
The integer identifier of the self-hosted Enterprise Edition subscription.

5 status codes
200Returns expected usage totals for keys, seats, and translations, along with applicable credits, subscription price, and total.
appliedStripeCreditsnumberoptional
Relevant for invoices only. When there are applied stripe credits, we need to reduce the total price by this amount.
carryOverTotalnumberoptional
Relevant for invoices only. Total amount deferred from previous billing periods that is included in this invoice.
creditsobjectoptional
keysobjectrequired
seatsobjectrequired
subscriptionPricenumberoptional
totalnumberrequired
translationsobjectrequired
400Returned when the request is invalid.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when authentication is missing or invalid.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user is not permitted to access the requested resource.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the organization or subscription is not found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 indicates an invalid request, a 401 indicates an authentication failure, a 403 indicates insufficient access, and a 404 indicates the organization or subscription was not found. The organizationId and subscriptionId path parameters must identify a subscription belonging to that organization.