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
  • entityId: MapmyIndia Intouch entity ID
  • timestamp: Epoch timestamp
  • lat: Latitude
  • lng: Longitude
  • altitude: Altitude Value in meters
  • speed: Speed from the device in km/h
  • engineStatus: Ignition Status reported by device 1 – Engine ON ; 0 – Engine OFF
  • panic: Status of Panic button 1 – Panic Pressed
  • digitalInput3: Value of digital Input 3
  • digitalOutput1: Value of digital Output 1
  • digitalOutput2: Value of digital Output 2
  • mainPower: External supply voltage reported by the device in milivolts
  • internalBatteryVolt: Internal Battery voltage of the device in milivolts.
  • heading: Direction In degrees
  • address: Address from MapmyIndia Database
  • status:
  • insertTime: Epoch timestamp – Time at which data was inserted in Intouch Server
  • satelites: Number of satellites in view
  • coolantTemp: Coolant Temperature
  • greenDriveType: Driver behaviour scenario type
  • greenDriveValue: Value of the Driver behaviour event
  • engineRPM: RPM value reported by the device
  • dtcDistance: Distance travelled by the device with Fault
  • dtcCount: Count of the DTCs reported by the device
  • dtcStr: error codes of vehicles
  • odometer: CAN odometer value sent by the device
  • gpsOdometer: Gps odometer value sent by the device
  • canSpeed: CAN Speed value in terms km/h
  • maf: Value of Maximum air flow
  • calcEngineLoad: Value of the Engine Load
  • accelPedal: accelaerator press or not of vehicle in percentage
  • intakeabsolutePress: Intake absolute pressure
  • packetType: packetType; 0-without can parameters 1-with can parameters 2-both null - both
  • uniqueId: MapmyIndia Tracking ID (device IMEI or Serial number)
  • day:
  • month:
  • year:
  • createdAt: Receiving time of packets/events in EPOCH
  • hdop: Float type value
  • gpsValidFlag: Flag for GPS availability 1- For fix 0- GPS not fix
  • digitalInput5: Value of digital Input 5
  • digitalInput7: Value of digital Input 7
  • analogInput1:
  • analogInput2:
  • analogInput3:
  • analogInput4:
  • digitalOutput3:
  • digitalOutput4:
  • powerSupplyVoltage: External supply voltage reported by the device in millivolts
  • deviceOdometer: Odometer field value reported by the device
  • calcEngineVal: Calculated engine value
  • intakeAirTemp: Intake air temperature
  • fuelRailPressure:
  • calibStatus: Caliberation status of vehicle
  • maximumXAcceleration: Use for Vehicle Acceleration in HB, HC etc.
  • maximumYAcceleration: Use for Vehicle Acceleration in HB, HC etc.
  • maximumZAcceleration: Use for Vehicle Acceleration in HB, HC etc.
  • xAcceleration: Use for Vehicle Acceleration in HB, HC etc.
  • yAcceleration: Use for Vehicle Acceleration in HB, HC etc.
  • zAcceleration: Use for Vehicle Acceleration in HB, HC etc.

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  }