User Manual
Version 7.5
×

Getting status of object, time and distance to needed point or goezone

 
Example:
https://<address>api/api.php?cmd=get_status_and_distance
 
Parameters:
cmd: get_status_and_distance
vehnum: vehicle name or several comma separated vehicles 
zone: geozone name
point: point coordinates
 
Request:
 
https://<address>/api/api.php?cmd=get_status_and_distance&vehnum=М897ЕТ777&zone=Госпиталь%20Lapino
 
https://<address>/api/api.php?cmd=get_status_and_distance&vehnum=М897ЕТ777&point=55.923032,37.659668
Object "distance" include data about time in seconds (time) distance in meters (length) to geozone (type=zone) or point (type=point)
 
Answer:
{
  cstatus: 6
  "cstatus_timestamp": 1554985159,
  "destination_name": "Zero coordinates",
  distance:
   { "code": 0, "length": 27613, "msg": "OK", "point": "55.923032,37.659668", "time": 2002, "type": "point" }
   ,
  "ignition": 1,
  "rbu": "08",
  "sensors":
 
  { "Unload Sensor": "on|1554985138", "Load Sensor": "on|1554985138", "Ignition Sensor": "on|1554985138", "FLS    Operation Sensor": "On|1554985138", " Fuel gauge": "202.96 Liter|1554995669" }
   ,
  "source_name": "Loading_Chertanovo",
  status: 4
  "status_timestamp": 1554985072,
  "unixtimestamp": 1554995864,
  "vehiclenumber": "M897ET777",
  "zone": [
  ]
}