To update a license order with a given activation key, use the following request:

PATCH /license-orders/activation_key

where:

Request JSON Objects

Valid JSON parameters include the following.

ParameterTypeRequiredDefinition

customer_id 

integerYesCustomer ID.
product_template_id integerYesProduct template ID.
license_typestringYesLicense type, choices: local, network.
licensee_typestringYesLicensee type, choices: fixed, customer, not_specified.
licensee stringYes*

Licensee.

*Required if licensee type is fixed.

hostid_match_rate integerYesHostID match rate.
min_hostids integerYesMinimum HostIDs.
activations_allowed integerYesActivations allowed.
enabled booleanYesWhether license order is enabled or not.
descriptionstringNoDescription.
settings_descriptionstringNoSettings description.
removal booleanYesWhether license should be removed from host.
deactivations_allowed integerNoWhether deactivation is allowed.
HostidsarrayYesList of HostIDs.
Features arrayYesList of features.

HostID parameters include the following.

ParameterTypeRequiredDefinition

name

stringYesHostID name.
min_amount integerYesMinimum required.
max_amountintegerYesMaximum allowed.

Feature parameters include the following.

ParameterTypeRequiredDefinition

name

stringYesFeature name.
version stringYesVersion.
expiration_type stringYesExpiration type, choices: fixed, days_from_activation, no_expiration.
expiration_datestringYes*

Expiration date.

*Required if expiration type is fixed.

days_from_activation stringYes*

Expiration days from activation.

*Required if expiration type is days_from_activation.

issued_type stringYesIssued type, choices: fixed, not_issued, activation_time.
issued_datestringYes*

Issued date.

*Required if issued type is fixed.

options stringNoOptions.
additional_settings stringNoAdditional settings.
enabled booleanNoWhether feature is enabled or not.
count integerYes*

Count.

*Required if license type is network.

maintenance_type stringYesMaintenance type, choices: fixed, days_from_activation, no_maintenance.
maintenance_date stringYes*

Maintenance date.

*Required if maintenance type is fixed.

maintenance_days_from_activationstringYes*

Maintenance days from activation.

*Required if maintenance type is days_from_activation.

comment stringNoComment.

Example request

PATCH /license-orders/II1HP-TX8EQ-R1QXZ-7LYXF HTTP/1.1
Content-Type: application/json
Authorization: Bearer f794846b7c26621688e1e06164975b4eae8ce2f6

{
	"customer_id": 1,
	"product_template_id": 1,
	"license_type": "network",
	"licensee_type": "customer",
	"hostid_match_rate": 100,
	"min_hostids": 1,
	"activations_allowed": 10,
	"enabled": true,
	"description": "License order description",
	"settings_description": "Settings description",
	"removal": false,
	"deactivations_allowed": 10,
	"Hostids": [
		{
			"name": "hostname",
			"min_amount": 1,
			"max_amount": 1
		}
	],
	"Features": [
		{
			"name": "Licstat",
			"version": "6.0",
			"expiration_type": "days_from_activation",
			"days_from_activation": 90,
			"issued_type": "activation_time",
			"options": "Feature options",
		`	"additional_settings": "Additional settings",
			"count": 15,
			"maintenance_type": "fixed",
			"maintenance_date": "2020-12-31",
			"enabled": true,
			"comment": "Feature comment"
		}
	]
}

Response

The LAC REST API returns the standard HTTP response codes described in the following table.

Status CodeDescription
200 OKLicense order updated.

400 Bad Request

Invalid data.
403 ForbiddenInvalid or expired token provided.
404 Not FoundLicense order activation key does not exist.

Example Response

HTTP/1.1 200 OK
Content-Type: application/json

{
	"customer": {
		"name": "Rivers Inc",
		"description": "desc",
		"phone_number": "779.790.4969x1425",
		"fax_number": "(536)600-8229",
		"street": "008 Santiago Groves Suite 651",
		"city": "Shortport",
		"country": "USA",
		"zip_code": "62448",
		"state": "South Carolina",
		"Contacts": [
			{
				"name": "James Taylor",
				"email": "nfisher@test.x-formation.com"
			},
			{
				"name": "Victor Martinez",
				"email": "ngallagher@test.x-formation.com"
			}
		],
		"CustomTags": [
			{
				"tag_name": "custom_tag_1",
				"value": "Gouldton"
			},
			{
				"tag_name": "custom_tag_2",
				"value": "Idaho"
			}
		]
	},
	"product_template": {
		"id": "1",
		"name": "Trial",
		"product_id": "1"
	},
	"activation_key": "II1HP-TX8EQ-R1QXZ-7LYXF",
	"creation_time": "2019-08-20 09:40:35",
	"license_type": "network",
	"licensee_type": "customer",
	"licensee": null,
	"hostid_match_rate": "100",
	"min_hostids": "1",
	"activations_allowed": "10",
	"activated_licenses_count": 0,
	"enabled": true,
	"description": "License order description",
	"settings_description": "Settings description",
	"removal": false,
	"removal_request_time": null,
	"removal_confirmation_time": null,
	"deactivations_allowed": "10",
	"deactivations_left": 10,
	"Hostids": [
		{
			"name": "Hostname",
			"min_amount": "1",
			"max_amount": "1"
		}
	],
	"Features": [
		{
			"name": "Licstat",
			"version": "6.0",
			"expiration_type": "days_from_activation",
			"expiration_date": null,
			"issued_type": "activation_time",
			"issued_date": null,
			"options": "Feature options",
			"additional_settings": "Additional settings",
			"enabled": true,
			"days_from_activation": "90",
			"count": "15",
			"maintenance_type": "fixed",
			"maintenance_date": "2020-12-31",
			"maintenance_days_from_activation": null,
			"comment": "Feature comment"
		}
	]
}
  • No labels