Appearance
Licenses
A License is what is granted to a customer so that they can access your product. A License's key should be protected as it is used to authenticate end-user endpoints.
Licenses can have notes. A note is a way for you to write down extra relevant information to the License itself.
You can disable a license at any time by setting it's deactivated field to true.
Get all licenses
Endpoint: GET https://api.software-licensing.io/v1/licenses
Parameters(Query)
ts
pageSize?: integerts
pageNumber?: integerts
appId?: stringts
customerId?: stringts
customerExternalId?: stringResponses
- 200 Success
application/json
ts
{
data: {
id: string
key: string
expirationDate: string
registrationDate: string
deactivated: boolean
plan: {
id: string
name: string
description: string
product: {
id: string
name: string
deactivated: boolean
}
cost: number
deactivated: boolean
duration: integer
}
previousLicenseId?: string
valid: string
customer: {
id: string
name: string
description: string
externalId: string
}
licenseEntitlements: {
id: string
entitlement: {
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
threshold: number
actual: number
refreshDate: string
activations: {
id: string
value: string
active: boolean
}[]
}[]
notes: {
id: string
content: string
}[]
}[]
pagination: {
itemCount?: integer
totalPages?: integer
currentPage?: integer
nextPage?: integer
previousPage?: integer
}
}Create a license
Endpoint: POST https://api.software-licensing.io/v1/licenses
- Description
If duration is provided, it must be greater or equal to 0. A duration of value 0 makes the license perpetual.
Providing a userId and and omitting the customerId field creates a new blank Customer with its externalId set to userId
RequestBody
ts
{
planName: string
productId: string
customerId?: string
userId?: string
regDate: string
duration?: integer
notes?: string[]
}Responses
- 201 Returns created License.
application/json
ts
{
id: string
key: string
expirationDate: string
registrationDate: string
deactivated: boolean
plan: {
id: string
name: string
description: string
product: {
id: string
name: string
deactivated: boolean
}
cost: number
deactivated: boolean
duration: integer
}
previousLicenseId?: string
valid: string
customer: {
id: string
name: string
description: string
externalId: string
}
licenseEntitlements: {
id: string
entitlement: {
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
threshold: number
actual: number
refreshDate: string
activations: {
id: string
value: string
active: boolean
}[]
}[]
notes: {
id: string
content: string
}[]
}Get a license
Endpoint: GET https://api.software-licensing.io/v1/licenses/license/{id}
Responses
- 200 Success
application/json
ts
{
id: string
key: string
expirationDate: string
registrationDate: string
deactivated: boolean
plan: {
id: string
name: string
description: string
product: {
id: string
name: string
deactivated: boolean
}
cost: number
deactivated: boolean
duration: integer
}
previousLicenseId?: string
valid: string
customer: {
id: string
name: string
description: string
externalId: string
}
licenseEntitlements: {
id: string
entitlement: {
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
threshold: number
actual: number
refreshDate: string
activations: {
id: string
value: string
active: boolean
}[]
}[]
notes: {
id: string
content: string
}[]
}Update a license
Endpoint: PUT https://api.software-licensing.io/v1/licenses/license/{id}
- Description
Expiration date needs to be after Registration date.
List of notes provided will replace the existing list. You do not have to provide an Id for new Notes.
RequestBody
ts
{
expirationDate?: string
registrationDate?: string
deactivated?: boolean
customerId?: string
notes: {
id?: string
content?: string
}[]
}Responses
- 204 License was updated successfully
Delete a license
Endpoint: DELETE https://api.software-licensing.io/v1/licenses/license/{id}
Responses
- 204 License was updated successfully
Validate a license by key
Endpoint: POST https://api.software-licensing.io/v1/licenses/license/validate
RequestBody
ts
{
licenseKey: string;
}Responses
- 200 Success
application/json
ts
{
id: string
key: string
expirationDate: string
registrationDate: string
deactivated: boolean
plan: {
id: string
name: string
description: string
product: {
id: string
name: string
deactivated: boolean
}
cost: number
deactivated: boolean
duration: integer
}
previousLicenseId?: string
valid: string
customer: {
id: string
name: string
description: string
externalId: string
}
licenseEntitlements: {
id: string
entitlement: {
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
threshold: number
actual: number
refreshDate: string
activations: {
id: string
value: string
active: boolean
}[]
}[]
notes: {
id: string
content: string
}[]
}Recreate a license
Endpoint: POST https://api.software-licensing.io/v1/licenses/recreate
- Description
Creates a new license with the same parameters as a previous license. Notes are
RequestBody
ts
{
previousLicenseId?: string
regDate: string
duration?: integer
}Responses
- 201 Returns created License.
application/json
ts
{
id: string
key: string
expirationDate: string
registrationDate: string
deactivated: boolean
plan: {
id: string
name: string
description: string
product: {
id: string
name: string
deactivated: boolean
}
cost: number
deactivated: boolean
duration: integer
}
previousLicenseId?: string
valid: string
customer: {
id: string
name: string
description: string
externalId: string
}
licenseEntitlements: {
id: string
entitlement: {
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
threshold: number
actual: number
refreshDate: string
activations: {
id: string
value: string
active: boolean
}[]
}[]
notes: {
id: string
content: string
}[]
}Check if a license with a specific key and activation exists
Endpoint: POST https://api.software-licensing.io/v1/licenses/license/activation
RequestBody
ts
{
licenseKey: string;
activationValue: string;
}Responses
- 200 Returns specified license
application/json
ts
{
id: string
key: string
expirationDate: string
registrationDate: string
deactivated: boolean
plan: {
id: string
name: string
description: string
product: {
id: string
name: string
deactivated: boolean
}
cost: number
deactivated: boolean
duration: integer
}
previousLicenseId?: string
valid: string
customer: {
id: string
name: string
description: string
externalId: string
}
licenseEntitlements: {
id: string
entitlement: {
id: string
name: string
consumptionPeriod: {
id: string
name: string
}
activationsEnabled: boolean
deactivated: boolean
}
threshold: number
actual: number
refreshDate: string
activations: {
id: string
value: string
active: boolean
}[]
}[]
notes: {
id: string
content: string
}[]
}Update the actual value of a license
Endpoint: PUT https://api.software-licensing.io/v1/licenses/license/actual
- Description
New actual value has to be higher than the previous value.
RequestBody
ts
{
actual: integer;
licenseKey: string;
entitlementName: string;
}Responses
- 204 License was updated successfully