addProductKey
This method adds a license or add-on key to the existing list of licenses and add-on keys.
Note
For companies with yearly licensing, both stand-alone and add-on licenses can be added.
For companies with monthly subscription licensing, only compatible add-on licenses can be added, such as GravityZone CSPM+.
Add-on licenses such as GravityZone CSPM+ cannot be added to companies with monthly subscriptions using the BitdefenderEDR or BitdefenderPHASR product types. Attempting to do so returns an
Invalid params (-32602)validation error.
Parameters
Parameter | Type | Optional | Description |
|---|---|---|---|
| String | No | The license key to be set. It can be an add-on or a base license. |
| String | Yes | The ID of the company whose license will be set. If no value is passed, the user's company will be selected. |
| Boolean | Yes | If true, all existing base licenses or add-ons that are not compatible with the current license key will be removed and the new license will be added to the existing base licenses or add-on keys. The default value is true. |
| Object | Yes | An object containing the company's designated emergency contact details, intended for use by the MDR team during security events or incidents. NoteThis information must be valid and it is mandatory for the following company types:
The object contains the following fields:
|
Return value
This method does not return any value.
Example
Request:
Add a product key with manually specified MDR contact information.
{
"params": {
"licenseKey": "TNB3AAA",
"companyId": "5493dcd2b1a43df00b7b23c6",
"replaceIncompatibleKeys": true,
"mdrContactInformation": {
"phoneNumber": {
"countryPrefix": "+4",
"subscriberNumber": "112345"
},
"fullName": "Contact",
"email": "mdrcontact@nebula.local",
"emailVerificationCode": "43728676"
}
},
"jsonrpc": "2.0",
"method": "addProductKey",
"id": "48daf1bc-4078-411c-bf44-4f293e68f501"
}Add a product key using MDR contact details imported from a user account.
{
"params": {
"licenseKey": "TNB3AAA",
"companyId": "5493dcd2b1a43df00b7b23c6",
"replaceIncompatibleKeys": true,
"mdrContactInformation": {
"useDataFromAccount": "user-1234567890",
"emailVerificationCode": "43728676"
}
},
"jsonrpc": "2.0",
"method": "addProductKey",
"id": "48daf1bc-4078-411c-bf44-4f293e68f501"
}Add a product key using MDR contact details imported from a company account.
{
"params": {
"licenseKey": "TNB3AAA",
"companyId": "5493dcd2b1a43df00b7b23c6",
"replaceIncompatibleKeys": true,
"mdrContactInformation": {
"useDataFromCompany": "company-0987654321"
}
},
"jsonrpc": "2.0",
"method": "addProductKey",
"id": "48daf1bc-4078-411c-bf44-4f293e68f501"
}Response:
Response when adding a compatible product key.
{
"id":"48daf1bc-4078-411c-bf44-4f293e68f501",
"jsonrpc":"2.0",
"result": null
}Response when attempting to add the GravityZone CSPM+ add-on to a company with a monthly subscription using the Bitdefender EDR product type.
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Invalid params",
"data": {
"details": "You cannot add a GravityZone CSPM+ add-on license to companies with a monthly subscription using Bitdefender EDR."
}
},
"id": "1603704207"
}