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",
"playerId": "string",
"change": 0,
"operation": "add",
"campaign": "string"
}| Attribute | Type | Required | Description |
|---|---|---|---|
| establishmentId | string | Yes | |
| playerId | string | No | |
| change | integer | Yes | |
| operation | string [add, subtract] | Yes | |
| campaign | string | No |
Responses
200
Coin balance updated successfully.
{
"message": "Coin balance updated"
}| Attribute | Type | Required | Description |
|---|---|---|---|
| message | string | No |
400
Invalid request payload or balance constraints.
{
"message": "Not enough balance in establishment"
}| Attribute | Type | Required | Description |
|---|---|---|---|
| message | string | No |
500
Internal server error during coin adjustment.