AutoLog supports multiple vehicles per user account. Every vehicle record is permanently associated with the authenticated user — 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.
UserId is extracted directly from the JWT bearer token on each request, so users can only view and modify their own vehicles. You can register as many vehicles as needed, then attach fuel logs to each one individually for independent tracking.
Vehicle Data Model
TheVehicle entity stores all the identifying and mechanical details for a car. The table below describes every field persisted to the database.
| Field | Type | Max Length | Required | Description |
|---|---|---|---|---|
Id | int | — | Auto | Auto-incremented primary key |
UserId | int | — | Yes | Foreign key to the owning user account |
Make | string | 50 | Yes | Vehicle manufacturer, e.g. "Ford" |
Model | string | 50 | Yes | Vehicle model name, e.g. "Mustang" |
Year | int | — | Yes | Model year, e.g. 2000 |
Cylinders | int | — | Yes | Number of engine cylinders, e.g. 6 |
EngineType | string | 10 | Yes | Engine displacement and type, e.g. "3.7 V6" |
FuelType | string | 20 | Yes | Type of fuel the vehicle uses, e.g. "Gasoline" |
Color | string? | 30 | No | Optional exterior color, e.g. "Midnight Blue" |
Creating a Vehicle
Send aPOST request to /api/vehicles with a JSON body matching the CreateVehicleDto shape. All fields except Color are required.
UserId is not included in the request body. AutoLog extracts it automatically from the NameIdentifier claim in your JWT bearer token, ensuring a user can never register a vehicle under another account.Vehicle Response Fields
Every successful vehicle response (create, get by ID, and get all) returns aVehicleResponseDto object. The UserId is intentionally omitted from all responses.
| Field | Type | Description |
|---|---|---|
id | int | Unique vehicle identifier |
make | string | Vehicle manufacturer |
model | string | Vehicle model name |
year | int | Model year |
cylinders | int | Number of engine cylinders |
engineType | string | Engine displacement and configuration |
fuelType | string | Type of fuel used |
color | string? | Exterior color (nullable) |
API Endpoints
GET /api/vehicles
Returns all vehicles belonging to the authenticated user.
GET /api/vehicles/{id}
Returns a single vehicle by ID. Returns
404 if the vehicle does not belong to the current user.POST /api/vehicles
Creates a new vehicle and returns
201 Created with the new resource.PUT /api/vehicles/{id}
Updates an existing vehicle. Returns
204 No Content on success.DELETE /api/vehicles/{id}
Deletes a vehicle by ID. Returns
204 No Content on success.Quick Reference
| Method | Path | Description |
|---|---|---|
GET | /api/vehicles | List all user vehicles |
GET | /api/vehicles/{id} | Get a vehicle by ID |
POST | /api/vehicles | Create a new vehicle |
PUT | /api/vehicles/{id} | Update a vehicle |
DELETE | /api/vehicles/{id} | Delete a vehicle |