API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

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

To get started, see Data Connect Guide.

Note

For requests 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 reqyests 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

CustomerActivity

[
    {
        "ActivityID": 123341,
        "DateCreated": "2016-11-16T12:09:31.467",
        "ActivityType": "Call - outbound",
        "Description": "Call",
        "CustomerID": 132662,
        "ActivityTypeID": 5,
        "EmployeeName": "iQmetrix Emplouee",
        "EmployeeDisplayName": "iQmetrix Employee (iQmetrix.Employee)",
        "CreatedBy": "iQmetrix Employee (iQmetrix.Employee)",
        "CustomerName": "John Smith",
        "Status": 0,
        "Priority": 3,
        "LastNote": "Done on Dec 1, 2016",
        "LastNoteBy": "iQmetrix Employee",
        "LastNoteOn": "2015-12-01T12:09:31.467",
        "EmployeeID": 219
    }
]
Name Description
ActivityID (INT) Internal identifier for CustomerActivity in RQ
DateCreated (DateTime) Created date
ActivityType (NVARCHAR(MAX)) Activity type
Description (VARCHAR(100)) Description
CustomerID (INT) Internal identifier for a customer in RQ
ActivityTypeID (INT) Identifier for an ActivityType. See ActivityType property
EmployeeName (VARCHAR(51)) Name of assigned employee
EmployeeDisplayName (VARCHAR(105)) Display name of assigned employee
CreatedBy (VARCHAR(105)) Name of employee that created the CustomerActivity
CustomerName (VARCHAR(101)) Assigned customer name
Status (TINYINT) Status. Acceptable values include Open (0), Pending (1), Completed (2) and Cancelled (3)
Priority (TINYINT) Priority. Acceptable values include Critical (0), High (1), Medium (2) and Low (3)
LastNote (VARCHAR(MAX)) Last note
LastNoteBy (VARCHAR(105)) Name of employee that left last note
LastNoteOn (DateTime) Date of last note
EmployeeID (INT) Internal identifier for an employee in RQ

FollowUp

[
    {
        "FollowUpID": 2330,
        "ComponentID": 3,
        "ComponentPK": 122890,
        "FollowUpDescription": "Unique West Activity Followup Contact: (334)312-2988",
        "Description": "Activity",
        "Abstract": "iPhone 7",
        "Employee_Name": "iQmetrix Employee",
        "DateFollowUp": "2015-03-11T08:52:44.553",
        "Completed": false,
        "Archived": false,
        "LastNote": "iPhone 7"
    }
]
Name Description
FollowUpID (INT) Internal identifier for a Follow Up in RQ
ComponentID (INT) Internal identifier in RQ
ComponentPK (INT) Internal value in RQ
FollowUpDescription (VARCHAR(6000)) Generated summary of Follow Up
Description (VARCHAR(50)) Type of Follow Up. Sales Opportunity, Activity, Employee Activity
Abstract (VARCHAR(100)) Description that appears when viewing list of follow ups under Description
Employee_Name (VARCHAR(51)) Employee name
DateFollowUp (DateTime) Follow up date
Completed (BIT) A flag to indicate if the FollowUp is completed
Archived (BIT) A flag to indicate if the FollowUp is archived
LastNote (VARCHAR(MAX)) Last note

MarketingCampaign

[
    {
        "CustomerID": 102692,
        "MarketingID": 11,
        "MarketingIDByStore": "84WEAMK3",
        "DateCreated": "2014-12-23T10:37:10.677",
        "MarketingTitle": "Send marketing material",
        "ShortDescription": "",
        "CustomerName": "84 West",
        "CorrespondenceComplete": false,
        "ContactNumber": "5555555555",
        "AssignedToID": 3479,
        "AssignedToName": "iQmetrix Employee",
        "AssignedToDisplayName": "iQmetrix Employee (iQmetrix.Employee)"
    }
]
Name Description
CustomerID (INT) Internal identifier for a customer in RQ
MarketingID (INT) Internal identifier for a Marketing Campaign in RQ
MarketingIDByStore (VARCHAR(15)) Campaign Number - Generated by RQ
DateCreated (DateTime) Create Date
MarketingTitle (VARCHAR(50)) Marketing Title
ShortDescription (VARCHAR(50)) Description
CustomerName (VARCHAR(101)) Customer name
CorrespondenceComplete (BIT) A flag to indicate of correspondence is complete
ContactNumber (VARCHAR(200)) Contact number
AssignedToID (INT) Internal identifier for an employee in RQ
AssignedToName (VARCHAR(51)) Name of assigned employee
AssignedToDisplayName (VARCHAR(105)) Display name of assigned employee

SalesOpportunity

[
    {
        "SalesOpportunityID": 5036,
        "OppDescription": "IQMETRIX",
        "DateCreated": "2012-07-11T10:56:41.207",
        "EmployeeName": "iQmetrix Employee",
        "AssignedToEmployeeName": "iQmetrix Employee",
        "AssignedToUsername": "iQmetrix.Employee",
        "TypeDescription": "Upgrade",
        "ContactName": "Johnny Smith",
        "CustomerID": 119440,
        "Status": 0,
        "StageName": "No contact with Customer",
        "Priority": 3,
        "ProbPercent": 50,
        "CustomerName": "Johnny Smith",
        "DollarValue": 500,
        "MonthlyValue": 0,
        "MissedStageDate": 1,
        "CompanySize": "$100 to $250 Million",
        "CustomInteger1": "3",
        "CustomInteger2": "68",
        "CustomDate1": "2012-07-11T10:56:41.207",
        "CustomDate2": "2012-07-11T10:56:41.207",
        "CustomText1": "",
        "CustomText2": "",
        "CustomDropDown1": "",
        "CustomDropDown2": "",
        "CustomDropDown3": "",
        "CustomDropDown4": "",
        "CustomDropDown5": "",
        "LastNote": "Complete",
        "LastNoteBy": "iQmetrix Employee",
        "LastNoteOn": "2015-12-01T12:09:31.467"
    }
]
Name Description
SalesOpportunityID (INT) Internal identifier for a SalesOpportunity in RQ
OppDescription (VARCHAR(100)) Opportunity description
DateCreated (DateTime) Created date
EmployeeName (VARCHAR(51)) Name of employee that created the Sales Opportunity
AssignedToEmployeeName (VARCHAR(51)) Name of assigned employee
AssignedToUsername (VARCHAR(51)) Username of assigned employee
TypeDescription (NVARCHAR(MAX)) Opportunity Type
ContactName (VARCHAR(50)) Contact name
CustomerID (INT) Internal identifier for a customer in RQ
Status (TINYINT) Status. Acceptable values include Open (0), Pending (1), Completed (2) and Cancelled (3)
StageName (NVARCHAR(MAX)) Sales Stage
Priority (TINYINT) Priority. Acceptable values include Critical (0), High (1), Medium (2) and Low (3)
ProbPercent (TINYINT) Probability
CustomerName (VARCHAR(101)) Customer name
DollarValue (MONEY) Total Value
MonthlyValue (MONEY) Monthly Value
MissedStageDate (INT) A flag to indicate if the Stage Date was missed (1) or not (0)
CompanySize (NVARCHAR(MAX)) Company size
CustomInteger1 (VARCHAR(20)) Custom integer value
CustomInteger2 (VARCHAR(20)) Custom integer value
CustomDate1 (DateTime) Custom date value
CustomDate2 (DateTime) Custom date value
CustomText1 (VARCHAR(150)) Custom text value
CustomText2 (VARCHAR(150)) Custom text value
CustomDropDown1 (NVARCHAR(MAX)) Custom dropdown value
CustomDropDown2 (NVARCHAR(MAX)) Custom dropdown value
CustomDropDown3 (NVARCHAR(MAX)) Custom dropdown value
CustomDropDown4 (NVARCHAR(MAX)) Custom dropdown value
CustomDropDown5 (NVARCHAR(MAX)) Custom dropdown value
LastNote (VARCHAR(MAX)) Last note
LastNoteBy (VARCHAR(105)) Employee who made last note
LastNoteOn (DateTime) Date of last note

ServiceRequest

[
    {
        "ServiceRequestID": 83,
        "ServiceRequestIDByStore": "84WEASR32",
        "DateCreated": "2016-08-04T15:21:28.977",
        "DateWorkIsToBeDone": "2016-08-04T00:00:00",
        "Description": "One More",
        "CustomerID1": 108560,
        "CustomerName1": "Kentel Corp",
        "Address": "4655 CORNWALL",
        "Address2": "",
        "Postal_Code": "36110",
        "ContactNumber": "5555555555",
        "EmployeeName2": "",
        "ServiceType": 2,
        "Status": 0,
        "StoreID": 1,
        "EmployeeID2": 5,
        "LastNote": "Done on Dec 1, 2016",
        "LastNoteBy": "iQmetrix Employee",
        "LastNoteOn": "2015-12-01T12:09:31.467",
        "SubStatus": 0
    }
]
Name Description
ServiceRequestID (INT) Internal identifier for a Service Request in RQ
ServiceRequestIDByStore (VARCHAR(14)) Identifier for a Service Request in RQ
DateCreated (DateTime) Created Date
DateWorkIsToBeDone (DateTime) Scheduled work date
Description (NVARCHAR(MAX)) Description
CustomerID1 (INT) Internal identifier for a customer in RQ
CustomerName1 (VARCHAR(152)) Customer name
Address (VARCHAR(50)) Address
Address2 (VARCHAR(50)) Address 2
Postal_Code (VARCHAR(15)) Postal/zip code
ContactNumber (VARCHAR(200)) Contact number
EmployeeName2 (VARCHAR(51)) Employee name
ServiceType (TINYINT) Acceptable values include -1 (N/A), 1 (General Onsite), 2 (General Offsite), 3 (Wireless), 4 (Hardware) or 5 (Highspeed)
Status (TINYINT) Status. Acceptable values include Open (0), Pending (1), Completed (2) and Cancelled (3)
StoreID (INT) Internal identifier for a store in RQ
EmployeeID2 (INT) Employee name
LastNote (VARCHAR(MAX)) Last note
LastNoteBy (VARCHAR(105)) Name of employee that left last note
LastNoteOn (DateTime) Date of last note
SubStatus (TINYINT) Internal use only

Task

[
    {
        "TaskID": 17,
        "Completed": false,
        "Importance": 3,
        "Status": 0,
        "Description": "Set up new display",
        "StopDate": "2012-07-11T10:56:41.207",
        "StoreTask": 1,
        "StoreID": 1
    }
]
Name Description
TaskID (INT) Internal identifier for a Task in RQ
Completed (BIT) A flag to indicate if the Task is completed
Importance (TINYINT) Priority. Acceptable values include Critical (0), High (1), Medium (2) and Low (3)
Status (TINYINT) Status. Acceptable values include Open (0), Pending (1), Completed (2) and Cancelled (3)
Description (VARCHAR(50)) Description
StopDate (DateTime) Stop date
StoreTask (INT) A flag to indicate if the Task to be done is for the store (1) or non-location based (0)
StoreID (INT) Internal identifier for a store in RQ

REQUESTS

GET Customer Activities in RQ

Definition

GET /Operations/CustomerActivities?DateAsOf={DateAsOf}&ForWho={ForWho}&ForWhoIDs={ForWhoIDs}&LocationType={LocationType}&LocationTypeIDs={LocationTypeIDs}&LanguageCode={LanguageCode}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /Operations/CustomerActivities?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/Operations/CustomerActivities?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingCustomerActivitiesInRq()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/Operations/CustomerActivities?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us");
    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 GettingCustomerActivitiesInRq() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/Operations/CustomerActivities?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us");
     
    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/Operations/CustomerActivities?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[CustomerActivity]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "ActivityID": 123341,
        "DateCreated": "2016-11-16T12:09:31.467",
        "ActivityType": "Call - outbound",
        "Description": "Call",
        "CustomerID": 132662,
        "ActivityTypeID": 5,
        "EmployeeName": "iQmetrix Emplouee",
        "EmployeeDisplayName": "iQmetrix Employee (iQmetrix.Employee)",
        "CreatedBy": "iQmetrix Employee (iQmetrix.Employee)",
        "CustomerName": "John Smith",
        "Status": 0,
        "Priority": 3,
        "LastNote": "Done on Dec 1, 2016",
        "LastNoteBy": "iQmetrix Employee",
        "LastNoteOn": "2015-12-01T12:09:31.467",
        "EmployeeID": 219
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "ActivityID": 123341,
            "DateCreated": "2016-11-16T12:09:31.467",
            "ActivityType": "Call - outbound",
            "Description": "Call",
            "CustomerID": 132662,
            "ActivityTypeID": 5,
            "EmployeeName": "iQmetrix Emplouee",
            "EmployeeDisplayName": "iQmetrix Employee (iQmetrix.Employee)",
            "CreatedBy": "iQmetrix Employee (iQmetrix.Employee)",
            "CustomerName": "John Smith",
            "Status": 0,
            "Priority": 3,
            "LastNote": "Done on Dec 1, 2016",
            "LastNoteBy": "iQmetrix Employee",
            "LastNoteOn": "2015-12-01T12:09:31.467",
            "EmployeeID": 219
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <ActivityID>123341</ActivityID>
    <DateCreated>2016-11-16T12:09:31.467</DateCreated>
    <ActivityType>Call - outbound</ActivityType>
    <Description>Call</Description>
    <CustomerID>132662</CustomerID>
    <ActivityTypeID>5</ActivityTypeID>
    <EmployeeName>iQmetrix Emplouee</EmployeeName>
    <EmployeeDisplayName>iQmetrix Employee (iQmetrix.Employee)</EmployeeDisplayName>
    <CreatedBy>iQmetrix Employee (iQmetrix.Employee)</CreatedBy>
    <CustomerName>John Smith</CustomerName>
    <Status>0</Status>
    <Priority>3</Priority>
    <LastNote>Done on Dec 1, 2016</LastNote>
    <LastNoteBy>iQmetrix Employee</LastNoteBy>
    <LastNoteOn>2015-12-01T12:09:31.467</LastNoteOn>
    <EmployeeID>219</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
ActivityID,DateCreated,ActivityType,Description,CustomerID,ActivityTypeID,EmployeeName,EmployeeDisplayName,CreatedBy,CustomerName,Status,Priority,LastNote,LastNoteBy,LastNoteOn,EmployeeID
123341,2016-11-16T12:09:31.467,Call - outbound,Call,132662,5,iQmetrix Emplouee,iQmetrix Employee (iQmetrix.Employee),iQmetrix Employee (iQmetrix.Employee),John Smith,0,3,Done on Dec 1, 2016,iQmetrix Employee,2015-12-01T12:09:31.467,219

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 Follow Ups in RQ

Definition

GET /Operations/FollowUps?DateAsOf={DateAsOf}&ForWho={ForWho}&ForWhoIDs={ForWhoIDs}&LocationType={LocationType}&LocationTypeIDs={LocationTypeIDs}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /Operations/FollowUps?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/Operations/FollowUps?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingFollowUpsInRq()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/Operations/FollowUps?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&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 GettingFollowUpsInRq() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/Operations/FollowUps?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&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/Operations/FollowUps?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[FollowUp]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "FollowUpID": 2330,
        "ComponentID": 3,
        "ComponentPK": 122890,
        "FollowUpDescription": "Unique West Activity Followup Contact: (334)312-2988",
        "Description": "Activity",
        "Abstract": "iPhone 7",
        "Employee_Name": "iQmetrix Employee",
        "DateFollowUp": "2015-03-11T08:52:44.553",
        "Completed": false,
        "Archived": false,
        "LastNote": "iPhone 7"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "FollowUpID": 2330,
            "ComponentID": 3,
            "ComponentPK": 122890,
            "FollowUpDescription": "Unique West Activity Followup Contact: (334)312-2988",
            "Description": "Activity",
            "Abstract": "iPhone 7",
            "Employee_Name": "iQmetrix Employee",
            "DateFollowUp": "2015-03-11T08:52:44.553",
            "Completed": false,
            "Archived": false,
            "LastNote": "iPhone 7"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <FollowUpID>2330</FollowUpID>
    <ComponentID>3</ComponentID>
    <ComponentPK>122890</ComponentPK>
    <FollowUpDescription>Unique West Activity Followup Contact: (334)312-2988</FollowUpDescription>
    <Description>Activity</Description>
    <Abstract>iPhone 7</Abstract>
    <Employee_Name>iQmetrix Employee</Employee_Name>
    <DateFollowUp>2015-03-11T08:52:44.553</DateFollowUp>
    <Completed>false</Completed>
    <Archived>false</Archived>
    <LastNote>iPhone 7</LastNote>
  </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
FollowUpID,ComponentID,ComponentPK,FollowUpDescription,Description,Abstract,Employee_Name,DateFollowUp,Completed,Archived,LastNote
2330,3,122890,Unique West Activity Followup Contact: (334)312-2988,Activity,iPhone 7,iQmetrix Employee,2015-03-11T08:52:44.553,false,false,iPhone 7

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 Campaigns in RQ

Definition

GET /Operations/MarketingCampaigns?DateAsOf={DateAsOf}&ForWho={ForWho}&ForWhoIDs={ForWhoIDs}&LocationType={LocationType}&LocationTypeIDs={LocationTypeIDs}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /Operations/MarketingCampaigns?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/Operations/MarketingCampaigns?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingMarketingCampaignsInRq()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/Operations/MarketingCampaigns?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&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 GettingMarketingCampaignsInRq() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/Operations/MarketingCampaigns?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&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/Operations/MarketingCampaigns?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[MarketingCampaign]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "CustomerID": 102692,
        "MarketingID": 11,
        "MarketingIDByStore": "84WEAMK3",
        "DateCreated": "2014-12-23T10:37:10.677",
        "MarketingTitle": "Send marketing material",
        "ShortDescription": "",
        "CustomerName": "84 West",
        "CorrespondenceComplete": false,
        "ContactNumber": "5555555555",
        "AssignedToID": 3479,
        "AssignedToName": "iQmetrix Employee",
        "AssignedToDisplayName": "iQmetrix Employee (iQmetrix.Employee)"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "CustomerID": 102692,
            "MarketingID": 11,
            "MarketingIDByStore": "84WEAMK3",
            "DateCreated": "2014-12-23T10:37:10.677",
            "MarketingTitle": "Send marketing material",
            "ShortDescription": "",
            "CustomerName": "84 West",
            "CorrespondenceComplete": false,
            "ContactNumber": "5555555555",
            "AssignedToID": 3479,
            "AssignedToName": "iQmetrix Employee",
            "AssignedToDisplayName": "iQmetrix Employee (iQmetrix.Employee)"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <CustomerID>102692</CustomerID>
    <MarketingID>11</MarketingID>
    <MarketingIDByStore>84WEAMK3</MarketingIDByStore>
    <DateCreated>2014-12-23T10:37:10.677</DateCreated>
    <MarketingTitle>Send marketing material</MarketingTitle>
    <ShortDescription></ShortDescription>
    <CustomerName>84 West</CustomerName>
    <CorrespondenceComplete>false</CorrespondenceComplete>
    <ContactNumber>5555555555</ContactNumber>
    <AssignedToID>3479</AssignedToID>
    <AssignedToName>iQmetrix Employee</AssignedToName>
    <AssignedToDisplayName>iQmetrix Employee (iQmetrix.Employee)</AssignedToDisplayName>
  </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
CustomerID,MarketingID,MarketingIDByStore,DateCreated,MarketingTitle,ShortDescription,CustomerName,CorrespondenceComplete,ContactNumber,AssignedToID,AssignedToName,AssignedToDisplayName
102692,11,84WEAMK3,2014-12-23T10:37:10.677,Send marketing material,,84 West,false,5555555555,3479,iQmetrix Employee,iQmetrix Employee (iQmetrix.Employee)

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 Sales Opportunities in RQ

Definition

GET /Operations/SalesOpportunities?DateAsOf={DateAsOf}&SalesOpportunityType={SalesOpportunityType}&ForWho={ForWho}&ForWhoIDs={ForWhoIDs}&LocationType={LocationType}&LocationTypeIDs={LocationTypeIDs}&LanguageCode={LanguageCode}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /Operations/SalesOpportunities?DateAsOf=2016-01-01T06:00:00.000Z&SalesOpportunityType=-1&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/Operations/SalesOpportunities?DateAsOf=2016-01-01T06:00:00.000Z&SalesOpportunityType=-1&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingSalesOpportunitiesInRq()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/Operations/SalesOpportunities?DateAsOf=2016-01-01T06:00:00.000Z&SalesOpportunityType=-1&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us");
    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 GettingSalesOpportunitiesInRq() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/Operations/SalesOpportunities?DateAsOf=2016-01-01T06:00:00.000Z&SalesOpportunityType=-1&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us");
     
    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/Operations/SalesOpportunities?DateAsOf=2016-01-01T06:00:00.000Z&SalesOpportunityType=-1&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[SalesOpportunity]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "SalesOpportunityID": 5036,
        "OppDescription": "IQMETRIX",
        "DateCreated": "2012-07-11T10:56:41.207",
        "EmployeeName": "iQmetrix Employee",
        "AssignedToEmployeeName": "iQmetrix Employee",
        "AssignedToUsername": "iQmetrix.Employee",
        "TypeDescription": "Upgrade",
        "ContactName": "Johnny Smith",
        "CustomerID": 119440,
        "Status": 0,
        "StageName": "No contact with Customer",
        "Priority": 3,
        "ProbPercent": 50,
        "CustomerName": "Johnny Smith",
        "DollarValue": 500,
        "MonthlyValue": 0,
        "MissedStageDate": 1,
        "CompanySize": "$100 to $250 Million",
        "CustomInteger1": "3",
        "CustomInteger2": "68",
        "CustomDate1": "2012-07-11T10:56:41.207",
        "CustomDate2": "2012-07-11T10:56:41.207",
        "CustomText1": "",
        "CustomText2": "",
        "CustomDropDown1": "",
        "CustomDropDown2": "",
        "CustomDropDown3": "",
        "CustomDropDown4": "",
        "CustomDropDown5": "",
        "LastNote": "Complete",
        "LastNoteBy": "iQmetrix Employee",
        "LastNoteOn": "2015-12-01T12:09:31.467"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "SalesOpportunityID": 5036,
            "OppDescription": "IQMETRIX",
            "DateCreated": "2012-07-11T10:56:41.207",
            "EmployeeName": "iQmetrix Employee",
            "AssignedToEmployeeName": "iQmetrix Employee",
            "AssignedToUsername": "iQmetrix.Employee",
            "TypeDescription": "Upgrade",
            "ContactName": "Johnny Smith",
            "CustomerID": 119440,
            "Status": 0,
            "StageName": "No contact with Customer",
            "Priority": 3,
            "ProbPercent": 50,
            "CustomerName": "Johnny Smith",
            "DollarValue": 500,
            "MonthlyValue": 0,
            "MissedStageDate": 1,
            "CompanySize": "$100 to $250 Million",
            "CustomInteger1": "3",
            "CustomInteger2": "68",
            "CustomDate1": "2012-07-11T10:56:41.207",
            "CustomDate2": "2012-07-11T10:56:41.207",
            "CustomText1": "",
            "CustomText2": "",
            "CustomDropDown1": "",
            "CustomDropDown2": "",
            "CustomDropDown3": "",
            "CustomDropDown4": "",
            "CustomDropDown5": "",
            "LastNote": "Complete",
            "LastNoteBy": "iQmetrix Employee",
            "LastNoteOn": "2015-12-01T12:09:31.467"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <SalesOpportunityID>5036</SalesOpportunityID>
    <OppDescription>IQMETRIX</OppDescription>
    <DateCreated>2012-07-11T10:56:41.207</DateCreated>
    <EmployeeName>iQmetrix Employee</EmployeeName>
    <AssignedToEmployeeName>iQmetrix Employee</AssignedToEmployeeName>
    <AssignedToUsername>iQmetrix.Employee</AssignedToUsername>
    <TypeDescription>Upgrade</TypeDescription>
    <ContactName>Johnny Smith</ContactName>
    <CustomerID>119440</CustomerID>
    <Status>0</Status>
    <StageName>No contact with Customer</StageName>
    <Priority>3</Priority>
    <ProbPercent>50</ProbPercent>
    <CustomerName>Johnny Smith</CustomerName>
    <DollarValue>500</DollarValue>
    <MonthlyValue>0</MonthlyValue>
    <MissedStageDate>1</MissedStageDate>
    <CompanySize>$100 to $250 Million</CompanySize>
    <CustomInteger1>3</CustomInteger1>
    <CustomInteger2>68</CustomInteger2>
    <CustomDate1>2012-07-11T10:56:41.207</CustomDate1>
    <CustomDate2>2012-07-11T10:56:41.207</CustomDate2>
    <CustomText1></CustomText1>
    <CustomText2></CustomText2>
    <CustomDropDown1></CustomDropDown1>
    <CustomDropDown2></CustomDropDown2>
    <CustomDropDown3></CustomDropDown3>
    <CustomDropDown4></CustomDropDown4>
    <CustomDropDown5></CustomDropDown5>
    <LastNote>Complete</LastNote>
    <LastNoteBy>iQmetrix Employee</LastNoteBy>
    <LastNoteOn>2015-12-01T12:09:31.467</LastNoteOn>
  </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
SalesOpportunityID,OppDescription,DateCreated,EmployeeName,AssignedToEmployeeName,AssignedToUsername,TypeDescription,ContactName,CustomerID,Status,StageName,Priority,ProbPercent,CustomerName,DollarValue,MonthlyValue,MissedStageDate,CompanySize,CustomInteger1,CustomInteger2,CustomDate1,CustomDate2,CustomText1,CustomText2,CustomDropDown1,CustomDropDown2,CustomDropDown3,CustomDropDown4,CustomDropDown5,LastNote,LastNoteBy,LastNoteOn
5036,IQMETRIX,2012-07-11T10:56:41.207,iQmetrix Employee,iQmetrix Employee,iQmetrix.Employee,Upgrade,Johnny Smith,119440,0,No contact with Customer,3,50,Johnny Smith,500,0,1,$100 to $250 Million,3,68,2012-07-11T10:56:41.207,2012-07-11T10:56:41.207,,,,,,,,Complete,iQmetrix Employee,2015-12-01T12:09:31.467

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 Service Requests in RQ

Definition

GET /Operations/ServiceRequests?DateRange={DateRange}&StartDate={StartDate}&StopDate={StopDate}&UnassignedOnly={UnassignedOnly}&ServiceType={ServiceType}&ForWho={ForWho}&ForWhoIDs={ForWhoIDs}&LocationType={LocationType}&LocationTypeIDs={LocationTypeIDs}&LanguageCode={LanguageCode}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /Operations/ServiceRequests?DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&UnassignedOnly=true&ServiceType=-1&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/Operations/ServiceRequests?DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&UnassignedOnly=true&ServiceType=-1&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingServiceRequestsInRq()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/Operations/ServiceRequests?DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&UnassignedOnly=true&ServiceType=-1&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us");
    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 GettingServiceRequestsInRq() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/Operations/ServiceRequests?DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&UnassignedOnly=true&ServiceType=-1&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us");
     
    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/Operations/ServiceRequests?DateRange=Today&StartDate=1970-01-01T06:00:00.000Z&StopDate=2016-01-01T06:00:00.000Z&UnassignedOnly=true&ServiceType=-1&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2&LanguageCode=en-us', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[ServiceRequest]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "ServiceRequestID": 83,
        "ServiceRequestIDByStore": "84WEASR32",
        "DateCreated": "2016-08-04T15:21:28.977",
        "DateWorkIsToBeDone": "2016-08-04T00:00:00",
        "Description": "One More",
        "CustomerID1": 108560,
        "CustomerName1": "Kentel Corp",
        "Address": "4655 CORNWALL",
        "Address2": "",
        "Postal_Code": "36110",
        "ContactNumber": "5555555555",
        "EmployeeName2": "",
        "ServiceType": 2,
        "Status": 0,
        "StoreID": 1,
        "EmployeeID2": 5,
        "LastNote": "Done on Dec 1, 2016",
        "LastNoteBy": "iQmetrix Employee",
        "LastNoteOn": "2015-12-01T12:09:31.467",
        "SubStatus": 0
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "ServiceRequestID": 83,
            "ServiceRequestIDByStore": "84WEASR32",
            "DateCreated": "2016-08-04T15:21:28.977",
            "DateWorkIsToBeDone": "2016-08-04T00:00:00",
            "Description": "One More",
            "CustomerID1": 108560,
            "CustomerName1": "Kentel Corp",
            "Address": "4655 CORNWALL",
            "Address2": "",
            "Postal_Code": "36110",
            "ContactNumber": "5555555555",
            "EmployeeName2": "",
            "ServiceType": 2,
            "Status": 0,
            "StoreID": 1,
            "EmployeeID2": 5,
            "LastNote": "Done on Dec 1, 2016",
            "LastNoteBy": "iQmetrix Employee",
            "LastNoteOn": "2015-12-01T12:09:31.467",
            "SubStatus": 0
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <ServiceRequestID>83</ServiceRequestID>
    <ServiceRequestIDByStore>84WEASR32</ServiceRequestIDByStore>
    <DateCreated>2016-08-04T15:21:28.977</DateCreated>
    <DateWorkIsToBeDone>2016-08-04T00:00:00</DateWorkIsToBeDone>
    <Description>One More</Description>
    <CustomerID1>108560</CustomerID1>
    <CustomerName1>Kentel Corp</CustomerName1>
    <Address>4655 CORNWALL</Address>
    <Address2></Address2>
    <Postal_Code>36110</Postal_Code>
    <ContactNumber>5555555555</ContactNumber>
    <EmployeeName2></EmployeeName2>
    <ServiceType>2</ServiceType>
    <Status>0</Status>
    <StoreID>1</StoreID>
    <EmployeeID2>5</EmployeeID2>
    <LastNote>Done on Dec 1, 2016</LastNote>
    <LastNoteBy>iQmetrix Employee</LastNoteBy>
    <LastNoteOn>2015-12-01T12:09:31.467</LastNoteOn>
    <SubStatus>0</SubStatus>
  </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
ServiceRequestID,ServiceRequestIDByStore,DateCreated,DateWorkIsToBeDone,Description,CustomerID1,CustomerName1,Address,Address2,Postal_Code,ContactNumber,EmployeeName2,ServiceType,Status,StoreID,EmployeeID2,LastNote,LastNoteBy,LastNoteOn,SubStatus
83,84WEASR32,2016-08-04T15:21:28.977,2016-08-04T00:00:00,One More,108560,Kentel Corp,4655 CORNWALL,,36110,5555555555,,2,0,1,5,Done on Dec 1, 2016,iQmetrix Employee,2015-12-01T12:09:31.467,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

GET Tasks in RQ

NOTE - For this request, one of ForWho/ForWhoIDs or LocationType/LocationTypeIDs is required.

Definition

GET /Operations/Tasks?DateAsOf={DateAsOf}&ForWho={ForWho}&ForWhoIDs={ForWhoIDs}&LocationType={LocationType}&LocationTypeIDs={LocationTypeIDs}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /Operations/Tasks?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/Operations/Tasks?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingTasksInRq()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/Operations/Tasks?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&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 GettingTasksInRq() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/Operations/Tasks?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&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/Operations/Tasks?DateAsOf=2016-01-01T06:00:00.000Z&ForWho=4&ForWhoIDs=1&LocationType=Store&LocationTypeIDs=1,2', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[Task]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "TaskID": 17,
        "Completed": false,
        "Importance": 3,
        "Status": 0,
        "Description": "Set up new display",
        "StopDate": "2012-07-11T10:56:41.207",
        "StoreTask": 1,
        "StoreID": 1
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "TaskID": 17,
            "Completed": false,
            "Importance": 3,
            "Status": 0,
            "Description": "Set up new display",
            "StopDate": "2012-07-11T10:56:41.207",
            "StoreTask": 1,
            "StoreID": 1
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <TaskID>17</TaskID>
    <Completed>false</Completed>
    <Importance>3</Importance>
    <Status>0</Status>
    <Description>Set up new display</Description>
    <StopDate>2012-07-11T10:56:41.207</StopDate>
    <StoreTask>1</StoreTask>
    <StoreID>1</StoreID>
  </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
TaskID,Completed,Importance,Status,Description,StopDate,StoreTask,StoreID
17,false,3,0,Set up new display,2012-07-11T10:56:41.207,1,1

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?