Customer entitlements
Read what one customer can do from the Comecero API, with the override and the purchase behind each feature, for support tools and your back office.
Get a customer's entitlements answers the same rows as the check API, plus why each feature has the value it has. It is meant for your back office and support tools. Your app should check access with the check API: it is faster, needs no Comecero API token, and is what the 60-second cache rules are made for.
GET https://api.comecero.com/api/v1/customers/{customer_id}/entitlements
| Path | customer_id: the Comecero customer id (not the external_id). |
| Query | feature (optional): one feature's key. Leave it out for every feature. |
| Tokens | Secret and trusted tokens. A limited token gets 403. |
curl "https://api.comecero.com/api/v1/customers/0091304300408CuoxY9Pf3/entitlements?feature=api_calls" \
-H "Authorization: Bearer $COMECERO_SECRET_TOKEN"Answer
{
"object": "customer_entitlements",
"customer_id": "0091304300408CuoxY9Pf3",
"external_id": "user_8412",
"checked_at": "2026-11-15T10:30:00.000Z",
"entitlements": [
{
"feature": "api_calls",
"type": "metered",
"has_access": true,
"reason": null,
"value": null,
"limit": "50000",
"used": "12840",
"remaining": "37160",
"reset_at": "2026-12-01T00:00:00.000Z",
"hard_limit": true,
"limit_reached": false,
"valid_until": "2026-12-01T00:00:00.000Z",
"items": [
{
"source": "SB0123456789:1",
"has_access": true,
"limit": "50000",
"used": "12840",
"remaining": "37160",
"reset_at": "2026-12-01T00:00:00.000Z",
"hard_limit": true,
"limit_reached": false,
"valid_until": "2026-12-01T00:00:00.000Z"
}
],
"plan_value": "10000",
"override": {
"override_id": "eo_9b2e6c1d4a7f4e3b8c5d0a1f2e3d4c5b",
"feature_key": "api_calls",
"limit": "50000",
"expires_at": "2026-12-31T23:59:59.000Z"
},
"source": "SB0123456789:1"
}
]
}external_id is your id for the customer: the one the check API and usage events use. It is the customer_id when you haven't set one.
Each row has every field the check API answers, and three more:
| Field | Type | Description |
|---|---|---|
plan_value | boolean, string or null | What the customer's purchases give without the override, in the same form as value (boolean and number) or limit (metered). Here the plan gives 10,000 calls and the override raises it to 50,000. |
override | object or null | The active override for the feature: override_id, feature_key, value, limit or unlimited, and expires_at. Null when there is none. |
source | string or null | For boolean features, the first granting purchase; for number features, the purchase with the highest value (unlimited wins). Both are null when an override applies. For metered features, the single item's source: the purchase source even when its limit is overridden, or "override" when only an override grants access. Null for multiple metered items, when nothing grants the feature, or when an override denies it. |
When usage can't be read
If the usage meter doesn't answer in time, Comecero still answers. The rows come from what the customer bought and their overrides, without usage: used and remaining are null and usage_unavailable is true. Soft limits and unlimited grants keep access. A finite hard limit is denied with reason: "usage_not_read", since Comecero can't tell whether it was reached.
Errors
| Status | Code | Meaning |
|---|---|---|
403 | insufficient_permissions | The token is a limited token. |
403 | entitlements_not_enabled | Entitlements are not turned on for the account. |
404 | customer_not_found | No customer has this id. |
404 | feature_not_found | feature is not a feature of your catalog. |
500 | request_failure | Comecero's own records of the customer could not be read in time. Try again. |
Change a customer's access
You don't change entitlements on this route. To change what one customer gets, create an override, or delete one to go back to what they bought. To change what a plan gives, publish a new revision of its feature set.
Check API
The usage meter route your server calls to check access. Read GET /v1/entitlements with a usage key, and every field, answer and status code it has.
SDK and HTTP integration
The entitlements SDK is coming soon. Use the HTTP check API today from your server with a usage key, and keep access checks and caching in your app.