Entitlements
Entitlements
The catalog of typed rights, the grant that carries each License's value and its enforcement, and the usage measured against it — the deep-dive behind Licenses & Entitlements and Usage & Metering.
What an entitlement is
An entitlement is one typed right in your catalog — a quota, a switch, or a structured setting — defined once and granted at a value by each License. The catalog says what can be granted and how it is measured; the grant says how much a License gives and how strictly that number is enforced; the usage record says how much an instance has consumed. Kaiten Sushi Shop's monthly-orders, read across its three Licenses:
Entitlement "Monthly Orders" (monthly-orders)
├── Type: NUMBER · aggregation: SUM
├── Warning threshold: none (0 — the early warning is off)
├── Reset period: MONTH, anchored on the calendar
└── Granted by
├── Starter → 20 · overage allowance 0 % (hard cap)
├── Standard → 100 · overage allowance 10 % (accepted up to 110)
└── Premium → 1,000 · overage allowance 20 % (accepted up to 1,200)Each License here is a family of versions, and a grant belongs to one version; every version of these three grants monthly-orders the same value.
Read the tree from the top and you have the measurement, identical for every License. Read the three grants and you have the contract: the same entitlement is a hard cap on one License and a soft limit with a bounded allowance on another, because enforcement is written on the grant.
The four types
| Type | Purpose | Grant value | Measured | Kaiten Sushi Shop |
|---|---|---|---|---|
BOOLEAN | Included, or not | {"type": "boolean", "value": true} | No — read, never metered | delivery-tracking |
NUMBER | A measurable quota | {"type": "number", "value": 20} | Yes — aggregation method mandatory | menu-items, monthly-orders, delivery-drivers, locations |
NUMBER_AI_CREDIT | A quota of AI credits | {"type": "number", "value": 5000} | Yes — same rules as NUMBER | — |
CONFIG | A structured value your product reads | {"type": "object", "value": {…}} | No | support-tier |
How it works
- Define the catalog —
POST /entitlements, one per right. ANUMBERcarries its aggregation method, an optional warning threshold, and an optional reset period; aBOOLEANorCONFIGcarries none of these. - Grant per License —
POST /licenses/{slug}/entitlementswith the typed value and, for aNUMBER,limitCapExceededOveragePercent:-1unlimited,0hard cap,> 0the tolerated overage. One grant per License–entitlement pair. - Attach instances to a License — every instance resolves its entitlements through the grants of its License, from its next read or report.
- Report usage — your product posts each
NUMBERconsumption toPOST /instances/{slug}/entitlements/{slug}/usage; Kaiten folds it into the stored total and compares the result with the grant's maximum allowed usage. Above it, the report is refused with409and nothing is written. - React — the threshold crossings, the accepted and refused reports, and every closed usage window are events, delivered as webhooks on Kaiten Cloud Kaiten Cloud or consumed from RabbitMQ when self-hosted, and recorded in the instance's audit trail.
Entitlements are organization-scoped. Your catalog, your grants, and your usage records are yours alone — a slug is unique within your organization.
In this section
Entitlement Types
BOOLEAN, NUMBER, NUMBER_AI_CREDIT, CONFIG — value shapes, what each type carries, and the grant body for each.
Entitlement Groups
Named sets of entitlements with an aggregated usage view per instance.
Metering
Aggregation methods, append versus set, what happens on a report, and periodic usage windows.
Usage & Thresholds
The two numbers on the grant, the allowance arithmetic, the refusal, the crossing signals, and the audit trail.
API endpoints overview
Scopes follow the module: read:entitlements / write:entitlements for the catalog and the groups, read:licenses / write:licenses for the grants, read:instances / write:instances for usage. See scopes.
Catalog
| Method | Endpoint | Description |
|---|---|---|
GET | /entitlements | List entitlements (cursor-paginated) |
POST | /entitlements | Create an entitlement |
GET | /entitlements/{slug} | Get an entitlement |
PUT | /entitlements/{slug} | Replace an entitlement's details — type, aggregation method, and reset period are immutable and must be echoed back |
DELETE | /entitlements/{slug} | Delete an entitlement no License grants; the usage recorded for it is deleted with it |
Deleting an entitlement deletes its usage: a counter measures nothing once its entitlement is gone. A grant is different — it is a commercial decision recorded on a License, so an entitlement a License still grants is refused with 409 Conflict (DeleteEntitlement.InUseConflict). Remove the grants first, with DELETE /licenses/{slug}/entitlements/{entitlementSlug}.
Grants
| Method | Endpoint | Description |
|---|---|---|
GET | /licenses/{slug}/entitlements | List a License's grants |
POST | /licenses/{slug}/entitlements | Grant an entitlement on a License, with its value and overage allowance |
GET | /licenses/{slug}/entitlements/{entitlementSlug} | Get one grant |
PUT | /licenses/{slug}/entitlements/{entitlementSlug} | Replace a grant's value and overage allowance |
DELETE | /licenses/{slug}/entitlements/{entitlementSlug} | Remove a grant |
Groups
| Method | Endpoint | Description |
|---|---|---|
GET | /entitlement-groups | List groups (cursor-paginated) |
POST | /entitlement-groups | Create a group |
GET | /entitlement-groups/{slug} | Get a group |
PUT | /entitlement-groups/{slug} | Replace a group's name and description |
DELETE | /entitlement-groups/{slug} | Delete a group |
POST | /entitlement-groups/{slug}/entitlements | Add an entitlement to a group |
DELETE | /entitlement-groups/{slug}/entitlements/{entitlementSlug} | Remove an entitlement from a group |
GET | /entitlement-groups/{slug}/usage?instance={instanceSlug} | Aggregated usage of the group's members for one instance |
Usage
| Method | Endpoint | Description |
|---|---|---|
GET | /instances/{slug}/entitlements/usage | Every entitlement's usage for an instance, next to the granted limit |
GET | /instances/{slug}/entitlements/{entitlementSlug}/usage | One entitlement's usage — recorded as ENTITLEMENT_VALUE_GET |
POST | /instances/{slug}/entitlements/{entitlementSlug}/usage | Report usage (append or set) |
GET | /instances/{slug}/audit-trails | Read the instance's audit trail |
Events
| Event name | Event type |
|---|---|
ENTITLEMENT_CREATED | com.kaiten.entitlement.v1.created |
ENTITLEMENT_UPDATED | com.kaiten.entitlement.v1.updated |
ENTITLEMENT_DELETED | com.kaiten.entitlement.v1.deleted |
ENTITLEMENT_GROUP_CREATED | com.kaiten.entitlement_group.v1.created |
ENTITLEMENT_GROUP_UPDATED | com.kaiten.entitlement_group.v1.updated |
ENTITLEMENT_GROUP_DELETED | com.kaiten.entitlement_group.v1.deleted |
LICENSE_ENTITLEMENT_ASSIGNED | com.kaiten.license.entitlement.v1.assigned |
LICENSE_ENTITLEMENT_UPDATED | com.kaiten.license.entitlement.v1.updated |
LICENSE_ENTITLEMENT_UNASSIGNED | com.kaiten.license.entitlement.v1.unassigned |
ENTITLEMENT_VALUE_GET | com.kaiten.instance.entitlement.v1.value_get |
ENTITLEMENT_USAGE_REPORT_ACCEPTED | com.kaiten.instance.entitlement.v1.usage_report_accepted |
ENTITLEMENT_USAGE_REPORT_REJECTED | com.kaiten.instance.entitlement.v1.usage_report_rejected |
INSTANCE_ENTITLEMENT_USAGE_WARNING_THRESHOLD_REACHED | com.kaiten.instance.entitlement.v1.usage_warning_threshold_reached |
INSTANCE_ENTITLEMENT_USAGE_REACHED | com.kaiten.instance.entitlement.v1.usage_reached |
INSTANCE_ENTITLEMENT_CAP_EXCEEDED | com.kaiten.instance.entitlement.v1.cap_exceeded |
INSTANCE_ENTITLEMENT_USAGE_PERIOD_ROLLED_OVER | com.kaiten.instance.entitlement.v1.usage_period_rolled_over |
The event catalog lists every event with its payload; events and webhooks explains the two delivery paths.
Where to go next
The one-screen versions: Licenses & Entitlements for the contract side, Usage & Metering for the observed side. Exact reference — tables, columns, constraints: the contract section of the data model.
OpenFeature & OFREP
Evaluate feature flags using the standard OpenFeature Remote Evaluation Protocol — compatible with any OpenFeature SDK.
Entitlement Types
BOOLEAN, NUMBER, NUMBER_AI_CREDIT, and CONFIG — the value shape of each type, what a NUMBER carries on the catalog, and what its grant carries on the License.