Appearance
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.software-licensing.io/v1/entitlements
Parameters(Query)
ts
pageSize?: integer
ts
pageNumber?: integer
ts
search: {
}
ts
sort_by?: string[]
Responses
- 200 Success
application/json
ts
{
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.software-licensing.io/v1/entitlements
Entitlement name has to be unique.
RequestBody
ts
{
entitlementName: string
consumptionPeriodId?: string
activationsEnabled: boolean
}
Responses
- 201 Returns created entitlement.
application/json
ts
{
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
Update an entitlement
Endpoint: PUT https://api.software-licensing.io/v1/entitlements/entitlement/{id}
RequestBody
ts
{
deactivated: boolean
}
Responses
- 204 Updated entitlement successfully
Delete an entitlement
Endpoint: DELETE https://api.software-licensing.io/v1/entitlements/entitlement/{id}
Responses
- 204 Deleted entitlement successfully