# Schedule

This endpoint returns information on all off the tee times of all the groups within a single tournament. This will return the tee times for all days of the tournament. It contains information on:

* Course
* Round
* Tee sequence
* Hole
* Start date and time
* Player and group number (and team number for Match Play tournaments.)

## Endpoint URL

Endpoint for tournament schedule:

`https://dde-api.data.imgarena.com/golf/tournaments/{tournamentId}/schedule`

To view a schedule, enter the ID of the event for example, the ID for The American Express 2025 is 1092, which will display the schedule for all 4 rounds. Note that you can pass ID as 1 to return sample data.

## Required Headers

| Key           | Value                                            |
| ------------- | ------------------------------------------------ |
| Accept        | application/vnd.imggaming.dde.api+json;version=1 |
| Content-Type  | application/json                                 |
| Authorization | Bearer eyvhaoudfgpdfgo\*                         |

\*Authorization header includes a truncated Bearer token, contact IMG for your auth token if you do not have.

## Request Parameters

This endpoint currently takes no request parameters, we aim to add them, and once we have they will be detailed here. It will be query-able by date and this doc will be updated when that is ready.

## Response Model

\
**Event Object**

| Field Name       | Type    | Description                                                                                                                                                     | Optional |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| date             | date    | The day that the round will be played for that group                                                                                                            |          |
| round            | integer | The round that is being played for that group                                                                                                                   |          |
| hole             | integer | The hole in which the round is starting for that group                                                                                                          |          |
| teeSeq           | integer | The sequence on the tee for that group                                                                                                                          |          |
| courseId         | integer | The ID of the course for the round for that group                                                                                                               |          |
| courseName       | string  | The name of the course for the round for that group                                                                                                             |          |
| status           | string  | The status of the round for that group. The values are either: NotStarted, InProgress or Finished.                                                              |          |
| matchType        | string  | "Strokeplay" or "Matchplay"                                                                                                                                     |          |
| bookingStatus    | string  | If an end user has got a license for that group; always set to “Booked”                                                                                         |          |
| startTime        | object  | See object docs                                                                                                                                                 |          |
| groupId          | integer | Unique ID for the group                                                                                                                                         |          |
| group            | object  | See object docs                                                                                                                                                 |          |
| poolNo           | integer | \[Optional] number of the pool the match is in                                                                                                                  | YES      |
| externalCourseId | string  | <p>The Golf Course Id</p><p>from the federation database. This is composed of the ID number concatenated with the federation abbreviation, either ET or PGA</p> |          |

```
[
  {
    "bookingStatus": "Booked",
    "courseId": "3",
    "courseName": "Emirates GC",
    "date": "2025-01-17",
    "externalCourseId": "ET-278",
    "group": {
      "featureGroup": false,
      "groupNo": 27,
      "matchNo": null,
      "teams": [
        {
          "orderOfPlayWithinGroup": 0,
          "players": [
            {
              "country": "NIR",
              "displayName": "Rory McIlroy",
              "firstName": "Rory",
              "isAmateur": false,
              "lastName": "McIlroy",
              "playerEuropeanTourId": "34024",
              "playerId": 14,
              "playerLPGATourId": null,
              "playerPGATourId": "28237",
              "playerRandAId": "73414",
              "status": "Entered"
            }
          ],
          "teamNo": 3
        },
        {
          "orderOfPlayWithinGroup": 1,
          "players": [
            {
              "country": "NOR",
              "displayName": "Viktor Hovland",
              "firstName": "Viktor",
              "isAmateur": false,
              "lastName": "Hovland",
              "playerEuropeanTourId": "40148",
              "playerId": 3347,
              "playerLPGATourId": null,
              "playerPGATourId": "46717",
              "playerRandAId": "145029",
              "status": "MissedCut"
            }
          ],
          "teamNo": 11
        },
        {
          "orderOfPlayWithinGroup": 2,
          "players": [
            {
              "country": "ENG",
              "displayName": "Tommy Fleetwood",
              "firstName": "Tommy",
              "isAmateur": false,
              "lastName": "Fleetwood",
              "playerEuropeanTourId": "35371",
              "playerId": 12,
              "playerLPGATourId": null,
              "playerPGATourId": "30911",
              "playerRandAId": "129462",
              "status": "Entered"
            }
          ],
          "teamNo": 5
        }
      ]
    },
    "groupId": 1122833,
    "hole": 1,
    "matchType": "Strokeplay",
    "poolNo": null,
    "round": 2,
    "startTime": {
      "status": "StartsAt",
      "time": "12:25+04:00"
    },
    "status": "Finished",
    "teeSeq": 27
  },
  {
    "bookingStatus": "Booked",
    "courseId": "3",
    "courseName": "Emirates GC",
    "date": "2025-01-16",
    "externalCourseId": "ET-278",
    "group": {
      "featureGroup": false,
      "groupNo": 41,
      "matchNo": null,
      "teams": [
        {
          "orderOfPlayWithinGroup": 0,
          "players": [
            {
              "country": "ENG",
              "displayName": "Dale Whitnell",
              "firstName": "Dale",
              "isAmateur": false,
              "lastName": "Whitnell",
              "playerEuropeanTourId": "36453",
              "playerId": 7270,
              "playerLPGATourId": null,
              "playerPGATourId": "33117",
              "playerRandAId": null,
              "status": "MissedCut"
            }
          ],
          "teamNo": 38
        },
        {
          "orderOfPlayWithinGroup": 1,
          "players": [
            {
              "country": "RSA",
              "displayName": "Louis de Jager",
              "firstName": "Louis",
              "isAmateur": false,
              "lastName": "de Jager",
              "playerEuropeanTourId": "35943",
              "playerId": 795,
              "playerLPGATourId": null,
              "playerPGATourId": "31681",
              "playerRandAId": null,
              "status": "Entered"
            }
          ],
          "teamNo": 112
        },
        {
          "orderOfPlayWithinGroup": 2,
          "players": [
            {
              "country": "ENG",
              "displayName": "Marcus Armitage",
              "firstName": "Marcus",
              "isAmateur": false,
              "lastName": "Armitage",
              "playerEuropeanTourId": "36452",
              "playerId": 7251,
              "playerLPGATourId": null,
              "playerPGATourId": "45194",
              "playerRandAId": "142329",
              "status": "Entered"
            }
          ],
          "teamNo": 109
        }
      ]
    },
    "groupId": 1122548,
    "hole": 10,
    "matchType": "Strokeplay",
    "poolNo": null,
    "round": 1,
    "startTime": {
      "status": "StartsAt",
      "time": "12:45+04:00"
    },
    "status": "Finished",
    "teeSeq": 41
  },
  {
    "bookingStatus": "Booked",
    "courseId": "3",
    "courseName": "Emirates GC",
    "date": "2025-01-17",
    "externalCourseId": "ET-278",
    "group": {
      "featureGroup": false,
      "groupNo": 18,
      "matchNo": null,
      "teams": [
        {
          "orderOfPlayWithinGroup": 0,
          "players": [
            {
              "country": "AUS",
              "displayName": "Min Woo Lee",
              "firstName": "Min Woo",
              "isAmateur": false,
              "lastName": "Lee",
              "playerEuropeanTourId": "41662",
              "playerId": 266,
              "playerLPGATourId": null,
              "playerPGATourId": "37378",
              "playerRandAId": "146599",
              "status": "Entered"
            }
          ],
          "teamNo": 51
        },
        {
          "orderOfPlayWithinGroup": 1,
          "players": [
            {
              "country": "DEN",
              "displayName": "Rasmus Højgaard",
              "firstName": "Rasmus",
              "isAmateur": false,
              "lastName": "Højgaard",
              "playerEuropeanTourId": "42144",
              "playerId": 7255,
              "playerLPGATourId": null,
              "playerPGATourId": "52686",
              "playerRandAId": "152144",
              "status": "Entered"
            }
          ],
          "teamNo": 18
        },
        {
          "orderOfPlayWithinGroup": 2,
          "players": [
            {
              "country": "USA",
              "displayName": "Akshay Bhatia",
              "firstName": "Akshay",
              "isAmateur": false,
              "lastName": "Bhatia",
              "playerEuropeanTourId": "43971",
              "playerId": 7042,
              "playerLPGATourId": null,
              "playerPGATourId": "56630",
              "playerRandAId": "50019324",
              "status": "Entered"
            }
          ],
          "teamNo": 2
        }
      ]
    },
    "groupId": 1122867,
    "hole": 10,
    "matchType": "Strokeplay",
    "poolNo": null,
    "round": 2,
    "startTime": {
      "status": "StartsAt",
      "time": "08:15+04:00"
    },
    "status": "Finished",
    "teeSeq": 18
  }
]
```

**Start Time Object**

| Field Name | Type   | Description                                                                              |
| ---------- | ------ | ---------------------------------------------------------------------------------------- |
| status     | string | The status of the start time – e.g. ‘StartsAt’                                           |
| time       | date   | The time of the group are scheduled to start their round. Time is returned in UTC format |

```
"startTime": {
      "status": "StartsAt",
      "time": "12:25+04:00"
    }
```

**Group Object**

| Field Name   | Type    | Description                                                                                                       | Optional |
| ------------ | ------- | ----------------------------------------------------------------------------------------------------------------- | -------- |
| featureGroup | boolean | Returned as "true" if group is a featured grope. Note PGA only                                                    |          |
| groupNo      | integer | The group’s number, an identifier for the group within that round.                                                |          |
| MatchNo      | integer | <p>For Match Play tournaments only</p><p><strong>When is Match Play tournament</strong> "matchNo" = "groupNo"</p> | **YES**  |
| teams        | object  | See object doc                                                                                                    |          |

```
 "group": {
            "featureGroup": false,
            "groupNo": 1,
            "matchNo": null,
            "teams": []

```

**Teams Object**

| Field Name             | Type    | Description                                                                                                               |
| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- |
| teamNo                 | integer | The ID of the team within the Tournament                                                                                  |
| orderOfPlayWithinGroup | integer | The order within the Group (or Match for Match Play.) Useful for ordering the display name of the Teams on the Front End. |
| players                | object  | Contains player objecy                                                                                                    |

```
"teams": [
        {
          "orderOfPlayWithinGroup": 0,
          "players": [],
          "teamNo": 38
        },
        {
          "orderOfPlayWithinGroup": 1,
          "players": [],
          "teamNo": 112
        },
        {
          "orderOfPlayWithinGroup": 2,
          "players": [],
          "teamNo": 109
        }
      ]
```

**Players Object**

| Field Name           | Type    | Description                                   |
| -------------------- | ------- | --------------------------------------------- |
| playerId             | integer | The ID of the player across the whole of Golf |
| displayName          | string  | The display name of the player                |
| playerPGATourId      | integer | Player's PGA tour Id (if relevant)            |
| playerEuropeanTourId | integer | Player's European tour Id (if relevant)       |
| playerRandAId        | integer | Player's R\&A Id (if relevant)                |
| playerLPGATourId     | integer | Player's LPGA tour Id (if relevant)           |
| firstName            | string  | The first name of the player                  |
| lastName             | string  | The last name of the player                   |
| country              | string  | The country code of the player’s country      |
| isAmateur            | boolean | Is the player an amateur or not               |
| status               | string  | The player’s entry type into the tournament   |

```
"players": [
                        {
                            "country": "USA",
                            "displayName": "Scott Piercy",
                            "firstName": "Scott",
                            "isAmateur": false,
                            "lastName": "Piercy",
                            "playerEuropeanTourId": "36202",
                            "playerId": 5009,
                            "playerLPGATourId": null,
                            "playerPGATourId": "25818",
                            "playerRandAId": null,
                            "status": "Entered"
                        }
                    ],

```

The above example is for Stroke Play, if two players will appear in a Team much like the Ryder Cup, this formation will look as follows:-

```
 "teams": [
                {
                    "orderOfPlayWithinGroup": 0,
                    "players": [
                        {
                            "country": "ESP",
                            "displayName": "Jon Rahm",
                            "firstName": "Jon",
                            "isAmateur": false,
                            "lastName": "Rahm",
                            "playerEuropeanTourId": "41208",
                            "playerId": 493,
                            "playerLPGATourId": null,
                            "playerPGATourId": "46970",
                            "playerRandAId": "136813",
                            "status": "Entered"
                        },
                        {
                            "country": "ENG",
                            "displayName": "Tyrrell Hatton",
                            "firstName": "Tyrrell",
                            "isAmateur": false,
                            "lastName": "Hatton",
                            "playerEuropeanTourId": "37626",
                            "playerId": 6,
                            "playerLPGATourId": null,
                            "playerPGATourId": "34363",
                            "playerRandAId": "100599",
                            "status": "Entered"
                        }
                    ],
                    "teamNo": 30
                },
                {
                    "orderOfPlayWithinGroup": 1,
                    "players": [
                        {
                            "country": "USA",
                            "displayName": "Scottie Scheffler",
                            "firstName": "Scottie",
                            "isAmateur": false,
                            "lastName": "Scheffler",
                            "playerEuropeanTourId": "41218",
                            "playerId": 5972,
                            "playerLPGATourId": null,
                            "playerPGATourId": "46046",
                            "playerRandAId": "146550",
                            "status": "Entered"
                        },
                        {
                            "country": "USA",
                            "displayName": "Sam Burns",
                            "firstName": "Sam",
                            "isAmateur": false,
                            "lastName": "Burns",
                            "playerEuropeanTourId": "40327",
                            "playerId": 3474,
                            "playerLPGATourId": null,
                            "playerPGATourId": "47504",
                            "playerRandAId": "146566",
                            "status": "Entered"
                        }
                    ],
                    "teamNo": 25
                }
            ]
```

### Playoffs

During a playoff, the schedule will be used in the same way as before. The only way of discerning whether or not a scheduled round would be a play off would be to understand the round type from the isPlayOff is True from the Tournaments end point.
