Last Modified December 22, 2021
- Home
- RESTful API
- Licenses Update
Use the Licenses Update
API to update selected information on a specific License.
Currently supported are updates to:
- License Activation Email
- License Data
NOTE: You can update multiple fields in the same API call, but all entries must be valid for the License to be updated.
Updating License Activation Email |
HTTP Verb |
Element |
Syntax |
PATCH |
URL |
https://api.softworkz.com/v1/Licenses/<productId>/<licenseId> |
Body |
{
"NewEmail":"<newEmail>",
"UserIp":"<userIp>",
"Test":<Test>,
"SendDnaEmail":<SendDnaEmail>
}
|
Updates the License information specified in a JSON string in the Request body
You must provide the End User IP Address. The IP Address is used to protect your implementation
and this API from abuse
and is only used to manage the IP Lockout feature of this API.
The IP Lockout will be triggered after multiple invalid attempts in a given period, and a set cooling period will be enacted.
Both are system-wide settings.
|
Updating License Data |
HTTP Verb |
Element |
Syntax |
PATCH |
URL |
https://api.softworkz.com/v1/Licenses/<productId>/<licenseId> |
Body |
{
"NewLicenseData":"<newLicenseData>",
"UserIp":"<userIp>",
"Test":<Test>
}
|
Updates the License Data information specified in a JSON string in the Request body
You must provide the End User IP Address. The IP Address is used to protect your implementation
and this API from abuse
and is only used to manage the IP Lockout feature of this API.
The IP Lockout will be triggered after multiple invalid attempts in a given period, and a set cooling period will be enacted.
Both are system-wide settings.
|
Where:
Parameter |
Type |
Value |
Required |
Default |
<productId> |
string |
the DNA ProductID |
Yes |
|
<licenseId> |
string |
the License Activation Code |
Yes |
|
<newEmail> |
string |
the new <activation email> for this License |
- |
- |
<newLicenseData> |
string |
the new <License Data> (max 200 chars) for this License |
- |
- |
<userIp> |
string |
the User's IP Address, for protection against end-user abuse |
Yes |
|
<Test> |
bool |
if true , this is a Test Event |
No |
false |
<SendDnaEmail> |
bool |
When updating the License Activation Email, if true , software_DNA will send Custom Emails to the old and new Email addresses to notify User
of the change to the License Email |
No |
true |
API Response
Success HTTP Status Code |
Description |
204 No Content |
The License was updated. |
Error HTTP Status Code |
Description |
400 Bad Request |
one of the parameters was invalid or missing - check error message in Response for details |
401 Unauthorized |
Basic Authentication failed - verify that you are using the correct <clientId> and <apiKey> information in the
Basic Authentication Header |
403 Forbidden |
Feature Data option is not enabled for this Product - License was not updated |
404 Not Found |
The <productId> and/or the <licenseId> was not found |
409 Conflict |
A Test Event for an ACTIVE Product was received succesfully - the License was not updated as Product is ACTIVE |
429 Too Many Requests |
You have exceeded the allowed maximum of API Requests in the period - check "X-RateLimit-Reset" for the
number of seconds remaining before reset |
500 Internal Error |
An error occured on the DNA Server - try again later. Tech Support has been notified |
Examples of API Requests
PATH Licenses Update example
curl -v -X PATCH https://api.softworkz.com/v1/licenses/<productId>/TEST12345
-H "Accept: application/json"
-u "<clientId>:<API Key>"
-d ’{"NewEmail:".....@softworkz.com","UserIp":"0.0.0.0","SendDnaEmail":false}’
Example of API Response with License Update
No response is provided in the body
Example of API Error Response
{
"Message": "Invalid ProductId format"
}