ERP API integration

TRACKSW.COM support API functions which make possible simple integration real time GPS tracking data to your information (ERP) system.

Description
Every function has name and parameters. First parameter is API key. API key give you right to access your data, and is provided from TRACKSW.COM administration. Api functions based on http protocol. Function response is array of data. Data columns separated with #9 (Tab key). Every record is terminated with #13#10 (LF). In first row are column names, all next rows are data.   Response you should read as stream or file. Data captured it easy to manipulate, you can simply copy to Excel.

Function : ECHO
Description: idea is to test if API server is alive
Parameters: no parameters
example: http://tracksw.com:8080/echo
response: OK

Function :GETSTATE
Description: Function response is the real time state of trackers
Parameters
apikey – api key – required,
IDNaprava – tracker ID  (if tracker not defined than you will receive state of all trackers belongs to API key)
example: http://tracksw.com:8080/getstate?apikey=test&IDnaprava=3542
response:

ime polja primer podatka Description
idnaprava 1040 tracker ID
datvpisa 2016-4-21 9:56 register date
opis Avto šola Volan tracker description
cas 2016-05-16 10:36 current time of last GPS position
dv 3.7 current speed (km/h)
krajds 33 distance from address
kraj1 LJUBLJANA location 1
kraj2 ZEMLJEMERSKA ULICA 7 location 2
wx 14.5173 WGS 84 longitude
wy 46.0469 WGS 84 lattitude
z 100 altitude
gkx 5463012 Gauss krueger position X
gky 5100412 Gauss krueger position Y
tipnaprave FOXLITE tracker type, producer
ulcount 1456 number of streets
krhscount 34551 number of addresses
izhod1 0 digit.input 1 (contact key: 0-NO, 1-YES)
izhod2 0 digit. input 2 (0-NO, 1-YES)
prtID 0 partner ID
reportTime 2016-05-16 10:30 last report created
currentDS 36522 today distance traveled (m)
currentDriveDT 2:05:11 today drive time
currentStopDT 0:30:04 today stops
currentStart 2016-05-46 7:54 today start time
stopduration 5 minimum stop interval (minutes)
vehiclecounter 191378 current vehicle counter (km)
description additional description
faktorKM 0 distance correction (%)

Function : GETHISTORY
Description: Function response all data received from tracker for defined date
Parameters
apikey – api key – required,
IDNaprava – tracker ID
DATUM– date, format: YYYYMMDD
CAS– time, format HHNNSS (if time not defined, then response is all records for required date)
example: http://tracksw.com:8080/gethistory?apikey=test&IDnaprava=3542&datum=20170317&cas=000000

response:

ime polja primer podatka Description
id 249431882 unique  record ID tracksw.com
uporabnik 8103 tracker ID
cas 2016-05-16 7:19 GPS time
y 46.0859 WGS 84 latitude
x 14.4754 WGS 84 longitude
dat_sp 2016-05-16 7:19 recieved time to server
ds 432 distance to previous position (m)
dv 57 speed km/h
dt 30 time to previous position (sec)
kraj1 LJUBLJANA location 1
kraj2 CELOVŠKA CESTA 291 location 2
stsat 9 number of satellites/accuracy
z 315 altitude
gkx 5459798 Gauss kreager X
gky 5104772 Gauss kreager Y
izhod1 0 DIN1- contact key (0-no, 1-yes)
izhod2 0 DIN2- dig.vhod (0-no, 1-yes)
alfa 144 direction
country SI country

Function : GETDATELOG
Description: Function response latest GPS time for current date . The time is the same as the last GPS time GetHistory for selected date.  The idea is to check consistency of data. It could happens that data received to server with delay. Remark: Data received to tracksw.com is always in FIFO order.

Parameters
apikey – api key – requried,
IDNaprava – tracker ID – option(if is no tracker ID, than response is all records belongs to API key)
DATUM– date , format: YYYYMMDD
example: http://tracksw.com:8080/getdatelog?apikey=test&IDnaprava=3330&datum=20170317

response:

ime polja primer podatka Description
uporabnik 8103 tracker ID
datum 2016-05-16 date
konec 2016-05-16 19:42:43 last GPS time for requested date

Function : GETDAILYSTAT
Description: Function  response is daily statistic.
Parameters
apikey – api key – requried,
IDNaprava – ID naprave – opcija (if is no tracker ID, than response is all records belongs to API key)
DATUM– date, format: YYYYMMDD
example: http://tracksw.com:8080/getdailystat?apikey=test&IDnaprava=3330&datum=20170317

response:

ime polja primer podatka Description
datum 2016-05-16 date
uporabnik 8103 tracker ID
casmax 2016-05-16 19:42:43 last time GPS position for date – start
mincas 2016-05-16 06:10:11 first time GPS position for date – end
povphitrost 39 average speed  (km/h)
maxhitrost 142 max. speed (km/h)
skupaj 74889 traveled distance (m)
casp 39394 stops period – sum (sec.)
upopis Coolio 1 tracker description
counter 15584 vehicle counter – end of date (km)

Function : GETPST
Description: Function response is list of stops
Parameters
apikey – api key – requried,
IDNaprava – ID naprave – opcija (if is no tracker ID, than response is all records belongs to API key)
DATUM– date, format: YYYYMMDD
example: http://tracksw.com:8080/getpst?apikey=test&IDnaprava=3330&datum=20170317

response:

ime polja primer podatka Description
datum 2016-05-16 date
uporabnik 8103 tracker ID
cas 2016-05-25 19:29:56 arrival time to location
lokacija Trebnje, Kidričeva ulica 16 location address
trajanje 862 time traveled to  location (sec)
ptrajanje 4338 stop time period (sec)
trajajnjes 0:14:22 time traveled to  location (hh:nn:ss)
ptrajanjes 1:12:18 stop time period (hh:nn:ss)
razdalja 4661 distance to previous stop (m)
wx 15.0069 WGS 84 – stop longitude
wy 45.911 WGS 84 – stop latitude
gkx 5500907 Gauss kreager X
gky 5085201 Gauss kreager Y
konec 2016-05-25 20:42:14 departure time from location
maxhitrost 63 maximum speed km/h