Resource information
URL | https://api.softnetsport.com/v2/seasons |
---|---|
XSD | https://api.softnetsport.com/assets/API/docs/xsd/seasons.index.xsd |
Method | GET |
Description | Returns a list of all available seasons played in the competitions |
Cache | 60 seconds |
Authorization required | Yes |
Method parameters
Name | Type | Description |
---|---|---|
There are no method parameters in this resource |
Query parameters
Name | Type | Description |
---|---|---|
token | xsd:string | REQUIRED. More information concerning authorization in API introduction section |
lang | xsd:string | Determines language for the output data. The complete list of possible languages can be retrieved using the API resource: languages.index |
page | xsd:int | Determines offset of paginated data. Default value is 1 which means first page |
limit | xsd:int | Determines maximum number of returned records on page. Used in paginated data. Default value is 500. Possible values: 5, 10, 25, 50, 100, 250, 500 |
sport_id | xsd:int | Determines the sport to which the season belongs. The complete list of possible sports can be retrieved using the API resource: sports.index |
competition_id | xsd:int | Determines the competition to which the season belongs. The complete list of possible competitions can be retrieved using the API resource: competitions.index |
participant_id | xsd:int | Determines the participant that is included in the seasons. The complete list of possible participants can be retrieved using the API resource: participants.index |
multi_ids | xsd:string | List of season identifiers separated by a comma (e.g. 123,234,321) for the season details you want to get. |
year | xsd:string | Determines the season year e.g.
|
sort_type | xsd:string | Determines sort order of data. Possible values:
|
sort_order | xsd:string | Additional parameter for sort_type which determines the direction of sort (ascending, descending)
|
area_id | xsd:int | Determines the area represented by the participant. The complete list of possible areas can be retrieved using the API resource: areas.index |
timestamp | xsd:unix_timestamp | Selection date, format UNIX_TIMESTAMP. Only changes in the seasons that occurred or were updated after this timestamp will be returned. |
Method calling examples
Link | Description |
---|---|
https://api.softnetsport.com/v2/seasons.xml?token={{YOUR_TOKEN}} | Returns a list of season names in XML format |
https://api.softnetsport.com/v2/seasons?token={{YOUR_TOKEN}} | Returns a list of season names in JSON format |
https://api.softnetsport.com/v2/seasons.xml?token={{YOUR_TOKEN}}&competition_id=1507 | Returns the seasons played in the competition - Primera Division |
https://api.softnetsport.com/v2/seasons.xml?token={{YOUR_TOKEN}}&sport_id=5 | Returns all competition seasons played in soccer |
https://api.softnetsport.com/v2/seasons.xml?token={{YOUR_TOKEN}}&year=2014/15 | Returns all competition seasons played in the season year 2014/15. |
Output elements
.competitions | |
---|---|
..competition | |
id | Unique identifier for the competition. The complete list of possible competitions can be retrieved using the API resource: competitions.index |
name | Name of the the competition e.g. U19 World Champ. Possible translation of the attribute |
short_name | Abbreviated name of the competition e.g. U19 WCH, Max 20 characters |
mini_name | Mini name of the competition. Max 3 characters in length e.g. U19 |
gender | Competition gender. Possible values:
|
type | Competitions type. Possible values:
|
area_id | Unique identifier for area in which the competitions are played. The complete list of possible areas can be retrieved using the API resource: areas.index |
area_name | Name of the area in which the competitions are played. Possible translation of the attribute |
area_type | Type of area in which competitions are played. Possible values:
|
area_sort | The parameter used to sort competitions in a the country e.g. Premier League is 1st and the Championship is 2nd in English competitions. Sorting direction is ascending |
area_code | Max 3 characters in length for the area in which competitions are played |
overall_sort | The parameter used to sort competitions. Sorting direction is ascending |
sport_id | Unique identifier for the sport in which a competition is played. The complete list of possible sports can be retrieved using the API resource: sports.index |
sport_name | Name of the sport in which a competition is played. Possible translation of the attribute |
tour_id | Unique identifier for the tour in which a competition is played. The complete list of possible tours can be retrieved using the API resource: tours.index |
tour_name | Name of the tour in which a competition is played |
ut | Information about the date and time of when the competition record was last updated. Format UNIX_TIMESTAMP |
old_competition_id | deprecated. The attribute will be removed in the next API version |
slug | friendly url for competition |
...seasons | |
....season | |
id | Unique identifier for the season. |
name | Name of the season e.g. Premiership 2014/15 |
year | Determines the season year e.g.
|
ut | Information about the date and time of when the season record was last updated. Format UNIX_TIMESTAMP |
old_season_id | deprecated. The attribute will be removed in the next API version |