Kaiten

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

TypePurposeGrant valueMeasuredKaiten Sushi Shop
BOOLEANIncluded, or not{"type": "boolean", "value": true}No — read, never metereddelivery-tracking
NUMBERA measurable quota{"type": "number", "value": 20}Yes — aggregation method mandatorymenu-items, monthly-orders, delivery-drivers, locations
NUMBER_AI_CREDITA quota of AI credits{"type": "number", "value": 5000}Yes — same rules as NUMBER—
CONFIGA structured value your product reads{"type": "object", "value": {…}}Nosupport-tier

How it works

  1. Define the catalog — POST /entitlements, one per right. A NUMBER carries its aggregation method, an optional warning threshold, and an optional reset period; a BOOLEAN or CONFIG carries none of these.
  2. Grant per License — POST /licenses/{slug}/entitlements with the typed value and, for a NUMBER, limitCapExceededOveragePercent: -1 unlimited, 0 hard cap, > 0 the tolerated overage. One grant per License–entitlement pair.
  3. Attach instances to a License — every instance resolves its entitlements through the grants of its License, from its next read or report.
  4. Report usage — your product posts each NUMBER consumption to POST /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 with 409 and nothing is written.
  5. 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

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

MethodEndpointDescription
GET/entitlementsList entitlements (cursor-paginated)
POST/entitlementsCreate 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

MethodEndpointDescription
GET/licenses/{slug}/entitlementsList a License's grants
POST/licenses/{slug}/entitlementsGrant 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

MethodEndpointDescription
GET/entitlement-groupsList groups (cursor-paginated)
POST/entitlement-groupsCreate 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}/entitlementsAdd 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

MethodEndpointDescription
GET/instances/{slug}/entitlements/usageEvery entitlement's usage for an instance, next to the granted limit
GET/instances/{slug}/entitlements/{entitlementSlug}/usageOne entitlement's usage — recorded as ENTITLEMENT_VALUE_GET
POST/instances/{slug}/entitlements/{entitlementSlug}/usageReport usage (append or set)
GET/instances/{slug}/audit-trailsRead the instance's audit trail

Events

Event nameEvent type
ENTITLEMENT_CREATEDcom.kaiten.entitlement.v1.created
ENTITLEMENT_UPDATEDcom.kaiten.entitlement.v1.updated
ENTITLEMENT_DELETEDcom.kaiten.entitlement.v1.deleted
ENTITLEMENT_GROUP_CREATEDcom.kaiten.entitlement_group.v1.created
ENTITLEMENT_GROUP_UPDATEDcom.kaiten.entitlement_group.v1.updated
ENTITLEMENT_GROUP_DELETEDcom.kaiten.entitlement_group.v1.deleted
LICENSE_ENTITLEMENT_ASSIGNEDcom.kaiten.license.entitlement.v1.assigned
LICENSE_ENTITLEMENT_UPDATEDcom.kaiten.license.entitlement.v1.updated
LICENSE_ENTITLEMENT_UNASSIGNEDcom.kaiten.license.entitlement.v1.unassigned
ENTITLEMENT_VALUE_GETcom.kaiten.instance.entitlement.v1.value_get
ENTITLEMENT_USAGE_REPORT_ACCEPTEDcom.kaiten.instance.entitlement.v1.usage_report_accepted
ENTITLEMENT_USAGE_REPORT_REJECTEDcom.kaiten.instance.entitlement.v1.usage_report_rejected
INSTANCE_ENTITLEMENT_USAGE_WARNING_THRESHOLD_REACHEDcom.kaiten.instance.entitlement.v1.usage_warning_threshold_reached
INSTANCE_ENTITLEMENT_USAGE_REACHEDcom.kaiten.instance.entitlement.v1.usage_reached
INSTANCE_ENTITLEMENT_CAP_EXCEEDEDcom.kaiten.instance.entitlement.v1.cap_exceeded
INSTANCE_ENTITLEMENT_USAGE_PERIOD_ROLLED_OVERcom.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.

On this page