Players

Players

GET /players

Retrieves a list of all registered players in the system. Typically used for admin dashboards, analytics, or player selection flows.

Endpoint

GET/players

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

POST/players

Request Body

{
  "establishmentId": "string" // required
  "name": "string" // required
  "email": "string"
}
AtributoTipoRequeridoDescripción
establishmentIdstring
namestring
emailstringNo

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

GET/players/{playerId}

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath

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

PUT/players/{playerId}

Request Body

{
  "name": "string" // required
  "playerStatus": "string" // required
  "email": "string"
}
AtributoTipoRequeridoDescripción
namestring
playerStatusstring
emailstringNo

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath

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

DELETE/players/{playerId}

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath

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

GET/players/{playerId}/tournament-position

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath

Responses

200

Tournament position retrieved.

400

Invalid player ID.

500

Failed to fetch tournament position.