comecerodocs

Check feature access

GET
/v1/entitlements

Checks a customer's feature access from your server. Send a usage key, not a Comecero API token. The key selects the shop and live or test mode. Comecero staff must enable entitlements for your shop before setup. Turning the switch off later does not remove existing grants from the meter. Answers use synced records and usage totals, seconds behind events. Cache successful answers until valid_until or for 60 seconds, whichever comes first, and invalidate them on entitlement:changed. Your app enforces has_access; valid usage events are still accepted at a hard limit. An all-feature check reads at most 32 usages, hard limits first. Ask for one feature alone to read all of its usage. A finite hard limit denies with usage_not_read whenever its usage cannot be read. Soft limits and unlimited grants keep access. This route sends no CORS headers. See Check API.

Authorization

usageKey
headerAuthorizationBearer <token>

A merchant usage key (apk_test_ or apk_live_), never a Comecero API token.

Query Parameters

customer_id*string

The id sent as external_customer_id on usage events, the customer's external_id or their Comecero customer_id when none is set.

Match^[A-Za-z0-9_.:-]{1,128}$
feature?string

One feature's key. Omit it for every feature.

Match^[a-z0-9_.-]{1,64}$

Response Body

The rows. An unknown customer receives rows with has_access false and reason not_entitled.

application/json
  1. response

Feature access from the usage meter, using the records synced from Comecero and current usage.

customer_id*string

The customer id sent in the query.

checked_at*string

When the answer was made, in UTC.

Formatdate-time
rules_revision?

The versions of the synced records used for this answer.

entitlements*array<>

One row per feature in the catalog, or the one asked for.

Itemsitems <= 200
Example Request
curl -X GET 'https://usage.comecero.com/v1/entitlements?customer_id=string'
Example Response
{  "customer_id": "user_8412",  "checked_at": "2026-11-15T10:30:00.000Z",  "rules_revision": {    "catalog_version": 3,    "customer_version": 1,    "revisions": {      "fs_pro|2026-11-01T00:00:00.000Z": 1    }  },  "entitlements": [    {      "feature": "sso",      "type": "boolean",      "has_access": true,      "reason": null,      "value": true,      "limit": null,      "used": null,      "remaining": null,      "reset_at": null,      "hard_limit": false,      "limit_reached": false,      "valid_until": null    }  ]}