Skip to content

Check how a wallet can register

GET
/api/onboarding/check-eligibility
curl --request GET \
--url https://foxleague.ai/api/onboarding/check-eligibility \
--header 'Authorization: Bearer <token>'

Answers what the app needs to choose a registration path for your wallet: how many player cards it holds, whether it may register now, whether the registration fee is already paid and whether it already has a team. When the chain cannot be read, the card count reads 0 and the fee reads as not paid, so read the fee state from the chain again before paying.

Who: a signed-in player.

Refusals: none.

Success or a refusal: read success (the refusals are in the description).

Media type application/json
object
code

A machine-readable reason next to error, set only where the caller must act differently. tx_pending: the payment was not refused but could not be verified yet; keep the transaction hash and confirm again with the same hash, never pay twice.

string | null
data

The answer. Present when success is true.

object
can_skip_mint
required

true when nft_count reaches nft_bypass_threshold: the wallet can register with the cards it holds instead of buying the starter squad.

boolean
has_existing_team
required

true when the wallet already has a team.

boolean
is_registration_paid
required

true when the registration fee is paid on chain. Also false when the chain cannot be read.

boolean
is_whitelisted
required

true when the wallet may register now: either registration is open to every wallet or this wallet is on the access list.

boolean
nft_bypass_threshold
required

Cards needed to register without buying the starter squad: 18.

integer format: int64
nft_count
required

Player cards the wallet holds on chain. Also 0 when the chain cannot be read.

integer format: int64
error

Why the request was refused, in plain words. Present when success is false.

string | null
success
required

true when the request did what it asked. false is a refusal: read error.

boolean
Example
{
"data": {
"can_skip_mint": false,
"has_existing_team": false,
"is_registration_paid": false,
"is_whitelisted": true,
"nft_bypass_threshold": 18,
"nft_count": 0
},
"success": true
}

No valid session. The body is plain text: Missing Authorization header, Invalid Authorization format, Invalid session token or Session expired or invalid. Sign in again.

Media type text/plain
string
Example
Session expired or invalid