Players¶
Create a player¶
POST /api/signup
Creates a new player in the terminal's shop. An initial deposit, promo code and invite code are all optional and can be applied in the same call.
| Field | Required | Description |
|---|---|---|
terminal_ID |
yes | Terminal ID |
deposit_amount |
no | Initial deposit, taken from the shop balance |
promo_code |
no | Promo code, see Promo codes |
invite_code |
no | Fizz Crew invite code of the player who invited this one, see Invite codes |
curl -X POST https://<fizz-api-host>/api/signup \
-H "Content-Type: application/json" \
-d '{"terminal_ID": "70790473203088", "deposit_amount": 30, "invite_code": "K7PM2QXA"}'
{
"status": "success",
"user": { "id": 12345, "user_code": "17-42-93-08-65-21" },
"promo": {
"applied": true,
"code": "WELCOME",
"type": "DEPOSIT_MATCH",
"amount": 30.0,
"spins": null,
"percent": 100.0,
"max_amount": 200.0,
"min_deposit": 20.0,
"description": "100% deposit bonus: 30.00 bonus entries for a 30.00 deposit (up to 200.00). Minimum deposit 20.00."
}
}
user.user_codeis the player's PIN. For login, send it without the dashes:174293086521.promois present only whenpromo_codewas sent.
An invalid invite code blocks signup
If invite_code is invalid, the player is not created. Check it first with /api/referrals/check.
An invalid promo code does not block signup
The player is still created. The response then has promo.applied: false and the reason in promo.error.
Errors: terminal_not_found, no_shop, insufficient_shop_balance, invite_code_invalid, program_unavailable.
Login¶
POST /api/login
| Field | Required | Description |
|---|---|---|
username |
yes | Player PIN without dashes, e.g. 174293086521 |
terminal_ID |
yes | Terminal ID |
Logging in ends the player's other sessions on all devices.
Errors: invalid_credentials, account_blocked, terminal_not_found, player_not_registered_from_this_terminal.
Logout¶
POST /api/logout
Ends the player's session. Requires the token from login: