To update a license order with a given activation key, use the following request:
PATCH /license-orders/activation_key
where:
- activation_key (string) is the license order activation key.
Request JSON Objects
Valid JSON parameters include the following.
| Parameter | Type | Required | Definition | 
|---|---|---|---|
| customer_id | integer | Yes | Customer ID. | 
| product_template_id | integer | Yes | Product template ID. | 
| license_type | string | Yes | License type, choices: local, network. | 
| licensee_type | string | Yes | Licensee type, choices: fixed, customer, not_specified. | 
| licensee | string | Yes* | Licensee. *Required if licensee type is fixed. | 
| hostid_match_rate | integer | Yes | HostID match rate. | 
| min_hostids | integer | Yes | Minimum HostIDs. | 
| activations_allowed | integer | Yes | Activations allowed. | 
| enabled | boolean | Yes | Whether license order is enabled or not. | 
| description | string | No | Description. | 
| settings_description | string | No | Settings description. | 
| removal | boolean | Yes | Whether license should be removed from host. | 
| deactivations_allowed | integer | No | Whether deactivation is allowed. | 
| Hostids | array | Yes | List of HostIDs. | 
| Features | array | Yes | List of features. | 
HostID parameters include the following.
| Parameter | Type | Required | Definition | 
|---|---|---|---|
| name | string | Yes | HostID name. | 
| min_amount | integer | Yes | Minimum required. | 
| max_amount | integer | Yes | Maximum allowed. | 
Feature parameters include the following.
| Parameter | Type | Required | Definition | 
|---|---|---|---|
| name | string | Yes | Feature name. | 
| version | string | Yes | Version. | 
| expiration_type | string | Yes | Expiration type, choices: fixed, days_from_activation, no_expiration. | 
| expiration_date | string | Yes* | Expiration date. *Required if expiration type is fixed. | 
| days_from_activation | string | Yes* | Expiration days from activation. *Required if expiration type is days_from_activation. | 
| issued_type | string | Yes | Issued type, choices: fixed, not_issued, activation_time. | 
| issued_date | string | Yes* | Issued date. *Required if issued type is fixed. | 
| options | string | No | Options. | 
| additional_settings | string | No | Additional settings. | 
| enabled | boolean | No | Whether feature is enabled or not. | 
| count | integer | Yes* | Count. *Required if license type is network. | 
| maintenance_type | string | Yes | Maintenance type, choices: fixed, days_from_activation, no_maintenance. | 
| maintenance_date | string | Yes* | Maintenance date. *Required if maintenance type is fixed. | 
| maintenance_days_from_activation | string | Yes* | Maintenance days from activation. *Required if maintenance type is days_from_activation. | 
| comment | string | No | Comment. | 
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 Code | Description | 
|---|---|
| 200 OK | License order updated. | 
| Invalid data. | |
| 403 Forbidden | Invalid or expired token provided. | 
| 404 Not Found | License 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"
		}
	]
}