Coins
PUT /coins
Adjusts the virtual coin balance for a specific player.
Allows incrementing or decrementing the balance using the add or subtract operation.
Optionally, a campaign can be linked to the transaction.
Endpoint
PUT/coins
Request Body
{
"establishmentId": "string" // required
"playerId": "string"
"change": "integer" // required
"operation": "string" // required
"campaign": "string"
}| Atributo | Tipo | Requerido | Descripción |
|---|---|---|---|
| establishmentId | string | Sí | |
| playerId | string | No | |
| change | integer | Sí | |
| operation | string (add, subtract) | Sí | |
| campaign | string | No |
Responses
200
Coin balance updated successfully.
{
"message": "Coin balance updated"
}400
Invalid request payload or balance constraints.
{
"message": "Not enough balance in establishment"
}500
Internal server error during coin adjustment.