---
# System prepended metadata

title: Trip API

---

# Trip API

[TOC]


---

### Trip List 
- path: /web_api/trip/v1/list/:IMEI/0/0/:startTimestamp,:endTimestamp
- method: GET
- response: 
```jsonld
{
  "status": 200,
  "errcode": "",
  "message": "API execution succeeded",
  "data": [
    {
      "duration": 3390,
      "fuelUsed": 0,
      "distance": 9,
      "speedDistance": 9.56,
      "gpsDistance": 9.45,
      "first_trips": {
        "deviceId": "351918068897956",
        "tripId": "15744797291147956",
        "longitude": 101.554507,
        "latitude": 3.13325,
        "duration": 0,
        "fuelUsed": 0,
        "distance": 0,
        "speedDistance": 0,
        "gpsDistance": 0,
        "ts": 1574479728,
        "localDate": "2019-11-23 11:28:48",
        "address": "Address",
        "placeName": "Place Name",    //New
        "packet": {
          "place_id": 268755961,
          "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
          "osm_type": "way",
          "osm_id": 704173832,
          "lat": "3.1333553",
          "lon": "101.555109",
          "place_rank": 26,
          "category": "highway",
          "type": "residential",
          "importance": 0.1,
          "addresstype": "road",
          "name": null,
          "display_name": "Subang, Pangsapuri Jasmin, SA, Selangor, 40150, Malaysia",
          "address": {
            "suburb": "Subang",
            "hamlet": "Pangsapuri Jasmin",
            "city": "SA",
            "state": "Selangor",
            "postcode": "40150",
            "country": "Malaysia",
            "country_code": "my"
          },
          "boundingbox": [
            "3.1329689",
            "3.1333553",
            "101.5547711",
            "101.5551758"
          ]
        }
      },
      "last_trips": {
        "deviceId": "351918068897956",
        "tripId": "15744797291147956",
        "longitude": 101.606846,
        "latitude": 3.092598,
        "duration": 3390,
        "fuelUsed": 0,
        "distance": 9,
        "speedDistance": 9.56,
        "gpsDistance": 9.45,
        "ts": 1574483118,
        "localDate": "2019-11-23 12:25:18",
        "address": "Address",
        "placeName": "Place Name",    //New
        "packet": {
          "address": {
            "Match_addr": "Jalan Majlis, SS 3, Taman Sentosa, Petaling Jaya, Petaling, 47300, Selangor",
            "LongLabel": "Jalan Majlis, SS 3, Taman Sentosa, Petaling Jaya, Petaling, 47300, Selangor, MYS",
            "ShortLabel": "Jalan Majlis",
            "Addr_type": "StreetName",
            "Type": "",
            "PlaceName": "",
            "AddNum": "",
            "Address": "Jalan Majlis",
            "Block": "",
            "Sector": "",
            "Neighborhood": "",
            "District": "SS 3, Taman Sentosa",
            "City": "Petaling Jaya",
            "MetroArea": "Klang Valley",
            "Subregion": "Petaling",
            "Region": "Selangor",
            "Territory": "",
            "Postal": "47300",
            "PostalExt": "",
            "CountryCode": "MYS"
          },
          "location": {
            "x": 101.60722360408413,
            "y": 3.0926660691862233,
            "spatialReference": {
              "wkid": 4326,
              "latestWkid": 4326
            }
          }
        }
      },
      "vehicle_info": {
        "plate": "WVN9096",
        "obdIIIMEI": "351918068897956"
      },
      "vehicle_drivers": {
        "firstName": "Imelda",
        "lastName": "Miranda",
        "img": ""
      },
      "businessTrip": [],
      "tripId": "15744797291147956",
      "driverRecord": {
        "driver": {
          "firstName": "Imelda",
          "lastName": "Miranda",
          "img": ""
        }
      }
    }
  ]
}
```


---

### Trip Detail
- path: /web_api/trip/v1/detail/:IMEI/:tripID
- method: GET
- response:
```jsonld
{
  "status": 200,
  "errcode": "",
  "message": "API execution succeeded",
  "data": [
    {
      "deviceId": "351918068885993",
      "tripId": "15843661368665993",
      "tripInfo": {
        "distance": 68,
        "speedDistance": 68.7,
        "gpsDistance": 70.7,
        "duration": 3650,
        "fuelUsed": 3.85,
        "idleFuelUsed": 1.85,
        "efficiency": 17.83,
        "speedDuration": [
            "level1": 13.5,
            "level2": 9.1,
            "level17": 20
          ], // TBD, from L3
        "maxGpsSpeed": 128,
        "maxVssSpeed": 126,
        "avgGpsSpeed": 74.6,
        "avgVssSpeed": 74.5,
        "harshAccCounter": 0,
        "harshBrakeCounter": 0,
        "harshCorneringCounter": 0,
        "harshRpmCounter": 0,
        "accBrakeCounter": 0,
        "nonEcoStopCounter": 0,
        "speedingPeriod": 0,
        "fatiguePeriod": 0,
        "longHourPeriod": 0,
        "overHosPeriod": 0,
        "ecoSpeedPeriod": 0,
        "ecoSteadyPeriod": 0,
        "ecoRpmPeriod": 0,
        "nonEcoStartCounter": 0,
        "idlePeriod": 0,
        "coastingPeriod": 0,
        "nonEcoTirePressurePeriod": 0,
        "stopAndGoCounter": 0
      },
      "driverRecord": {
        "driver": {
          "img": "https://roadmio-dashcam.s3.ap-southeast-1.amazonaws.com/5a4f4083fdad4973b5c3dbc5/account/pic.jpg",
          "firstName": "Mr ",
          "lastName": "Car Master"
        }
      },
      "routelist": {
        "gps_list": [
          {
            "heading": 201,
            "avgVssSpeed": 5,
            "avgGpsSpeed": 0,
            "longitude": 121.467219,
            "latitude": 25.013171,
            "time": 1584366188
          }
        ],
        "simple_trip_list": [
          {
            "tripPointCounter": 0,
            "motionState": "ENGINE_ON",
            "heading": null,
            "avgVssSpeed": null,
            "avgGpsSpeed": 0,
            "driverId": null,
            "tripDuration": 0,
            "tripDistance": 0,
            "gpsDistance": 0,
            "alertLevel": "none",
            "alertList": [],
            "tpmsData": [],
            "mainPowerVoltage": 12.9,
            "longitude": 121.467347,
            "latitude": 25.014451,
            "mcc": 466,
            "mnc": 97,
            "cell_towers": [],
            "time": 1584366078
          }
        ]
      },
    }
  ]
}
```

---
