API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

To get started, see Data Connect Guide.

Note

For reports that provide optional URI parameters for filtering at different levels (ForWho/ForWhoIDs/LocationType/LocationTypeIDs), omitting these values will run the report at the default company level.

Authentication

This API supports many different methods of authentication, see Authentication Options.

Rate Limiting

Example

HTTP 429 Too Many Requests
{
    "Error": true,
    "Message": "Rate Limiting Applied. 8 active requests are already in progress."
}

Data Connect limits the number of concurrent requests you can perform per RQ Database.

If the rate limit is exceeded, the response will be HTTP 429 and you will not be able to make additional requests until a previously made request finishes.

ENDPOINTS

RESOURCES

Relationship

[
    {
        "CompanyID": 21090,
        "CompanyName": "KENTEL",
        "DoingBusinessAs": "Kentel Corp"
    }
]
Name Description
CompanyID (INTEGER) Identifier for a Company
CompanyName (VARCHAR(50)) Database name
DoingBusinessAs (NVARCHAR(MAX)) Company name

DealerRelationship

[
    {
        "CompanyID": 14146,
        "CompanyName": "KENTEL",
        "LocationEntityID": 14192,
        "LocationName": "Region A"
    }
]
Name Description
CompanyID (BIGINT) Identifier for a Company
CompanyName (NVARCHAR(128)) Company name
LocationEntityID (BIGINT) Identifier for the Location, Region, Channel or District in Entity Store
LocationName (NVARCHAR(MAX)) Name of the Location, Region, Channel or District

IMEI

[
    {
        "IMEI": "014497002384313",
        "PurchaseDate": "2016-04-17T00:00:00",
        "ReturnDate": "2016-12-30T00:00:00",
        "ClientID": "24168022-3ed4-422f-90a0-31c70869c1d7"
    }
]
Name Description
IMEI (VARCHAR(100)) IMEI
PurchaseDate (DATE) Purchase date
ReturnDate (DATE) Return date
ClientID (UNIQUNIQUEIDENTIFIER) Identifier in Connection Manager

REQUESTS

GET Dealer Relationships

This request returns a list of LocationEntityIDs and Names for a Company that the partner can access.

When the response contains multiple resouces with the same CompanyID, the partner can access multiple nodes within the Company.

Example

The below response means the partner can access data on behalf of the company KENTEL using the context of Region 1 (LocationEntityID 14189) or Region 2 (LocationEntityID 14188).

{
  "CompanyID": 14146,
  "CompanyName": "MasterCompany",
  "LocationEntityID": 14189,
  "LocationName": "Child Dealer 1"
},
{
  "CompanyID": 14146,
  "CompanyName": "MasterCompany",
  "LocationEntityID": 14188,
  "LocationName": "Child Dealer 2"
}

Definition

GET /partner/relationships/dealers?Auth={Auth}&Response={Response}

Headers

Example Request

GET /partner/relationships/dealers
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/partner/relationships/dealers" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingDealerRelationships()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/partner/relationships/dealers");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept-Encoding", "gzip"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingDealerRelationships() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/partner/relationships/dealers");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept-Encoding", "gzip"); 
    
    return httpClient.execute(request);
}
require 'rest-client'


response = RestClient.get 'https://dataconnectdemo.iqmetrix.net/partner/relationships/dealers', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[DealerRelationship]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "CompanyID": 14146,
        "CompanyName": "KENTEL",
        "LocationEntityID": 14192,
        "LocationName": "Region A"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "CompanyID": 14146,
            "CompanyName": "KENTEL",
            "LocationEntityID": 14192,
            "LocationName": "Region A"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <CompanyID>14146</CompanyID>
    <CompanyName>KENTEL</CompanyName>
    <LocationEntityID>14192</LocationEntityID>
    <LocationName>Region A</LocationName>
  </Record>
  <Schema>
    <Column_Name>ColumnName</Column_Name>
    <Type>datatybe</Type>
    <SafeType>safetype</SafeType>
    <Length>100</Length>
  </Schema>
</Table>

Example Response (CSV)

HTTP 200 Content-Type: text/csv
CompanyID,CompanyName,LocationEntityID,LocationName
14146,KENTEL,14192,Region A

Example Response (Excel)

HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
content-disposition: attachment;filename=reportname-2016-07-11.xlsx
Binary *.xlsx file

GET Partner Relationships

This request will return a list of Companies the Partner can access data from.

If the response is empty, use the request Getting Dealer Relationships instead.

Definition

GET /partner/relationships?Auth={Auth}&Response={Response}

Headers

Example Request

GET /partner/relationships
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/partner/relationships" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingPartnerRelationships()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/partner/relationships");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept-Encoding", "gzip"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingPartnerRelationships() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/partner/relationships");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept-Encoding", "gzip"); 
    
    return httpClient.execute(request);
}
require 'rest-client'


response = RestClient.get 'https://dataconnectdemo.iqmetrix.net/partner/relationships', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[Relationship]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "CompanyID": 21090,
        "CompanyName": "KENTEL",
        "DoingBusinessAs": "Kentel Corp"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "CompanyID": 21090,
            "CompanyName": "KENTEL",
            "DoingBusinessAs": "Kentel Corp"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <CompanyID>21090</CompanyID>
    <CompanyName>KENTEL</CompanyName>
    <DoingBusinessAs>Kentel Corp</DoingBusinessAs>
  </Record>
  <Schema>
    <Column_Name>ColumnName</Column_Name>
    <Type>datatybe</Type>
    <SafeType>safetype</SafeType>
    <Length>100</Length>
  </Schema>
</Table>

Example Response (CSV)

HTTP 200 Content-Type: text/csv
CompanyID,CompanyName,DoingBusinessAs
21090,KENTEL,Kentel Corp

Example Response (Excel)

HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
content-disposition: attachment;filename=reportname-2016-07-11.xlsx
Binary *.xlsx file

GET IMEI Details

Definition

GET /partner/ingrammicro/imei?CompanyID={CompanyID}&IMEI={IMEI}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /partner/ingrammicro/imei?CompanyID=14170&IMEI=014497002384313,014497002384321,014497002384669
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/partner/ingrammicro/imei?CompanyID=14170&IMEI=014497002384313,014497002384321,014497002384669" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingImeiDetails()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/partner/ingrammicro/imei?CompanyID=14170&IMEI=014497002384313,014497002384321,014497002384669");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept-Encoding", "gzip"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingImeiDetails() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/partner/ingrammicro/imei?CompanyID=14170&IMEI=014497002384313,014497002384321,014497002384669");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept-Encoding", "gzip"); 
    
    return httpClient.execute(request);
}
require 'rest-client'


response = RestClient.get 'https://dataconnectdemo.iqmetrix.net/partner/ingrammicro/imei?CompanyID=14170&IMEI=014497002384313,014497002384321,014497002384669', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[IMEI]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "IMEI": "014497002384313",
        "PurchaseDate": "2016-04-17T00:00:00",
        "ReturnDate": "2016-12-30T00:00:00",
        "ClientID": "24168022-3ed4-422f-90a0-31c70869c1d7"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "IMEI": "014497002384313",
            "PurchaseDate": "2016-04-17T00:00:00",
            "ReturnDate": "2016-12-30T00:00:00",
            "ClientID": "24168022-3ed4-422f-90a0-31c70869c1d7"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <IMEI>014497002384313</IMEI>
    <PurchaseDate>2016-04-17T00:00:00</PurchaseDate>
    <ReturnDate>2016-12-30T00:00:00</ReturnDate>
    <ClientID>24168022-3ed4-422f-90a0-31c70869c1d7</ClientID>
  </Record>
  <Schema>
    <Column_Name>ColumnName</Column_Name>
    <Type>datatybe</Type>
    <SafeType>safetype</SafeType>
    <Length>100</Length>
  </Schema>
</Table>

Example Response (CSV)

HTTP 200 Content-Type: text/csv
IMEI,PurchaseDate,ReturnDate,ClientID
014497002384313,2016-04-17T00:00:00,2016-12-30T00:00:00,24168022-3ed4-422f-90a0-31c70869c1d7

Example Response (Excel)

HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
content-disposition: attachment;filename=reportname-2016-07-11.xlsx
Binary *.xlsx file

ERRORS

HTTP Status Code Description How to Resolve
HTTP 400 Bad Request Ensure request body is formatted properly
HTTP 401 Token is invalid Ensure Access Token is valid and has not expired
HTTP 403 Unauthorized Ensure Access Token is valid and user has appropriate security
HTTP 404 Not Found Ensure URI is valid
HTTP 500 Unexpected Error See Message in response for more information
HTTP 503 Maintenance The requested data is currently undergoing scheduled maintenance, please try again after 12:00PM UTC
Was this page helpful?