Appearance
Plans
A Plan describes the type and contents of a license. It acts as a template for easily generating the same type of license repeatedly. For example, you can have two plans called Basic and Premium that each allow for different features or usage limits to be set for issued licenses of that plan.
Get all plans
Endpoint: GET https://api.verustrust-licensing.com/v1/plans
Parameters(Query)
typescript
pageSize?: integertypescript
pageNumber?: integertypescript
search: {
}typescript
sort_by?: string[]typescript
productId?: stringResponses
- 200 Success
application/json
typescript
{
data: {
id: string
name: string
description: string
product: {
id: string
name: string
deactivated: boolean
}
cost: number
deactivated: boolean
duration: integer
planEntitlements: {
id: string
threshold?: number
entitlement: {
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 a plan
Endpoint: POST https://api.verustrust-licensing.com/v1/plans
Plan 'name' has to be unique.
The duration parameter specifies the validity period of the plan in days.
RequestBody
- application/json
typescript
{
name: string
description?: string
cost: number
productId: string
duration: integer
}Responses
- 201 Returns created plan.
application/json
typescript
{
id: string
name: string
description: string
product: {
id: string
name: string
deactivated: boolean
}
cost: number
deactivated: boolean
duration: integer
planEntitlements: {
id: string
threshold?: number
entitlement: {
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
}[]
}Get a plan
Endpoint: GET https://api.verustrust-licensing.com/v1/plans/plan/{id}
Responses
- 200 Success
application/json
typescript
{
id: string
name: string
description: string
product: {
id: string
name: string
deactivated: boolean
}
cost: number
deactivated: boolean
duration: integer
planEntitlements: {
id: string
threshold?: number
entitlement: {
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
}[]
}Update a plan
Endpoint: PUT https://api.verustrust-licensing.com/v1/plans/plan/{id}
Plan 'name' has to be unique.
The duration parameter specifies the validity period of the plan in days.
RequestBody
- application/json
typescript
{
name?: string
description?: string
cost?: number
deactivated?: boolean
duration?: integer
}Responses
- 204 Plan was updated successfully
Find a plan in a specific product by name
Endpoint: GET https://api.verustrust-licensing.com/v1/plans/plan
Parameters(Query)
typescript
productId?: stringtypescript
plan?: stringResponses
- 200 Success
application/json
typescript
{
id: string
name: string
description: string
product: {
id: string
name: string
deactivated: boolean
}
cost: number
deactivated: boolean
duration: integer
planEntitlements: {
id: string
threshold?: number
entitlement: {
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
}[]
}