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?: integerts
pageNumber?: integerts
productId?: stringResponses
- 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
- Description
Plan name has to be unique.
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}
- Description
Plan name has to be unique.
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
appId?: stringts
plan?: stringResponses
- 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;
}
}
[];
}