PARTNERS

getCompaniesList

This method returns the list of companies under a parent company or from a company folder.

Parameters

Parameter

Type

Optional

Description

parentId

String

Yes

The parent company's ID or the company folder's ID. The default value is the ID of the parent company.

filters

Object

Yes

The filters to apply on the returned list. The filtering criteria are:

  • companyType: 0 - partner companies, 1 - customer companies

  • licenseType: 1 - companies with trial license key, 2 - companies with yearly license key, 3 - companies with monthly license key

Return value

This method returns an Array containing the list of companies located under the parent company. Each entry in the list has the following fields:

  • id - the ID of the company

  • name - the name of the company

Example

Request:

  {
       "params": {
           "parentId" : "54a28b41b1a43d89367b23fd",
           "filters" : {
               "companyType": 0,
               "licenseType": 1
           }
       },
       "jsonrpc": "2.0",
       "method": "getCompaniesList",
       "id": "103d7b05-ec02-481b-9ed6-c07b97de2b7a"
  }  

Response:

  {
      "id":"103d7b05-ec02-481b-9ed6-c07b97de2b7a",
      "jsonrpc":"2.0",
      "result": [
           {
               "id" : "54a295eeb1a43d8b497b23c6",
               "name" : "Partner Company Trial 1"
           },
           {
               "id" : "54a295d8b1a43d7c4a7b23c6",
               "name" : "Partner Company Trial 2"
           }
      ]
  }