Historical Location

This API is used to get the historical location information as well as related additional information for a vehicle. This API can be used thus to create customized reports for users of your apps for different use cases, e.g.: plot the vehicle's past movements on map or get a historical graph of change in a vehicle's altitude.

Input:

  • License_key: the REST API license key allocated to you. This is part of URL structure.
  • deviceId: Mandatory parameter. Single device Id can only be passed as a input parameter.
  • skipPeriod: Optional parameter to filter the records in terms of minutes. Limit is 1 to 60 minutes. These are skip minutes.
  • startTime : startTime needs to be fed as epoch timestamp according to the user choice.If not specified, automatically epoch timestamp of 24 hours before the endTime is taken into consideration. It's a required parameter.
  • endTime : endTime needs to be fed as epoch timestamp according to the user choice.If not specified, automatically current epoch timestamp is taken as input. It's a required parameter.

Note: maximum Duration for which API response can be returned is 24 hours

Output:
  • deviceId: MapmyIndia Intouch device ID
  • timestamp: Epoch timestamp
  • lat :Latitude
  • lng :Longitude
  • altitude
  • speedkph
  • heading : Direction In degrees
  • address: "Nangoli Saiyed Road, Block J, Pushkar Enclave, Paschim Vihar, New Delhi, Delhi. 77 m from Overhead Tank pin-110063"
  • dtcCount
  • dtcDistance
  • coolantTemp
  • engineRPM
  • greenDriveType
  • greenDriveValue
  • engineStatus : 1 – Engine ON ; 0 – Engine OFF
  • mainPower
  • internalBatteryVolt
  • digitalInput3
  • digitalOutput1
  • digitalOutput2

Example URL Response:
https://apis.mapmyindia.com/intouch/v1/<licence_key>/>/getEvents?startTime=1476354702&endTime=1476358302&deviceId=>&skipPeriod=15

{  "mmi_eventdetail": [  {  "deviceId": 281,  "timestamp": 1478080669,  "lat": 28.6862,  "lng": 77.2039,  "altitude": 196,  "speed": 0,  "engineStatus": 0,  "panic": null,  "digitalInput3": null,  "digitalOutput1": null,  "digitalOutput2": null,  "mainPower": null,  "internalBatteryVolt": null,  "heading": 179,  "address": "7, Block D, Maurice Nagar, New Delhi, Delhi. 83 m from Dr JL Jain pin-110007",  "status": "stopped",  "insertTime": 1478080684,  "satelites": 14,  "coolantTemp": null,  "greenDriveType": null,  "greenDriveValue": null,  "engineRPM": null,  "dtcDistance": null,  "dtcCount": null,  "odometer": null,  "canSpeed": null,  "maf": null,  "calcEngineLoad": null,  "throtlePosition": null  },  {  "deviceId": 281,  "timestamp": 1478082300,  "lat": 28.6862,  "lng": 77.2039,  "altitude": 199,  "speed": 0,  "engineStatus": 1,  "panic": null,  "digitalInput3": null,  "digitalOutput1": null,  "digitalOutput2": null,  "mainPower": null,  "internalBatteryVolt": null,  "heading": 179,  "address": "7, Block D, Maurice Nagar, New Delhi, Delhi. 83 m from Dr JL Jain pin-110007",  "status": "idle",  "insertTime": 1478082320,  "satelites": 17,  "coolantTemp": null,  "greenDriveType": null,  "greenDriveValue": null,  "engineRPM": null,  "dtcDistance": null,  "dtcCount": null,  "odometer": null,  "canSpeed": null,  "maf": null,  "calcEngineLoad": null,  "throtlePosition": null  },  {  "deviceId": 281,  "timestamp": 1478083200,  "lat": 28.6862,  "lng": 77.2039,  "altitude": 200,  "speed": 0,  "engineStatus": 0,  "panic": null,  "digitalInput3": null,  "digitalOutput1": null,  "digitalOutput2": null,  "mainPower": null,  "internalBatteryVolt": null,  "heading": 179,  "address": "7, Block D, Maurice Nagar, New Delhi, Delhi. 83 m from Dr JL Jain pin-110007",  "status": "stopped",  "insertTime": 1478083218,  "satelites": 17,  "coolantTemp": null,  "greenDriveType": null,  "greenDriveValue": null,  "engineRPM": null,  "dtcDistance": null,  "dtcCount": null,  "odometer": null,  "canSpeed": null,  "maf": null,  "calcEngineLoad": null,  "throtlePosition": null  },  {  "deviceId": 281,  "timestamp": 1478084564,  "lat": 28.6862,  "lng": 77.2039,  "altitude": 202,  "speed": 0,  "engineStatus": 1,  "panic": null,  "digitalInput3": null,  "digitalOutput1": null,  "digitalOutput2": null,  "mainPower": null,  "internalBatteryVolt": null,  "heading": 179,  "address": "7, Block D, Maurice Nagar, New Delhi, Delhi. 83 m from Dr JL Jain pin-110007",  "status": "idle",  "insertTime": 1478084588,  "satelites": 17,  "coolantTemp": null,  "greenDriveType": null,  "greenDriveValue": null,  "engineRPM": null,  "dtcDistance": null,  "dtcCount": null,  "odometer": null,  "canSpeed": null,  "maf": null,  "calcEngineLoad": null,  "throtlePosition": null  },  {  "deviceId": 281,  "timestamp": 1478085849,  "lat": 28.6862,  "lng": 77.2039,  "altitude": 203,  "speed": 0,  "engineStatus": 1,  "panic": null,  "digitalInput3": null,  "digitalOutput1": null,  "digitalOutput2": null,  "mainPower": null,  "internalBatteryVolt": null,  "heading": 179,  "address": "7, Block D, Maurice Nagar, New Delhi, Delhi. 83 m from Dr JL Jain pin-110007",  "status": "idle",  "insertTime": 1478085869,  "satelites": 14,  "coolantTemp": null,  "greenDriveType": null,  "greenDriveValue": null,  "engineRPM": null,  "dtcDistance": null,  "dtcCount": null,  "odometer": null,  "canSpeed": null,  "maf": null,  "calcEngineLoad": null,  "throtlePosition": null  }  ],  "message": "success",  "status": 200  }