Trip report with geolocation

This API provides a detailed report on a vehicle’s movements during a selected period, including coordinates and geographic information (address, district, city, etc.).
The data includes start and end points of each trip, average and maximum speed, trip length, and location details based on geo-coordinates.

How to get data

Method

GET

Request address

To get the data, use the address: https://<server_address>/api/api.php?

Request parameters

  • cmd=rungeo — command to retrieve the trip report
  • imei — unique identifier of the vehicle in the system
  • start — start time of the report period (Unix timestamp)
  • stop — end time of the report period (Unix timestamp)
  • node — node number where the command should be executed
 

Example request

https://<server_address>/api/api.php?cmd=rungeo&imei=356307045913463&start=1439413200&stop=1439586000&node=1
Response
{
  "code": 0,
  "msg": "OK",
  "tracks": {
    "1439443509": {
      "avgspeed": 35.3889,
      "length": 12.7304,
      "maxspeed": 59,
      "ts": 1439443509,
      "te": 1439445837,
      "slat": "47.2037",
      "slon": "39.6325",
      "elat": "47.2037",
      "elon": "39.6325",
      "sgeo": {
        "city": "Rostov-on-Don",
        "road": "2-ya Krasnodarskaya ulitsa",
        "house_number": "80 к13",
        "state": "Rostov Oblast",
        "postcode": "344091"
      },
      "egeo": {
        "city": "Rostov-on-Don",
        "road": "2-ya Krasnodarskaya Street",
        "house_number": "80 к13",
        "state": "Rostov Oblast",
        "postcode": "344091"
      }
    }
  }
}
In response to the API request, the following is returned:
  • code — execution status (0 = success)
  • msg — status message
  • tracks — object, where keys are trip start timestamps (Unix) and values contain trip data
For each trip:
  • avgspeed — average speed (km/h)
  • maxspeed — maximum speed (km/h)
  • length — route length (km)
  • ts — trip start time (Unix timestamp)
  • te — trip end time (Unix timestamp)
  • slat, slon — start coordinates (latitude, longitude)
  • elat, elon — end coordinates (latitude, longitude)
  • sgeo — start location address (city, street, house, postal code)
  • egeo — end location address (city, street, house, postal code)