getCompanyDetailsByUser
This method retrieves the details of a company linked to an account identified through the given username.
Parameters
Parameter | Type | Optional | Description |
---|---|---|---|
username | String | No | The username linked to the searched company. |
password | String | Yes | The password of the specified username. This parameter is required only when the searched company is not in the target companies of the user who makes the API call. |
Return value
This method returns an Object containing the details of the searched company:
type
- a Number that shows the company type: 0 for Partner, 1 for Customername
- a String representing the name of the companyid
- a String that shows the company ID in GravityZoneaddress
- a String showing the physical address of the company premisesphone
- a String that informs of the contact phone of the companycanBeManagedByAbove
- a Boolean representing the security management rights over the company. It has the valuetrue
if the Bitdefender Partner manages the security for the searched company. Otherwise, it is falseenforce2FA
- a Boolean specifying if the Two Factor Authentication (2FA) is enforced for user accounts belonging to the searched companyskip2FAPeriod
- an integer specifying the duration, in days, that the users can be exempted from providing a two-factor authentication code at loginisSuspended
- a Boolean informing of the company account status. It has the valuetrue
if the company account is suspendedcreatedAt
- a String representing the UTC date and time at which the company was createdcountry
- a String representing the country code in ISO 3166 format. If the code is not specified, the String has the valueN/A
state
- a String representing the country state code in ISO 3166 format. If the code is not specified, the String has the valueN/A
contactPerson
- an Object containing the details of the contact person:fullName
, their first name and surnameemail
, their business email addressphoneNumber
, their business phone numbercompanyRole
, their position in the company
customFields
- an Object containing the set of custom fields configured for the searched company, together with their associated values
Example
Request:
{ "params": { "username": "[email protected]", "password": "password" }, "jsonrpc": "2.0", "method": "getCompanyDetailsByUser", "id": "6435c228-73b0-4e72-9a2a-8716cc58c883" }
Response:
{ "id":"6435c228-73b0-4e72-9a2a-8716cc58c883", "jsonrpc":"2.0", "result": { "type": 0, "name": "Test partner", "id": "550ac840b1a43da64d7b23c6", "address": "Str Example No 1", "phone": "0040740000001", "canBeManagedByAbove": true, "enforce2FA": true, "skip2FAPeriod": 1 "isSuspended": false, "createdAt": "2017-01-28T15:01:15", "country": "CA", "state": "CA-BC", "contactPerson": { "fullName": "Stephen Jhonson", "email": "[email protected]", "phoneNumber": "0040740000001", "companyRole": "Owner / President" }, "customFields":{ "referenceID":"004562", "vertical":"healthcare", "partner_type":"platinum", "security_level":"high", "payment_status":"goodstanding" } } }