Trackunit API

<back to all web services

GetReportUnitHistory

The following routes are available for this service:
GET POST/report/unithistory
GetReportUnitHistory Parameters:
NameParameterData TypeRequiredDescription
UnitIdbodystringNo
FrombodyDateTime?No
TobodyDateTime?No
GetReportUnitHistoryResponse Parameters:
NameParameterData TypeRequiredDescription
ListformList<UnitHistory>No
ResponseStatusformResponseStatusNo
UnitHistory Parameters:
NameParameterData TypeRequiredDescription
TimeformDateTimeNo
EventformintNo
KeyIdformstringNo
LocationformLocationNo
AddressformAddressNo
Headingformint?No
Speedformdouble?No
Kmformdouble?No
Run1formdouble?No
Run2formdouble?No
Run3formdouble?No
Run4formdouble?No
RunOdoformdouble?No
Temperature1formdouble?No
Temperature2formdouble?No
Input1formbool?No
Input2formbool?No
Input3formbool?No
Input4formbool?No
Input5formbool?No
Input6formbool?No
Input7formbool?No
Input8formbool?No
Input9formbool?No
Input10formbool?No
Output1formbool?No
Output2formbool?No
Output3formbool?No
Output4formbool?No
Output5formbool?No
AnalogInput1formdouble?No
AnalogInput2formdouble?No
AnalogInput4formdouble?No
Input1ChangeCounterformint?No
Input2ChangeCounterformint?No
Input3ChangeCounterformint?No
Input4ChangeCounterformint?No
BatteryLevelformdouble?No
ExternalPowerformdouble?No
Location Parameters:
NameParameterData TypeRequiredDescription
LatitudeformdoubleNo
LongitudeformdoubleNo
Address Parameters:
NameParameterData TypeRequiredDescription
CountryformstringNo
ZipCodeformstringNo
CityformstringNo
StreetAddressformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /report/unithistory HTTP/1.1 
Host: api.trackunit.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"unitId":"String","from":"0001-01-01T00:00:00.0000000Z","to":"0001-01-01T00:00:00.0000000Z"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"list":[{"time":"0001-01-01T00:00:00.0000000Z","event":0,"keyId":"String","location":{"latitude":0,"longitude":0},"address":{"country":"String","zipCode":"String","city":"String","streetAddress":"String"},"heading":0,"speed":0,"km":0,"run1":0,"run2":0,"run3":0,"run4":0,"runOdo":0,"temperature1":0,"temperature2":0,"input1":false,"input2":false,"input3":false,"input4":false,"input5":false,"input6":false,"input7":false,"input8":false,"input9":false,"input10":false,"output1":false,"output2":false,"output3":false,"output4":false,"output5":false,"analogInput1":0,"analogInput2":0,"analogInput4":0,"input1ChangeCounter":0,"input2ChangeCounter":0,"input3ChangeCounter":0,"input4ChangeCounter":0,"batteryLevel":0,"externalPower":0}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}