Appearance
Plan Entitlements
A Plan Entitlement object is what connects a Plan to an Entitlement. It is also where the usage limit (called threshold) for the Entitlement is defined. For example, a Basic Plan would use the "API Calls" Entitlement with a threshold of 1000, which would allow for up to 1000 API calls within the Entitlement's reset period.
Get plan entitlement by plan
GET
https://api.verustrust-licensing.com/v1/plan-entitlements/plan/{planId}Requires an access token with the View Products permission.
Path parameters
| Name | Type | Required |
|---|---|---|
planId | string | Yes |
Responses
- 200 Success
application/json
json
[
{
"id": "557bad0d-2cbe-5361-a311-9eec61e58cdf",
"threshold": 4,
"entitlement": {
"id": "78ab45ca-cbaa-5b20-8905-4e44026dcb13",
"productId": "4467c06f-014b-559c-bf05-9aab22bdab39",
"name": "Screens",
"consumptionPeriod": {
"id": "fb50fc32-b64c-577c-95c9-52d4d2a7a1c0",
"name": "Monthly"
},
"activationsEnabled": true,
"deactivated": false
}
}
]ts
{
id: string
threshold?: number | null
entitlement: {
id: string
productId?: string | null
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
}[]| Error | Meaning |
|---|---|
400 | The request is invalid. |
401 | The access token is missing, invalid, or expired. |
403 | The access token does not have the View Products permission. |
429 | Too many requests: a rate limit was exceeded. |
See Errors for the response formats.
Create a plan entitlement
POST
https://api.verustrust-licensing.com/v1/plan-entitlementsRequires an access token.
Threshold has to be greater than or equal to 0. An entitlement can only be included in a plan once. The entitlements specified must not be deactivated.
Request body
application/json
json
{
"planId": "c23d27a5-3029-5ffd-96a3-a0a7abc4ee31",
"threshold": 4,
"entitlementId": "78ab45ca-cbaa-5b20-8905-4e44026dcb13"
}ts
{
planId: string
threshold?: number | null
entitlementId: string
}Responses
- 201 Returns created plan entitlement.
application/json
json
{
"id": "557bad0d-2cbe-5361-a311-9eec61e58cdf",
"threshold": 4,
"entitlement": {
"id": "78ab45ca-cbaa-5b20-8905-4e44026dcb13",
"productId": "4467c06f-014b-559c-bf05-9aab22bdab39",
"name": "Screens",
"consumptionPeriod": {
"id": "fb50fc32-b64c-577c-95c9-52d4d2a7a1c0",
"name": "Monthly"
},
"activationsEnabled": true,
"deactivated": false
}
}ts
{
id: string
threshold?: number | null
entitlement: {
id: string
productId?: string | null
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
}| Error | Meaning |
|---|---|
400 | The request is invalid. |
401 | The access token is missing, invalid, or expired. |
429 | Too many requests: a rate limit was exceeded. |
See Errors for the response formats.
Update a plan entitlement
PUT
https://api.verustrust-licensing.com/v1/plan-entitlements/plan-entitlement/{id}Requires an access token with the Edit Products permission.
Threshold has to be greater than or equal to 0. An entitlement can only be included in a plan once. The entitlement specified must not be deactivated.
Path parameters
| Name | Type | Required |
|---|---|---|
id | string | Yes |
Request body
application/json
json
{
"threshold": 4,
"entitlementId": "78ab45ca-cbaa-5b20-8905-4e44026dcb13"
}ts
{
threshold?: number | null
entitlementId?: string | null
}Responses
- 204 Plan was updated successfully
| Error | Meaning |
|---|---|
400 | The request is invalid. |
401 | The access token is missing, invalid, or expired. |
403 | The access token does not have the Edit Products permission. |
429 | Too many requests: a rate limit was exceeded. |
See Errors for the response formats.
Delete a plan entitlement
DELETE
https://api.verustrust-licensing.com/v1/plan-entitlements/plan-entitlement/{id}Requires an access token with the Edit Products permission.
Path parameters
| Name | Type | Required |
|---|---|---|
id | string | Yes |
Responses
- 200 Success
| Error | Meaning |
|---|---|
400 | The request is invalid. |
401 | The access token is missing, invalid, or expired. |
403 | The access token does not have the Edit Products permission. |
429 | Too many requests: a rate limit was exceeded. |
See Errors for the response formats.