Tournaments By Class
This endpoint allows you to retrieve the tournaments from a specific class.
Multi-language: This feature allows the user to manually change the language of the API response by adding value to the
langattribute. Example:lang=en.
Pagination: The endpoint uses an offset and limit system. Specify the offset and limit parameters to fetch the desired range of results. The maximum and default number of results per request is 50.
Update Period: The endpoint is updated every day.
Recommended Calls: Limit calls to 1 per day.
Use Cases
Get tournaments from a specific class_idhttps://cricket.sportmicro.com/tournaments-by-class?class_id=eq.{class_id}
Query Parameters
- class_id integer
The id of the class
Example: eq.43 - offset string
Default value:
0Limiting and Pagination
Example: 0 - limit string
Default value:
50Limiting and Pagination
Example: 50 - lang string
Default value:
enMulti-language
Example: en
- 200
OK
- application/json
- Schema
- Example (from schema)
Schema array
- class_id integer
The id of the class
Note: This is a Foreign Key to
classes.id. - class_name text
The name of the class
- class_hash_image character varying
Possible values:
<= 64 charactersThe hash image of the class
- tournaments jsonb
The tournaments
[
{
"class_id": 43,
"class_name": "Pakistan",
"class_hash_image": "2e143d0fada152dd204140fa7cd1c5a14756fdf01fd532e378aa69513f9fe7eb",
"tournaments": [
{
"id": 51,
"name": "Pakistan Super League",
"importance": 80
},
{
"id": 58,
"name": "Pakistan Super League - Regular Season",
"importance": 0
},
{
"id": 4555,
"name": "T20 Women's Cricket Tournament - Round 1",
"importance": 0
},
{
"id": 5532,
"name": "President's Cup Grade-I",
"importance": 0
},
{
"id": 5534,
"name": "President's Cup Grade-I One-Day Tournament",
"importance": 0
},
{
"id": 5535,
"name": "President's Cup Grade-I - Group B",
"importance": 0
},
{
"id": 5536,
"name": "T20 Cup - Group A",
"importance": 0
},
{
"id": 5537,
"name": "National T20 Cup - Group A",
"importance": 0
},
{
"id": 5538,
"name": "T20 Cup - Group B",
"importance": 0
},
{
"id": 5539,
"name": "Quaid-e-Azam Trophy",
"importance": 0
},
{
"id": 5541,
"name": "National T20 Cup - Group B",
"importance": 0
},
{
"id": 5542,
"name": "National T20 Cup Qualifiers - Group A",
"importance": 0
},
{
"id": 5543,
"name": "T20 Cup - Group C",
"importance": 0
},
{
"id": 5549,
"name": "National T20 Cup - Group D",
"importance": 0
},
{
"id": 5550,
"name": "T20 Cup - Regular Season",
"importance": 0
},
{
"id": 5555,
"name": "National T20 Cup - Group Stages",
"importance": 0
},
{
"id": 5556,
"name": "Pakistan Cup",
"importance": 0
},
{
"id": 5562,
"name": "National T20 Cup Qualifiers - Group B",
"importance": 0
},
{
"id": 5563,
"name": "National T20 Cup - Group C",
"importance": 0
},
{
"id": 5564,
"name": "National T20 Cup - Super Eight",
"importance": 0
},
{
"id": 5565,
"name": "Quaid-e-Azam Trophy - Group B",
"importance": 0
},
{
"id": 5567,
"name": "Quaid-e-Azam Trophy - Group A",
"importance": 0
},
{
"id": 5568,
"name": "T20 Cup - Group D",
"importance": 0
},
{
"id": 5633,
"name": "President's Trophy Grade-I",
"importance": 0
},
{
"id": 5636,
"name": "President's Cup Grade-I - Group A",
"importance": 0
},
{
"id": 5740,
"name": "Quaid-e-Azam Trophy - Group C",
"importance": 0
},
{
"id": 5741,
"name": "Quaid-e-Azam Trophy - Triangular Stage",
"importance": 0
},
{
"id": 5803,
"name": "Champions One-Day Cup",
"importance": 0
},
{
"id": 19526,
"name": "National T20 Cup - Final",
"importance": 0
},
{
"id": 19535,
"name": "National T20 Cup - Semi Final",
"importance": 0
},
{
"id": 19877,
"name": "President's Trophy Grade-I - Final",
"importance": 0
},
{
"id": 20275,
"name": "President's Cup Grade-I One-Day Tournament - Semi Final",
"importance": 0
},
{
"id": 20408,
"name": "Quaid-e-Azam Trophy - Final",
"importance": 0
},
{
"id": 21262,
"name": "Kashmir Premier League",
"importance": 0
},
{
"id": 21446,
"name": "Pakistan Super League - Final",
"importance": 82
},
{
"id": 21450,
"name": "Pakistan Super League - Playoffs",
"importance": 81
},
{
"id": 21771,
"name": "National T20 Cup - Quarter Final",
"importance": 0
},
{
"id": 21835,
"name": "President's Cup Grade-I - Final",
"importance": 0
},
{
"id": 22296,
"name": "President's Cup Grade-I - Semi Final",
"importance": 0
},
{
"id": 22360,
"name": "Champions One-Day Cup - Final",
"importance": 0
},
{
"id": 22367,
"name": "Champions One-Day Cup - Playoffs",
"importance": 0
},
{
"id": 23369,
"name": "Pakistan Cup - Final",
"importance": 0
},
{
"id": 23372,
"name": "Pakistan Cup - Semi Final",
"importance": 0
},
{
"id": 24109,
"name": "National T20 Cup - Regular Season",
"importance": 0
},
{
"id": 24111,
"name": "National T20 Cup",
"importance": 0
},
{
"id": 24176,
"name": "T20 Women's Cricket Tournament - Round 2",
"importance": 0
},
{
"id": 24996,
"name": "Pakistan Super League - Play Offs",
"importance": 0
},
{
"id": 25219,
"name": "National T20 Cup - Play Offs",
"importance": 0
},
{
"id": 26082,
"name": "T20 Cup - Play Offs",
"importance": 0
},
{
"id": 26601,
"name": "Super Eight T-20 Cup - Play Offs",
"importance": 0
},
{
"id": 26604,
"name": "Super Eight T-20 Cup - Group B",
"importance": 0
},
{
"id": 26607,
"name": "Super Eight T-20 Cup - Group A",
"importance": 0
},
{
"id": 67084,
"name": "National T20 Cup Qualifiers - Final",
"importance": 0
},
{
"id": 67100,
"name": "President's Cup Grade-I One-Day Tournament - Final",
"importance": 0
}
]
}
]