This endpoint returns all reservations that have not yet been accepted by a lawyer — every document whereDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/despacho-backend/llms.txt
Use this file to discover all available pages before exploring further.
reservation_accepted is false. These are incoming client requests that are still awaiting review. Results are sorted by _id in descending order (newest first) and are paginated via the Paginate middleware using URL path parameters.
Endpoint
Authentication
Required. Include a valid JWT in theAuthorization header as a Bearer token.
Pagination
Pagination is controlled by two optional URL path parameters passed to thePaginate middleware before the main handler runs:
| Parameter | Location | Default | Description |
|---|---|---|---|
perpage | req.params.perpage | 10 | Number of records to return per page. |
pag | req.params.pag | 0 | Current page number. Pages greater than 1 are offset by pag - 1 (e.g., page 2 skips the first perpage records). Page 1 or any value ≤ 1 starts from the beginning (skip 0). |
req.body.skippag (how many records to skip) and req.body.limit (how many to return). These are used directly in the Mongoose query.
Request Body
No request body fields are required. Pagination is derived from URL path parameters as described above.Example Request
Response
200 — Success
A human-readable status message. Value:
"Cargando reservas no aceptadas".true when the request was handled successfully.Array of
FormReserve documents with reservation_accepted: false, sorted newest first.Pagination metadata for the current response.
401 — Missing Token
403 — Expired Token
403 — Invalid Token
Returned when the token fails signature verification or is otherwise malformed.404 — Lawyer User Not Found
Returned by the Token middleware when the token is valid but the associated lawyer user no longer exists in the database.500 — Server Error
Returned when an unexpected error occurs on the server. The response body is the raw error object thrown by the server.Use this endpoint as your primary queue for reservations that need attention. A high
pags value relative to the accepted list indicates a backlog of unreviewed client requests. Combine this endpoint with the Accept Reservation endpoint to process pending reservations one by one.