Skip to main content
GET
Check customer entitlement

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id_or_alias
string
required

Customer ID or alias

feature_id_or_code
string
required

Feature ID or code

Query Parameters

requested
string<decimal>

Units the customer is about to consume. Defaults to 1.

subscription_id
string

The subscription (sub_…) the usage belongs to: only its own budgets and the customer-wide ones apply. Without it, a budget on one subscription refuses only once every subscription charging the feature's metric is refused by its own budget.

group
object

The group to check, as group[<property>]=<value>: required when the entitlement is grouped

Response

Whether the customer may consume the requested units

Whether a customer may consume more of a feature now.

as_of
string<date-time>
required

When the usage behind the answer was measured.

exact
boolean
required

Always false: the answer reflects usage up to as_of.

feature
object
required
has_access
boolean
required
in_overage
boolean
required

The entitlement allows overage (ALLOW) and the requested units go beyond its limit: access is granted, and the overage is billed.

lag_ms
integer<int64>
required

Age of that usage, in milliseconds.

limits
object[]
required

Deprecated: always empty. Customer-specific limits are entitlement overrides, reported in used, limit and remaining.

near_limit
boolean
required

True when a hard limit is within 5% of being reached, reached, or refuses the request. While true, check before every request with its actual requested, and do not cache an answer that grants access.

reason
enum<string>
required
Available options:
WITHIN_LIMIT,
LIMIT_REACHED,
NO_ENTITLEMENT,
DISABLED,
BUDGET_EXCEEDED,
INSUFFICIENT_BALANCE,
TOO_MANY_GROUPS
limit
string<decimal> | null
period
object | null

The current period of the entitlement's limit.

remaining
string<decimal> | null

Units left before the limit, grace excluded: 0 while has_access is true when usage is within the grace allowance.

retry_after_ms
integer<int64> | null

When to check again, in milliseconds. After a refusal by a limit whose period ends within 24 hours: the time until it ends (a smaller requested may still be allowed sooner); absent after a refusal by a sliding window, whose usage leaves it gradually. While near_limit is true and access is granted: 1000.

used
string<decimal> | null

used, limit, remaining and period report the entitlement's limit. Absent when the entitlement has no limit.

value
object

The value of a CONFIG feature.