API Update Round

Update Round (PUT)

The update round webservice accepts the JSON seen below and represents an entire rounds details.  It includes player information like name and handicap as well as their shots taken on each hole.  This data is the raw shots.  All calculations will be done on the server and returned in the Competition Details and the Leaderboard.

URL: http://golfscorecardpro.com:23556/v1/competition/competition id/authorisation id
 

Round Update JSON


{
  "_id": "D975F2CB-395C-4E95-A0B7-EE69A92C776C",
  "players": [
    {
      "name": "Tom",
      "no": 1,
      "_id": "9E5CE276-B7E9-4CCB-AC8F-9F81493281A2",
      "shots": [
        {
          "no": 1,
          "shot": 3
        },
        {
          "no": 2,
          "shot": 4
        }
      ],
      "handicap": 5
    },
    {
      "name": "Dick",
      "no": 2,
      "_id": "8C787C4F-642F-4D88-A570-0E39443CEC46",
      "shots": [
        {
          "no": 1,
          "shot": 5
        },
        {
          "no": 2,
          "shot": 6
        }
      ],
      "handicap": 10
    },
    {
      "name": "Harry",
      "no": 3,
      "_id": "74C2B813-FD3D-4E66-BABA-7EBC9A3163EC",
      "shots": [
        {
          "no": 1,
          "shot": 5
        },
        {
          "no": 2,
          "shot": 6
        }
      ],
      "handicap": 15
    },
    {
      "name": "Bob",
      "no": 4,
      "_id": "C5B3D30D-5427-4D59-9228-9BE2DD0A8866",
      "shots": [
        {
          "no": 1,
          "shot": 6
        },
        {
          "no": 2,
          "shot": 5
        }
      ],
      "handicap": 20
    }
  ],
  "team": "Team A"
}

Details

Round PUT JSON has the  following items:

  • Base Information

    Line 2: The “_id” is a guid unique to the round.

    Lines 3 – 68: An array of the players

    Line 69: The team name when playing team competitions

  • Player Details

    Lines 5: The players name.

    Line 6: A number between 1 and 4 that represents the order of players.  This will be used for 2BBB scoring when players 1 and 2 make a team and players 3 and 4 make anothe.

    Line 7: The “_id” is a guid unique to the player.

    Lines 8 – 17: An array of objects that represent the shots take on each hole.  Shot is the actual number of shots taken.  In this example the players have finished the first two holes.

    Line 8: The players handicap.  This is the true handicap even when playing in a handicap reduced competition.