API Documentation
The DataDrive API allows you to retrieve valuable data about your vehicle, fuel usage, km, engine failure and more.
The API is based on REST principles, so it's very easy to establish a connection to the data and test your applications.
You can use your browser to access the URLs and choose your favorite programming tools to interact with the API.
Here on the left you can see the calls we are supporting today. We are currently working on adding new calls and if you have a suggestion, then don't hesitate to us line at info@datadrive.is.
Happy coding :-)
Getting started
Base URL
All API URLs referenced in this documentation start with the following base part:
https://api.datadrive.is
Authentication
When you sign up for an account, you are given an API key. You authenticate to the DataDrive API by providing your API key in the request.
Get current position
This call will give back the current realtime position of your vehicle.
HTTP GET
To make a call, make an HTTP GET request to this URL:
https://api.datadrive.is/getposition?RegNumber={Vehicle registration number}&key={Your API key}
GET Parameters
You must set the following parameters:
| Parameter |
Description |
| RegNumber (required) |
Vehicle registration number of the vehicle, i.e. ER123 |
| Key (required) |
Your API key |
{
"RegNumber": "OT380",
"GPStime": "2015-03-13 15:45:10",
"Lat": "64.455345",
"Lon": "-21.987977",
"Speed": "89",
"Course": "178"
}
Get Engine data
This call will give back the engine data over period of time.
HTTP GET
To make a call, make an HTTP GET request to this URL:
https://api.datadrive.is/getenginedata?RegNumber={Vehicle registration number}&key={Your API key}&from={From time}&to={To time}
GET Parameters
You must set the following parameters:
| Parameter |
Description |
| RegNumber (required) |
Vehicle registration number of the vehicle, i.e. ER123 |
| Key (required) |
Your API key |
| From (required) |
From which date and time (YYYY-MM-dd HH:mm) |
| To (required) |
To which date and time (YYYY-MM-dd HH:mm) |
[
{
"GPStime":"2015-05-21 09:00:34",
"regnumber":"OT380",
"TotalOdo":"213401138",
"RPM":"164.75",
"EngLoad":"16.86275",
"MIL":"1",
"EngTemp":"90",
"TotalFuel":"1871.3",
"AirTemp":"-40",
"FuelLevel":"0",
"FuelPressure":"0",
"IntakePressure":"0"
}
]
Get Trips data
This call will give back the trips the vehicle has made, if there are any, over period of time.
HTTP GET
To make a call, make an HTTP GET request to this URL:
https://api.datadrive.is/gettripsdata?RegNumber={Vehicle registration number}&key={Your API key}&from={From time}&to={To time}
GET Parameters
You must set the following parameters:
| Parameter |
Description |
| RegNumber (required) |
Vehicle registration number of the vehicle, i.e. ER123 |
| Key (required) |
Your API key |
| From (required) |
From which date and time (YYYY-MM-dd HH:mm) |
| To (required) |
To which date and time (YYYY-MM-dd HH:mm) |
[
{
"RegNumber": "OT380",
"StartTime": "2015-03-13 16:54",
"EndTime": "2015-03-13 17:15",
"Fuel": "0.85",
"Km": "12.5",
"AvgFuel": "7.08",
"DrivingTime": "00:21"
},
{
"RegNumber": "OT380",
"StartTime": "2015-03-13 18:08",
"EndTime": "2015-03-13 18:20",
"Fuel": "0.71",
"Km": "10.9",
"AvgFuel": "7.1",
"DrivingTime": "00:12"
}
]
Get position history
This call will give back the GPS history of the vehicle's wherabout, over period of time.
HTTP GET
To make a call, make an HTTP GET request to this URL:
https://api.datadrive.is/getpositionhistory?RegNumber={Vehicle registration number}&key={Your API key}&from={From time}&to={To time}
GET Parameters
You must set the following parameters:
| Parameter |
Description |
| RegNumber (required) |
Vehicle registration number of the vehicle, i.e. ER123 |
| Key (required) |
Your API key |
| From (required) |
From which date and time (YYYY-MM-dd HH:mm) |
| To (required) |
To which date and time (YYYY-MM-dd HH:mm) |
[
{
"RegNumber": "OT380",
"GPStime": "2015-03-13 16:54:00",
"Lat": "64.133123",
"Lon": "-21.546345",
"Speed": "49",
"Course": "164"
},
{
"RegNumber": "OT380",
"GPStime": "2015-03-13 16:54:10",
"Lat": "64.123015",
"Lon": "-21.213125",
"Speed": "45",
"Course": "171"
}
]
Get geofence events
This call will give back the events were the vehicle has entered a prohibited area.
HTTP GET
To make a call, make an HTTP GET request to this URL:
https://api.datadrive.is/getgeofenceevents?RegNumber={Vehicle registration number}&key={Your API key}&from={From time}&to={To time}
GET Parameters
You must set the following parameters:
| Parameter |
Description |
| RegNumber (required) |
Vehicle registration number of the vehicle, i.e. ER123 |
| Key (required) |
Your API key |
| From (required) |
From which date and time (YYYY-MM-dd HH:mm) |
| To (required) |
To which date and time (YYYY-MM-dd HH:mm) |
[
{
"RegNumber": "OT380",
"GPStimeIn": "2015-03-28 17:22"
"GPStimeOut": "2015-03-28 23:01"
"AreaIn": "Sprengisandur_F821"
"AreaOut": "Sprengisandur_F26"
},
{
"RegNumber": "OT380",
"GPStimeIn": "2015-03-29 09:14"
"GPStimeOut": "2015-03-29 21:41"
"AreaIn": "Sprengisandur_F821"
"AreaOut": "Sprengisandur_F26"
}
]
Get geofence status
This call will give back the status of geofence settings for the vehicle.
HTTP GET
To make a call, make an HTTP GET request to this URL:
https://api.datadrive.is/getgeofence?RegNumber={Vehicle registration number}&key={Your API key}
GET Parameters
You must set the following parameters:
| Parameter |
Description |
| RegNumber (required) |
Vehicle registration number of the vehicle, i.e. ER123 |
| Key (required) |
Your API key |
{
"RegNumber": "OT380",
"GeoFence1Enabled": "False"
}
Set geofence status
This call will set enable or disable geofence settings for the vehicle.
HTTP GET
To make a call, make an HTTP GET request to this URL:
https://api.datadrive.is/setgeofence?RegNumber={Vehicle registration number}&key={Your API key}&GeoFence1={"0"or"1"}
GET Parameters
You must set the following parameters:
| Parameter |
Description |
| RegNumber (required) |
Vehicle registration number of the vehicle, i.e. ER123 |
| GeoFence1 (required) |
"0" for disable and "1" for enable the geofence monitoring |
| Key (required) |
Your API key |
{
"RegNumber": "OT380",
"GeoFence1Enabled": "1"
}
Get Vehicle information
This call will get the detailed information about the vehicle; the type, model, VIN number etc.
HTTP GET
To make a call, make an HTTP GET request to this URL:
https://api.datadrive.is/getvehicleinfo?RegNumber={Vehicle registration number}&key={Your API key}
GET Parameters
You must set the following parameters:
| Parameter |
Description |
| RegNumber (required) |
Vehicle registration number of the vehicle, i.e. ER123 |
| Key (required) |
Your API key |
{
"RegNumber": "OT380",
"IMEI": "354456458456456",
"VIN": "SB1ER56L90E146446",
"Vehicle Type": "TOYOTA - AVENSIS (Dökk blár)",
"CO2": "193 g/km",
"Odo": "216456",
"NextInspection": "2015-10-01",
"OBDerrors": "0037"
}
Set Vehicle odo
This will set a new odo value for the vehicle.
HTTP GET
To make a call, make an HTTP GET request to this URL:
https://api.datadrive.is/setvehicleodo?RegNumber={Vehicle registration number}&key={Your API key}&odo=[odo value]
GET Parameters
You must set the following parameters:
| Parameter |
Description |
| RegNumber (required) |
Vehicle registration number of the vehicle, i.e. ER123 |
| Key (required) |
Your API key |
| Odo (required) |
New odo value for the vehicle in km (no "," or ".") |
"OK"
Set Vehicle service
This will set a new service km value for the vehicle.
HTTP GET
To make a call, make an HTTP GET request to this URL:
https://api.datadrive.is/setvehicleservice?RegNumber={Vehicle registration number}&key={Your API key}&servicekm=[odo value in km]
GET Parameters
You must set the following parameters:
| Parameter |
Description |
| RegNumber (required) |
Vehicle registration number of the vehicle, i.e. ER123 |
| Key (required) |
Your API key |
| ServiceKm (required) |
New service km value for the vehicle (no "." or ",") |
"OK"
Set Vehicle rental period
This will set the start time of the rental period and the end time. Also positioning tag of the vehicle is updated, i.e. 'my home depot etc'.
HTTP GET
To make a call, make an HTTP GET request to this URL:
https://api.datadrive.is/setvehiclerentalperiod?RegNumber={Vehicle registration number}&key={Your API key}&start=[start value]&end=[end value]&place=[Place value]&updatetype=[optional updatetype value]
GET Parameters
You must set the following parameters:
| Parameter |
Description |
| RegNumber (required) |
Vehicle registration number of the vehicle, i.e. ER123 |
| Key (required) |
Your API key |
| start (required) |
Start date and time of the rental of the vehicle in ("yyyy-MM-dd HH:mm") |
| end (required) |
End date and time of the rental of the vehicle in ("yyyy-MM-dd HH:mm") |
| Place (required) |
If the vehicle is positioned on specific place or depot. |
| updatetype (optional) |
Optional text to mark the request for specific action. |
"OK"