Player transfers in Gestor Deportivo follow a two-step approval process. The source team’s owner initiates the request, and the destination team’s owner must explicitly accept it before the player moves. This ensures that no player can be transferred without consent from both sides, and every transfer is logged in a permanentDocumentation 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.
TransferPlayer record for audit purposes.
Transfer workflow
Source team owner initiates the transfer
The owner of the team where the player currently plays sends the transfer request, specifying the destination team.
On success, the API returns the new
| Path parameter | Description |
|---|---|
:playerId | ID of the player being transferred |
:sourceTeamId | ID of the team the player is currently on |
| Body field | Description |
|---|---|
destinationTeamId | ID of the team that should receive the player |
TransferPlayer document. Note the _id — you may need it for auditing, though the acceptance step uses the destination team ID directly.Deduplication check
The API automatically checks whether a pending transfer already exists for this player between the same two teams. If one does, the request returns an HTTP
203 with an informational message rather than creating a duplicate record. No further action is needed on your part — the original transfer request remains active.TransferPlayer record is created
When the transfer is accepted, a
TransferPlayer document is persisted linking three sub-documents:player— a snapshot of the player’s profile at the time of transfercurrentTeam— the source team the player is leavingtargetTeam— the destination team the player is joining
acceptsTransfer field is initially false and flips to true once the destination team owner accepts.Destination team owner accepts the transfer
The owner of the receiving team approves the incoming transfer. This is the action that physically moves the player.
Roster and player record are updated
On a successful acceptance, the API performs three operations atomically:
- Removes the player from the source team’s roster array
- Adds the player to the destination team’s roster array
- Updates the player’s own
teamIdarray to reflect the new club
TransferPlayer record’s acceptsTransfer field is also set to true, preserving a complete history of the move.Curl examples
Initiate a transfer
Accept a transfer
Error reference
| Scenario | HTTP status | Description |
|---|---|---|
| Duplicate pending transfer exists | 203 | A transfer for this player between the same teams is already pending. The existing request remains active. |
| Player not found | 404 | No player exists with the given :playerId. Verify the ID and try again. |
| Source or destination team not found | 404 | One of the team IDs is invalid. Check both :sourceTeamId and destinationTeamId. |
| Caller is not the destination team owner | 403 | Only the owner of the destination team can call the accept endpoint. Ensure you are authenticating with the correct account. |
Every transfer — whether pending or accepted — is stored as a
TransferPlayer record. This gives you a complete audit trail of all player movements across your organisation. You can use these records to reconstruct a player’s club history, verify past transfers, or resolve disputes about roster eligibility.