Entitlements
Override subject entitlement
Overriding an entitlement creates a new entitlement from the provided inputs and soft deletes the previous entitlement for the provided subject-feature pair. If the previous entitlement is already deleted or otherwise doesnt exist, the override will fail.
This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime.
⚠️ Deprecated: Use PUT /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override instead.
put/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override
Path parameters
subjectIdOrKeystring required
entitlementIdOrFeatureKeystring required
Request body
Example request
{
"featureKey": "example-feature-key",
"featureId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"metadata": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"usagePeriod": {
"interval": "DAY",
"anchor": "2023-01-01T01:01:01.001Z"
},
"measureUsageFrom": "2023-01-01T01:01:01.001Z"
}Response
The request has succeeded and a new resource has been created as a result.
Example response
{
"createdAt": "2024-01-01T01:01:01.001Z",
"updatedAt": "2024-01-01T01:01:01.001Z",
"deletedAt": "2024-01-01T01:01:01.001Z",
"metadata": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"activeFrom": "2023-01-01T01:01:01.001Z",
"activeTo": "2023-01-01T01:01:01.001Z",
"annotations": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"subjectKey": "customer-1",
"featureKey": "example-feature-key",
"featureId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"lastReset": "2023-01-01T01:01:01.001Z",
"currentUsagePeriod": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-02-01T01:01:01.001Z"
},
"measureUsageFrom": "2023-01-01T01:01:01.001Z",
"usagePeriod": {
"interval": "DAY",
"intervalISO": "P1D",
"anchor": "2023-01-01T01:01:01.001Z"
}
}