Trakwell Web Services API Documentation

The Trakwell Web Services allow passing data between the Trakwell database and your client. All requests are sent over the HTTPS protocol. To use web services, request an API key from Trakwell support.

About This Document:

The Production URL endpoint is https://intg.trakwell.ai/ords/doorcounts/api/ 

Words within {curly braces} represent runtime parameters. Unless specified, HTTPS requests are to use the GET method.

 

Table of Contents:

 

Count Summary Version 1:

v1/apikey/{apikey}/count.{format}?store={storeid}&dateFrom={dateFrom}&dateThrough={dateThrough}

Purpose:

Allow clients access to summarized traffic data so that it can be integrated into external systems. Does not contain the excluded count.

Parameters:

apikey: Your company API key
format: One of the following: json, csv, xml
storeid: Optional. Retailer store code identifier. If not provided, ALL stores are returned.
dateFrom: Date in YYYYMMDD format. Example 20130613
dateThrough: Date in YYYYMMDD format. Example 20130613

Example Input:

https://intg.trakwell.ai/ords/doorcounts/api/v1/apikey/abc123/count.xml?dateFrom=20130524&dateThrough=201305 25

Example Output:

<RESULTS> 
<RESULT>
<STORE_ID>01</STORE_ID>
<DT>2013-05-24</DT>
<OPPORTUNITIES>20</OPPORTUNITIES>
</RESULT>
<RESULT>
<STORE_ID>01</STORE_ID>
<DT>2013-05-25</DT>
<OPPORTUNITIES>23</OPPORTUNITIES>
</RESULT>
<RESULT>
<STORE_ID>02</STORE_ID>
<DT>2013-05-24</DT>
<OPPORTUNITIES>15</OPPORTUNITIES>
</RESULT>
<RESULT>
<STORE_ID>02</STORE_ID>
<DT>2013-05-25</DT>
<OPPORTUNITIES>6</OPPORTUNITIES>
</RESULT>
</RESULTS>

 

 

Count Summary Version 2:

v2/apikey/{apikey}/count.{format}?store={storeid}&dateFrom={dateFrom}&dateThrough={dateThrough}

Purpose:

Allow clients access to summarized traffic data so that it can be integrated into external systems. Also includes excluded count.

Parameters:

apikey: Your company API key
format: One of the following: json, csv, xml
storeid: Optional. Retailer store code identifier. If not provided, ALL stores are returned.
dateFrom: Date in YYYYMMDD format. Example 20130613
dateThrough: Date in YYYYMMDD format. Example 20130613

Example Input:

https://intg.trakwell.ai/ords/doorcounts/api/v2/apikey/abc123/count.xml?dateFrom=20130524&dateThrough=201305 25

Example Output:

<RESULTS> 
<RESULT>
<STORE_ID>01</STORE_ID>
<DT>05/24/2013</DT>
<INCLUDED_COUNT>20</INCLUDED_COUNT>
<EXCLUDED_COUNT>2</EXCLUDED_COUNT>
</RESULT>
<RESULT>
<STORE_ID>01</STORE_ID>
<DT>05/25/2013</DT>
<INCLUDED_COUNT>11</INCLUDED_COUNT>
<EXCLUDED_COUNT>1</EXCLUDED_COUNT>
</RESULT>
<RESULT>
<STORE_ID>02</STORE_ID>
<DT>05/24/2013</DT>
<INCLUDED_COUNT>6</INCLUDED_COUNT>
<EXCLUDED_COUNT>0</EXCLUDED_COUNT>
</RESULT>
</RESULTS>

 

 

 

Count Detail Version 1:

v1/apikey/{apikey}/countDetail.{format}?store={storeid}&dateFrom={dateFrom}&dateThrough={dateThrough}

Purpose:

Allow clients access to detailed traffic data so that it can be integrated into external systems.

Parameters:

apikey: Your company API key
format: One of the following: json, csv, xml
storeid: Optional. Retailer store code identifier. If not provided, ALL stores are returned.
dateFrom: Date in YYYYMMDD format. Example 20130613
dateThrough: Date in YYYYMMDD format. Example 20130613

Example Input:

https://intg.trakwell.ai/ords/doorcounts/api/v1/apikey/abc123/countDetail.xml?store=01&dateFrom=20130524&date Through=20130525

Example Output:

<RESULTS> 
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_NAME>5M</STORE_NAME>
<DOOR>1</DOOR>
<PHOTO_DATE>5/24/2013</PHOTO_DATE>
<PHOTO_TIME>09:51:48 AM</PHOTO_TIME>
<INCLUDED_COUNT>0</INCLUDED_COUNT>
<EXCLUDED_COUNT>1</EXCLUDED_COUNT>
</RESULT>
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_NAME>5M</STORE_NAME>
<DOOR>1</DOOR>
<PHOTO_DATE>5/24/2013</PHOTO_DATE>
<PHOTO_TIME>10:02:05 AM</PHOTO_TIME>
<INCLUDED_COUNT>1</INCLUDED_COUNT>
<EXCLUDED_COUNT>0</EXCLUDED_COUNT>
</RESULT>
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_NAME>5M</STORE_NAME>
<DOOR>1</DOOR>
<PHOTO_DATE>5/24/2013</PHOTO_DATE>
<PHOTO_TIME>10:15:38 AM</PHOTO_TIME>
<INCLUDED_COUNT>1</INCLUDED_COUNT>
<EXCLUDED_COUNT>0</EXCLUDED_COUNT>
</RESULT>

</RESULTS>
 

 

 

Count Detail Version 2:

v2/apikey/{apikey}/countDetail.{format}?store={storeid}&dateFrom={dateFrom}&dateThrough={dateThrough}

Purpose:

Allow clients access to detailed traffic data so that it can be integrated into external systems. Contains the Trakwell record identifier for each photo.

Parameters:

apikey: Your company API key
format: One of the following: json, csv, xml
storeid: Optional. Retailer store code identifier. If not provided, ALL stores are returned.
dateFrom: Date in YYYYMMDD format. Example 20130613
dateThrough: Date in YYYYMMDD format. Example 20130613

Example Input:

https://intg.trakwell.ai/ords/doorcounts/api/v2/apikey/abc123/countDetail.xml?store=01&dateFrom=20130524&date Through=20130525

Example Output:

<RESULTS> 
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_NAME>5M</STORE_NAME>
<ID>975875</ID>
<DOOR>1</DOOR>
<PHOTO_DATE>5/24/2013</PHOTO_DATE>
<PHOTO_TIME>09:51:48 AM</PHOTO_TIME>
<INCLUDED_COUNT>0</INCLUDED_COUNT>
<EXCLUDED_COUNT>1</EXCLUDED_COUNT>
</RESULT>
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_NAME>5M</STORE_NAME>
<ID>975879</ID>
<DOOR>1</DOOR>
<PHOTO_DATE>5/24/2013</PHOTO_DATE>
<PHOTO_TIME>10:02:05 AM</PHOTO_TIME>
<INCLUDED_COUNT>1</INCLUDED_COUNT>
<EXCLUDED_COUNT>0</EXCLUDED_COUNT>
</RESULT>
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_NAME>5M</STORE_NAME>
<ID>975890</ID>
<DOOR>1</DOOR>
<PHOTO_DATE>5/24/2013</PHOTO_DATE>
<PHOTO_TIME>10:15:38 AM</PHOTO_TIME>
<INCLUDED_COUNT>1</INCLUDED_COUNT>
<EXCLUDED_COUNT>0</EXCLUDED_COUNT>
</RESULT>

</RESULTS> 

 

 

Count Detail Version 3:

v3/apikey/{apikey}/countDetail.{format}?store={storeid}&dateFrom={dateFrom}&dateThrough={dateThrough}

Purpose:

Allow clients access to detailed traffic data so that it can be integrated into external systems. Contains the Trakwell user identifier for each photo. If no user has been assigned to the photo, the user identifier that is returned will say “Unassigned”.

Parameters:

apikey: Your company API key
format: One of the following: json, csv, xml
storeid: Optional. Retailer store code identifier. If not provided, ALL stores are returned.
dateFrom: Date in YYYYMMDD format. Example 20130613
dateThrough: Date in YYYYMMDD format. Example 20130613

Example Input:

https://intg.trakwell.ai/ords/doorcounts/api/v3/apikey/abc123/countDetail.xml?store=01&dateFrom=20130524&date Through=20130525

Example Output:

<RESULTS> 
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_NAME>5M</STORE_NAME>
<USER>ABC</USER>
<DOOR>1</DOOR>
<PHOTO_DATE>5/24/2013</PHOTO_DATE>
<PHOTO_TIME>09:51:48 AM</PHOTO_TIME>
<INCLUDED_COUNT>0</INCLUDED_COUNT>
<EXCLUDED_COUNT>1</EXCLUDED_COUNT>
</RESULT>
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_NAME>5M</STORE_NAME>
<USER>Unassigned</USER>
<DOOR>1</DOOR>
<PHOTO_DATE>5/24/2013</PHOTO_DATE>
<PHOTO_TIME>10:02:05 AM</PHOTO_TIME>
<INCLUDED_COUNT>1</INCLUDED_COUNT>
<EXCLUDED_COUNT>0</EXCLUDED_COUNT>
</RESULT>

</RESULTS>

 

 

 

Upload Sale (Version 1):

v1/sale.put

Purpose:

Allow user-specific sale selection during SALE data entry in Trakwell application.

HTTP Method:

POST: Pass parameters as HTTP Headers.

Mandatory Parameters:

API-KEY: Your company API key
SALE-ID: Identifier for the sale in your database. Example 1231401ABCD SALE-DATE: Date of sale in YYYYMMDD format.
SALE-AMOUNT: Amount of sale. Example 15997.90
STORE: Your store code identifier. Example 03
CUST-ID: Identifier for the customer in your database. Example LASTF123Z9

Optional Parameters:

ADDON-DESCR-01: Description of Add-On sale item #1. ADDON-AMT-01: Amount of Add-On sale #1. ADDON-DESCR-02: Description of Add-On sale item #2. ADDON-AMT-02: Amount of Add-On sale #2.

Through:

ADDON-DESCR-99: Description of Add-On sale item #99. ADDON-AMT-99: Amount of Add-On sale #99.

Optional (but necessary) Parameters:

SALESPERSONS: Comma delimited identifier for salespersons related to this sale. Example KJS,DJW
CUST-ADDR1: First line of customer’s address.
CUST-ADDR2: Second line of customer’s address.
CUST-CITY: Customer’s city.
CUST-STATE: Customer’s state. Two-letter abbreviation.
CUST-ZIP: Customer’s zip code.
CUST-L-NAME: Customer’s last name
CUST-F-NAME: Customer’s first name
CUST-PHONE1: Customer’s primary phone.
CUST-PHONE2: Customer’s alternate phone.
CUST-EMAIL: Customer’s e-mail address.

Example Input:

POST https://intg.trakwell.ai/ords/doorcounts/api/v1/sale.put 
API-KEY=abc123
SALE-ID=1231401ABCD
SALE-DATE=20201215
SALE-AMOUNT=15997.90
ADDON-DESCR-01=Fabric Protection
ADDON-AMT-01=149.99
ADDON-DESCR-02=Warranty
ADDON-AMT-02=50
STORE=03
CUST-ID=12345
CUST-F-NAME=Clark
CUST-L-NAME= Kent
CUST-ADDR1=1234 Krypton Street
CUST-ADDR2=Apartment 101
CUST-CITY=Metropolis
CUST-STATE=NY
CUST-ZIP=99999
CUST-EMAIL=clark@superhero.com

curl Example:

curl -X "POST" \
-H "API-KEY: abc123" \
-H "SALE-ID: 1231401ABCD" \
-H "SALE-DATE: 20201215" \
-H "SALE-AMOUNT: 15997.90" \
-H "ADDON-DESCR-01: Fabric Protection" \
-H "ADDON-AMT-01: 149.99" \
-H "ADDON-DESCR-02: Warranty" \
-H "ADDON-AMT-02: 50" \
-H "STORE: 03" \
-H “CUST-ID” 12345” \
-H “CUST-F-NAME: Clark" \
-H “CUST-L-NAME: Kent" \
-H “CUST-ADDR1: 1234 Krypton Street" \
-H “CUST-ADDR2: Apartment 101" \
-H “CUST-CITY: Metropolis" \
-H “CUST-STATE: NY" \
-H “CUST-ZIP: 99999" \
-H “CUST-EMAIL: clark@superhero.com" \
    https://intg.trakwell.ai/ords/doorcounts/api/v1/sale.put

Example Output:

Will return HTTP status 201 if successful. Will return detailed error information if unsuccessful.

 

 

 

Upload Sale (Version 2):

v2/sale.put

Version 2 of the Sale Upload API has all of the same parameters as Version 1. (See above)

Except for the following additional parameters:
CUST-ADV-SRC: Advertising Source
CUST-PRO-CAT: Product Category (multiple product categories can be sent, delimited by colon. Such as:
Sofa:Dining:Rugs)

 

 

Sales Statistics (Emp):

v3/apikey/{apikey}/ salestatsemp.{format}?store={storeid}&dateFrom={dateFrom}&dateThrough={dateThrough}
Purpose:
Allow clients access to sales statistics by employee so that they can be integrated into external systems.
Parameters:
apikey: Your company API key
format: One of the following: json, csv, xml
storeid: Optional. Retailer store code identifier. If not provided, ALL stores are returned.
dateFrom: Date in YYYYMMDD format. Example 20210613
dateThrough: Date in YYYYMMDD format. Example 20210613
Example Input:
https://intg.trakwell.ai/ords/doorcounts/api/v3/apikey/abc123/salestatsemp.xml?store=101&dateFrom=20210524&dateThrough=20210525
Example Output:

<RESULTS> 
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_CODE>101</STORE_CODE>
<EMPLOYEE_CODE>RLJ</EMPLOYEE_CODE>
<OPPORTUNITIES>12</OPPORTUNITIES>
<ASSIGNED>0</ASSIGNED>
<IN_PROCESS>1</IN_PROCESS>
<SALES>5</SALES>
<NO_SALES>4</NO_SALES>
<POTENTIAL_SALES>3</POTENTIAL_SALES>
<SALES_CONVERSION>.42</SALES_CONVERSION>
<TOTAL_SALES>14772</TOTAL_SALES>
<ADJUSTED_SALES>14772</ADJUSTED_SALES>
<AVERAGE_SALE>2954</AVERAGE_SALE>
<REVENUE_PER_OPPORTUNITY>1231</REVENUE_PER_OPPORTUNITY>
<PROSPECTING_PERCENT>.43</PROSPECTING_PERCENT>
<BE_BACKS>1</BE_BACKS>
<EXCLUDED>3</EXCLUDED>
<REASSIGNED>1</REASSIGNED>
<REJECTED>0</REJECTED>
<ADJUSTMENTS_AMOUNT>0</ADJUSTMENTS_AMOUNT>
<ADJUSTMENTS_COUNT>0</ADJUSTMENTS_COUNT>
<CREDITS_AMOUNT>0</CREDITS_AMOUNT>
<RETURNS_AMOUNT>0</RETURNS_AMOUNT>
<RETURNS_AMOUNT>0</RETURNS_AMOUNT>
</RESULT>
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_CODE>101</STORE_CODE>
<EMPLOYEE_CODE>KLD</EMPLOYEE_CODE>
<OPPORTUNITIES>6</OPPORTUNITIES>
<ASSIGNED>0</ASSIGNED>
<IN_PROCESS>0</IN_PROCESS>
<SALES>2</SALES>
<NO_SALES>3</NO_SALES>
<POTENTIAL_SALES>1</POTENTIAL_SALES>
<SALES_CONVERSION>.33</SALES_CONVERSION>
<TOTAL_SALES>6255</TOTAL_SALES>
<ADJUSTED_SALES>6255</ADJUSTED_SALES>
<AVERAGE_SALE>3128</AVERAGE_SALE>
<REVENUE_PER_OPPORTUNITY>1043</REVENUE_PER_OPPORTUNITY>
<PROSPECTING_PERCENT>.25</PROSPECTING_PERCENT>
<BE_BACKS>0</BE_BACKS>
<EXCLUDED>4</EXCLUDED>
<REASSIGNED>1</REASSIGNED>
<REJECTED>0</REJECTED>
<ADJUSTMENTS_AMOUNT>0</ADJUSTMENTS_AMOUNT>
<ADJUSTMENTS_COUNT>0</ADJUSTMENTS_COUNT>
<CREDITS_AMOUNT>0</CREDITS_AMOUNT>
<RETURNS_AMOUNT>0</RETURNS_AMOUNT>
<RETURNS_AMOUNT>0</RETURNS_AMOUNT>
</RESULT>

</RESULTS>

 

 

Sales Statistics (Loc):

v3/apikey/{apikey}/ salestatsloc.{format}?store={storeid}&dateFrom={dateFrom}&dateThrough={dateThrough}
Purpose:
Allow clients access to sales statistics by location so that they can be integrated into external systems.
Parameters:
apikey: Your company API key
format: One of the following: json, csv, xml
storeid: Optional. Retailer store code identifier. If not provided, ALL stores are returned.
dateFrom: Date in YYYYMMDD format. Example 20210613
dateThrough: Date in YYYYMMDD format. Example 20210613
Example Input:
https://intg.trakwell.ai/ords/doorcounts/api/apikey/abc123/salestatsloc.xml?dateFrom=20210620&dateThrough=2
0210704
Example Output:

<RESULTS> 
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_CODE>101</STORE_CODE>
<OPPORTUNITIES>343</OPPORTUNITIES>
<ASSIGNED>0</ASSIGNED>
<IN_PROCESS>1</IN_PROCESS>
<SALES>111</SALES>
<NO_SALES>159</NO_SALES>
<POTENTIAL_SALES>61</POTENTIAL_SALES>
<SALES_CONVERSION>.32</SALES_CONVERSION>
<TOTAL_SALES>276765</TOTAL_SALES>
<ADJUSTED_SALES>276765</ADJUSTED_SALES>
<AVERAGE_SALE>2493</AVERAGE_SALE>
<REVENUE_PER_OPPORTUNITY>807</REVENUE_PER_OPPORTUNITY>
<PROSPECTING_PERCENT>.28</PROSPECTING_PERCENT>
<BE_BACKS>12</BE_BACKS>
<EXCLUDED>146</EXCLUDED>
<REASSIGNED>129</EXCLUDED>
<REJECTED>0</REJECTED>
<ADJUSTMENTS_AMOUNT>0</ADJUSTMENTS_AMOUNT>
<ADJUSTMENTS_COUNT>0</ADJUSTMENTS_COUNT>
<CREDITS_AMOUNT>0</CREDITS_AMOUNT>
<RETURNS_AMOUNT>0</RETURNS_AMOUNT>
<RETURNS_AMOUNT>0</RETURNS_AMOUNT>
</RESULT>
<RESULT>
<COMPANY_NAME>CMPNY</COMPANY_NAME>
<STORE_CODE>102</STORE_CODE>
<EMPLOYEE_CODE>KLD</EMPLOYEE_CODE>
<OPPORTUNITIES>6</OPPORTUNITIES>
<ASSIGNED>0</ASSIGNED>
<IN_PROCESS>2</IN_PROCESS>
<SALES>119</SALES>
<NO_SALES>138</NO_SALES>
<POTENTIAL_SALES>17</POTENTIAL_SALES>
<SALES_CONVERSION>.42</SALES_CONVERSION>
<TOTAL_SALES>236035</TOTAL_SALES>
<ADJUSTED_SALES>236035</ADJUSTED_SALES>
<AVERAGE_SALE>1983</AVERAGE_SALE>
<REVENUE_PER_OPPORTUNITY>837</REVENUE_PER_OPPORTUNITY>
<PROSPECTING_PERCENT>.25</PROSPECTING_PERCENT>
<BE_BACKS>20</BE_BACKS>
<EXCLUDED>130</EXCLUDED>
<REASSIGNED>114</REASSIGNED>
<REJECTED>0</REJECTED>
<ADJUSTMENTS_AMOUNT>0</ADJUSTMENTS_AMOUNT>
<ADJUSTMENTS_COUNT>0</ADJUSTMENTS_COUNT>
<CREDITS_AMOUNT>0</CREDITS_AMOUNT>
<RETURNS_AMOUNT>0</RETURNS_AMOUNT>
<RETURNS_AMOUNT>0</RETURNS_AMOUNT>
</RESULT>

</RESULTS>

 

 

Download Scheduled Actions:

v1/apikey/{apikey}/ action_customer_api.{format}?store={storeid}&dateFrom={dateFrom}&dateThrough={dateThrough}
Purpose:
Allow clients access to actions that have been scheduled within Trakwell so that they can be integrated into
external systems.
Parameters:
apikey: Your company API key
format: One of the following: json, csv, xml
storeid: Optional. Retailer store code identifier. If not provided, ALL stores are returned.
dateFrom: Date in YYYYMMDD format. Example 20210913
dateThrough: Date in YYYYMMDD format. Example 20210930
Example Input:
https://intg.trakwell.ai/ords/doorcounts/api/v1/apikey/abc123/action_customer_api.xml?dateFrom=202100914&dateThrough=20210920
Example Output:

<RESULTS> 
<RESULT>
<ACTION_DATE>09/14/2021</ACTION_DATE>
<ACTION_TIME>02:00 PM</ACTION_TIME>
<ACTION_TYPE>Customer will Return</ACTION_TYPE>
<SALESPERSON>Anita</SALESPERSON>
<CLIENT_IDENTIFIER>ABC</CLIENT_IDENTIFIER>
<COMMENTS>New test appointment with Henny.</COMMENTS>
<STORE_ID>999</STORE_ID>
<CUST_FIRST_NAME>Henny</CUST_FIRST_NAME>
<CUST_LAST_NAME>Penny</CUST_LAST_NAME>
<CUST_ADDR1>1234 Chicken Coop Road</CUST_ADDR1>
<CUST_ADDR2>Apartment 99</CUST_ADDR2>
<CUST_CITY>San Diego</CUST_CITY>
<CUST_STATE>CA</CUST_STATE>
<CUST_ZIP>92999</CUST_ZIP>
<CUST_EMAIL>george@trakwell.ai</CUST_EMAIL>
<CUST_PHONE1>999-999-9999</CUST_PHONE1>
<CUST_PHONE2>888-888-8888</CUST_PHONE2>
</RESULT>
</RESULTS>