This endpoint returns all users stored in the database, sorted byDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/ecommerce-delivery/llms.txt
Use this file to discover all available pages before exploring further.
_id in descending order (newest first). Pagination is controlled through optional URL path parameters rather than query strings. The Paginate middleware computes the correct skip and limit values from those path segments before the controller runs.
Endpoint
Authorization: Bearer <token>
Path Parameters
The page number to retrieve. Defaults to
1 when omitted. Page 1 starts at the first record (skip = 0). For pages greater than 1, the middleware computes skip = (pag - 1) * perpage.The number of users to return per page. Defaults to
10 when omitted.Request Body
The request body is optional. No filter fields are currently applied by the active controller implementation. The body may be omitted or sent as an empty JSON object.Pagination Behaviour
ThePaginate middleware translates path parameters into req.body properties before the controller runs:
| Path parameter | Default | Computed value |
|---|---|---|
pag | 1 | req.params.pag |
perpage | 10 | req.body.limit |
| (derived) | — | req.body.skippag = (pag > 1 ? pag - 1 : 0) * perpage |
pagination.pags, calculated as Math.ceil(totalCount / perpage).
Response
200 — Members loaded
"Cargando miembros"true on success.Array of user documents for the requested page. Each document contains all active fields stored on the
user model (name, email, roles, status, address, phone_number, typeIdentification, identification, avatar, timestamps, etc.).Pagination metadata for the current response.
401 — No token provided
403 — Token expired or invalid
Examples
Default — first page, 10 per page
Page 2, 20 items per page
The
pag value in the pagination response object is the raw URL path parameter string. Cast it to a number in your client if you need to perform arithmetic on it.