# Seasons

A snooker season, organised by the World Snooker Tour (WST), is a series of snooker tournaments played from June to May the following year. The Seasons API is serving as a gateway to the Fixtures API, it provides seamless integration for accessing comprehensive sports-related data.

Key Features:

* List and Manage Competition Seasons: With the Seasons API, developers can effortlessly retrieve a complete list of competition seasons. No specific input is required from applications, making it easy to obtain general season information.
* Flexible Filtering Options: Developers can leverage the API's filtering capabilities to retrieve seasons based on desired start and end dates. This feature allows applications to narrow down the results to specific time frames.

Useful Results: The API provides valuable results for obtaining essential identifiers, including competition IDs, season IDs, and stage IDs.

This pages provides in-depth information on endpoints, request parameters, and response structures. By following the provided guidelines and examples, developers can seamlessly integrate the API into their applications and maximize competition season management capabilities.

## Endpoints

## List seasons

<mark style="color:blue;">`GET`</mark> `https://dde-api.data.imgarena.com/snooker/seasons`

Retrieves a list of seasons for a specific sport.

#### Query Parameters

| Name     | Type   | Description                                                                                                                          |
| -------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| type     | string | Official, Training or Simulation matches                                                                                             |
| dateFrom | date   | Allows clients to filter between specific dates, it will return seasons that start after a given date. **Example**: `YYYY-MM-DD`     |
| dateTo   | date   | Allows clients to filter between specific dates, it will return seasons that finishes before a given date. **Example**: `YYYY-MM-DD` |

#### Headers

| Name                                            | Type   | Description                                      |
| ----------------------------------------------- | ------ | ------------------------------------------------ |
| Accept<mark style="color:red;">\*</mark>        | string | application/vnd.imggaming.dde.api+json;version=1 |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer ACCESS\_TOKEN                             |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json                                 |

{% tabs %}
{% tab title="400: Bad Request " %}

```json
{
    Request is missing required HTTP header 'Accept'
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```json
{
    The supplied authentication is invalid
}
```

{% endtab %}

{% tab title="200: OK " %}

```json
{
    "id": "ca1829d1-fc05-455a-90e1-1692b2eb1306",
        "name": "Season 2022/2023",
        "startDateUTC": "2022-09-19T00:00:00",
        "endDateUTC": "2022-10-31T00:00:00",
        "competition": {
            "id": "10d45772-74a0-4703-ae40-804591a0fb80",
            "name": "Israel League Cup",
            "category": {
                "id": 1,
                "name": "Men"
            },
            "location": {
                "name": "Israel",
                "country": {},
                "continent": {
                    "name": "Asia"
                }
            }
        },
        "stages": [
            {
                "id": "b14d07d6-77ac-4aae-abbd-8da9125cfbf2",
                "name": "Regular Round",
                "startDateUTC": "2022-09-19T00:00:00",
                "endDateUTC": "2022-10-31T00:00:00",
                "rounds": [],
                "groups": []
            }
        ]
}
```

{% endtab %}
{% endtabs %}

## Response Fields

<table data-header-hidden><thead><tr><th width="178">Property</th><th>Description</th></tr></thead><tbody><tr><td>seasons<br><a href="../objects/static-objects/season"><em><mark style="color:blue;">Season []</mark></em></a></td><td>The requested list of seasons.<br></td></tr></tbody></table>

## Polling frequency

We recommend the following frequency for your REST requests to ensure that you have the most up-to-date information at all times - `once per 12 hours`

## Pagination

Please find the following link to the [pagination](https://docs.sportradar.com/snooker/readme/pagination) page.

{% hint style="warning" %}
We kindly request your thorough perusal of this section in order to familiarize yourself with forthcoming alterations scheduled for implementation on the **31st of July, 2023**.
{% endhint %}

These modifications, primarily encompassing the introduction of supplementary parameters, are anticipated to be of a straightforward nature and aim to enhance the query efficiency of our Fixtures API, thereby affording you considerable advantages.
