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 entitlements 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
- Description
Threshold has to be greater than or equal to 0. An entitlements 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 entitlements
Endpoint: PUT https://api.software-licensing.io/v1/plan-entitlements/plan-entitlements/{id}
- Description
Threshold has to be greater than or equal to 0. An entitlements can only be included in a Plan once. The entitlements specified must not be deactivated.
RequestBody
ts
{
threshold?: number
entitlementId?: string
}Responses
- 204 Plan was updated successfully
Delete a Plan entitlements
Endpoint: DELETE https://api.software-licensing.io/v1/plan-entitlements/plan-entitlements/{id}
Responses
- 200 Success