Skip to content

Vehicles

Drivers manage their fleet of vehicles. A driver can have multiple registered vehicles but only one active vehicle at a time (set via POST /drivers/my-status).

Only the serviceType on the vehicle determines which ride types a driver is eligible for during matching.


List vehicles

GET /api/my-vehicles 🔒 DRIVER

Returns all vehicles registered to the authenticated driver.

Response 200 OK

json [ { "make": "Toyota", "model": "Camry", "registrationNumber": "ABCD 123", "year": 2022, "registeredAt": "2024-01-15", "seatingCapacity": 5, "interiorType": "cloth", "color": "Silver" } ]


Add a vehicle

POST /api/my-vehicles 🔒 DRIVER

Registers a new vehicle under the authenticated driver.

Request body

json { "make": "Toyota", "model": "Camry", "registrationNumber": "ABCD 123", "year": 2022, "registeredAt": "2024-01-15", "seatingCapacity": 5, "interiorType": "cloth", "color": "Silver" }

Field Type Notes
make string Manufacturer name
model string Model name
registrationNumber string Must be unique across all vehicles
year int Model year
registeredAt date (YYYY-MM-DD) Registration date
seatingCapacity int Total passenger seats
interiorType string e.g. cloth, leather
color string Vehicle color

Response 200 OK — the created VehicleDTO


Update a vehicle

PATCH /api/my-vehicles/{vehicleID} 🔒 DRIVER

Updates an existing vehicle. All fields in the request body replace the current values.

Path parameter: vehicleID

Request body — same schema as add vehicle

Response 200 OK — the updated VehicleDTO


Delete a vehicle

DELETE /api/my-vehicles/{vehicleID} 🔒 DRIVER

Removes a vehicle from the driver's fleet.

Path parameter: vehicleID

Response 200 OK — the deleted VehicleDTO