API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

Data Connect allows you to retrieve report data from your RQ database (v4.23 and up).

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

Data Connect supports many different methods of authentication, see Authentication Options.

Note that for all reports the Access Token should be mapped to an employee in RQ.

Report List

For a complete list of reports in Data Connect, see Report List.

ENDPOINTS

RESOURCES

TrafficCount

[
    {
        "TrafficCountID": 656,
        "StartDate": "2016-11-09T10:00:00",
        "EndDate": "2016-11-09T11:00:00",
        "TrafficCount": 20,
        "StoreID": 1,
        "GLCode": "84WEA"
    }
]
Name Description
TrafficCountID (INT) Identifier
StartDate (DateTime) Start date
EndDate (DateTime) End date
TrafficCount (INT) Traffic count
StoreID (INT) Identifier for a store in RQ
GLCode (VARCHAR(100)) General Ledger code. For more information about G/L, G/L Account Setup.

REQUESTS

Importing Traffic Count Data into RQ

This request allows you to import and update Traffic Count Data into RQ.

For more information, see Traffic Count Dashboard.

Definition

POST /Import/TrafficCount?StoreID={StoreID}&DateRange={DateRange}&StartDate={StartDate}&StopDate={StopDate}&TrafficCount={TrafficCount}&TrafficCountID={TrafficCountID}&Auth={Auth}&Response={Response}

Headers

Example Request

POST /Import/TrafficCount?StoreID=1&DateRange=Today&StartDate=2016-11-09T16:00:00.000Z&StopDate=2016-11-09T17:00:00.000Z&TrafficCount=20&TrafficCountID=645
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X POST "https://dataconnectdemo.iqmetrix.net/Import/TrafficCount?StoreID=1&DateRange=Today&StartDate=2016-11-09T16:00:00.000Z&StopDate=2016-11-09T17:00:00.000Z&TrafficCount=20&TrafficCountID=645" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse ImportingTrafficCountDataIntoRq()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/Import/TrafficCount?StoreID=1&DateRange=Today&StartDate=2016-11-09T16:00:00.000Z&StopDate=2016-11-09T17:00:00.000Z&TrafficCount=20&TrafficCountID=645");
    var request = new RestRequest(Method.POST);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept-Encoding", "gzip"); 

    

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse ImportingTrafficCountDataIntoRq() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://dataconnectdemo.iqmetrix.net/Import/TrafficCount?StoreID=1&DateRange=Today&StartDate=2016-11-09T16:00:00.000Z&StopDate=2016-11-09T17:00:00.000Z&TrafficCount=20&TrafficCountID=645");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept-Encoding", "gzip"); 
    
    return httpClient.execute(request);
}
require 'rest-client'


response = RestClient.post 'https://dataconnectdemo.iqmetrix.net/Import/TrafficCount?StoreID=1&DateRange=Today&StartDate=2016-11-09T16:00:00.000Z&StopDate=2016-11-09T17:00:00.000Z&TrafficCount=20&TrafficCountID=645', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[TrafficCount]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "TrafficCountID": 656,
        "StartDate": "2016-11-09T10:00:00",
        "EndDate": "2016-11-09T11:00:00",
        "TrafficCount": 20,
        "StoreID": 1,
        "GLCode": "84WEA"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "TrafficCountID": 656,
            "StartDate": "2016-11-09T10:00:00",
            "EndDate": "2016-11-09T11:00:00",
            "TrafficCount": 20,
            "StoreID": 1,
            "GLCode": "84WEA"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <TrafficCountID>656</TrafficCountID>
    <StartDate>2016-11-09T10:00:00</StartDate>
    <EndDate>2016-11-09T11:00:00</EndDate>
    <TrafficCount>20</TrafficCount>
    <StoreID>1</StoreID>
    <GLCode>84WEA</GLCode>
  </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
TrafficCountID,StartDate,EndDate,TrafficCount,StoreID,GLCode
656,2016-11-09T10:00:00,2016-11-09T11:00:00,20,1,84WEA

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?