Players
GET /players
Retrieves a list of all registered players in the system. Typically used for admin dashboards, analytics, or player selection flows.
Endpoint
Responses
200
Players retrieved successfully.
[
{
"playerStatus": "string"
"createdAt": "string"
"coins": "integer"
"playerId": "string"
"gameCredits": "object"
"email": "string"
"name": "string"
"prizes": "array"
"establishmentId": "string"
}
]
400
Invalid query or request format.
500
Server error while retrieving players.
POST /players
Registers a new player within an establishment. A minimal payload includes name and associated establishment.
Endpoint
Request Body
{
"establishmentId": "string" // required
"name": "string" // required
"email": "string"
}
Atributo | Tipo | Requerido | Descripción |
---|---|---|---|
establishmentId | string | Sí | |
name | string | Sí | |
string | No |
Responses
200
Player created successfully.
500
Error creating new player.
GET /players/[playerId]
Retrieves a specific player's data including contact info and account status.
Endpoint
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí |
Responses
200
Player information retrieved successfully.
{
"playerStatus": "string"
"createdAt": "string"
"coins": "integer"
"playerId": "string"
"gameCredits": "object"
"email": "string"
"name": "string"
"prizes": "array"
"establishmentId": "string"
}
400
Malformed player ID.
404
Player not found.
500
Error retrieving player data.
PUT /players/[playerId]
Updates a player's name, status, or email. Intended for use in account management tools or user support operations.
Endpoint
Request Body
{
"name": "string" // required
"playerStatus": "string" // required
"email": "string"
}
Atributo | Tipo | Requerido | Descripción |
---|---|---|---|
name | string | Sí | |
playerStatus | string | Sí | |
string | No |
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí |
Responses
200
Player updated successfully.
400
Invalid or incomplete update data.
404
Player not found.
500
Server error during update.
DELETE /players/[playerId]
Deletes a player account by ID. This operation is irreversible and should only be used with caution.
Endpoint
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí |
Responses
200
Player deleted successfully.
400
Invalid player ID.
404
Player not found.
500
Server error while deleting player.
GET /players/[playerId]/tournament-position
Retrieves the current tournament leaderboard position of a player. May be used for showing ranking progress in a live campaign.
Endpoint
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí |
Responses
200
Tournament position retrieved.
400
Invalid player ID.
500
Failed to fetch tournament position.