The Reservations module lets customers schedule car wash appointments in advance. Customers have scoped visibility — they can only read and manage their own reservations, and the system validates that they can only book services for vehicles registered to their account. Admins have unrestricted access to all reservations.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.
Auto-queue cron integration: Reservations with status
CONFIRMED are
automatically converted into service orders (placed in queue) by a scheduled
cron job. The cron runs between 6:30 AM and 12:00 PM VET (Venezuela Time,
UTC-4) and picks up any confirmed reservation whose scheduled date falls
within the next 60 minutes. Once processed, the reservation status is updated
to COMPLETED.Endpoints
POST /api/reservations
Create a new reservation for a specific vehicle and service. Each time slot (exactdate) has a maximum capacity of 2 non-cancelled reservations — the endpoint will reject a third booking at the same exact datetime.
When an ADMIN creates a reservation it is automatically set to CONFIRMED. When a CUSTOMER creates one it starts as PENDING and requires admin confirmation before the cron can process it.
Authentication: Requires ADMIN or CUSTOMER role.
Request Body
Desired appointment datetime in ISO 8601 format, e.g.
"2026-06-27T10:00:00.000Z". The exact datetime is used to check slot
capacity — two reservations at the same instant are the maximum allowed.UUID of the vehicle to be serviced. If the caller is a CUSTOMER, the vehicle
must be registered under their account — otherwise the request is rejected with
a 400 error.
UUID of the service to be performed (e.g. Lavado Completo).
ADMIN-only. Override which customer the reservation is created for. When
called by a CUSTOMER, this field is ignored — the token identity is always
used.
| Status | Condition |
|---|---|
400 | Missing required fields |
400 | Customer trying to book a vehicle that doesn’t belong to them |
400 | Time slot already at capacity (2 non-cancelled reservations) |
401 | Missing or invalid JWT |
403 | Caller does not have ADMIN or CUSTOMER role |
GET /api/reservations
List reservations. Admins receive all reservations in the system; Customers receive only their own. Results are ordered bydate ascending.
Authentication: Requires ADMIN or CUSTOMER role.
Query Parameters
Filter by calendar day. Returns all reservations whose
date falls within
that day (00:00:00 to 23:59:59). If omitted, the full historical list is
returned.PUT /api/reservations/:id
Update an existing reservation. Customers may only modify their own reservations, and are restricted to settingstatus to CANCELLED. Admins can update any field and set any status.
If the date is changed, the new slot is validated against the 2-reservation capacity limit before saving.
Authentication: Requires ADMIN or CUSTOMER role.
Path Parameters
UUID of the reservation to update.
Request Body (all fields optional)
New appointment datetime. A capacity check is performed on the new slot.
ADMIN only for status changes other than
CANCELLED.New vehicle UUID. If the caller is a CUSTOMER, the new vehicle must belong to
them.
New service UUID.
New reservation status. Customers may only set this to
CANCELLED. Admins
can set any valid status: PENDING, CONFIRMED, COMPLETED, or CANCELLED.| Status | Condition |
|---|---|
400 | Reservation not found |
400 | Customer trying to update another user’s reservation |
400 | Customer trying to set a status other than CANCELLED |
400 | Customer trying to reassign to a vehicle they don’t own |
400 | New time slot already at capacity |
DELETE /api/reservations/:id
Soft-delete a reservation. This endpoint does not physically remove the row from the database — it setsstatus to CANCELLED to preserve the historical record. Customers may only cancel their own reservations.
Authentication: Requires ADMIN or CUSTOMER role.
Path Parameters
UUID of the reservation to cancel.
| Status | Condition |
|---|---|
400 | Reservation not found |
400 | Customer trying to delete another user’s reservation |
Reservation Object Reference
| Field | Type | Description |
|---|---|---|
id | string | UUID of the reservation |
date | string | ISO 8601 datetime of the scheduled appointment |
status | string | Current status — see statuses below |
carId | string | UUID of the vehicle being serviced |
car | object | Vehicle details: plate, mark, model |
serviceId | string | UUID of the requested service |
service | object | Service details: name, stimatedTimeMin |
userId | string | UUID of the customer who owns the reservation |
user | object | Customer name and lastName |
createdAt | string | ISO 8601 timestamp when the reservation was created |
Reservation Statuses
| Status | Description |
|---|---|
PENDING | Created by a customer, awaiting admin confirmation |
CONFIRMED | Confirmed by an admin; eligible for auto-queue processing |
COMPLETED | Cron job has successfully converted this into a service order |
CANCELLED | Soft-deleted by the customer or admin — slot is freed |