Check Feature access
Check a customer’s access or available balance without spending units.
https://i.nuxie.ai/entitledCheck whether a customer can use a published Feature. This request reads access without spending units. To charge for an action, consume usage.
Request body
apiKeybodystringrequiredPublishable key for the app platform. A pk_test_ key selects test data; a pk_live_ key selects live data. Copy it from Connect your app.
customerIdbodystringrequiredThe identified or anonymous customer ID your app supplies to the SDK, rather than Nuxie’s internal customer record ID. See Customer identifiers.
featureIdbodystringrequiredPublished Feature key, such as premium-export. Several Products can grant the same Feature.
requiredBalancebodyintegerUnits needed for the action. Accepts 1 to 9,007,199,254,740,991; defaults to 1.
requiredQuantitybodyintegerAlias for requiredBalance. If you send both, their values must match.
entityIdbodystringIdentifier for entity-scoped access. Must be non-empty, trimmed, and at most 256 bytes.
Unknown request fields return 400.
Response
customerIdstringrequiredCustomer identity supplied in the request.
featureIdstringrequiredPublished Feature key that was checked.
requiredBalanceintegerrequiredNumber of units checked.
codestringrequiredReason for the result. See the decision codes below.
allowedbooleanrequiredWhether the customer has the requested access. A 200 response can have allowed: false.
unlimitedbooleanrequiredWhether usage is unlimited.
balancenumberrequiredRemaining units, or null for unlimited access.
typestringrequiredFeature type: boolean, metered, or creditSystem.
For a Boolean Feature, allowed reports active access independently of the balance. For a metered Feature or credit system, access must be active and either unlimited or have enough units for requiredBalance. Unlimited access has a null balance.
allowed: false means the customer does not have the requested access, even when the HTTP status is 200.
code |
Meaning |
|---|---|
feature_found |
The Feature was checked; read allowed for the decision |
customer_missing |
No customer record exists for the supplied ID |
feature_inapplicable |
The Feature does not apply to the platform making the request |
feature_not_found |
No published Feature matches; HTTP 404 |
billing_unavailable |
Access could not be checked; HTTP 503 |