Skip to main content

Documentation 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.

Teams are the core organizational unit in Gestor Deportivo. Once you have an authenticated account, you can register one or more teams, build out your player roster, assign shirt numbers and positions, and keep everything up to date as your squad evolves throughout a season.

Full team setup workflow

1

Register a team

Send a multipart/form-data request with your team name, a short description, and optional image assets. The authenticated user becomes the team owner.
curl -X POST https://api.example.com/api/team/register-team \
  -H "Authorization: Bearer <token>" \
  -F "nameTeam=Los Halcones FC" \
  -F "description=Competitive amateur football club based in Guatemala City" \
  -F "teamImg=@/path/to/logo.png" \
  -F "bannerImg=@/path/to/banner.png"
A successful response returns the new team document including its _id, which you will use in all subsequent team operations.
2

Register players

Create player profiles before adding them to your roster. Each player requires personal details and an optional avatar image.
curl -X POST https://api.example.com/api/player/register \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "namePlayer": "Carlos Méndez",
    "genero": "Masculino",
    "height": 178,
    "municipality": "Guatemala",
    "departament": "Guatemala",
    "age": 24,
    "myPosition": "CM"
  }'
The response includes the player’s _id and an activation code sent to the associated account. Keep the playerId handy for the next step.
3

Activate a player

A newly registered player is inactive until the activation code is verified. Use the code returned during registration (or sent via email) to activate the player profile.
curl -X POST https://api.example.com/api/player/activate/<playerId>/player \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "483921"
  }'
Once activated, the player is eligible to be assigned to a team roster.
4

Add a player to your roster

Players join a team either by being added directly through a roster update or by completing a transfer workflow. After a transfer is accepted, the player is automatically linked to the destination team. See the Player Transfers guide for the full transfer flow.For direct roster assignment (when you own both the player profile and the team), proceed to the next step to assign the shirt number and position at the same time.
5

Assign shirt numbers and positions

Update the team’s player list to set each player’s shirt number and on-field position. You can update one or multiple players in a single request by passing an array.
curl -X POST https://api.example.com/api/team/updating/<teamId>/players \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "players": [
      {
        "_id": "<playerId>",
        "shirtNumber": 10,
        "position": "CAM"
      },
      {
        "_id": "<anotherPlayerId>",
        "shirtNumber": 1,
        "position": "GK"
      }
    ]
  }'
Only the team owner can call this endpoint. See the position codes table below for all valid position values.

Player position codes

Use one of the following codes in the position field when updating your roster. Codes follow standard football position abbreviations.
CodePositionLine
GKGoalkeeperGoalkeeper
CBCentre-BackDefender
LBLeft-BackDefender
RBRight-BackDefender
LWBLeft Wing-BackDefender
RWBRight Wing-BackDefender
CDMCentre Defensive MidfielderMidfielder
CMCentre MidfielderMidfielder
CAMCentre Attacking MidfielderMidfielder
LMLeft MidfielderMidfielder
RMRight MidfielderMidfielder
LWLeft WingerForward
RWRight WingerForward
CFCentre ForwardForward
STStrikerForward

Managing your teams

List your own teams

Retrieve all teams where the authenticated user is the owner.
curl -X POST https://api.example.com/api/team/to-list-own \
  -H "Authorization: Bearer <token>"
The response is a paginated array of team documents. Each document includes the roster, images, and metadata.

Update team information

Change the team name, description, or image assets at any time. Only the team owner can perform updates.
curl -X POST https://api.example.com/api/team/updating/<teamId>/team \
  -H "Authorization: Bearer <token>" \
  -F "nameTeam=Los Halcones United FC" \
  -F "description=Rebranded for the new season" \
  -F "teamImg=@/path/to/new-logo.png"
You can omit any field you do not want to change — only the fields you provide will be updated.

Search and browse teams

No authentication is required to search or list teams publicly.
# Search by name
curl -X POST https://api.example.com/api/team/search/-/team/halcones/1/10

# List all teams (page 1, 20 per page)
curl -X POST https://api.example.com/api/team/to-list/1/20

# Get a single team by ID
curl -X POST https://api.example.com/api/team/to/<teamId>/list-team
The :pag and :perpage path parameters are optional and default to the first page with a system-defined page size.

Removing players and teams

Remove a player from a team

Detaches a player from the roster without deleting the player profile. The player can subsequently be added to another team.
curl -X POST https://api.example.com/api/team/remove/<teamId>/-/<playerId>/player \
  -H "Authorization: Bearer <token>"
Only the team owner can remove players. This action detaches the player from this team’s roster immediately but does not delete their player profile from the system.

Delete a team

Permanently deletes the team and its associated data. This action cannot be undone.
curl -X POST https://api.example.com/api/team/remove/<teamId>/team \
  -H "Authorization: Bearer <token>"
Deleting a team removes all associated roster data. Ensure you have no active tournament reservations before deleting — cancelling reservations first is strongly recommended.

Membership limits

The number of teams and players you can manage depends on your account membership tier. Review the Memberships page for details on roster size limits, team quotas, and available features per plan.

Build docs developers (and LLMs) love