v1

latestOpenAPI 3.0.12026-07-24210349345.4 KB
Levels

All Level Tiers for a Player

Returns every level in the active level configuration with the same shape as the single-level endpoint, plus configuration metadata. Useful for rendering a full progress roadmap.

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

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

Array of level tiers for the player.

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.

levelConfigIdstring uuid

UUID of the level configuration this tier belongs to.

configNamestring

Name of the level configuration.

isMainboolean

true for the active/main config. Filter by this if needed.