Appearance
Plan-entitlements
A Plan Entitlement object is what connects a Plan to an Entitlement. It is also where the usage limit (called threshold) for the Entitlement is defined. For example, a Basic Plan would use the "API Calls" Entitlement with a threshold of 1000, which would allow for up to 1000 API calls within the Entitlement's reset period.
Get plan entitlement by plan
Endpoint: GET https://api.software-licensing.io/v1/plan-entitlements/plan/{planId}
Responses
- 200 Success
application/json
ts
{
id: string
threshold?: number
entitlement: {
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
}[]
Create a plan entitlement
Endpoint: POST https://api.software-licensing.io/v1/plan-entitlements
Threshold has to be greater than or equal to 0. An entitlement can only be included in a plan once. The entitlements specified must not be deactivated.
RequestBody
ts
{
planId: string
threshold?: number
entitlementId: string
}
Responses
- 201 Returns created plan entitlement.
application/json
ts
{
id: string
threshold?: number
entitlement: {
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
}
Update a plan entitlement
Endpoint: PUT https://api.software-licensing.io/v1/plan-entitlements/plan-entitlement/{id}
Threshold has to be greater than or equal to 0. An entitlement can only be included in a plan once. The entitlement specified must not be deactivated.
RequestBody
ts
{
threshold?: number
entitlementId?: string
}
Responses
- 204 Plan was updated successfully
Delete a plan entitlement
Endpoint: DELETE https://api.software-licensing.io/v1/plan-entitlements/plan-entitlement/{id}
Responses
- 200 Success