Use this file to discover all available pages before exploring further.
This endpoint returns every reservation stored in the database — both accepted and pending — sorted by _id in descending order so the most recently created records appear first. It is the broadest of the three list endpoints and is useful when you need a complete picture of all incoming and confirmed appointments without filtering by reservation_accepted status. Pagination is handled automatically by the Paginate middleware.
Pagination is controlled by two optional URL path parameters passed to the Paginate 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).
The middleware writes the computed values into req.body.skippag (how many records to skip) and req.body.limit (how many to return). These are used directly in the Mongoose query.
Returned when an unexpected error occurs on the server. The response body is the raw error object thrown by the server.
This endpoint is ideal for powering a dashboard overview or administrative reporting screen where staff need to see the full intake volume at a glance. To drill into specific subsets, use List Accepted to view confirmed appointments only, or List Pending to surface reservations that still need a lawyer’s review.