Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Luisangelebp/SCO_Autolavados/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Vehicles API is split into two resource groups:- Vehicle Types (
/typecars) — Category definitions such as Sedán, Camioneta, or Moto. Each car and each service is linked to a vehicle type. - Cars (
/cars) — Individual vehicles registered in the system, linked to an owner (User) and a vehicle type.
When a
CUSTOMER role creates a car via POST /api/cars, the server automatically forces ownerId to match the authenticated user’s own ID, regardless of what value is sent in the request body. Only an ADMIN can assign a car to an arbitrary owner.Car Object
UUID primary key.
License plate — unique across the system (e.g.
ABC12D).Vehicle brand / manufacturer (e.g.
Toyota, Ford).Vehicle model name (e.g.
Corolla, Ranger).Vehicle color.
Model year. Optional — may be
null if not provided.Free-text notes about the vehicle (e.g. special instructions for the wash crew).
Timestamp of when the vehicle was registered.
UUID of the owning User.
Embedded subset of the owner User object:
{ id, name, lastName, ... }.UUID of the associated TypeCar category.
Embedded TypeCar object:
{ id, name }.Vehicle Types (TypeCars)
GET /api/typecars
Returns the full list of registered vehicle type categories. No authentication required.
200 OK:
UUID of the vehicle type. Use this as
typeCarId when registering a car or creating a service.Human-readable category name. Unique across the system.
POST /api/typecars ADMIN
Creates a new vehicle type category.
Name of the new vehicle type. Must be unique (e.g.
Sedán, Camioneta, SUV, Moto).201 Created:
PUT /api/typecars/:id ADMIN
Updates the name of an existing vehicle type.
UUID of the vehicle type to update.
New name for the vehicle type.
200 OK:
DELETE /api/typecars/:id ADMIN
Permanently deletes a vehicle type. The deletion is blocked if any cars or services are currently linked to this type.
UUID of the vehicle type to delete.
200 OK:
400 Bad Request — Type is still in use:
Cars
GET /api/cars
Returns all registered vehicles, ordered by most recently created. Each car includes its full owner and type details. No authentication required.
200 OK:
GET /api/cars/:plate
Looks up a single vehicle by its license plate. Useful for the reception desk auto-fill flow when a returning customer arrives.
Exact license plate string to look up (e.g.
ABC12D). The lookup is exact-match — case and formatting must match what was used at registration.200 OK:
404 Not Found:
POST /api/cars Any authenticated user
Registers a new vehicle. Requires a valid JWT token from any role.
License plate string. Must be unique across the system. Any duplicate will be rejected with a
400 error.Vehicle brand / manufacturer name.
Vehicle model name.
Vehicle color.
Model year as an integer (e.g.
2020). Optional.UUID of the user who owns this vehicle. Ignored for
CUSTOMER role — the server substitutes their own authenticated user ID automatically.UUID of the vehicle type category. Obtain valid UUIDs from
GET /api/typecars.Optional free-text note (e.g. special wash instructions). Optional.
201 Created:
400 Bad Request — Plate already exists:
PUT /api/cars/:id
Updates one or more fields of an existing vehicle record. This endpoint has no authentication requirement — any caller can submit an update.
UUID of the vehicle to update.
New license plate (must remain unique).
New brand / manufacturer.
New model name.
New color.
New model year.
Updated notes.
UUID of the new owner (transfer ownership).
UUID of the new vehicle type category.
200 OK: Updated Car object.