Skip to main content

Documentation 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.

AutoLog supports multiple vehicles per user account. Every vehicle record is permanently associated with the authenticated user — the 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

The Vehicle entity stores all the identifying and mechanical details for a car. The table below describes every field persisted to the database.
FieldTypeMax LengthRequiredDescription
IdintAutoAuto-incremented primary key
UserIdintYesForeign key to the owning user account
Makestring50YesVehicle manufacturer, e.g. "Ford"
Modelstring50YesVehicle model name, e.g. "Mustang"
YearintYesModel year, e.g. 2000
CylindersintYesNumber of engine cylinders, e.g. 6
EngineTypestring10YesEngine displacement and type, e.g. "3.7 V6"
FuelTypestring20YesType of fuel the vehicle uses, e.g. "Gasoline"
Colorstring?30NoOptional exterior color, e.g. "Midnight Blue"

Creating a Vehicle

Send a POST request to /api/vehicles with a JSON body matching the CreateVehicleDto shape. All fields except Color are required.
{
  "make": "Ford",
  "model": "Mustang",
  "year": 2000,
  "cylinders": 6,
  "engineType": "3.7 V6",
  "fuelType": "Gasoline",
  "color": "Midnight Blue"
}
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 a VehicleResponseDto object. The UserId is intentionally omitted from all responses.
FieldTypeDescription
idintUnique vehicle identifier
makestringVehicle manufacturer
modelstringVehicle model name
yearintModel year
cylindersintNumber of engine cylinders
engineTypestringEngine displacement and configuration
fuelTypestringType of fuel used
colorstring?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

MethodPathDescription
GET/api/vehiclesList all user vehicles
GET/api/vehicles/{id}Get a vehicle by ID
POST/api/vehiclesCreate a new vehicle
PUT/api/vehicles/{id}Update a vehicle
DELETE/api/vehicles/{id}Delete a vehicle
Vehicle API Reference

Build docs developers (and LLMs) love