Daily vehicle summary
This API retrieves data about a vehicle over the past 24 hours, including mileage, fuel level, refueling, and fuel consumption.
How to get data
Method
GET
Request address
To get the data, use the address: https://<server_address>/api/api.php?
Request parameters
-
cmd=vehinfo_24_hours — command to get 24-hour vehicle info
-
agent_id — vehicle ID (can specify multiple IDs separated by commas)
-
imei — device IMEI (can specify multiple IMEIs separated by commas)
-
ts — timestamp (Unix timestamp)
-
node — node number where the command should be executed
Example request
https://<server_address>/api/api.php?cmd=vehinfo_24_hours&imei=10518,165182&ts=1617710825&node=1
|
Response
{
"10518": {
"total_mileage": 745851.44,
"fuel_start": 229.37,
"fuel_stop": 229.37,
"fuel_fill": 409.6,
"fuel_drain": 153.15,
"fuel_consumption_l": 256.45,
"fuel_consumption_l_per_100km": 35,
"fuel_consumption_norm_l": 161.5658,
"fuel_consumption_norm_l_per_100km": 22,
"engine_hours": 0
},
"165182": {
"total_mileage": 100946.68,
"fuel_start": 0,
"fuel_stop": 0,
"fuel_fill": 0,
"fuel_drain": 0,
"fuel_consumption_l": 0,
"fuel_consumption_l_per_100km": 0,
"fuel_consumption_norm_l": 22.313,
"fuel_consumption_norm_l_per_100km": 10,
"engine_hours": 0
}
}
|
In response to the API request, the following is returned:
-
total_mileage — total mileage
-
fuel_start — fuel level at the start of the period
-
fuel_stop — fuel level at the end of the period
-
fuel_fill — fuel added (refueling)
-
fuel_drain — fuel removed (draining)
-
fuel_consumption_l — actual fuel consumed (liters)
-
fuel_consumption_l_per_100km — fuel consumption per 100 km
-
fuel_consumption_norm_l — normative fuel consumption (liters)
-
fuel_consumption_norm_l_per_100km — normative fuel consumption per 100 km
-
engine_hours — engine hours