Winday - Help Center
HomepageLogin Brand Panel
English
English
  • What is Winday
  • Getting Started
  • Create Campaigns
    • Create Instant Game
      • Discount Codes
    • Create Tournament Game
      • Booster Codes
    • Supervised Setup
  • Publish Campaigns
    • Game link
    • QR Code
    • Connect to custom domain (Change CNAME)
    • Publish on Website
      • Manual Installation
      • Shopify
      • WordPress
      • Joomla
    • Publish in Mobile App
      • WebView
      • Unity
    • Publish in Telegram Bot
    • Winday Club Visibility
    • Winday Club Brand Page
  • Analytics
    • Built-in Analytics
    • Google Analytics
  • Winday Account
    • User Account
    • Brand Settings
      • Brand Verification
    • Payment Plan
  • API
    • Booster Codes API
  • FAQ & Tutorials
    • FAQ
    • Video Tutorials
  • Releases
    • Dec 2024 - Brand Landing Page, Localization, Partner Program, and Much More
    • Aug 2024 - New Features, New Publishing Options
  • Legal
    • Terms of Service
    • Privacy Policy
    • Cookies
Powered by GitBook
On this page
  • Getting Started
  • Developer Guide
  • Retrieve Game Secret Key
  • Set New Game Secret Key
  • Requests for external integration

Was this helpful?

  1. API

Booster Codes API

PreviousPayment PlanNextFAQ

Last updated 3 days ago

Was this helpful?

The Booster Codes API feature enables the automatic distribution of booster codes through API requests.

Getting Started

To use this feature, please follow the steps below:

  1. Create a Tournament game with Booster Codes enabled.

  2. 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).

  1. Then, open the Integration tab and click the Setup button in the Booster Codes API section.

  1. Copy the secret key* provided in the popup, and use the detailed instructions in our Help Center.

*Please note that the secret key automatically updates when a game is published or republished. You can also manually reset the secret key at any time. Once reset, a new secret key will be generated and assigned to the game, making the previous key invalid.

Developer Guide

API host

Retrieve Game Secret Key

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

Set New Game Secret Key

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

Requests for external integration

Check the number of boosters left

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

Claim booster

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
https://discounter-mania-api.com/apidiscounter-mania-api.com