Skip to content

Entitlements

An Entitlement describes a feature and how it will be measured for usage limits. That includes a name and, if required, how often the usage limit will be reset. An entitlement is meant to be shared between different Plans. For example, a Basic and Premium Plan would both use the same entitlement called "API Calls" that resets every hour, but would set different usage limits. Setting the activationsEnabled parameter to true allows for the use of Activations with this Entitlement.

Get all entitlements

Endpoint: GET https://api.verustrust-licensing.com/v1/entitlements

Parameters(Query)

typescript
pageSize?: integer
typescript
pageNumber?: integer
typescript
search: {
}
typescript
sort_by?: string[]

Responses

  • 200 Success

application/json

typescript
{
  data: {
    id: string
    name: string
    consumptionPeriod: {
      id: string
      name: string
    }
    activationsEnabled: boolean
    deactivated: boolean
  }[]
  pagination: {
    itemCount: integer
    totalPages: integer
    currentPage: integer
    nextPage?: integer
    previousPage?: integer
  }
}

Create an entitlement

Endpoint: POST https://api.verustrust-licensing.com/v1/entitlements

Entitlement name has to be unique.

RequestBody

  • application/json
typescript
{
  entitlementName: string
  consumptionPeriodId?: string
  activationsEnabled: boolean
}

Responses

  • 201 Returns created entitlement.

application/json

typescript
{
  id: string
  name: string
  consumptionPeriod: {
    id: string
    name: string
  }
  activationsEnabled: boolean
  deactivated: boolean
}

Update an entitlement

Endpoint: PUT https://api.verustrust-licensing.com/v1/entitlements/entitlement/{id}

RequestBody

  • application/json
typescript
{
  deactivated: boolean
}

Responses

  • 204 Updated entitlement successfully

Delete an entitlement

Endpoint: DELETE https://api.verustrust-licensing.com/v1/entitlements/entitlement/{id}

Responses

  • 204 Deleted entitlement successfully