Opono
Skip to content
Documentation menu Hypothetical matches ▾

API reference

Hypothetical matches

Copy as Markdown

List teams for hypothetical matches

GET /v1/hypothetical/teams

List, at zero credits, the teams a hypothetical match can be played between: the covered teams with a published match in the next 8 days, which their squads and predicted elevens come from.

Authentication: Bearer API key with data.read; active Plus or Pro plan required.

Parameters

Path parameters

NameTypeRequiredDescription
———None.

Query parameters

NameTypeRequiredDescription
leagueintegerNoOnly clubs of this league; minimum: 1.
nationalbooleanNotrue: national teams only; false: clubs only.
countrystringNoOnly teams of this country, by name; maximum length: 200.
searchstringNoTeam name contains this text; maximum length: 200.
limitintegerNoMaximum rows to return; range: 1–200; default: 100.
cursorstringNonext_cursor from the previous page, with the same filters, the same day; maximum length: 4096.

Body parameters

NameTypeRequiredDescription
———None.

Example request

bash
curl 'https://api.opono.com/v1/hypothetical/teams?league=8' \
  --header "Authorization: Bearer $OPONO_API_KEY"

Response

FieldTypeDescription
objectstringlist.
datesobject or nullfrom and to: the dates a hypothetical match may be played on. null while the model's teams are being refreshed.
dataarrayTeams in team ID order.
data[].team_id / name / shortinteger / string / string or nullTeam labels.
data[].countrystring or nullCountry label.
data[].nationalbooleanA national team. Clubs and national teams never meet.
data[].leagueobject or nullA club's league ID and name; null for a national team.
data[].cross_countrybooleanWhether the club can meet a club from another country: its league plays enough continental matches. Both clubs need it.
has_more / next_cursorboolean / string or nullPass next_cursor as cursor for the next page. Filters can leave a page short.

Example response

200 response with a test key.

json
{
  "object": "list",
  "dates": {
    "from": "2026-10-28",
    "to": "2026-11-03"
  },
  "data": [],
  "has_more": false,
  "next_cursor": null
}

Errors

StatusCodeMeaning
400parameter_invalidA parameter has an invalid value.
401invalid_api_keyThe credential cannot authenticate.
401key_revokedThe API key has been revoked.
401key_expiredThe API key has expired.
403scope_missingThe key lacks the required scope.
403tier_restrictedThe organisation plan does not include this operation.
403org_suspendedYour account is suspended.
403ip_not_allowedThe caller is outside the key's IP allowlist.
429rate_limitedA request or authentication rate limit was exceeded.
503dependency_unavailableRequest admission is unavailable.
503maintenanceThe API is paused for maintenance.

List competitions for hypothetical matches

GET /v1/hypothetical/competitions

List, at zero credits, the competitions a hypothetical match can be played in. The kind decides which pairs fit it.

Authentication: Bearer API key with data.read; active Plus or Pro plan required.

Parameters

Path parameters

NameTypeRequiredDescription
———None.

Query parameters

NameTypeRequiredDescription
nationalbooleanNotrue: national teams only; false: clubs only.
limitintegerNoMaximum rows to return; range: 1–200; default: 100.
cursorstringNonext_cursor from the previous page, with the same filters, the same day; maximum length: 4096.

Body parameters

NameTypeRequiredDescription
———None.

Example request

bash
curl 'https://api.opono.com/v1/hypothetical/competitions?national=false' \
  --header "Authorization: Bearer $OPONO_API_KEY"

Response

FieldTypeDescription
objectstringlist.
datesobject or nullAs for teams.
dataarrayCompetitions in competition ID order.
data[].competition_id / nameinteger / stringCompetition labels.
data[].countrystring or nullCountry label.
data[].kindstring or nulldomestic: a league, both clubs in it. domestic_cup or play-offs: both clubs from its country. cup_international or friendly: any pair that can meet. international: national teams.
data[].nationalbooleanIts matches are national teams' matches.
has_more / next_cursorboolean / string or nullAs for teams.

Example response

200 response with a test key.

json
{
  "object": "list",
  "dates": {
    "from": "2026-10-28",
    "to": "2026-11-03"
  },
  "data": [],
  "has_more": false,
  "next_cursor": null
}

Errors

StatusCodeMeaning
400parameter_invalidA parameter has an invalid value.
401invalid_api_keyThe credential cannot authenticate.
401key_revokedThe API key has been revoked.
401key_expiredThe API key has expired.
403scope_missingThe key lacks the required scope.
403tier_restrictedThe organisation plan does not include this operation.
403org_suspendedYour account is suspended.
403ip_not_allowedThe caller is outside the key's IP allowlist.
429rate_limitedA request or authentication rate limit was exceeded.
503dependency_unavailableRequest admission is unavailable.
503maintenanceThe API is paused for maintenance.

Squad for a hypothetical match

GET /v1/hypothetical/teams/{team_id}/squad

Get, at zero credits, the squad a hypothetical match on this date plays from: the team's published match nearest the date. Use its player IDs for custom sides and players left out.

Authentication: Bearer API key with data.read; active Plus or Pro plan required.

Parameters

Path parameters

NameTypeRequiredDescription
team_idintegerYesA team ID from GET /v1/hypothetical/teams; minimum: 1.

Query parameters

NameTypeRequiredDescription
datestringYesThe match date in YYYY-MM-DD format, in the window GET /v1/hypothetical/teams lists.

Body parameters

NameTypeRequiredDescription
———None.

Example request

bash
curl 'https://api.opono.com/v1/hypothetical/teams/1/squad?date=2026-10-30' \
  --header "Authorization: Bearer $OPONO_API_KEY"

Response

FieldTypeDescription
objectstringhypothetical_squad.
teamobjectTeam ID and name.
datestringThe match date asked for.
from_fixtureobject or nullThe fixture ID and kick-off the squad comes from; null for test keys.
squad_versionstringSquad identity.
formationsarrayAccepted formation strings for custom sides.
as_ofstringInput watermark in ISO 8601 UTC.
playersarrayEligible players: player_id, name and position.

Example response

200 synthetic test response, shortened to one player.

json
{
  "object": "hypothetical_squad",
  "team": {
    "team_id": 1,
    "name": "Sample Home"
  },
  "date": "2026-10-30",
  "from_fixture": null,
  "squad_version": "sq1:example",
  "formations": [
    "4-3-3"
  ],
  "as_of": "2026-10-17T09:00:00Z",
  "players": [
    {
      "player_id": 1001,
      "name": "Sample Goalkeeper",
      "position": "goalkeeper"
    }
  ]
}

Errors

StatusCodeMeaning
400parameter_invalidA parameter has an invalid value.
401invalid_api_keyThe credential cannot authenticate.
401key_revokedThe API key has been revoked.
401key_expiredThe API key has expired.
403scope_missingThe key lacks the required scope.
403tier_restrictedThe organisation plan does not include this operation.
403org_suspendedYour account is suspended.
403ip_not_allowedThe caller is outside the key's IP allowlist.
429rate_limitedA request or authentication rate limit was exceeded.
503dependency_unavailableRequest admission is unavailable.
503maintenanceThe API is paused for maintenance.
404not_foundA public catalog id names no team, player or competition.
503refreshingThe request can't be checked right now.