User Tools

Site Tools


getflight

This is an old revision of the document!


/itg/getflight

To retreive detailed data of teetime reservations (called flights).

parameters:

auth the authorisation code you received from Intogolf BV (mandatory)
fltnr internal id of the flight
relnr internal id of a golfer within the domain of ikgagolfen
relnrlocal local id of a golfer within the domain of the golfcourse
startdate date the flightreservation is made for (format YYYYMMDD)
starttime time the flightreservation is made for in minutes since midnight (600 = 10 o'clock, 720 is noon)

At least one of the parameters fltnr, relnr, relnrlocal, startdate, strttime is needs to be prvided, otherwise the return code 449 - Retry with valid parameters is returned. If the parameters fltnr and/or startdate are nort provided, the resultset will always be limited to startdates >= today If the parameter fltnr is provided all other selection parameters are ignored. If the parameter fltnr is not provided, only non-canceled flights are returned. The result set will never consist more than 1000 records.

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)
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
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”

getflight.1369319802.txt.gz · Last modified: 2013/05/23 15:36 (external edit)