Gamification
Missions, event ingestion, XP and levels, streaks, battle-pass seasons, chests and leaderboards, and how their rewards settle through Rewards.
The Gamification service turns what your players do into progress. You describe the activity you care about as events, author missions that react to those events, and send the events as they happen. Tanitar counts progress, completes missions, grants XP, advances levels and streaks, fills battle-pass tiers, hands out chests and ranks players on leaderboards. Anything that moves value, such as currency or a badge, is paid through Rewards so it lands in the same ledger as every other reward.
Every route on this page is called with an API key against GAMIFICATION_API_URL. Everything is
scoped to your tenant: the tenant comes from the key, never from a request body.
The building blocks
| Concept | What it is |
|---|---|
| Event | A named fact about one player, such as match:won, with a typed payload. You declare its shape in the event registry, then send occurrences of it. |
| Mission | A rule: "when event X matching these conditions happens N times in this period, pay these rewards". Missions are authored, then approved by a second principal before players see them. |
| Progress | Per-player, per-mission counters, scoped to the mission's cadence (once ever, per UTC day, per UTC week, or up to a fixed number of occurrences). |
| XP and levels | XP accumulates from mission rewards, chest drops and battle-pass tier rewards. Levels come from a level curve you can author; a default curve applies until you do. |
| Streak | The number of consecutive UTC days on which a player completed at least one mission. Streaks of 3, 7, 14 and 30 days pay a chest. |
| Battle-pass season | A time-boxed track of tiers with free and premium rewards. Players earn battle-pass XP and claim tiers they reach. |
| Chest | An item in a player's inventory that the player opens for random drops, rolled on drop tables with a pity floor. |
| Leaderboard | A ranking of mission XP for the current UTC day, UTC week or all time, by player or by team. |
How the pieces fit
flowchart LR A["Organizer backend"] -->|"POST event"| B["Event ingestion"] B --> C["Mission progress"] C -->|"mission completed"| D["XP, level, streak"] C -->|"battle-pass XP"| E["Battle-pass season"] C -->|"chest reward"| F["Chest inventory"] C -->|"currency or badge"| G["Rewards grant"] E -->|"tier claim"| G F -->|"chest opened"| G D --> H["Leaderboards"] G -->|"settled outcome"| C
- You register an event and publish it, then author missions against it. See Catalog authoring.
- Your backend sends each occurrence with an
Idempotency-Key. See Event ingestion. - Tanitar advances every matching mission for that player in one transaction. A mission that reaches its target completes exactly once and pays its rewards.
- You read a player's level, XP, streak and mission progress, and can replay retained history when you publish a mission late. See Progress, XP and levels.
- Seasons, chests and leaderboards build on the same completions. See Seasons and chests and Leaderboards.
How mission rewards settle
A mission declares one or more rewards. Each type is paid in a different place:
rewardType | Where it is paid |
|---|---|
xp | Inside Gamification, in the same transaction as the completion. |
battlePassXP | Inside Gamification, toward the active season. With no active season the slot is recorded as rejected; the mission still completes. |
chest | Inside Gamification: a chest of the tier named in key (common, rare, epic, legendary) is added to the player's inventory. |
currency | Sent to Rewards as a grant of amount in the currency named in key. The currency must be one you have published. |
badge | Sent to Rewards as an award of the badge named in key. |
nft and token are accepted by the request shape but refused when the mission is written.
A completion that pays currency is held until Rewards answers. When the grant is applied or rejected, the completion is published with the outcome. If no answer arrives within the grant timeout (15 minutes by default), the completion is settled as a terminal failure; a late answer is still recorded and published as a correction rather than dropped. A rejected grant is a settled outcome, never a lost reward. See Grants.
A completion that was itself caused by a gamification payout does not request a second grant: if a
mission reacts to the reward:granted event that another mission's payout produced, its currency reward is
recorded as rejected instead of being sent. This stops reward loops.
Scopes
| Scope | What it allows |
|---|---|
gamification-config:mutate | Register, archive and delete events in the event registry. |
gamification-catalog:author | Author missions and battle-pass seasons; read the catalog and the event registry; read and replace the level curve, membership-tier settings, chest economy and chest settings. |
gamification-catalog:approve | Approve a mission, which publishes it. |
gamification-events:ingest | Send events. |
gamification-progress:read | Read a player's progress and the leaderboards. |
gamification-progress:replay | Replay a player's retained history, and grant a chest to a player. |
Issue the authoring and approving scopes to different API keys: an approval made by the principal that last wrote the mission is refused. See API keys and scopes.
What your players see
Players reach their own gamification data through the hosted experience, on the Player plane
(routes under /player/v1/gamification), authenticated with their own player credential rather than your
API key. They see published missions, their progress, level and streak, their chest inventory and
pity meter, the active battle-pass season, and the leaderboards; they open chests and claim tiers
themselves. See Player identity.
Events you can receive
Gamification publishes gamification.mission.completed, gamification.progress.updated,
gamification.xp.granted, gamification.streak.advanced, gamification.chest.opened,
gamification.battle-pass.progressed and gamification.battle-pass.tier-claimed. Subscribe to
them with a webhook endpoint; the payloads are in the event catalog.
Results and evidence
Report, correct and revert match results, read result history, handle forfeits, collect and review evidence, purge evidence media, and read standings.
Catalog authoring
Register the events you send, author missions against them, have a second key approve them, and configure the level curve and membership-tier settings.