# Seasons

The Seasons API lets developers list and manage competition seasons. This is a gateway into the Fixtures API.

Applications don't need any input to list all seasons, however information can be filtered by start date and end date. The result is useful for obtaining competiton Ids, season Ids, and stage Ids.

## Endpoints

## List seasons

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

Retrieves a list of seasons for a specific sport.

#### Path Parameters

| Name                                    | Type   | Description                                             |
| --------------------------------------- | ------ | ------------------------------------------------------- |
| sport<mark style="color:red;">\*</mark> | string | A unique name for the requested sport, i.e. basketball. |

#### Query Parameters

| Name     | Type | Description |
| -------- | ---- | ----------- |
| dateFrom | date |             |
| dateTo   | date |             |

#### 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": []
            }
        ]on
}
```

{% endtab %}
{% endtabs %}

## Response fields

The requested list of seasons.

### Season attributes

* *id* (`uuid`) - The FastPath-assigned ID of the season
* *name* (`string`) - Name of the season
* *startDateUTC* (`datetime`) - Start date of the season
* *endDateUTC* (`datetime`) - End date of the season
* *competition* (`Competition`) - Competition information within the season
* *stages* (`Stages`) - Round of match within a competition

### Competition

* *id* (`uuid`) - The FastPath-assigned ID of the competition within the season
* *name* (`string`) - Name of the competition. Example: `Israel League Cup`
* *category* (`Category`) - Competition category information
* *location* (Location) - Venue information of the competition

### Category

* *id* (`integer`) - The FastPath-assigned ID of the competiton category
* *name* (`string`) - Name of the competition category. Example: `Men`, `Women`

### Tour

* **id** (`integer`) -
* **name** (`string`) -

### Location

* **name** (`string`) - Name of the venue. Example: `Israel`
* **country** (`List`) - List of countries where the competition is played out
* **continent** (`object`) - List of continents where the competition is played out

### Continent

* name (`string`) - Name of the continent where the seasion is located. Example: `Asia`

### Stages

* *id* (`uuid`) -
* *name* (`string`) -
* *startDateUTC* (`datetime`) -
* *endDateUTC* (`datetime`) -
* *rounds* (`object`) -
* *groups* (`object`) -

## 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`
