getLiveData

GET request: This API is used to request the live data of vehicles in an account on Intouch.

Input:

  • License_key: the REST API license key allocated to you. This is part of URL structure.
  • deviceId: If left blank or then all vehicles will be considered. Multiple comma separated entries can also be provided.
  • State: State parameter takes epoch timestamp into consideration and filter out the results. To consider time parameter or not, will depend on state value. If any specific timestamp is entered under state input, then API will only return the data of those devices for which live data is updated post the input timestamp.
    If state is 0, then API will show live data of all the devices.

Output:
  • deviceId : MapmyIndia Device ID
  • latitude
  • longitude
  • timestamp: Epoch Time stamp
  • "speedkph": in Km/hr
  • "gprstime": GPRS time in termsof Epoch Time stamp
  • address
  • enginestatus : Status of Ignition in terms of 0 or 1. 0 means Ignition is in off state. 1 means Ignition is in ON state
  • Panic : Status of Panic button
  • mainPower : External battery voltage in mili Volts.
  • internalBatteryVolt: Internal battery voltage in millivolts
  • heading : Direction in degrees
  • dtcCount: Count of Fault codes detected by device
  • dtcDistance: Distance travelled by device with any fault present.
  • greenDriveType: Detection of HA, HB and HC scenarios
  • greenDriveValue: Value in terms of g or rad/s for a HA or HB or HC. For HA and HB value will be in terms of g. For HC value will be measured in rad/s.
  • altitude
  • coolantTemp
  • engineRPM
  • digitalInput3
  • digitalOutput1
  • digitalOutput2
  • satellites

Example URL Response:
https://apis.mapmyindia.com/intouch/v1/<licence_key>/getLiveData

{  "devices": [  {  "deviceId": 281,  "latitude": 28.6863,  "longitude": 77.2039,  "timestamp": 1478085860,  "speedkph": 5,  "gprsTime": 1478085882,  "heading": 23,  "gpsSignal": 15,  "mainPower": 14187,  "internalBatteryVolt": 7912,  "engineStatus": 1,  "panic": 0,  "address": "7, Block D, Maurice Nagar, New Delhi, Delhi. 99 m from Dr JL Jain pin-110007",  "dtcCount": null,  "dtcDistance": null,  "greenDriveType": null,  "greenDriveValue": null,  "altitude": 204,  "coolantTemp": null,  "engineRPM": null,  "digitalInput3": 0,  "digitalOutput1": null,  "digitalOutput2": null,  "satellites": 15  }  ],  "message": "success",  "status": 200  }