Skip to main content

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.

maxResults

Integer

Yes

Determines the maximum number of entries returned by the request.

Possible values: 1 - 100.

Default value: 25.

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 Customer

  • name - the name of the company

  • id - the ID of the company

  • address - the address of the company

  • phone - the phone of the company

  • canBeManagedByAbove - the security management status for the company: true, if the security can be managed by parent companies

  • enforce2FA - a boolean specifying if the Two Factor Authentication (2FA) is enforced for user accounts belonging to the selected company

  • skip2FAPeriod - an integer specifying the duration, in days, that the users can be exempted from providing a two-factor authentication code at login

  • isSuspended - company account status: true, if the company is suspended

  • createdAt - a String representing the UTC date and time at which the company was created

  • country - a String representing the country code in ISO 3166 format. If the code is not specified, the String has the value N/A

  • state - a String representing the country state code in ISO 3166 format. If the code is not specified, the String has the value N/A

  • contactPerson - an Object containing the details of the contact person:

    • fullName, their first name and surname

    • email, their business email address

    • phoneNumber, their business phone number

    • companyRole, 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"
          }
      }]
  }