Skip to main content

Data Model Reference

This page summarizes reusable objects returned by the Zeqa Network REST API.

Response Envelope​

FieldTypeDescription
errstring or nullnull on success. Contains an error message on failure.
resultobject or arrayEndpoint-specific data. May be omitted when err is present.

PlayerStats​

FieldTypeDescription
lifetimeLifetimeStatsLifetime account totals.
eloRecord<string, number>Ranked ELO values keyed by lowercase game key.
season_statsSeasonStatsCurrent season kill and death totals.
duel_statsRecord<string, DuelModeStats>Duel stats keyed by display-mode name.
ffa_statsRecord<string, FfaModeStats>FFA stats keyed by display-mode name.
rankingsRecord<string, number>Optional leaderboard placements when rankings=true.

LifetimeStats​

FieldTypeDescription
killsnumberLifetime kills.
deathsnumberLifetime deaths.
coinsnumberCoins value.
shardsnumberShards value.
bpnumberBattle-pass or progression points value.

SeasonStats​

FieldTypeDescription
killsnumberCurrent season kills.
deathsnumberCurrent season deaths.

DuelModeStats​

FieldTypeDescription
ranked_winsnumberRanked wins.
ranked_lossesnumberRanked losses.
unranked_winsnumberUnranked wins.
unranked_lossesnumberUnranked losses.
current_winstreaknumberCurrent winstreak.
highest_winstreaknumberHighest recorded winstreak.

FfaModeStats​

FieldTypeDescription
killsnumberKills in the FFA mode.
deathsnumberDeaths in the FFA mode.
current_killstreaknumberCurrent killstreak.
highest_killstreaknumberHighest recorded killstreak.

LeaderboardEntry​

FieldTypeDescription
usernamestringPlayer username.
{key}numberNumeric value for the requested leaderboard key.

PlayerCosmetics​

FieldTypeDescription
xuidstringPlayer Xbox user id.
namestringPlayer username returned by Zeqa.
potcolorstringSelected potion color as an RGB string.
projectilestringSelected projectile cosmetic id.
tagstringSelected tag cosmetic id or an empty string.
artifactstringSelected artifact cosmetic id.
capestringSelected cape cosmetic id.
killphrasestringSelected kill phrase cosmetic id.
ownedprojectilestringComma-separated projectile cosmetic ids.
ownedtagstringComma-separated tag cosmetic ids or an empty string.
ownedartifactstringComma-separated artifact cosmetic ids.
ownedcapestringComma-separated cape cosmetic ids.
ownedkillphrasestringComma-separated kill phrase cosmetic ids.
premium_bpnumberPremium battle-pass status as returned by Zeqa.
free_bp_progressnumberFree battle-pass progress.
premium_bp_progressnumberPremium battle-pass progress.
login_streaknumberPlayer login streak.
mountstringSelected mount cosmetic id.
ownedmountstringComma-separated mount cosmetic ids.
elitetagstringSelected elite tag cosmetic id or an empty string.

TypeScript Types​

type ApiResponse<T> =
| {err: null; result: T}
| {err: string; result?: never};

type PlayerStats = {
lifetime: LifetimeStats;
elo: Record<string, number>;
season_stats: SeasonStats;
duel_stats: Record<string, DuelModeStats>;
ffa_stats: Record<string, FfaModeStats>;
rankings?: Record<string, number>;
};

type LifetimeStats = {
kills: number;
deaths: number;
coins: number;
shards: number;
bp: number;
};

type SeasonStats = {
kills: number;
deaths: number;
};

type DuelModeStats = Partial<{
ranked_wins: number;
ranked_losses: number;
unranked_wins: number;
unranked_losses: number;
current_winstreak: number;
highest_winstreak: number;
}>;

type FfaModeStats = Partial<{
kills: number;
deaths: number;
current_killstreak: number;
highest_killstreak: number;
}>;

type LeaderboardEntry<TKey extends string> = {
username: string;
} & Record<TKey, number>;

type PlayerCosmetics = {
xuid: string;
name: string;
potcolor: string;
projectile: string;
tag: string;
artifact: string;
cape: string;
killphrase: string;
ownedprojectile: string;
ownedtag: string;
ownedartifact: string;
ownedcape: string;
ownedkillphrase: string;
premium_bp: number;
free_bp_progress: number;
premium_bp_progress: number;
login_streak: number;
mount: string;
ownedmount: string;
elitetag: string;
};