All protected endpoints require a valid JWT token obtained fromDocumentation 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.
POST /api/users/login. Include it in the Authorization header:
Service Orders
Manage the vehicle service queue — from creation through laundrer assignment to completion.Order State Reference:
EN_ESPERA— Vehicle is waiting in the reception queue (set manually at creation)LAVANDO— Vehicle is actively being washed (set byPATCH /api/service-orders/:id/start)FINALIZADO— Wash is complete (set byPATCH /api/service-orders/:id/finishor the/stateendpoint)En cola— Auto-queued from a customer web order viaPOST /api/customer/orders(not yet assigned to a laundrer)CANCELLED— Order was cancelled when its parent customer order was rejected
FINALIZADO, the system automatically decrements inventory for any items linked as resources to the service definition (ServiceResource records).Get All Service Orders
Public endpoint — no authentication required. Returns all service orders, optionally filtered by date, vehicle, user, or laundrer. Supports pagination whenpage and limit are both supplied.
Filter by date in
YYYY-MM-DD format. Returns all orders created on that calendar day.Filter orders by vehicle UUID.
Filter orders by the UUID of the receptionist or admin who created them.
Filter orders by the UUID of the assigned laundrer.
Page number for paginated results (requires
limit).Number of records per page (requires
page). When both are omitted, all records are returned.page/limit are supplied):
UUID of the service order.
Current state:
EN_ESPERA, LAVANDO, FINALIZADO, En cola, or CANCELLED.ISO 8601 datetime when the wash started (or was scheduled to start).
ISO 8601 datetime of the estimated completion.
ISO 8601 datetime when the wash actually finished.
null until finalized.Optional note left by the receptionist.
Nested vehicle object (
plate, mark, model, color, year).Nested service object (
name, priceUsd, stimatedTimeMin).Nested user object for the assigned laundrer.
null until a laundrer is assigned.page and limit are provided):
Create a Service Order
🔒 Requires:ADMIN role
Creates a new service order in the reception queue.
Initial state for the order. Typically
EN_ESPERA when created directly from reception.ISO 8601 datetime for when the service is scheduled to begin (e.g.
2026-06-26T10:00:00.000Z).ISO 8601 datetime for the estimated end time.
UUID of the vehicle being washed.
UUID of the service to be performed (e.g.
"Lavado Básico").UUID of the receptionist or admin creating the order.
Optional note about special customer requests or vehicle condition.
Update Order State
🔒 Requires:ADMIN role
Manually sets the state of any service order to an arbitrary value. For structured workflow transitions, prefer the dedicated /start and /finish endpoints.
UUID of the service order to update.
The new state value. Common values:
EN_ESPERA, LAVANDO, FINALIZADO.Start a Service Order (Assign Laundrer)
🔒 Requires:ADMIN role
Assigns a laundrer to the order and transitions its state to LAVANDO. Records timeStart as the actual wash-start timestamp and automatically marks the laundrer as isWorkingToday: true with lastShiftStart set to now.
UUID of the service order.
UUID of the laundrer (User with role
LAUNDRER) to assign to this order.state: "LAVANDO" and laundrerId set:
Finish a Service Order
🔒 Requires:ADMIN role
Marks a service order as complete. Sets state to FINALIZADO, records timeEnd as the current timestamp, and automatically decrements inventory for any items listed as service resources (ServiceResource records linked to the service).
UUID of the service order to finalize.
state: "FINALIZADO" and timeEnd populated:
Delete a Service Order
🔒 Requires:ADMIN role
Permanently deletes a service order record from the database. This action is irreversible.
UUID of the service order to delete.
Laundrer Shift Management
Control which laundrers are active and counted in the wait-time algorithm and daily payroll calculations.Start a Laundrer’s Shift
🔒 Requires:ADMIN role
Marks a laundrer as working today by setting isWorkingToday = true and recording lastShiftStart. Active laundrers are included in the estimated wait-time algorithm and the daily payroll pool.
UUID of the laundrer (User with role
LAUNDRER).End a Laundrer’s Shift
🔒 Requires:ADMIN role
Marks a laundrer as off-shift by setting isWorkingToday = false. The laundrer will no longer be counted in the wait-time estimate or the daily payroll pool.
UUID of the laundrer.
Get Estimated Wait Time
Public endpoint — no authentication required. Returns the dynamic estimated wait time based on the current queue depth and the number of laundrers who are actively on shift (isWorkingToday: true). This endpoint powers the customer-facing waiting display.
Estimated minutes until the next available laundrer is free to start a new vehicle.
Total estimated minutes until the last vehicle currently in the queue is finished.
Number of laundrers currently on shift (
isWorkingToday: true).Number of orders currently in an active queue state.
If
activeLaundrers is 0, the wait time calculation cannot proceed. Ensure at least one laundrer has started their shift before opening the queue.