Booster Codes API
Last updated
Was this helpful?
Last updated
Was this helpful?
The Booster Codes API feature enables the automatic distribution of booster codes through API requests.
To use this feature, please follow the steps below:
Create a Tournament game with Booster Codes enabled.
Navigate to the Tournament Details page, open the Published Links tab, and find Game ID (you will need it later to enable automatic distribution of booster codes through API requests).
Then, open the Integration tab and click the Setup button in the Booster Codes API section.
Copy the secret key* provided in the popup, and use the detailed instructions in our Help Center.
Returns the current game secret key for external integrations.
GET {apiHost}/Games/{gameId}/secret-key
HTTP 200 - Returns the decrypted secret key { data: “secret-key-goes-here” }
HTTP 404 - Game not found
HTTP 403 - User does not have access to this brand, or the brand creation is not completed
HTTP 400 (inner code 1083) - Game secret key error
HTTP 400 (inner code 1048) - Payment plan restriction
A new secret key is generated and assigned to the game, and an old key becomes invalid.
PUT {apiHost}/Games/{gameId}/secret-key
HTTP 200 - Returns the decrypted secret key { data: “secret-key-goes-here” }
HTTP 404 - Game not found
HTTP 403 - User does not have access to this brand, or the brand creation is not completed
HTTP 400 (inner code 1083) - Game secret key error
HTTP 400 (inner code 1048) - Payment plan restriction
This request is recommended to make sure that there are available boosters in the tournament.
If no boosters are left, it will be impossible to claim a booster code.
GET {apiHost}/tournamentGames/external/{gameId}/boosters/amount
Parameters:
gameId (string) — Game ID
Headers:
X-Api-Key (string) — Game secret key, used for authorization (can be retrieved from the Game details in the Games Admin Panel)
Responses:
HTTP 200 { amount: number }
HTTP 400 { status: “1078”, message: “Game is not active” }
HTTP 403 { status: “1082”, message: “Invalid Secret Key” }
HTTP 404 { status: “1044”, message: “Game not found” }
HTTP 500 - Internal Server Error (General server error, retry later)
HTTP 400 (inner code 1048) - Payment plan restriction
It is used to receive a booster code.
This booster code should be passed to the user in any appropriate way:
sent by email,
printed on a receipt, etc.
PUT {apiHost}/tournamentGames/external/{gameId}/boosters/claim
Body: empty object or null
Parameters: gameId (string) — Game ID
Headers: X-Api-Key (string) — Game secret key, used for authorization (can be retrieved from the Game details in the Games Admin Panel)
Responses:
HTTP 200 { code: string, boostMultiplier: number }
code - a code string, that should be used to play tournament game.
boostMultiplier - a multiplier that will be applied to the player’s points after the game played with a booster.
HTTP 400 { status: “1078”, message: “Game is not active” }
HTTP 400 { status: “1079”, message: “No promo codes left” }
HTTP 403 { status: “1082”, message: “Invalid Secret Key” }
HTTP 404 { status: “1044”, message: “Game not found” }
HTTP 500 - Internal Server Error (General server error, retry later)
HTTP 400 (inner code 1048) - Payment plan restriction