Provision a perpetual license
A perpetual license means that the customer makes a one-time purchase to acquire the software, and their license is valid indefinitely. In 10Duke Enterprise, what defines a license as a perpetual license is that it has no validity end date defined.
Perpetual licenses are used with both B2B and B2C customers.
This article explains how to provision (grant) a perpetual license using the 10Duke Entitlement Management REST API. For background, see how license provisioning through the API uses the concept of a transaction.
The article assumes you have connected your client application to 10Duke Enterprise and implemented license consumption for it.
API operations
10Duke Entitlement Management REST API operations:
Operation | URL (relative, prepend the environment base URL) |
---|---|
Provision a license to an organization | POST /organizations/{orgId}/license-transactions |
Provision a personal license to a user | POST /users/{userId}/license-transactions |
Example
This example shows how to provision a perpetual license to a consumer customer.
The example uses the following business case:
-
Product being sold: CutXPro, a B2C desktop software application that allows end users to crop elements from photographs
-
Quantity sold: 1 license
-
Product package in 10Duke Enterprise: Name
CutXPro
, product ID0aa228a2-d3bc-4934-9069-658333c03780
-
Customer: A B2C customer
-
License terms: The license is valid indefinitely
This example provisions a seat-based license, so the product package has a licensed item configured to grant 1 seat, and the associated license model has SeatCountConstraint
enabled.
Request example
Send a POST request to users/{userId}/license-transactions
. See the API reference for details on the API path parameters, request body, and response schemas.
This example request uses curl
(line breaks added for display purposes). The request only specifies a licenseValidFrom
date but no end date.
curl --request POST
--url <API_base_path>/users/me/license-transactions
--header 'content-type: application/json'
--data '{"transaction":{"type":"Order","externalId":"0000004556786","items":[{"externalId":"0001","productId":"0aa228a2-d3bc-4934-9069-658333c03780","quantity":1,"licenseValidFrom":"2023-02-19T14:12:22.012Z"}]}}'
Response example
This sample response shows information that the response body can contain:
{
"transaction": {
"id": "8ec39f9d-f739-4bc1-aa55-8cb712e50adb",
"type": "Order",
"externalId": "0000004556786",
"processed": "2023-02-19T14:12:22.010Z",
"items": [{
"id": "e0588c33-7055-4b28-8ec6-9e92c6f3b94f",
"externalId": "0001",
"productId": "0aa228a2-d3bc-4934-9069-658333c03780",
"quantity": 1,
"licenseValidFrom": "2023-02-19T14:12:22.012Z",
"licenses": [{
"id": "48e04c21-1fae-4ddf-ab5a-e0644039c81e",
"validFrom": "2023-02-19T14:12:22.012Z",
"validUntil": "2024-02-19T14:12:22.012Z",
"active": true,
"entitlementId": "6bde22fa-ecd4-4017-9b61-d661c33ba353",
"licensedItem": {
"id": "75151a68-fee2-436e-bfa7-3d9e5b94668d",
"name": "CutXPro",
"displayName": "CutXPro"
},
"licenseModelId": "1db0c182-70c4-4a51-8326-54ce29138303",
"licenseModelName": "License_Model_for_Personal_License",
"seatsTaken": 0,
"seatsReserved": 0,
"seatsTotal": 1,
"seatCountCredits": [{
"id": "b0588b0e-97ec-4b24-88b9-38984eb61600",
"validFrom": "2023-02-19T14:12:22.012Z",
"active": true,
"licenseId": "48e04c21-1fae-4ddf-ab5a-e0644039c81e",
"licenseTransactionItemId": "e0588c33-7055-4b28-8ec6-9e92c6f3b94f",
"seatCount": 1,
"seatsConsumed": 0
}]
}]
}]
}
}
Next steps
In the above example case, the consumer user now has a license and will be able to use the software application indefinitely.
Depending on the specifics of the license agreement/contract you offer to your customers, the consumer user may also be entitled to download updates to the software and receive technical support. This is often provided only for an initial predefined period of time (for example, 1-3 years), after which they have to pay for updates or maintenance.
If you provisioned a perpetual license to an organization, authorize the organization’s users to consume the license. The license was created in the organization’s default entitlement, so add the users to a user group that has access to that entitlement. (This can also be done in advance.) You can do this through the 10Duke Identity Management REST API or using the 10Duke SysAdmin tool.