Entitlements
Customers
Override customer entitlement
Overriding an entitlement creates a new entitlement from the provided inputs and soft deletes the previous entitlement for the provided customer-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.
put/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override
Request
- Base URLhttps://openmeter.cloud (the document declares no server; this is the origin it was published from)
- Auth
- HTTP bearer
- or API key in cookie __session
Path parameters
Example:01G65Z755AFWAKHE12NY0CQ9FH
Example:01G65Z755AFWAKHE12NY0CQ9FH
Request body
Example request
{
"featureId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"featureKey": "example-feature-key",
"grants": [
{
"amount": 100,
"annotations": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"effectiveAt": "2023-01-01T01:01:01.001Z",
"expiration": {
"count": 12
},
"maxRolloverAmount": 100,
"metadata": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"minRolloverAmount": 100,
"priority": 1,
"recurrence": {
"anchor": "2023-01-01T01:01:01.001Z",
"interval": "DAY"
}
}
],
"measureUsageFrom": "2023-01-01T01:01:01.001Z",
"metadata": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"usagePeriod": {
"anchor": "2023-01-01T01:01:01.001Z",
"interval": "DAY"
}
}Response
The request has succeeded and a new resource has been created as a result.
Example response
{
"activeFrom": "2023-01-01T01:01:01.001Z",
"activeTo": "2023-01-01T01:01:01.001Z",
"annotations": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"createdAt": "2024-01-01T01:01:01.001Z",
"currentUsagePeriod": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-02-01T01:01:01.001Z"
},
"customerId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"customerKey": "customer-1",
"deletedAt": "2024-01-01T01:01:01.001Z",
"featureId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"featureKey": "example-feature-key",
"id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"lastReset": "2023-01-01T01:01:01.001Z",
"measureUsageFrom": "2023-01-01T01:01:01.001Z",
"metadata": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"updatedAt": "2024-01-01T01:01:01.001Z",
"usagePeriod": {
"anchor": "2023-01-01T01:01:01.001Z",
"interval": "DAY",
"intervalISO": "P1D"
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.