[GET] - Company Ids

  • Updated

Use the Company Id endpoint to fetch old company IDs associated with a single company. You can choose to retrieve all or a single company ID.

Endpoint

GET https://api.insideview.com/api/v1/companyIds/{id}

Request

HTTP Headers

Header Name Type Required Description
accessToken String Yes Valid access token.
See Authentication and Authorization Overview for more details.
Accept String No Selects the response's content type.  
Valid values are application/json and application/xml (default).  

 

URI Parameters

Parameter Name Type Required Description
companyId Integer Yes Company Id to fetch Merged company IDs


Responses

HTTP 200

Returns either a JSON or XML data structure depending on the request Accept header. 

Name type Description
companyId Integer Company InsideView ID
currentCompanyId Integer Current Company ID
mergedcompanyIds List of Integer Merged company IDs 

Type: application/json

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "/",
  "type": "object",
  "properties": {
    "mergedCompanyIds": {
      "id": "mergedCompanyIds",
      "type": "array",
      "items": {
        "id": "0",
        "type": "integer"
      },
      "uniqueItems": true
    },
    "companyId": {
      "id":"companyId",
      "type":"integer"
    },
    "currentCompanyId":{
      "id":"currentCompanyId",
      "type":"integer"
    }
  }
}

Example

{
  "currentCompanyId": 13457,
  "mergedCompanyIds": [
    1755
  ],
  "companyId": 1755
}

Type: application/xml

Schema

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="company" type="companyDTO"/>
    <xs:complexType name="companyDTO">
        <xs:sequence>
            <xs:element name="mergedCompanyIds" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="mergedCompanyId" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="companyId" type="xs:int" minOccurs="0"/>
            <xs:element name="currentCompanyId" type="xs:int" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
</xs:schema>

Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<company>
    <companyId>1755</companyId>
    <currentCompanyId>13457</currentCompanyId>
    <mergedCompanyIds>
        <mergedCompanyId>1755</mergedCompanyId>
    </mergedCompanyIds>
</company>

HTTP 400

Invalid query parameter(s).

HTTP 401

Unauthorized Error - Cannot use API's without setting a valid accessToken in header.

HTTP 405

Method Not Allowed - HTTP method other than POST is not allowed.

HTTP 404

Invalid ID, record not found.

HTTP 429

Request is throttled.