Copy {
"tab": "examples",
"url": "/api/v4/deactivate_license",
"name": "/api/v4/deactivate_license",
"method": "POST",
"request": {
"pathParameters": [],
"queryParameters": [],
"headerParameters": [
{
"kind": "required",
"name": "Date",
"type": "string",
"children": [],
"description": "In RFC7231 format (see \"License API Authorization\"), eg.: Thu, 17 Nov 2022 20:51:35 GMT"
},
{
"kind": "required",
"name": "Authorization",
"type": "string",
"children": [],
"description": "See \"License API Authorization\" article"
}
],
"bodyDataParameters": [
{
"kind": "required",
"name": "hardware_id",
"type": "String",
"children": [],
"description": "Unique hardware ID generated for the client device"
},
{
"kind": "required",
"name": "product",
"type": "string",
"children": [],
"description": "Product short code"
},
{
"kind": "optional",
"name": "license_key",
"type": "string",
"children": [],
"description": "Required if product is key-based (see section below)"
},
{
"kind": "optional",
"name": "username",
"type": "string",
"children": [],
"description": "Required if product is user based (see section below)"
},
{
"kind": "optional",
"name": "id_token",
"type": "string",
"children": [],
"description": "Required if using SSO (see section below). This is the id_token received from the SSO if Implicit grant authorization method is being used."
},
{
"kind": "optional",
"name": "code",
"type": "string",
"children": [],
"description": "Required if using SSO (see section below). This is the code received from the SSO if Authorization code grant method is being used."
},
{
"kind": "optional",
"name": "customer_account_code",
"type": "string",
"children": [],
"description": "Required if using SSO (see section below). This is the customer_account_code to which SSO provider is configured. "
},
{
"name": "license_id",
"kind": "optional",
"type": "Number",
"description": "Ensures that the action affects only the license with the specified ID. This is useful if e.g. you have multiple licenses for the same product assigned to the same user. For obtaining a list of licenses assigned to a user, see \"User Licenses\"",
"children": []
},
{
"kind": "optional",
"name": "sdk_ver",
"type": "string",
"description": "Version of the SDK used",
"": "Version of the SDK used"
},
{
"name": "consumptions",
"kind": "optional",
"type": "number",
"description": "Increases/decreases total_consumptions",
"": "Increases/decreases total_consumptions"
}
],
"formDataParameters": []
},
"results": {
"languages": [
{
"id": "es8g1cuKJMbNPiIVt9VoF",
"code": "license_deactivated",
"language": "200",
"customLabel": ""
},
{
"id": "7eyIlKSv2QgJcowEsDZ-2",
"code": "{\n \"unknown_product\": \"Provided product was not found\",\n \"license_not_found\": \"License with the provided license user not found\",\n \"license_not_enabled\": \"The license is not enabled\",\n \"vm_not_allowed\": \"Virtual machine not allowed\",\n \"offline_floating_cloud_not_supported\": \" Floating cloud licenses cannot be activated offline.\",\n \"license_start_date_error\": \"This license cannot be activated before start date: {date}\",\n \"blacklisted\": \"This device is blacklisted\",\n \"license_activated_max_times\": \"This license has already been activated the maximum number of times\",\n \"license_user_activated_max_times\": \"License user has activated this license max times\",\n \"license_expired\": \"License validity period has expired.\",\n \"license_transferred_max_times\": \"This license has already been transferred the maximum number of times\",\n \"license_device_exists\": \"A device matching this hardware_id is already created on the license\"\n}",
"language": "400",
"customLabel": ""
}
],
"selectedLanguageId": "7eyIlKSv2QgJcowEsDZ-2"
},
"examples": {
"languages": [
{
"id": "xgX5uw4vq7BJNbqvQ_ia0",
"language": "curl",
"code": "curl --location --request POST '/api/v4/deactivate_license' \\\n--header 'Accept: application/json' \\\n--header 'Date: string' \\\n--header 'Authorization: string' \\\n--data-raw '{\"hardware_id\":\"String\",\"product\":\"string\",\"license_key\":\"string\",\"username\":\"string\",\"password\":\"string\",\"id_token\":\"string\",\"code\":\"string\",\"customer_account_code\":\"string\",\"is_vm\":\"Boolean\",\"vm_info\":\"string\",\"os_ver\":\"string\",\"hostname\":\"string\",\"os_hostname\":\"string\",\"ip\":\"string\",\"ip_local\":\"string\",\"app_ver\":\"string\",\"sdk_ver\":\"string\",\"mac_address\":\"string\"}'",
"customLabel": ""
},
{
"id": "3Fz0Q_qaZA0RnhG5k5R_W",
"language": "nodejs",
"code": "var request = require('request');\nvar options = {\n 'method': 'POST',\n 'url': '/api/v4/deactivate_license',\n 'headers': {\n 'Accept': 'application/json',\n 'Date': 'string',\n 'Authorization': 'string'\n },\n body: '{\"hardware_id\":\"String\",\"product\":\"string\",\"license_key\":\"string\",\"username\":\"string\",\"password\":\"string\",\"id_token\":\"string\",\"code\":\"string\",\"customer_account_code\":\"string\",\"is_vm\":\"Boolean\",\"vm_info\":\"string\",\"os_ver\":\"string\",\"hostname\":\"string\",\"os_hostname\":\"string\",\"ip\":\"string\",\"ip_local\":\"string\",\"app_ver\":\"string\",\"sdk_ver\":\"string\",\"mac_address\":\"string\"}'\n\n};\nrequest(options, function (error, response) {\n if (error) throw new Error(error);\n console.log(response.body);\n});\n",
"customLabel": ""
},
{
"id": "uJvCS-wF1cAIBTUqKJTug",
"language": "javascript",
"code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Date\", \"string\");\nmyHeaders.append(\"Authorization\", \"string\");\n\nvar raw = \"{\\\"hardware_id\\\":\\\"String\\\",\\\"product\\\":\\\"string\\\",\\\"license_key\\\":\\\"string\\\",\\\"username\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"id_token\\\":\\\"string\\\",\\\"code\\\":\\\"string\\\",\\\"customer_account_code\\\":\\\"string\\\",\\\"is_vm\\\":\\\"Boolean\\\",\\\"vm_info\\\":\\\"string\\\",\\\"os_ver\\\":\\\"string\\\",\\\"hostname\\\":\\\"string\\\",\\\"os_hostname\\\":\\\"string\\\",\\\"ip\\\":\\\"string\\\",\\\"ip_local\\\":\\\"string\\\",\\\"app_ver\\\":\\\"string\\\",\\\"sdk_ver\\\":\\\"string\\\",\\\"mac_address\\\":\\\"string\\\"}\";\n\nvar requestOptions = {\n method: 'POST',\n headers: myHeaders,\n body: raw,\n redirect: 'follow'\n};\n\nfetch(\"/api/v4/deactivate_license\", requestOptions)\n .then(response => response.text())\n .then(result => console.log(result))\n .catch(error => console.log('error', error));",
"customLabel": ""
},
{
"id": "oHvG2_KC9rAafj9m1qUOF",
"language": "python",
"code": "import requests\n\nurl = \"/api/v4/deactivate_license\"\n\npayload = \"{\\\"hardware_id\\\":\\\"String\\\",\\\"product\\\":\\\"string\\\",\\\"license_key\\\":\\\"string\\\",\\\"username\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"id_token\\\":\\\"string\\\",\\\"code\\\":\\\"string\\\",\\\"customer_account_code\\\":\\\"string\\\",\\\"is_vm\\\":\\\"Boolean\\\",\\\"vm_info\\\":\\\"string\\\",\\\"os_ver\\\":\\\"string\\\",\\\"hostname\\\":\\\"string\\\",\\\"os_hostname\\\":\\\"string\\\",\\\"ip\\\":\\\"string\\\",\\\"ip_local\\\":\\\"string\\\",\\\"app_ver\\\":\\\"string\\\",\\\"sdk_ver\\\":\\\"string\\\",\\\"mac_address\\\":\\\"string\\\"}\"\nheaders = {\n 'Accept': 'application/json',\n 'Date': 'string',\n 'Authorization': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
"customLabel": ""
},
{
"id": "urxE_DgGNxfjEo27HuGSl",
"language": "ruby",
"code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"/api/v4/deactivate_license\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Date\"] = \"string\"\nrequest[\"Authorization\"] = \"string\"\nrequest.body = \"{\\\"hardware_id\\\":\\\"String\\\",\\\"product\\\":\\\"string\\\",\\\"license_key\\\":\\\"string\\\",\\\"username\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"id_token\\\":\\\"string\\\",\\\"code\\\":\\\"string\\\",\\\"customer_account_code\\\":\\\"string\\\",\\\"is_vm\\\":\\\"Boolean\\\",\\\"vm_info\\\":\\\"string\\\",\\\"os_ver\\\":\\\"string\\\",\\\"hostname\\\":\\\"string\\\",\\\"os_hostname\\\":\\\"string\\\",\\\"ip\\\":\\\"string\\\",\\\"ip_local\\\":\\\"string\\\",\\\"app_ver\\\":\\\"string\\\",\\\"sdk_ver\\\":\\\"string\\\",\\\"mac_address\\\":\\\"string\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body\n",
"customLabel": ""
}
],
"selectedLanguageId": "uJvCS-wF1cAIBTUqKJTug"
},
"description": "Dectivate a license for a product\n",
"currentNewParameter": {
"label": "Body Parameter",
"value": "bodyDataParameters"
}
}