findCompaniesByName
This method searches for all managed companies containing the specified string in their name.
Parameters
Parameter | Type | Optional | Description |
---|---|---|---|
nameFilter | String | No | The string to be searched in the company name. Use the asterisk symbol (*) in front of the keyword to search its appearance anywhere in the name. If omitted, only results where the name starts with the keyword will be returned. |
| Integer | Yes | Determines the maximum number of entries returned by the request. Possible values: Default value: |
Return value
This method returns an Array containing company objects whose names contain the given search criteria. The maxium size of the returned array is based on the maxResults
parameter. Each entry in the array has the following structure:
type
- the company type: 0 for Partner, 1 for Customername
- the name of the companyid
- the ID of the companyaddress
- the address of the companyphone
- the phone of the companycanBeManagedByAbove
- the security management status for the company:true
, if the security can be managed by parent companiesenforce2FA
- a boolean specifying if the Two Factor Authentication (2FA) is enforced for user accounts belonging to the selected companyskip2FAPeriod
- an integer specifying the duration, in days, that the users can be exempted from providing a two-factor authentication code at loginisSuspended
- company account status:true
, if the company 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 custom fields values for the company:custom field name 1
, custom field value 1,custom field name 2
, custom field value 2
Example
Request:
{ "params": { "nameFilter": "Test", "maxResults": "100" }, "jsonrpc": "2.0", "method": "findCompaniesByName", "id": "ae037403-7947-4f2b-b0b2-af190a8b44eb" }
Response:
{ "id":"ae037403-7947-4f2b-b0b2-af190a8b44eb", "jsonrpc":"2.0", "result": [{ "type": 1, "name": "Test customer", "id": "55191c7ab1a43d1f107b23c7", "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" } }, { "type": 0, "name": "Test partner", "id": "55191c5fb1a43da8107b23c6", "address": "Str Example No 2", "phone": "0040740000002", "canBeManagedByAbove": true, "enforce2FA": false, "isSuspended": false, "createdAt": "2017-01-28T15:01:15", "country": "CA", "state": "CA-BC", "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" } }] }