v51

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2026-08-011534301009.2 KB
Entitlements

List subject entitlement grants

List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.

⚠️ Deprecated: Use GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants instead.

get/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants

Path parameters

subjectIdOrKeystring required
entitlementIdOrFeatureKeystring required

Query parameters

includeDeletedboolean
orderBy'id' | 'createdAt' | 'updatedAt'

Order by options for grants.

Response

The request has succeeded.

createdAtstring date-time required

Timestamp of when the resource was created.

updatedAtstring date-time required

Timestamp of when the resource was last updated.

deletedAtstring date-time

Timestamp of when the resource was permanently deleted.

amountnumber double required

The amount to grant. Should be a positive number.

priorityinteger

The priority of the grant. Grants with higher priority are applied first. Priority is a positive decimal numbers. With lower numbers indicating higher importance. For example, a priority of 1 is more urgent than a priority of 2. When there are several grants available for the same subject, the system selects the grant with the highest priority. In cases where grants share the same priority level, the grant closest to its expiration will be used first. In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.

effectiveAtstring date-time required

Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).

maxRolloverAmountnumber double

Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))

minRolloverAmountnumber double

Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))

metadataMetadata

Set of key-value pairs. Metadata can be used to store additional information about a resource.

idstring required

Readonly unique ULID identifier.

entitlementIdstring required

The unique entitlement ULID that the grant is associated with.

nextRecurrencestring date-time

The next time the grant will recurr.

expiresAtstring date-time

The time the grant expires.

voidedAtstring date-time

The time the grant was voided.

annotationsAnnotations

Set of key-value pairs managed by the system. Cannot be modified by user.

Example response

[
  {
    "createdAt": "2024-01-01T01:01:01.001Z",
    "updatedAt": "2024-01-01T01:01:01.001Z",
    "deletedAt": "2024-01-01T01:01:01.001Z",
    "amount": 100,
    "priority": 1,
    "effectiveAt": "2023-01-01T01:01:01.001Z",
    "expiration": {
      "count": 12
    },
    "maxRolloverAmount": 100,
    "minRolloverAmount": 100,
    "metadata": {
      "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
    },
    "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "entitlementId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "nextRecurrence": "2023-01-01T01:01:01.001Z",
    "expiresAt": "2023-01-01T01:01:01.001Z",
    "voidedAt": "2023-01-01T01:01:01.001Z",
    "recurrence": {
      "interval": "DAY",
      "intervalISO": "P1D",
      "anchor": "2023-01-01T01:01:01.001Z"
    },
    "annotations": {
      "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
    }
  }
]