API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

To get started, see Data Connect Guide.

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

MarketingReportData

[
    {
        "Email": "johntest@kentel.com",
        "Phone": "5555555555",
        "FirstName": "John",
        "LastName": "Test",
        "City": "Regina",
        "Province": "SK",
        "PostalCode": "H0H0H0",
        "Country": "Canada",
        "Category": "Activations,Smart Phones",
        "ProductLibraryID": "M5592-E12435",
        "UnitPrice": 250,
        "ListPrice": 299.99,
        "Quantity": 1,
        "ProductLibraryName": "Galaxy Gear Watch - Black",
        "ProductLibraryCanonicalName": "Smartphones"
    }
]
Name Description
Email (VARCHAR(200)) Email
Phone (VARCHAR(200)) Phone number
FirstName (VARCHAR(50)) First name
LastName (VARCHAR(50)) Last name
City (VARCHAR(50)) City
Province (VARCHAR(50)) Province/State
PostalCode (VARCHAR(15)) Postal/Zip code
Country (VARCHAR(50)) Country
Category (NVARCHAR(MAX)) Category in RQ
ProductLibraryID (VARCHAR(50)) Identifier for a Product in Product Library
UnitPrice (MONEY) Unit price
ListPrice (MONEY) List price
Quantity (INT) Quantity
ProductLibraryName (NVARCHAR(MAX)) Name of the Product in Product Library
ProductLibraryCanonicalName (NVARCHAR(MAX)) Name of the Product’s Classification in Product Library

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

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 Marketing Report

Definition

GET /partner/FacebookOfflineConversions/MarketingReport?CompanyID={CompanyID}&LocationEntityID={LocationEntityID}&StartDate={StartDate}&StopDate={StopDate}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /partner/FacebookOfflineConversions/MarketingReport?CompanyID=21090&LocationEntityID=14188&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-06-06T06:00:00.000Z
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/partner/FacebookOfflineConversions/MarketingReport?CompanyID=21090&LocationEntityID=14188&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-06-06T06:00:00.000Z" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GetMarketingReport()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/partner/FacebookOfflineConversions/MarketingReport?CompanyID=21090&LocationEntityID=14188&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-06-06T06:00:00.000Z");
    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 GetMarketingReport() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/partner/FacebookOfflineConversions/MarketingReport?CompanyID=21090&LocationEntityID=14188&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-06-06T06:00:00.000Z");
     
    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/FacebookOfflineConversions/MarketingReport?CompanyID=21090&LocationEntityID=14188&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-06-06T06:00:00.000Z', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[MarketingReportData]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "Email": "johntest@kentel.com",
        "Phone": "5555555555",
        "FirstName": "John",
        "LastName": "Test",
        "City": "Regina",
        "Province": "SK",
        "PostalCode": "H0H0H0",
        "Country": "Canada",
        "Category": "Activations,Smart Phones",
        "ProductLibraryID": "M5592-E12435",
        "UnitPrice": 250,
        "ListPrice": 299.99,
        "Quantity": 1,
        "ProductLibraryName": "Galaxy Gear Watch - Black",
        "ProductLibraryCanonicalName": "Smartphones"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "Email": "johntest@kentel.com",
            "Phone": "5555555555",
            "FirstName": "John",
            "LastName": "Test",
            "City": "Regina",
            "Province": "SK",
            "PostalCode": "H0H0H0",
            "Country": "Canada",
            "Category": "Activations,Smart Phones",
            "ProductLibraryID": "M5592-E12435",
            "UnitPrice": 250,
            "ListPrice": 299.99,
            "Quantity": 1,
            "ProductLibraryName": "Galaxy Gear Watch - Black",
            "ProductLibraryCanonicalName": "Smartphones"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <Email>johntest@kentel.com</Email>
    <Phone>5555555555</Phone>
    <FirstName>John</FirstName>
    <LastName>Test</LastName>
    <City>Regina</City>
    <Province>SK</Province>
    <PostalCode>H0H0H0</PostalCode>
    <Country>Canada</Country>
    <Category>Activations,Smart Phones</Category>
    <ProductLibraryID>M5592-E12435</ProductLibraryID>
    <UnitPrice>250</UnitPrice>
    <ListPrice>299.99</ListPrice>
    <Quantity>1</Quantity>
    <ProductLibraryName>Galaxy Gear Watch - Black</ProductLibraryName>
    <ProductLibraryCanonicalName>Smartphones</ProductLibraryCanonicalName>
  </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
Email,Phone,FirstName,LastName,City,Province,PostalCode,Country,Category,ProductLibraryID,UnitPrice,ListPrice,Quantity,ProductLibraryName,ProductLibraryCanonicalName
johntest@kentel.com,5555555555,John,Test,Regina,SK,H0H0H0,Canada,Activations,Smart Phones,M5592-E12435,250,299.99,1,Galaxy Gear Watch - Black,Smartphones

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
Was this page helpful?