Veritrack API

Veritrack JSON API is a way for our customers to query for their location data in a machine-processable format. You can access real-time data, historical positions of your vehicles or even data preprocessed as trips with corresponding metadata.

The API is accessible at https://api.veritrack.net/api/v1/

The login credentials are the same as those for the platform. Basic authentication over HTTPS is used.

The following endpoints are available:

1) Get a list of available groups

https://api.veritrack.net/api/v1/groups
List of groups to which you have permissions.

[{“Code”:”SATD”,”Name”:”Veritrack DEMO”}]

2) Get list of all vehicles in a specific group

https://api.veritrack.net/api/v1/vehicles/group/
i.e.: https://api.veritrack.net/api/v1/vehicles/group/SATD

Returns a list of vehicles, their name, registration plate, battery status (0 if the battery is not in use), current speed, GPS position and last response time (UTC).

[
{
“Code”:”MIRUBAREBI”,
“GroupCode”:”SATD”,
“Name”:”01 MAN”,
“SPZ”:””,
“BatteryPercentage”:0,
“Speed”:1.0,
“LastPosition”:{
“Latitude”:”25.767524″,
“Longitude”:”-80.193646″
},
“LastPositionTimestamp”:”2018-03-23T00:48:14″
},
{
“Code”:”PEJEZEDAGO”,
“GroupCode”:”SATD”,
“Name”:”03 Truck”,
“SPZ”:””,
“BatteryPercentage”:0,
“Speed”:0.0,
“LastPosition”:{
“Latitude”:”27.873273″,
“Longitude”:”-81.020683″
},
“LastPositionTimestamp”:”2018-04-05T21:32:04Z”
},

]

3) Get realtime information of a specific vehicle

https://api.veritrack.net/api/v1/vehicle/

i.e.: https://api.veritrack.net/api/v1/vehicle/(vehicle code)

Returns the real-time information about a vehicle.

{
“Code”: “MIRUBAREBI”,
“GroupCode”: “SATD”,
“Name”: “01 MAN”,
“SPZ”: “”,
“BatteryPercentage”: 10,
“Speed”: 4,
“LastPosition”: {
“Latitude”:”27.873273″,
“Longitude”:”-81.020683″
},
“LastPositionTimestamp”: “2018-02-09T15:27:51Z”
}

4) Get the history of positions of a specific vehicle

https://api.veritrack.net/api/v1/vehicles/history/?from=<date+time from>&to=<date+time to>
i.e.: https://api.veritrack.net/api/v1/vehicles/history/MIRUBAREBI,PEJEZEDAGO?from=2018-05-20T00:00&to=2018-05-21T00:00

Returns list of historical positions in specified time intervals for selected vehicles.

[
{
“Name”:”MAN”,
“VehicleCode”:”MIRUBAREBI”,
“From”:”2017-07-19T22:00:00Z”,
“To”:”2017-07-20T22:00:00Z”,
“Positions”:[
{
“Lat”:”28.321751″,
“Lng”:”-80.715108″,
“Time”:”2017-07-19T22:00:13Z”,
“Speed”:82.0
},
{
“Lat”:”28.321395″,
“Lng”:”-80.714849″,
“Time”:”2017-07-19T22:00:16Z”,
“Speed”:53.0
},
{
“Lat”:”28.321023″,
“Lng”:”-80.714532″,
“Time”:”2017-07-19T22:00:20Z”,
“Speed”:53.0
},

]
}
]

5) Get a history of trips

https://api.veritrack.net/api/v1/vehicle/trips?from=<date+time from>&to=<date+time to>
i.e.: https://api.veritrack.net/api/v1/vehicle/MIRUBAREBI/trips?from=2018-05-20T00:00&to=2018-05-21T00:00

Returns history of trips with metadata for selected vehicle with start time between from/to dates.

[
{
“AverageSpeed”:63.0,
“MaxSpeed”:99.0,
“TripType”:false,
“StartTime”:”2017-07-19T23:40:55″,
“FinishTime”:”2017-07-20T01:45:42″,
“StartPosition”:{
“Latitude”:”28.05401″,
“Longitude”:”-80.589111″
},
“FinishPosition”:{
“Latitude”:”27.0705″,
“Longitude”:”-80.482134″
},
“StartAddress”:”I-95, Cocoa, FL 32926, US”,
“FinishAddress”:”I-95, St. Augustine, FL 32084, US”,
“TripLength”:”02:04″,
“TripWaitingTime”:”00:00″,
“TotalDistance”:131.159
},
{
“AverageSpeed”:66.0,
“MaxSpeed”:99.0,
“TripType”:false,
“StartTime”:”2017-07-20T02:04:49″,
“FinishTime”:”2017-07-20T04:40:16″,
“StartPosition”:{
“Latitude”:”27.0705″,
“Longitude”:”-80.482134″
},
“FinishPosition”:{
“Latitude”:”25.769416″,
“Longitude”:”-80.239058″
},
“StartAddress”:”Florida’s Turnpike, Lake Worth, FL 33467, US”,
“FinishAddress”:”Ronald Reagan Turnpike, Miami, FL 33182, US”,
“TripLength”:”02:35″,
“TripWaitingTime”:”00:00″,
“TotalDistance”:170.498,
“DriverName”:”Mikoláš, Karel”,
“DriverChipCode”:”000000753DBF”
},

]

6) Get engine relay state

https://api.veritrack.net/api/v1/vehicle//getEngineRelayState
i.e.: https://api.veritrack.net/api/v1/vehicle/MIRUBAREBI/getEngineRelayState

Returns current engine relay state.

{
“RelayState”: 0,
“LastEventTimestamp”: “2018-04-23T16:17:31.0621104+02:00”
}

RelayState values:

0 – initial state
1 – lock engine request sent to device, not confirmed
2 – lock engine request sent to device, confirmed by system
3 – unlock engine request sent to device, unconfirmed
4 – unlock engine request sent to device and confirmed by system
5 – unable to lock engine, request denied or delayed by the device

7) Set engine relay state

https://api.veritrack.net/api/v1/vehicle//setEngineRelayState/
i.e.: https://api.veritrack.net/api/v1/vehicle/MIRUBAREBI/setEngineRelayState/off sends lock engine message to the device

or

https://api.veritrack.net/api/v1/vehicle/MIRUBAREBI/setEngineRelayState/on sends unlock engine message to the device

Returns current engine relay state.

Caution: May cause discrepancy between the state shown on platform and the actual state of the vehicle! Use only if you are sure that engine is unlocked but engine relay state is incorrect.

Returns current engine relay state.

{
“RelayState”: 0,
“LastEventTimestamp”: “2018-04-23T16:17:31.0621104+02:00”
}

9) Get sensors data

https://api.veritrack.net/api/v1/vehicle//sensors/Rpm?from=<date+time from>&to=<date+time to>

i.e. https://api.veritrack.net/api/v1/vehicle/MIRUBAREBI/sensors/Rpm,Speed?from=2020-05-26T15:00&to=2020-05-26T15:05 – returns sensors data for Rpm and Speed sensors for selected interval for specified vehicle.

Available sensor types (depending on vehicle and device configuration):

Temperature1
Temperature2
Temperature3
Temperature4
InternalBatteryPercentage
InternalBatteryVoltage
ExternalBatteryPercentage
ExternalBatteryVoltage
Speed
Altitude
Rpm
Odometer
ThrottlePercentage
FuelConsumedTotal
FuelConsumptionActual
FuelActualVolume
FuelActualVolumeFromPercentage
Humidity1
Humidity2
Humidity3
Humidity4
LightSensor
CoolingLiquidTemperature
EngineTemperature
BinaryInput1
BinaryInput2
BinaryInput3
BinaryInput4
AnalogInput1
AnalogInput2
AnalogInput3

{
“items”:[
{
“name”:”Rpm”,
“units”:”int”,
“data”:[
{
“t”:”2020-05-26T15:02:49Z”,
“v”:827
},
{
“t”:”2020-05-26T15:04:47Z”,
“v”:0
}
]
},
{
“name”:”Speed”,
“units”:”KilometersPerHour”,
“data”:[
{
“t”:”2020-05-26T15:02:49Z”,
“v”:10.0
},
{
“t”:”2020-05-26T15:04:47Z”,
“v”:13.0
}
]
}
]
}