Skip to content

Tournament standings

GET
/api/tournaments/{id}/standings
curl --request GET \
--url https://foxleague.ai/api/tournaments/1/standings

Returns the group, league or Swiss table built from finished matches only. Rows come by group, then by rank: points (3 for a win, 1 for a draw), then among teams level on points a table of their matches against each other (points, goal difference, goals scored), then overall goal difference, goals scored and rating. In Champions FoxLeague the table of the level teams’ own matches counts only when every one of them has played every other one. Once the league phase is over the table keeps its final league places. A match neither team could play counts as a loss for both and costs each team one point. A knockout tournament or an unknown id answers an empty list.

Who: anyone.

Refusals: none specific to this route.

id
required
integer format: int64

The tournament id.

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.

Array<object>

One team’s row in a group, league or Swiss table.

object
drawn
required

Matches drawn.

integer format: int32
goals_against
required

Goals conceded.

integer format: int32
goals_for
required

Goals scored.

integer format: int32
group_name

A, B and so on for a group, League for a round robin and for the league phase of Champions FoxLeague; null for a Swiss tournament.

string | null
id
required

Id of the row.

integer format: int32
lost
required

Matches lost.

integer format: int32
participant_id
required

Seat id of the team: the id of its row in participants.

integer format: int32
played
required

Finished matches played.

integer format: int32
points
required

Points: 3 for a win, 1 for a draw, minus 1 for each match neither team could play.

integer format: int32
tournament_id
required

The tournament id.

integer format: int64
won
required

Matches won.

integer format: int32
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": [
{
"drawn": 1,
"goals_against": 2,
"goals_for": 7,
"group_name": "League",
"id": 8801,
"lost": 0,
"participant_id": 2150,
"played": 3,
"points": 7,
"tournament_id": 377,
"won": 2
},
{
"drawn": 0,
"goals_against": 4,
"goals_for": 5,
"group_name": "League",
"id": 8803,
"lost": 1,
"participant_id": 2152,
"played": 3,
"points": 6,
"tournament_id": 377,
"won": 2
},
{
"drawn": 1,
"goals_against": 6,
"goals_for": 2,
"group_name": "League",
"id": 8802,
"lost": 2,
"participant_id": 2151,
"played": 3,
"points": 1,
"tournament_id": 377,
"won": 0
}
],
"success": true
}