League points table from match results

Builds a league table from match results: played, won, drawn, lost, scored, conceded, difference, points and position (custom points for win/draw/loss).

Request

POSThttps://sports-tools.p.apihiver.com/v1/standings

JSON object. Required: results.

Request Body

Edit the values below to test different scenarios.

Parameters and body structure are inherited from this endpoint's definition. Changes here only apply to this test run.

Language
Client
1curl --request POST \
2  --url https://sports-tools.p.apihiver.com/v1/standings \
3  --header 'Accept: application/json' \
4  --header 'Content-Type: application/json' \
5  --header 'X-API-Key: YOUR_API_KEY' \
6  --data '{
7  "results": [
8    {
9      "away": "B",
10      "home": "A",
11      "away_score": 1,
12      "home_score": 2
13    }
14  ]
15}'

League points table from match results: Sports & Cricket Tools API reference

Builds a league table from match results: played, won, drawn, lost, scored, conceded, difference, points and position (custom points for win/draw/loss). This endpoint is part of the Sports & Cricket Tools API: Tournament fixtures, league tables, Elo ratings and cricket net run rate / required run rate calculators.

Example response (200, application/json)

Success.

1{
2  "standings": [
3    {
4      "won": 1,
5      "lost": 0,
6      "team": "A",
7      "drawn": 0,
8      "played": 1,
9      "points": 3,
10      "scored": 2,
11      "conceded": 1,
12      "position": 1,
13      "difference": 1
14    },
15    {
16      "won": 0,
17      "lost": 1,
18      "team": "B",
19      "drawn": 0,
20      "played": 1,
21      "points": 0,
22      "scored": 1,
23      "conceded": 2,
24      "position": 2,
25      "difference": -1
26    }
27  ]
28}

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "results: Field required"
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.