Fuel consumption and idle statistics
This API provides data on how much fuel was consumed during the selected time period, as well as how long the vehicle was idling.
How to get data
Method
GET
Request address
To get the data, use the address: https://<server_address>/api/api.php?
Request parameters
-
cmd=fuelconsumtion — API command to get the report
-
imei — unique vehicle identifier
-
start — start time of the data range (Unix timestamp)
-
stop — end time of the data range (Unix timestamp)
-
node — node number where the command should be executed
Example request
https://<server_address>/api/api.php?cmd=fuelconsumtion&imei=7157153151020&start=1644741475&stop=1644914275&node=1
|
Response
{
"code": 0,
"data": {
"7157153151020": [
{
"idle": 98872,
"fuel consumed": 457.92
}
]
},
"message": "success"
}
|
In response to the API request, the following is returned:
-
code — result code (0 = success, other values = error)
-
data — object data for the selected vehicle:
-
idle — engine idling time (in seconds)
-
fuel consumed — amount of fuel consumed during the selected period (liters)
-
message — response status message