# Entrylist

This endpoint returns the list of teams/players who are going to play in any given tournament. The first list of players will be provided roughly two weeks before a tournament starts, and will be updated as and when players are added/drop out of the tournament.

## Endpoint URL

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

Please note that to access an entry list, you will have to enter the tournament ID in the “{id}” field. 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.

## Response Model

\
**Entrylist Object**

| Field Name | Type | Description                                                                                     |
| ---------- | ---- | ----------------------------------------------------------------------------------------------- |
| teamId     | int  | The ID of that team for that tournament – stays unique for that team throughout the tournament. |
| players    | list | List of the players within that team. Is strokeplay one team = one player                       |

`https://dde-api.data.imgarena.com/golf/tournaments/{id}/entrylist`

Please note that to access an entry list, you will have to enter the tournament ID in the “{id}” field. Note that you can pass ID as 1 to return sample data. i,e `https://dde-api.data.imgarena.com/golf/tournaments/1/entrylist`<br>

````
```json
[
    {
        "players": [
            {
                "country": "NIR",
                "displayName": "Rory McIlroy",
                "firstName": "Rory",
                "isAmateur": false,
                "lastName": "McIlroy",
                "pending": false,
                "playerEuropeanTourId": "34024",
                "playerId": 14,
                "playerLPGATourId": null,
                "playerPGATourId": "28237",
                "playerRandAId": "73414",
                "status": "Entered"
            }
        ],
        "teamNo": 1
    },
```
````

**Players List**

| Field Name           | Type            | Description                                                                                                                                                                      |
| -------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| displayName          | string          | The display name of the player.                                                                                                                                                  |
| country              | string          | 3-character FIFA Country Code.                                                                                                                                                   |
| IsAmateur            | boolean         | True if the player is an amateur.                                                                                                                                                |
| lastName             | string          | The last name of the player.                                                                                                                                                     |
| firstName            | string          | The first name of the player.                                                                                                                                                    |
| pending              | boolean         | Pending flag if the player needs to be verified by our support team. Note that if this flag is true, the player name will be marked as "Unknown".                                |
| status               | string          | <p>Describes current player status in tournament. Possible values:<br>Entered, Alternate, Playing, Withdrawn, Retired, Disqualified, MissedCut, Removed, Unknown, MadeCutDNF</p> |
| playerId             | integer         | The unique player ID of that player                                                                                                                                              |
| playerPGATourId      | integer or null | The unique PGA Tour player ID of that player (if applicable)                                                                                                                     |
| playerLivId          | integer or null | The unique Liv Tour player ID of that player (if applicable)                                                                                                                     |
| playerEuropeanTourId | integer or null | The unique European Tour player ID of that player (if applicable)                                                                                                                |
| playerLPGATourId     | integer or null | The unique LPGA Tour player ID of that player (if applicable)                                                                                                                    |
| playerRandAId        | integer or null | Player's R\&A Id (if relevant)                                                                                                                                                   |

````
  "players": [
            {
                "country": "ENG",
                "displayName": "Tommy Fleetwood",
                "firstName": "Tommy",
                "isAmateur": false,
                "lastName": "Fleetwood",
                "pending": false,
                "playerEuropeanTourId": "35371",
                "playerId": 12,
                "playerLivId": null,
                "playerLPGATourId": null,
                "playerPGATourId": "30911",
                "playerRandAId": "129462",
                "status": "Entered"
            }
        ]
```
````

The above example is for normal Stroke Play. During Team/Match Play where two players will play together in Stroke/match Play (much like the Team Cup/Ryder cup) the formation of the players is as below.

````
"players": [
            {
                "country": "ENG",
                "displayName": "Tommy Fleetwood",
                "firstName": "Tommy",
                "isAmateur": false,
                "lastName": "Fleetwood",
                "pending": false,
                "playerEuropeanTourId": "35371",
                "playerId": 12,
                "playerLPGATourId": null,
                "playerLivId": null,
                "playerPGATourId": "30911",
                "playerRandAId": "129462",
                "status": "Entered"
            },
            {
                "country": "ENG",
                "displayName": "Aaron Rai",
                "firstName": "Aaron",
                "isAmateur": false,
                "lastName": "Rai",
                "pending": false,
                "playerEuropeanTourId": "39583",
                "playerId": 122,
                "playerLPGATourId": null,
                "playerLivId": null,
                "playerPGATourId": "46414",
                "playerRandAId": "146561",
                "status": "Entered"
            }
        ],
        "teamNo": 12
```
````

#### Ryder Cup Example

During the Ryder Cup, a squad will be used to provide relationships of European and US players. The Entry List teams serve the purpose of providing ids for the combinations of players used for Foursomes, Fourballs and Singles matches.

Below is a snippet of a Ryder Cup Entry List, notice that Justin Rose is involved in 3 Teams. These three team combinations would be involved in respective Fourball, Foursome or Singles matches.

```
[
  {
    "players": [
      {
        "country": "USA",
        "displayName": "Collin Morikawa",
        "firstName": "Collin",
        "isAmateur": false,
        "lastName": "Morikawa",
        "playerEuropeanTourId": "43410",
        "playerId": 3378,
        "pending": false,
        "playerLPGATourId": null,
        "playerPGATourId": "50525",
        "playerRandAId": "146554",
        "playerLivId": null,
        "status": "Entered"
      }
    ],
    "teamNo": 1
  },
  ...................
  {
    "players": [
      {
        "country": "USA",
        "displayName": "Scottie Scheffler",
        "firstName": "Scottie",
        "isAmateur": false,
        "lastName": "Scheffler",
        "pending": false,
        "playerEuropeanTourId": "41218",
        "playerId": 5972,
        "playerLPGATourId": null,
        "playerPGATourId": "46046",
        "playerRandAId": "146550",
        "playerLivId": null,
        "status": "Entered"
      }
    ],
    "teamNo": 8
  },
  {
    "players": [
      {
        "country": "USA",
        "displayName": "Max Homa",
        "firstName": "Max",
        "isAmateur": false,
        "lastName": "Homa",
        "pending": false,
        "playerEuropeanTourId": "39358",
        "playerId": 3886,
        "playerLPGATourId": null,
        "playerPGATourId": "39977",
        "playerRandAId": "146567",
        "playerLivId": null,
        "status": "Entered"
      }
    ],
    "teamNo": 9
  }
]
```
