Every list endpoint in Gestor Deportivo follows the same pagination pattern: page number and page size are embedded directly in the URL path, and every response includes aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/gestor-backend/llms.txt
Use this file to discover all available pages before exploring further.
pagination object so clients always know the total number of pages without a separate count request.
How it works
Paginated routes expose two optional URL path segments —:pag (page number) and :perpage (results per page) — appended after the base path:
Paginate middleware defaults to page 1 with 10 results per page.
The middleware translates these path parameters into skippag (the number of documents to skip in MongoDB) and limit (the maximum documents to return), then passes them to the controller via req.body.
Example URL
1 with 10 teams per page.
Response structure
Every paginated endpoint wraps its results in a consistent envelope:The array of resource objects for the current page.
The current page number as supplied in the URL.
The number of results returned on this page.
Total number of pages available, calculated as
Math.ceil(totalDocuments / perpage). Use this value to drive client-side pagination UI.Default behaviour
When:pag and :perpage are omitted, the middleware applies these defaults:
| Parameter | Default |
|---|---|
pag | 1 (first page) |
perpage | 10 results |
Paginated endpoints
Teams
POST /api/team/to-list/:pag?/:perpage?POST /api/team/search/-/team/:query/:pag?/:perpage?
Players
POST /api/player/to-alls(token required)POST /api/player/search-player/:query/:pag?/:perpage?POST /api/player/to-list-inactive/:activeParam/:pag?/:perpage?
Events
POST /api/event/list/:owner/:pag?/:perpage?POST /api/event/list-public/:pag?/:perpage?
Clubs
POST /api/club/list-clubs/:pag?/:perpage?
Games
POST /api/game/list/:satdeParams/:pag?/:perpage?
Reserves
POST /api/reserve/list/:eventId/reserve-accepts/:pag?/:perpage?POST /api/reserve/list/:typeStatus/reserves/:pag?/:perpage?
Notices
POST /api/notice/list-notice/:eventId/:pag?/:perpage?POST /api/notice/list-notice-home/:pag?/:perpage?
Users
POST /api/user/list-user/:adminId/:pag?/:perpage?POST /api/user/search/:query/:pag?/:perpage?