Skip to content

Widen the OVR range of your tournament

POST
/api/tournaments/{id}/ovr-range
curl --request POST \
--url https://foxleague.ai/api/tournaments/1/ovr-range \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "ovr_max": 1, "ovr_min": 1 }'

Replaces the OVR range of a tournament or 1v1 challenge you created with a wider one while it is open for joining. Each side of the body has three states: a side left out keeps its bound, null removes it and a whole number from 1 to 100 sets it. So {"ovr_max": 45} on a range of 30 to 40 gives 30 to 45; {"ovr_min": null} removes the minimum. An empty object {} asks for no change and is refused like the same range. The range may only get wider: a lower ovr_min, a higher ovr_max or a bound removed. Removing both removes the range. It never gets narrower, so a team that already joined stays inside it. The answer gives the range now and the range before it. Every later join is checked against the new range.

Who: a signed-in player: the creator or an admin.

Refusals:

  • Not registered: the wallet has no player account.
  • Tournament not found: no tournament has this id.
  • Only the creator of this tournament or an admin can change its OVR range.: a 1v1 challenge says challenge.
  • Champions FoxLeague invites its teams from the leaderboard, so it takes no OVR range.: a league_knockout tournament.
  • A developer tournament is played by uploaded binaries, so it takes no OVR range.
  • The range can be changed only while the tournament is open for joining.: the status is not open or the registration deadline has passed; a 1v1 challenge says challenge.
  • The OVR range takes whole numbers from 1 to 100.: ovr_min or ovr_max below 1 or above 100.
  • This tournament has no OVR range: it already takes teams of any OVR.: a 1v1 challenge says challenge.
  • The range is already <range>: nothing to change.: the same range again or {}. <range> reads like 30 to 40, at most 35 or at least 30.
  • You can only widen the range: a side with no bound stays without one.: ovr_min on a range with no minimum or ovr_max on a range with no maximum.
  • You can only widen the range: lower the minimum or raise the maximum.: an ovr_min above the range’s minimum or an ovr_max below its maximum.
id
required
integer format: int64

The tournament id.

Media type application/json

The change to the OVR range, per side: left out keeps the bound, null removes it, a number sets it. The result may only be wider than the range it replaces.

object
ovr_max

The new highest best XI OVR a joining team may have, a whole number from 1 to 100: at least the current ovr_max. Left out: the current maximum stays. null: no maximum.

integer | null format: int32
ovr_min

The new lowest best XI OVR a joining team may have, a whole number from 1 to 100: at most the current ovr_min. Left out: the current minimum stays. null: no minimum.

integer | null format: int32
Example generated
{
"ovr_max": 1,
"ovr_min": 1
}

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
ovr_max

The highest best XI OVR a joining team may have now. null when there is none.

integer | null format: int32
ovr_min

The lowest best XI OVR a joining team may have now. null when there is none.

integer | null format: int32
previous_ovr_max

The maximum before the change. null when there was none.

integer | null format: int32
previous_ovr_min

The minimum before the change. null when there was none.

integer | null format: int32
tournament_id
required

The tournament id.

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": {
"ovr_max": 40,
"ovr_min": 25,
"previous_ovr_max": 40,
"previous_ovr_min": 30,
"tournament_id": 1712
},
"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