Skip to content

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 ​

GEThttps://api.verustrust-licensing.com/v1/plan-entitlements/plan/{planId}

Requires an access token with the View Products permission.

Path parameters ​

NameTypeRequired
planIdstringYes

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
  }
}[]
ErrorMeaning
400The request is invalid.
401The access token is missing, invalid, or expired.
403The access token does not have the View Products permission.
429Too many requests: a rate limit was exceeded.

See Errors for the response formats.

Create a plan entitlement ​

POSThttps://api.verustrust-licensing.com/v1/plan-entitlements

Requires 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
  }
}
ErrorMeaning
400The request is invalid.
401The access token is missing, invalid, or expired.
429Too many requests: a rate limit was exceeded.

See Errors for the response formats.

Update a plan entitlement ​

PUThttps://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 ​

NameTypeRequired
idstringYes

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
ErrorMeaning
400The request is invalid.
401The access token is missing, invalid, or expired.
403The access token does not have the Edit Products permission.
429Too many requests: a rate limit was exceeded.

See Errors for the response formats.

Delete a plan entitlement ​

DELETEhttps://api.verustrust-licensing.com/v1/plan-entitlements/plan-entitlement/{id}

Requires an access token with the Edit Products permission.

Path parameters ​

NameTypeRequired
idstringYes

Responses ​

  • 200 Success
ErrorMeaning
400The request is invalid.
401The access token is missing, invalid, or expired.
403The access token does not have the Edit Products permission.
429Too many requests: a rate limit was exceeded.

See Errors for the response formats.