The AutoLog API is a .NET 10 ASP.NET Core JSON REST API. Inside the Docker container it listens on port 8080 (the ASP.NET Core default for containerised apps) and is mapped to 5030 on the host; in a local development run it binds to http://localhost:5187 (HTTP) or https://localhost:7142 (HTTPS). All endpoints follow RESTful conventions, consume and produce JSON, and are grouped under theDocumentation 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.
/api path prefix.
Base URL
Use the base URL that matches your environment. Every path in this reference is appended to the base URL shown below.| Environment | Base URL |
|---|---|
| Development (local run) | http://localhost:5187/api |
| Container (host-mapped) | http://localhost:5030/api |
| Production | https://api.yourdomain.com/api |
Authentication
All endpoints — with the exception of register (POST /api/auth/register) and login (POST /api/auth/login) — require a valid JWT access token sent as a Bearer token in the Authorization request header.
POST /api/auth/login and last 15 minutes. When a token expires, call POST /api/auth/refresh with both the expired access token and the still-valid refresh token (valid 7 days) to receive a new pair. See API Authentication for the full token lifecycle.
Available Endpoints
Auth
POST /api/auth/register — create a new accountPOST /api/auth/login — exchange credentials for tokensPOST /api/auth/refresh — rotate an expiring access tokenVehicles
GET /api/vehicles — list all vehicles for the authenticated userGET /api/vehicles/{id} — get a single vehiclePOST /api/vehicles — create a vehiclePUT /api/vehicles/{id} — update a vehicleDELETE /api/vehicles/{id} — delete a vehicleFuel Logs
GET /api/fuellogs/vehicle/{vehicleId} — list fill-up records for a vehiclePOST /api/fuellogs — record a new fill-upPUT /api/fuellogs/{id} — update a fill-up recordDELETE /api/fuellogs/{id} — delete a fill-up recordExchange Rates
GET /api/exchangerates — list the USD/MXN rate catalogGET /api/exchangerates/date/{date} — get the rate for a specific datePOST /api/exchangerates — add a rate entryPUT /api/exchangerates/{id} — update a rate entryDELETE /api/exchangerates/{id} — remove a rate entryDashboard
GET /api/dashboard/summary — aggregated spend, volume, and cost-per-km summarySupports optional query parameters:
vehicleId, month, and yearExternal Rates
GET /api/externalrates/dof/{date} — fetch the live USD/MXN fix rate published by Mexico’s DOF (Diario Oficial de la Federación) for a given dateError Format
AutoLog uses ASP.NET Core’s built-inIExceptionHandler interface to catch every unhandled exception in a single place (GlobalExceptionHandler) and return a consistent RFC 7807 Problem Details JSON body. This means you can always inspect status, title, and detail regardless of which endpoint raised the error.
Two error shapes exist:
- Business rule violations — thrown as
CustomAppExceptioninside the application layer. These return400 Bad Requestwith"title": "Business Rule Violation"and a human-readabledetailmessage. AnerrorCodeextension field maps to theSystemResponsestable for i18n translation. - Unexpected errors — any other unhandled exception returns
500 Internal Server Errorwith a generic message. AnincidentNumber(UUID) is included so you can correlate the request with server-side logs.
Common HTTP Status Codes
| Status | Meaning |
|---|---|
200 OK | Request succeeded; response body contains the requested resource or result. |
201 Created | A new resource was created; the Location header points to the new resource URL. |
204 No Content | Request succeeded; no response body (used for updates and deletes). |
400 Bad Request | Validation failed or a business rule was violated; see the detail field. |
401 Unauthorized | Missing, expired, or invalid Bearer token. |
404 Not Found | The requested resource does not exist or does not belong to the authenticated user. |
500 Internal Server Error | An unexpected server-side error occurred; use the incidentNumber when contacting support. |
Interactive API Reference
When the API is running in Development mode, an interactive Scalar API reference is available at:HttpClient code samples. It is generated automatically from the OpenAPI specification produced by MapOpenApi() and is not available in the production build.