Skip to content

Invite codes

Fizz Crew is the Fizz referral program. An invite code links a new player to the player who invited them.

Only at signup

A code can be given only when the player is created, via invite_code in /api/signup. Existing players enter a code themselves in their Account on the website. This is not possible from the terminal.

Code format

Property Value
Length 8 characters
Characters Uppercase letters and digits, without the look-alikes 0, O, 1, I, L
Example K7PM2QXA

Codes are case-insensitive, and dashes and spaces are ignored. You can send exactly what the player typed: k7pm-2qxa works the same as K7PM2QXA.

Check an invite code

POST /api/referrals/check

Field Required Description
invite_code yes Code typed by the player
terminal_ID yes Terminal ID
curl -X POST https://<fizz-api-host>/api/referrals/check \
  -H "Content-Type: application/json" \
  -d '{"invite_code": "k7pm-2qxa", "terminal_ID": "70790473203088"}'
{ "status": "success", "data": { "code": "K7PM2QXA" } }
{ "status": "failure", "error": "invite_code_invalid" }

data.code is the normalized code. Show it to the player for confirmation, then pass it to /api/signup as invite_code.

Errors

error Suggested text for the player
invite_code_invalid This invite code does not exist.
program_unavailable Invite codes are not available right now.
terminal_not_found Terminal configuration problem, not shown to the player
sequenceDiagram
    participant P as Player
    participant K as Kiosk
    participant B as Fizz backend
    P->>K: Types invite code
    K->>B: POST /api/referrals/check
    alt Valid
        B-->>K: {"status":"success","data":{"code":"K7PM2QXA"}}
        K->>P: Shows K7PM2QXA for confirmation
        K->>B: POST /api/signup with invite_code
        B-->>K: New player
    else Invalid
        B-->>K: {"status":"failure","error":"invite_code_invalid"}
        K->>P: Shows the error, lets the player retry or skip
    end

Getting a code for testing

There is no endpoint that generates a code. Each player gets their own code the first time they open Referrals on the website.

  1. Create a player on the kiosk with /api/signup, without invite_code. This is the inviter.
  2. Log in on the website with that player's PIN and open Referrals. The code is shown there.
  3. Create another player on the kiosk with that code.

Note

A player cannot use their own code, so testing needs two different players. The inviter and the new player can be from different shops.