The Fuel Logs API is the core data-entry surface of AutoLog. Each fuel log entry captures a single fill-up event — odometer reading, volume dispensed, cost paid, and whether the tank was filled to the brim — so AutoLog can compute fuel efficiency (km/L) and total spending over time. All four endpoints require a validDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JReyna217/AutoLog/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer token.
AutoLog normalises every fill-up into metric/MXN units internally regardless of the units the user submits. The
isOdometerInMiles, isVolumeInGallons, and isPaidInUsd flags tell the API which units were used at input, and appliedExchangeRate carries the USD→MXN rate used for cost conversion when isPaidInUsd is true.GET /api/fuellogs/vehicle/
GET /api/fuellogs/vehicle/{vehicleId}
Returns every fuel log entry recorded for the specified vehicle, ordered by fill-up date. The vehicle must belong to the authenticated user.
Auth
Authorization: Bearer <accessToken> — required.
Path parameters
The unique identifier of the vehicle whose fuel logs should be retrieved.
Response fields
Returns an array of fuel log objects. Each object contains:Unique identifier of the fuel log entry.
Identifier of the vehicle this log belongs to.
The date and time the fill-up occurred, e.g.
"2024-06-15T08:30:00".Distance driven since the previous fill-up, normalised to kilometres.
Volume of fuel dispensed, normalised to litres.
Total cost of the fill-up, normalised to Mexican pesos (MXN).
Odometer reading at the time of fill-up, normalised to kilometres.
true if the tank was filled to capacity. AutoLog only computes efficiency for consecutive full-tank entries.Response codes
| Code | Meaning |
|---|---|
200 OK | Array of fuel logs returned (may be empty). |
401 Unauthorized | Missing or invalid Bearer token. |
Example
POST /api/fuellogs
POST /api/fuellogs
Records a new fill-up entry for a vehicle. All unit-conversion metadata must be provided so AutoLog can normalise the values before storage. Returns 201 Created with the persisted fuel log object.
Auth
Authorization: Bearer <accessToken> — required.
Request body
The ID of the vehicle being filled up. Must belong to the authenticated user.
The date and time of the fill-up event. Example:
"2024-06-15T08:30:00".Set
true if currentOdometer is in miles; false if it is already in kilometres.The odometer reading at the time of fill-up, in the unit indicated by
isOdometerInMiles. Must be ≥ 0.Set
true if inputVolume is in US gallons; false if it is already in litres.Volume of fuel dispensed, in the unit indicated by
isVolumeInGallons. Must be between 0.1 and 1000.Set
true if inputCost is denominated in USD; false if it is already in MXN.Total cost of the fill-up, in the currency indicated by
isPaidInUsd. Must be ≥ 0.The USD→MXN exchange rate used to convert the cost. Required when
isPaidInUsd is true; ignored otherwise.Set
true if the tank was completely filled. Only full-tank entries are used in efficiency calculations.Optional free-text notes for this fill-up (e.g. fuel station name, trip context). Maximum 500 characters.
Response fields
Server-assigned unique identifier for the new log entry.
Vehicle this log is associated with.
Fill-up date and time as stored.
Distance since previous fill-up, in kilometres.
Fuel volume dispensed, in litres.
Total cost of the fill-up in MXN.
Odometer reading at fill-up, in kilometres.
Whether the tank was filled to capacity.
Response codes
| Code | Meaning |
|---|---|
201 Created | Log entry created. Response body contains the new object. |
400 Bad Request | One or more required fields are missing or fail range validation. |
401 Unauthorized | Missing or invalid Bearer token. |
Example
PUT /api/fuellogs/
PUT /api/fuellogs/{id}
Replaces all fields on an existing fuel log entry. The request body accepts the same fields as POST /api/fuellogs. Returns 204 No Content on success.
Auth
Authorization: Bearer <accessToken> — required.
Path parameters
The unique identifier of the fuel log entry to update.
Request body
Same fields asPOST /api/fuellogs: vehicleId, fillUpDate, isOdometerInMiles, currentOdometer, isVolumeInGallons, inputVolume, isPaidInUsd, inputCost, appliedExchangeRate, isFullTank, notes.
Response codes
| Code | Meaning |
|---|---|
204 No Content | Log entry updated. No body returned. |
400 Bad Request | One or more fields are missing or fail validation. |
401 Unauthorized | Missing or invalid Bearer token. |
404 Not Found | No log entry with that ID exists. |
Example
DELETE /api/fuellogs/
DELETE /api/fuellogs/{id}
Permanently deletes a fuel log entry by its ID. After deletion, efficiency calculations for the surrounding entries will be adjusted automatically on the next dashboard query.
Auth
Authorization: Bearer <accessToken> — required.
Path parameters
The unique identifier of the fuel log entry to delete.
Response codes
| Code | Meaning |
|---|---|
204 No Content | Log entry deleted. No body returned. |
401 Unauthorized | Missing or invalid Bearer token. |
404 Not Found | No log entry with that ID exists. |