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

Employee

Documentation provided assumes DataSource is iQmetrix (1)

{
    "DataSource": 1,
    "CompanyID": "14146",
    "EmployeeID": 58034,
    "UserName": "John.Bates@KENTEL",
    "AccountID": 14243,
    "LocationID": 14192,
    "FirstName": "iQmetrix",
    "LastName": "User",
    "EmailAddress": "test@test.com",
    "Phone": "5555555555",
    "Status": 1,
    "Country": "Canada",
    "StateProvince": "SK",
    "PostalCode": "H0H 0H0"
}
Name Description
DataSource (INT) Denotes Vendor origination of data. Acceptable values include - 1 (iQmetrix) or 2 (CSpire)
CompanyID (TEXT) Identifier for a Company
EmployeeID (INT) Identifier for a User
UserName (NVARCHAR(180)) Username
AccountID (INT) Unique identifier at the DB level
LocationID (INT) Identifier for a Location
FirstName (VARCHAR(25)) First name
LastName (VARCHAR(25)) Last name
EmailAddress (VARCHAR(50)) Personal email
Phone (VARCHAR(50)) Phone number
Status (INT) A flag to indicate if the employee is Enabled (1) or Disabled (0)
Country (VARCHAR(50)) Country where Employee resides
StateProvince (VARCHAR(50)) State/Province
PostalCode (VARCHAR(15)) Postal Code

Store

Documentation provided assumes DataSource is iQmetrix (1)

{
    "DataSource": 1,
    "CompanyID": "14146",
    "StoreID": 14192,
    "StoreName": "84 West",
    "Address": "3851 Test Street",
    "Address2": "0",
    "City": "Georgetown",
    "StateProvince": "SK",
    "PostalCode": "99577-0727",
    "Country": "Canada",
    "StoreStatus": true,
    "LastChangedStatusDate": "2015-01-09T15:00:00.187",
    "Longitude": -104.612034,
    "Latitude": 50.443559,
    "CurrencyCode": 0,
    "TimeZoneName": "(GMT-06:00) Saskatchewan"
}
Name Description
DataSource (INT) A Brierly assigned value that denotes Vendor origination of data. Acceptable values include - 1 (iQmetrix), 2 (CSpire)
CompanyID (TEXT) Identifier for a Company
StoreID (INT) Identifier for a Location
StoreName (NVARCHAR(MAX)) Store name
Address (NVARCHAR(MAX)) Address
Address2 (NVARCHAR(MAX)) Address
City (VARCHAR(50)) City
StateProvince (NVARCHAR(3)) State/Province
PostalCode (VARCHAR(15)) Postal Code
Country (VARCHAR(50)) Country
StoreStatus (BIT) A flag to indicate if the store is open (true) or closed (false)
LastChangedStatusDate (DateTime) Indicates the last time the StoreStatus field was changed, in UTC
Longitude (INT) Longitude
Latitude (INT) Latitude
CurrencyCode (INT) Currency code
TimeZoneName (VARCHAR(200)) Time zone

TransactionLogHeader

Documentation provided assumes DataSource is iQmetrix (1)

{
    "DataSource": 1,
    "CompanyID": "14146",
    "LocationID": 14192,
    "TxnNumber": "84WEAIN17149",
    "TxnDate": "2017-01-03T19:20:48.027",
    "TxnRegisterNumber": 0,
    "TxnTypeID": 0,
    "TxnAmount": 11.05,
    "TxnDiscountAmount": 1.05,
    "TxnCurrency": 0,
    "UserName": "John.Bates@KENTEL",
    "EmployeeID": 58034
}
Name Description
DataSource (INT) A Brierly assigned value that denotes Vendor origination of data. Acceptable values include - 1 (iQmetrix), 2 (CSpire)
CompanyID (TEXT) Identifier for a Company
LocationID (INT) Identifier for a Location
TxnNumber (VARCHAR(14)) Transaction number, unique identifier for transaction
TxnDate (DateTime) Date and time transaction was completed
TxnRegisterNumber (INT) Register number where transaction was completed
TxnTypeID (INT) Identification number that identifies the transaction type
TxnAmount (MONEY) Amount of completed transaction
TxnDiscountAmount (MONEY) Amount discounted from transaction
TxnCurrency (INT) Currency transaction was executed in
UserName (NVARCHAR(180)) Username used to log onto the POS system to ring transactions
EmployeeID (INT) For non-iQmetrix - Unique identifier of the employee. For iQmetrix - identifier for a User

TransactionLogDetails

Documentation provided assumes DataSource is iQmetrix (1)

{
    "DataSource": 1,
    "CompanyID": "14146",
    "TxnNumber": "84WEAIN17149",
    "TxnDate": "2017-01-03T19:20:48.027",
    "Txn_DetailID": 132834,
    "PartNumber": "",
    "VendorPartNumber": "",
    "Quantity": 5,
    "DtlRetailAmount": 79.95,
    "DtlSaleAmount": 79.95,
    "DtlDiscountAmount": 0,
    "DropShip": 0
}
Name Description
DataSource (INT) A Brierly assigned value that denotes Vendor origination of data. Acceptable values include - 1 (iQmetrix), 2 (CSpire)
CompanyID (TEXT) Identifier for a Company
TxnNumber (VARCHAR(14)) Transaction number, unique identifier for transaction
TxnDate (DateTime) Date and time transaction was completed
Txn_DetailID (INT) Transaction detail identification number
PartNumber (NVARCHAR(100)) OBX part number
VendorPartNumber (VARCHAR(30)) Product ID of purchased product, unique to vendor
Quantity (INT) Quantity
DtlRetailAmount (MONEY) Retail amount of transaction
DtlSaleAmount (MONEY) Sale amount of transaction
DtlDiscountAmount (MONEY) Discount amount for transaction
DropShip (INT) A flag to indicate if the item was purchased in store and shipped to the customer (1) or not (0)

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 Employees for a Company

Definition

GET /partner/otterbox/Employees?CompanyID={CompanyID}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /partner/otterbox/Employees?CompanyID=14170
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/partner/otterbox/Employees?CompanyID=14170" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingEmployeesForACompany()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/partner/otterbox/Employees?CompanyID=14170");
    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 GettingEmployeesForACompany() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/partner/otterbox/Employees?CompanyID=14170");
     
    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/otterbox/Employees?CompanyID=14170', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Employee

Example Response (Default)

HTTP 200 Content-Type: application/json
{
    "DataSource": 1,
    "CompanyID": "14146",
    "EmployeeID": 58034,
    "UserName": "John.Bates@KENTEL",
    "AccountID": 14243,
    "LocationID": 14192,
    "FirstName": "iQmetrix",
    "LastName": "User",
    "EmailAddress": "test@test.com",
    "Phone": "5555555555",
    "Status": 1,
    "Country": "Canada",
    "StateProvince": "SK",
    "PostalCode": "H0H 0H0"
}

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "DataSource": 1,
    "CompanyID": "14146",
    "EmployeeID": 58034,
    "UserName": "John.Bates@KENTEL",
    "AccountID": 14243,
    "LocationID": 14192,
    "FirstName": "iQmetrix",
    "LastName": "User",
    "EmailAddress": "test@test.com",
    "Phone": "5555555555",
    "Status": 1,
    "Country": "Canada",
    "StateProvince": "SK",
    "PostalCode": "H0H 0H0"
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <DataSource>1</DataSource>
    <CompanyID>14146</CompanyID>
    <EmployeeID>58034</EmployeeID>
    <UserName>John.Bates@KENTEL</UserName>
    <AccountID>14243</AccountID>
    <LocationID>14192</LocationID>
    <FirstName>iQmetrix</FirstName>
    <LastName>User</LastName>
    <EmailAddress>test@test.com</EmailAddress>
    <Phone>5555555555</Phone>
    <Status>1</Status>
    <Country>Canada</Country>
    <StateProvince>SK</StateProvince>
    <PostalCode>H0H 0H0</PostalCode>
  </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
DataSource,CompanyID,EmployeeID,UserName,AccountID,LocationID,FirstName,LastName,EmailAddress,Phone,Status,Country,StateProvince,PostalCode
1,14146,58034,John.Bates@KENTEL,14243,14192,iQmetrix,User,test@test.com,5555555555,1,Canada,SK,H0H 0H0

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 Stores for a Company

Definition

GET /partner/otterbox/Stores?CompanyID={CompanyID}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /partner/otterbox/Stores?CompanyID=14170
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/partner/otterbox/Stores?CompanyID=14170" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingStoresForACompany()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/partner/otterbox/Stores?CompanyID=14170");
    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 GettingStoresForACompany() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/partner/otterbox/Stores?CompanyID=14170");
     
    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/otterbox/Stores?CompanyID=14170', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Store

Example Response (Default)

HTTP 200 Content-Type: application/json
{
    "DataSource": 1,
    "CompanyID": "14146",
    "StoreID": 14192,
    "StoreName": "84 West",
    "Address": "3851 Test Street",
    "Address2": "0",
    "City": "Georgetown",
    "StateProvince": "SK",
    "PostalCode": "99577-0727",
    "Country": "Canada",
    "StoreStatus": true,
    "LastChangedStatusDate": "2015-01-09T15:00:00.187",
    "Longitude": -104.612034,
    "Latitude": 50.443559,
    "CurrencyCode": 0,
    "TimeZoneName": "(GMT-06:00) Saskatchewan"
}

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "DataSource": 1,
    "CompanyID": "14146",
    "StoreID": 14192,
    "StoreName": "84 West",
    "Address": "3851 Test Street",
    "Address2": "0",
    "City": "Georgetown",
    "StateProvince": "SK",
    "PostalCode": "99577-0727",
    "Country": "Canada",
    "StoreStatus": true,
    "LastChangedStatusDate": "2015-01-09T15:00:00.187",
    "Longitude": -104.612034,
    "Latitude": 50.443559,
    "CurrencyCode": 0,
    "TimeZoneName": "(GMT-06:00) Saskatchewan"
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <DataSource>1</DataSource>
    <CompanyID>14146</CompanyID>
    <StoreID>14192</StoreID>
    <StoreName>84 West</StoreName>
    <Address>3851 Test Street</Address>
    <Address2>0</Address2>
    <City>Georgetown</City>
    <StateProvince>SK</StateProvince>
    <PostalCode>99577-0727</PostalCode>
    <Country>Canada</Country>
    <StoreStatus>true</StoreStatus>
    <LastChangedStatusDate>2015-01-09T15:00:00.187</LastChangedStatusDate>
    <Longitude>-104.612034</Longitude>
    <Latitude>50.443559</Latitude>
    <CurrencyCode>0</CurrencyCode>
    <TimeZoneName>(GMT-06:00) Saskatchewan</TimeZoneName>
  </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
DataSource,CompanyID,StoreID,StoreName,Address,Address2,City,StateProvince,PostalCode,Country,StoreStatus,LastChangedStatusDate,Longitude,Latitude,CurrencyCode,TimeZoneName
1,14146,14192,84 West,3851 Test Street,0,Georgetown,SK,99577-0727,Canada,true,2015-01-09T15:00:00.187,-104.612034,50.443559,0,(GMT-06:00) Saskatchewan

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 the Transaction Log Header File

Definition

GET /partner/otterbox/TLogHeader?CompanyID={CompanyID}&StartDate={StartDate}&StopDate={StopDate}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /partner/otterbox/TLogHeader?CompanyID=14170&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

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

puts response

URI Parameters

Response Parameters

TransactionLogHeader

Example Response (Default)

HTTP 200 Content-Type: application/json
{
    "DataSource": 1,
    "CompanyID": "14146",
    "LocationID": 14192,
    "TxnNumber": "84WEAIN17149",
    "TxnDate": "2017-01-03T19:20:48.027",
    "TxnRegisterNumber": 0,
    "TxnTypeID": 0,
    "TxnAmount": 11.05,
    "TxnDiscountAmount": 1.05,
    "TxnCurrency": 0,
    "UserName": "John.Bates@KENTEL",
    "EmployeeID": 58034
}

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "DataSource": 1,
    "CompanyID": "14146",
    "LocationID": 14192,
    "TxnNumber": "84WEAIN17149",
    "TxnDate": "2017-01-03T19:20:48.027",
    "TxnRegisterNumber": 0,
    "TxnTypeID": 0,
    "TxnAmount": 11.05,
    "TxnDiscountAmount": 1.05,
    "TxnCurrency": 0,
    "UserName": "John.Bates@KENTEL",
    "EmployeeID": 58034
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <DataSource>1</DataSource>
    <CompanyID>14146</CompanyID>
    <LocationID>14192</LocationID>
    <TxnNumber>84WEAIN17149</TxnNumber>
    <TxnDate>2017-01-03T19:20:48.027</TxnDate>
    <TxnRegisterNumber>0</TxnRegisterNumber>
    <TxnTypeID>0</TxnTypeID>
    <TxnAmount>11.05</TxnAmount>
    <TxnDiscountAmount>1.05</TxnDiscountAmount>
    <TxnCurrency>0</TxnCurrency>
    <UserName>John.Bates@KENTEL</UserName>
    <EmployeeID>58034</EmployeeID>
  </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
DataSource,CompanyID,LocationID,TxnNumber,TxnDate,TxnRegisterNumber,TxnTypeID,TxnAmount,TxnDiscountAmount,TxnCurrency,UserName,EmployeeID
1,14146,14192,84WEAIN17149,2017-01-03T19:20:48.027,0,0,11.05,1.05,0,John.Bates@KENTEL,58034

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 Transaction Log Details

Omitting LocationType and LocationIDs values will run the report at the default company level.

Definition

GET /partner/otterbox/TLogDetail?CompanyID={CompanyID}&DateRange={DateRange}&StartDate={StartDate}&StopDate={StopDate}&LocationType={LocationType}&LocationIDs={LocationIDs}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /partner/otterbox/TLogDetail?CompanyID=14170&DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&LocationType=Store&LocationIDs=1,2
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/partner/otterbox/TLogDetail?CompanyID=14170&DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&LocationType=Store&LocationIDs=1,2" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingTransactionLogDetails()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/partner/otterbox/TLogDetail?CompanyID=14170&DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&LocationType=Store&LocationIDs=1,2");
    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 GettingTransactionLogDetails() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/partner/otterbox/TLogDetail?CompanyID=14170&DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&LocationType=Store&LocationIDs=1,2");
     
    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/otterbox/TLogDetail?CompanyID=14170&DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&LocationType=Store&LocationIDs=1,2', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

TransactionLogDetails

Example Response (Default)

HTTP 200 Content-Type: application/json
{
    "DataSource": 1,
    "CompanyID": "14146",
    "TxnNumber": "84WEAIN17149",
    "TxnDate": "2017-01-03T19:20:48.027",
    "Txn_DetailID": 132834,
    "PartNumber": "",
    "VendorPartNumber": "",
    "Quantity": 5,
    "DtlRetailAmount": 79.95,
    "DtlSaleAmount": 79.95,
    "DtlDiscountAmount": 0,
    "DropShip": 0
}

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "DataSource": 1,
    "CompanyID": "14146",
    "TxnNumber": "84WEAIN17149",
    "TxnDate": "2017-01-03T19:20:48.027",
    "Txn_DetailID": 132834,
    "PartNumber": "",
    "VendorPartNumber": "",
    "Quantity": 5,
    "DtlRetailAmount": 79.95,
    "DtlSaleAmount": 79.95,
    "DtlDiscountAmount": 0,
    "DropShip": 0
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <DataSource>1</DataSource>
    <CompanyID>14146</CompanyID>
    <TxnNumber>84WEAIN17149</TxnNumber>
    <TxnDate>2017-01-03T19:20:48.027</TxnDate>
    <Txn_DetailID>132834</Txn_DetailID>
    <PartNumber></PartNumber>
    <VendorPartNumber></VendorPartNumber>
    <Quantity>5</Quantity>
    <DtlRetailAmount>79.95</DtlRetailAmount>
    <DtlSaleAmount>79.95</DtlSaleAmount>
    <DtlDiscountAmount>0</DtlDiscountAmount>
    <DropShip>0</DropShip>
  </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
DataSource,CompanyID,TxnNumber,TxnDate,Txn_DetailID,PartNumber,VendorPartNumber,Quantity,DtlRetailAmount,DtlSaleAmount,DtlDiscountAmount,DropShip
1,14146,84WEAIN17149,2017-01-03T19:20:48.027,132834,,,5,79.95,79.95,0,0

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