v1

latestOpenAPI 3.0.12026-07-24210349345.4 KB
Levels

Player Level and XP Progress

Current level, XP progress, and rewards for reaching the next level. Use this to render the XP progress bar and level badge.

Draw the progress bar as xpProgressInCurrentLevel / (xpForNextLevel - xpForCurrentLevel).

Reward references (currentLevelRewards[].rewardId, nextLevelRewards[].rewardId) resolve to the rewards catalog (match against id).

get/levels/brand/{brandId}/player/{playerId}

Path parameters

brandIdstring uuid required
Example:aebb6a6a-bdef-480f-8096-e13f9c3d4969

Brand UUID returned by GET /brands/default/{tenantId}.

playerIdstring required
Example:player-123

Your internal player/customer identifier.

Response

Player level state.

currentLevelinteger

Current level number (1-based).

levelNamestring

Display name for the current level (e.g. "Silver", "Gold").

levelIconstring nullable

URL to the current level badge icon. null if no icon configured.

nextLevelNamestring nullable

Display name for the next level. null if at max level.

nextLevelIconstring nullable

URL to the next level badge icon. null if no icon or at max level.

totalXpinteger

Cumulative XP earned across all levels.

xpForCurrentLevelinteger

Total XP threshold required to reach the current level.

xpForNextLevelinteger nullable

Total XP threshold required to reach the next level. null if at max level.

xpProgressInCurrentLevelinteger

XP earned since entering the current level. Use this to draw the progress bar: progress / (xpForNextLevel - xpForCurrentLevel).

maxLevelinteger

Highest level in the program.

isMaxLevelboolean

true when the player has reached the top level. Hide "next level" UI when this is true.