Your entry state for a tournament
const url = 'https://foxleague.ai/api/tournaments/1/entry-status';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://foxleague.ai/api/tournaments/1/entry-status \ --header 'Authorization: Bearer <token>'Tells you whether you hold a seat, whether the contract holds an entry payment of yours for this tournament and whether the tournament takes joins now. Call it before signing a paid join: with has_escrow: true and is_participant: false, call POST /api/tournaments/{id}/join without a hash instead of paying again. sc_full says the contract already counts every seat as taken even when the tournament still shows a free one.
Who: a signed-in player.
Refusals:
Tournament not found: no tournament has this id.Not registered: the wallet has no player account.Failed to load entry status: the tournament or your account could not be read; try again.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The tournament id.
Responses
Section titled “ Responses ”Success or a refusal: read success (the refusals are in the description).
object
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.
The answer. Present when success is true.
object
Your entry payment held by the contract for this tournament, in the token’s smallest unit (18 decimals) as a decimal string. "0" when there is none.
true when the contract holds an entry payment of yours for this paid tournament. Always false for a free tournament.
true when you hold a seat.
true while the tournament is open, has a free seat and its deadline has not passed. Invitations, targets and squad rules are not checked here.
true when the contract already counts every seat of this paid tournament as taken while joinable is true. false otherwise.
Why the request was refused, in plain words. Present when success is false.
true when the request did what it asked. false is a refusal: read error.
Example
{ "data": { "entry_amount": "1000000000000000000000", "has_escrow": true, "is_participant": false, "joinable": true, "sc_full": false }, "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.
Example
Session expired or invalid