To create a license order, use the following request:

POST /license-orders

Request JSON Objects

Valid JSON parameters include the following.

ParameterTypeRequiredDefinition

customer_id

integerYesCustomer ID.
product_template_idintegerYes

Product template ID.

license_typestringYesLicense type, choices: local, network.
licensee_typestringYesLicensee type, choices: fixed, customer, not_specified.
licenseestringYes*

Licensee.

*Required only if licensee type is fixed.

hostid_match_rateintegerYesHostID match rate.
min_hostidsintegerYesMinimum HostIDs.
activations_allowedintegerYesActivations allowed.
enabledbooleanYesWhether license order is enabled or not.
description stringNoDescription.
settings_descriptionstringNoSettings description.
removalbooleanYesWhether license should be removed from host.
deactivations_allowedintegerNoDeactivation allowed.
HostidsarrayYesList of HostIDs.
FeaturesarrayYesList of Features.

HostID parameters

ParameterTypeRequiredDefinition

name

stringYesHostID name.
min_amountintegerYes

Minimum required.

max_amountintegerYes

Maximum allowed.

Feature parameters

ParameterTypeRequiredDefinition

name

stringYesFeature name.
versionstringYes

Version.

expiration_typestringYes

Expiration type, choices: fixed, days_from_activation, no_expiration

expiration_datestringYes*

Expiration date.

*Required only if expiration type is fixed.

issued_typestringYesIssued type, choices: fixed, not_issued, activation_time.
issued_datestringYes*

Issued date.

*Required only if issued type is fixed.

optionsstringNo

Options.

additional_settingsstringNo

Additional settings.

enabledbooleanYesWhether feature is enabled or not.
days_from_activationstringYes*

Expiration days from activation.

*Required only if expiration type is days_from_activation

countintegerYes*

Count.

*Required only if license type is network.

maintenance_typestringYesMaintenance type, choices: fixed, days_from_activation, no_maintenance.
maintenance_datestringYes*

Maintenance date.

*Required only if maintenance type is fixed.

maintenance_days_from_activationstringYes*

Maintenance days from activation.

*Required only if maintenance type is days_from_activation.

commentstringNo

Comment.

Example request

POST /license-orders HTTP/1.1
Content-Type: application/json
Authorization: Bearer f794846b7c26621688e1e06164975b4eae8ce2f6

{
	"customer_id": 1,
	"product_template_id": 1,
	"license_type": "local",
	"licensee_type": "not_specified",
	"hostid_match_rate": 100,
	"min_hostids": 1,
	"activations_allowed": 1,
	"enabled": true,
	"removal": false,
	"Hostids": [
		{
			"name": "username",
			"min_amount": 1,
			"max_amount": 1
		}
	],
	"Features": [
		{
			"name": "Licstat",
			"version": "6.0",
			"expiration_type": "no_expiration",
			"issued_type": "not_issued",
			"maintenance_type": "no_maintenance",
			"enabled": true
		}
	]
}


POST /license-orders HTTP/1.1
Content-Type: application/json
Authorization: Bearer f794846b7c26621688e1e06164975b4eae8ce2f6

{
	"customer_id": 1,
	"product_template_id": 1,
	"license_type": "local",
	"licensee_type": "not_specified",
	"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": "username",
			"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 created.

400 Bad Request

Invalid data
403 ForbiddenInvalid or expired token provided.

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": "local",
	"licensee_type": "not_specified",
	"licensee": null,
	"hostid_match_rate": "100",
	"min_hostids": "1",
	"activations_allowed": "1",
	"activated_licenses_count": 0,
	"enabled": true,
	"description": "",
	"settings_description": "",
	"removal": false,
	"removal_request_time": null,
	"removal_confirmation_time": null,
	"deactivations_allowed": "0",
	"deactivations_left": 0,
	"Hostids": [
		{
			"name": "Username",
			"min_amount": "1",
			"max_amount": "1"
		}
	],
	"Features": [
		{
			"name": "Licstat",
			"version": "6.0",
			"expiration_type": "no_expiration",
			"expiration_date": null,
			"issued_type": "not_issued",
			"issued_date": null,
			"options": null,
			"additional_settings": null,
			"enabled": true,
			"days_from_activation": null,
			"count": null,
			"maintenance_type": "no_maintenance",
			"maintenance_date": null,
			"maintenance_days_from_activation": null,
			"comment": null
		}
	]
}
  • No labels