Description
Fuel events API is returning refuls and drains information from fuel module.
Limitations
- 1000 req/min
- Maximum period is 3 months (92days)
Request parameters
GET fuel-events?object_id=<..>&from_datetime=<..>&to_datetime=<..>&version=1&api_key=<..>&limit=<..>&continuation_token=<..> HTTP/1.1
Host: api.fm-track.com
Content-Type: application/json;charset=UTF-8
| Parameter | Type | Description | Is required | Remarks |
1 | object_id | string | External object id | + | |
2 | from_datetime | date time | Find events starting from specified date | + | example for format: "2017-04-13T06:58:48.090Z" according ISO-8601 |
3 | to_datetime | date time | Find events ending to specified date. | + | example for format: "2017-04-13T06:58:48.090Z" according ISO-8601 |
4 | continuation_token | integer | Continuation token | - | |
5 | limit | integer | Limits events count in response. | - | Default -100. Maximum value - 1000 |
6 | version | string | version of API | + | At this moment we have only version=1 |
7 | api_key | string | User identification key | + | |
Response parameters
{
"items": [
{
"object_id": "a4325fd6-b105-11ed-9a5e-53fa8cfbfd79",
"event_type": "REFUEL",
"start_date": "2023-02-15T14:19:22.000Z",
"end_date": "2023-02-15T15:30:57.000Z",
"fuel_level_start": 1164.80,
"fuel_level_end": 1206.40,
"difference": 41.60,
"latitude": 53.77,
"longitude": -0.64,
"driver_id": "a4325fd6-e352-44b9-9b77-355072ac7db9"
},
...
],
"continuation_token": 1
}
Name | Type | Description |
continuation_token | integer | Continuation token is sent when number of events in response exceed limit |
items | array | Array of events |
object_id | string | External object ID |
event_type | string | Fuel event type: "REFUEL" or "DRAIN" |
start_date | date time | Begin of fuel event |
end_date | date time | End of fuel event |
fuel_level_start | Number | Fuel level at fuel event start |
fuel_level_end | Number | Fuel level at fuel event end |
difference | Number | Fuel level difference from end to start (absolute value) |
latitude | Number | Latitude of event start |
longitude | Number | Longitude of event start |
driver_id | string | External driver ID of driver at event beginning |