Entitlements
Batch Check Feature Entitlements
Check multiple feature entitlements in a single request. Returns entitlement information for each requested feature. Features that are not found or not entitled are filtered out of the response.
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Path Parameters
customerId*string
Customer ID. Can be internal ID (cus_...) or external ID based on isExtCustId parameter.
Query Parameters
isExtCustId?string
When 'true', customerId is interpreted as externalCustomerId (your external ID). Default is 'false' (internal Lumen customer ID).
Default
"false"Value in
"true" | "false"Request Body
application/json
featureSlugs*array<string>
Array of feature slugs to check
Items
1 <= itemsResponse Body
application/json
application/json
application/json
curl -X POST "https://api.getlumen.dev/v1/entitlements/cus_Lo4xGg1Yk9pB2eWv3sNtA/features" \ -H "Content-Type: application/json" \ -d '{ "featureSlugs": [ "api-access", "max-api-calls", "premium-support" ] }'{
"entitlements": [
{
"entitled": true,
"feature": {
"slug": "api-access",
"value": true
},
"source": "plan",
"creditInfo": {
"creditAllowance": 0,
"creditsRemaining": 0,
"nextExpiryDate": null
}
},
{
"entitled": true,
"feature": {
"slug": "max-api-calls",
"value": 10000
},
"source": "credits",
"usages": [
{
"metricId": "met_DQ6f7a8b9c0d1e2f3g4h5i",
"usage": 2500
}
],
"creditInfo": {
"creditAllowance": 10000,
"creditsRemaining": 7500,
"nextExpiryDate": "2024-02-15T00:00:00Z"
}
}
]
}{
"error": "featureSlugs array cannot be empty"
}{
"error": "Failed to check entitlements"
}