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.software-licensing.io/v1/plans
Parameters(Query)
ts
pageSize?: integer
ts
pageNumber?: integer
ts
search: {
}
ts
sort_by?: string[]
ts
productId?: string
Responses
- 200 Success
application/json
ts
{
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.software-licensing.io/v1/plans
Plan 'name' has to be unique.
The duration
parameter specifies the validity period of the plan in days.
RequestBody
ts
{
name: string
description?: string
cost: number
productId: string
duration: integer
}
Responses
- 201 Returns created plan.
application/json
ts
{
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.software-licensing.io/v1/plans/plan/{id}
Responses
- 200 Success
application/json
ts
{
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.software-licensing.io/v1/plans/plan/{id}
Plan 'name' has to be unique.
The duration
parameter specifies the validity period of the plan in days.
RequestBody
ts
{
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.software-licensing.io/v1/plans/plan
Parameters(Query)
ts
productId?: string
ts
plan?: string
Responses
- 200 Success
application/json
ts
{
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
}
}[]
}