User Tools

Site Tools


teetimes

/igg/teetimes

To retreive a list of teetimes. You will get a teetime list per courseloops per course. Typically each courseloop will be placed in a separate column in your gui and courseloops of one course can be grouped together.

parameters:

auth the authorisation code you received from Intogolf BV (mandatory)
crsnr show only this course exclusively
date date in YYYYMMDD format (mandatory)
players nr of players you want to book (1-4) (default 2)
category 0 - show teetimes for greenfee players 1- show teetimes for members (will only apply to the first golfcourse in the resultset, the teetimes for the next courses always show teetimes for greenfee players)(this parameter is only needed if relnr is not provided, otherwise the backend will know if the client is a member or not)
centercrsnr the course you want to appear in the first column
cols number of desired columns (setting this value too high, will result in slow response times)

if you do not provide the relnr parameter, you can use category instead. But golfcourses often have different types of memberships and they can have different permissions. Setting category=1 will not always produce a reliable teesheet. For category=0 the problem doesn’t exist, because there are useually not many different types of greenfee players and if there are they dont have different permissions. If you get a teesheet that shows times that the client would not be allowed to book (because of providing category=1 instead of relnr=1234) the user will receive an error message in the end when he tries to make a teetime reservation and the system refuses it.

example: https://backend.ikgagolfen.nl/igg/teetimes?auth=<your authorisation code>&date=20120926&players=2&category=0&cols=3&centercrsnr=19

To obtain the teesheet for 26/9/2012 for Golfbaan Sluispolder, displaying 3 columns

result (shortened for readability):

{
  "teetimes": [
    {
      "crsnr": 19,
      "crsshortname": "Sluispolder",
      "crsname": "Golfbaan Sluispolder",
      "crsaddress1": "Sluispolderweg 7",
      "crsaddress2": "1817 BM Alkmaar",
      "crsphone": "072 5111555",
      "crspremiumyn": 0,
      "crlnr": 16,
      "crlname": "lus b",
      "crlduration": 126,
      "sunrise": 438,
      "sunset": 1186,
      "dark": 1206,
      "ebfee": 0,
      "twfee": 1006,
      "times": [
        {
          "time": 441,
          "maxholes": 9
        },
        {
          "time": 448,
          "maxholes": 9
        },
        {
          "time": 560,
          "timeto": 566,
          "maxholes": 9,
          "blocktype": 1
        },
        {
          "time": 616,
          "timeto": 784,
          "maxholes": 9,
          "blocktype": 16,
          "blockrefnr": 85618
        },
        {
          "time": 1036,
          "maxholes": 9,
          "status": 17
        }
      ]
    },
    {
      "crsnr": 19,
      "crsshortname": "Sluispolder",
      "crsname": "Golfbaan Sluispolder",
      "crsaddress1": "Sluispolderweg 7",
      "crsaddress2": "1817 BM Alkmaar",
      "crsphone": "072 5111555",
      "crspremiumyn": 0,
      "crlnr": 15,
      "crlname": "lus a",
      "crlduration": 126,
      "sunrise": 438,
      "sunset": 1186,
      "dark": 1206,
      "ebfee": 0,
      "twfee": 1006,
      "times": [
        {
          "time": 441,
          "maxholes": 9
        },
        {
          "time": 448,
          "maxholes": 18,
          "nextcrlnr": 16,
          "minholes": 9
        },
        {
          "time": 938,
          "maxholes": 18,
          "nextcrlnr": 16,
          "minholes": 9,
          "status": 1
        },
        {
          "time": 959,
          "maxholes": 9,
          "status": 3
        },
        {
          "time": 1015,
          "maxholes": 9,
          "status": 19
        },
        {
          "time": 1078,
          "maxholes": 9,
          "status": 19
        }
      ]
    },
    {
      "crsnr": 19,
      "crsshortname": "Sluispolder",
      "crsname": "Golfbaan Sluispolder",
      "crsaddress1": "Sluispolderweg 7",
      "crsaddress2": "1817 BM Alkmaar",
      "crsphone": "072 5111555",
      "crspremiumyn": 0,
      "crlnr": 17,
      "crlname": "par 3",
      "crlduration": 119,
      "sunrise": 438,
      "sunset": 1186,
      "dark": 1206,
      "ebfee": 0,
      "twfee": 1006,
      "times": [
        {
          "time": 441,
          "maxholes": 9
        }
      ]
    }
  ]
}

All times are displayed in minutes since midnight (0=00:00, 60=1:00, 720=12:00, 730=12:10, 1439=23:59)

The attributes sun-rise and sunset show the time the sun comes up and goes down. After sunset there are still a few minutes where it is only half dark and you can still play golf. At “dark” it is time to stop golfing.

If an early bird fee is defined by the course, the ending time for this discount fee is provided in the attribute ebfee

If a twilight fee is defined by the course, the starting time for this discount fee is provided in the attribute twfee

crlduration is the number of minutes it takes to play the course loop.

time teetime
timeto if the teetime is blocked for a longer period, timeto will tell you the end time
minholes min nr of holes that can be played (9 or 18) i minholes is not provided in the result set the value of maxholes is mandatory
maxholes max nr of holes that can be played (9 or 18) if minholes=9 and maxholes=18, the user should be prompted with the option to book 9 or 18 holes. If maxholes=18 and minholes is not present in the result set, it is only possible to book 18 holes
nextcrlnr the courseloop that will be used for holes 10-18 (only if maxholes=18)
blocktype 1 - booked by another flight, 2 - booked but you can add yourself to the booking, 4 - not allowed for this golfer or for the category, 8 - date is too far in the future for this golfer or this category, 16 - closed for an event or competition, 32 - course is closed
blockrefnr internal id of the booking that is causing the value of blocktype
descr string containing the names of the people in the booking (only if these people are on your friendlist)
status 1 - golf round will end in dark, 2 - 9 holes only, (4 - this value is no used), 8 - eb fee is applicable, 16 - twilight fee is applicable, 32 - booking is in option. These statuses can be bitwise combined (i.e 17 = golf round will end in the dark and twilight fee is applicable)

if a wrong authorisation code is provided, the backend will return “no authorisation”

teetimes.txt · Last modified: 2017/11/22 16:20 by marcel