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

CustomerListReportData

[
    {
        "Address": "12 Hello St.",
        "Address2": "n/a",
        "BillingAccountNumber": "",
        "City": "Fargo",
        "ContactNumber": "5555555555",
        "ContactTypeName": "",
        "Country": "United States",
        "CustomerCompanyName": "KENTEL",
        "CustomerFirstName": "Carrie",
        "CustomerID": 2108754,
        "CustomerLastName": "Madison",
        "DateCreated": "2016-01-26T20:55:53.227",
        "DeclineToProvideEmail": false,
        "Email": "carry@test.iq",
        "EmployeeName": "iQmetrix Employee",
        "EmployeeNameAssignedTo": "iQmetrix Employee",
        "IndustryTypeName": "",
        "MultiLevelPriceID": 1,
        "NumberOfActivations": 0,
        "PositionTypeName": "",
        "PostalCode": "90123",
        "Province": "ND",
        "TracPointMemberNumber": "C2981754hduw",
        "TypeOfCustomer": 3,
        "VIPCustomer": 0
    }
]
Name Description
Address (VARCHAR(50)) Address - first line of the address
Address2 (VARCHAR(50)) Address 2 - second line of the address, if necessary
BillingAccountNumber (NVARCHAR(MAX)) BAN -  if your company uses BAN you will enter it in the Customer profile and it will show here
City (VARCHAR(50)) City - customer’s city
ContactNumber (VARCHAR(200)) Contact # - the number that is selected on the customer’s profile, it can be any of the number options there
ContactTypeName (NVARCHAR(MAX)) Contact Type - as defined in General Customer Setup and assigned in the Custom Fields section on the customer’s profile
Country (VARCHAR(50)) Country - customer’s country
CustomerCompanyName (VARCHAR(50)) Company Name - may be blank depending on the kind of customer
CustomerFirstName (VARCHAR(50)) First Name - may be blank depending on the kind of customer
CustomerID (INT) Identifier for a Customer in RQ
CustomerLastName (VARCHAR(50)) Last Name - may be blank depending on the kind of customer
DateCreated (DateTime) Created On - day and time the customer’s profile was created
DeclineToProvideEmail (BIT) Decline Email - the option for customers to decline email
Email (VARCHAR(200)) Email - may be blank, if so, the context menu will not have the Email Customer option
EmployeeName (VARCHAR(51)) Created By - employee who created the profile
EmployeeNameAssignedTo (VARCHAR(51)) Assigned To - may be blank if the customer has not been assigned to an employee
IndustryTypeName (NVARCHAR(MAX)) Industry Type - as defined in General Customer Setup and assigned in the Custom Fields section on the customer’s profile
MultiLevelPriceID (INT) Pricing Group - as defined in Multi-Level Pricing - Setup and assigned in the Discount Level field in the More Information section on the customer’s profile
NumberOfActivations (INT) # of Activations - number of Activations the customer has completed as recorded in RQ
PositionTypeName (NVARCHAR(MAX)) Position Type - as defined in General Customer Setup and assigned in the Custom Fields section on the customer’s profile
PostalCode (VARCHAR(15)) Zip/Postal Code - zip code (USA) or postal code (Canada)
Province (VARCHAR(50)) State/Province - customer’s state or province
TracPointMemberNumber (VARCHAR(30)) Member # - this number is automatically generated when a new customer is created
TypeOfCustomer (INT) Type Of Customer - 0 for Company, or 3 for Individual
VIPCustomer (TINYINT) VIP Customer - will be checked if this is a VIP Customer

REQUESTS

GET the Customer List Report

For more information, see Customer List Report.

Definition

GET /reports/customerlistreport?DateRange={DateRange}&StartDate={StartDate}&StopDate={StopDate}&DatePercision={DatePercision}&TypeOfCustomer={TypeOfCustomer}&FilterBy={FilterBy}&StoreIDLoggedIn={StoreIDLoggedIn}&ForWho={ForWho}&ForWhoIDs={ForWhoIDs}&LocationType={LocationType}&LocationTypeIDs={LocationTypeIDs}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /reports/customerlistreport?DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&DatePercision=1970-01-01T06:00:00.000Z&TypeOfCustomer=-1&FilterBy=1&StoreIDLoggedIn=1&ForWho=1&ForWhoIDs=6679&LocationType=Store&LocationTypeIDs=1,2
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/reports/customerlistreport?DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&DatePercision=1970-01-01T06:00:00.000Z&TypeOfCustomer=-1&FilterBy=1&StoreIDLoggedIn=1&ForWho=1&ForWhoIDs=6679&LocationType=Store&LocationTypeIDs=1,2" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingTheCustomerListReport()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/reports/customerlistreport?DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&DatePercision=1970-01-01T06:00:00.000Z&TypeOfCustomer=-1&FilterBy=1&StoreIDLoggedIn=1&ForWho=1&ForWhoIDs=6679&LocationType=Store&LocationTypeIDs=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 GettingTheCustomerListReport() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/reports/customerlistreport?DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&DatePercision=1970-01-01T06:00:00.000Z&TypeOfCustomer=-1&FilterBy=1&StoreIDLoggedIn=1&ForWho=1&ForWhoIDs=6679&LocationType=Store&LocationTypeIDs=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/reports/customerlistreport?DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&DatePercision=1970-01-01T06:00:00.000Z&TypeOfCustomer=-1&FilterBy=1&StoreIDLoggedIn=1&ForWho=1&ForWhoIDs=6679&LocationType=Store&LocationTypeIDs=1,2', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[CustomerListReportData]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "Address": "12 Hello St.",
        "Address2": "n/a",
        "BillingAccountNumber": "",
        "City": "Fargo",
        "ContactNumber": "5555555555",
        "ContactTypeName": "",
        "Country": "United States",
        "CustomerCompanyName": "KENTEL",
        "CustomerFirstName": "Carrie",
        "CustomerID": 2108754,
        "CustomerLastName": "Madison",
        "DateCreated": "2016-01-26T20:55:53.227",
        "DeclineToProvideEmail": false,
        "Email": "carry@test.iq",
        "EmployeeName": "iQmetrix Employee",
        "EmployeeNameAssignedTo": "iQmetrix Employee",
        "IndustryTypeName": "",
        "MultiLevelPriceID": 1,
        "NumberOfActivations": 0,
        "PositionTypeName": "",
        "PostalCode": "90123",
        "Province": "ND",
        "TracPointMemberNumber": "C2981754hduw",
        "TypeOfCustomer": 3,
        "VIPCustomer": 0
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "Address": "12 Hello St.",
            "Address2": "n/a",
            "BillingAccountNumber": "",
            "City": "Fargo",
            "ContactNumber": "5555555555",
            "ContactTypeName": "",
            "Country": "United States",
            "CustomerCompanyName": "KENTEL",
            "CustomerFirstName": "Carrie",
            "CustomerID": 2108754,
            "CustomerLastName": "Madison",
            "DateCreated": "2016-01-26T20:55:53.227",
            "DeclineToProvideEmail": false,
            "Email": "carry@test.iq",
            "EmployeeName": "iQmetrix Employee",
            "EmployeeNameAssignedTo": "iQmetrix Employee",
            "IndustryTypeName": "",
            "MultiLevelPriceID": 1,
            "NumberOfActivations": 0,
            "PositionTypeName": "",
            "PostalCode": "90123",
            "Province": "ND",
            "TracPointMemberNumber": "C2981754hduw",
            "TypeOfCustomer": 3,
            "VIPCustomer": 0
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <Address>12 Hello St.</Address>
    <Address2>n/a</Address2>
    <BillingAccountNumber></BillingAccountNumber>
    <City>Fargo</City>
    <ContactNumber>5555555555</ContactNumber>
    <ContactTypeName></ContactTypeName>
    <Country>United States</Country>
    <CustomerCompanyName>KENTEL</CustomerCompanyName>
    <CustomerFirstName>Carrie</CustomerFirstName>
    <CustomerID>2108754</CustomerID>
    <CustomerLastName>Madison</CustomerLastName>
    <DateCreated>2016-01-26T20:55:53.227</DateCreated>
    <DeclineToProvideEmail>false</DeclineToProvideEmail>
    <Email>carry@test.iq</Email>
    <EmployeeName>iQmetrix Employee</EmployeeName>
    <EmployeeNameAssignedTo>iQmetrix Employee</EmployeeNameAssignedTo>
    <IndustryTypeName></IndustryTypeName>
    <MultiLevelPriceID>1</MultiLevelPriceID>
    <NumberOfActivations>0</NumberOfActivations>
    <PositionTypeName></PositionTypeName>
    <PostalCode>90123</PostalCode>
    <Province>ND</Province>
    <TracPointMemberNumber>C2981754hduw</TracPointMemberNumber>
    <TypeOfCustomer>3</TypeOfCustomer>
    <VIPCustomer>0</VIPCustomer>
  </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
Address,Address2,BillingAccountNumber,City,ContactNumber,ContactTypeName,Country,CustomerCompanyName,CustomerFirstName,CustomerID,CustomerLastName,DateCreated,DeclineToProvideEmail,Email,EmployeeName,EmployeeNameAssignedTo,IndustryTypeName,MultiLevelPriceID,NumberOfActivations,PositionTypeName,PostalCode,Province,TracPointMemberNumber,TypeOfCustomer,VIPCustomer
12 Hello St.,n/a,,Fargo,5555555555,,United States,KENTEL,Carrie,2108754,Madison,2016-01-26T20:55:53.227,false,carry@test.iq,iQmetrix Employee,iQmetrix Employee,,1,0,,90123,ND,C2981754hduw,3,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 Tokan 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?