User Tools

Site Tools


getflight

/itg/getflight

To retrieve detailed data of teetime reservations (called flights). This function is meant for operational purposes, not for management info or statistics.

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 needs to be provided, otherwise the return code 449 - Retry with valid parameters is returned.

If the parameters fltnr and/or startdate are not 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.

If the result set is longer than 1000 records, it will be truncated.

If a wrong authorisation code is provided, the backend will return 401,“Unauthorized”

example: https://backend.intogolf.com/itg/getflight?auth=<your authorisation code>&relnr=659764&startdate=20130530

To obtain the flight for the golfer with id 659764 (see igg/getgolfer) for may 30th, 2013

result (shortened for readability):

{
{
  "getflight": [
    {
      "fltnr": 3436124,
      "startdate": 20130530,
      "starttimebooked": 510,
      "starttimefixed": false,
      "starttime": 510,
      "breaktime": 0,
      "time2": 630,
      "crlnr1": 44,
      "crlnr2": 70,
      "nrofplayers": 3,
      "nomerging": false,
      "origin": 1,
      "timestamp": "2013-05-23T16:07:45+02:00",
      "carnr": 0,
      "carname": null,
      "locked_by": 205,
      "players": [
        {
          "flpnr": 11162606,
          "relnr": 659764,
          "relnrlocal": 12590,
          "name": "knol-pas, s.a.w.",
          "phone": "0135159339",
          "handicap": 54.0,
          "grfnr": 4,
          "grfname": "lid (gratis)",
          "greenfee": 0.0,
          "grfnrdiscount": 0,
          "grfnamediscount": null,
          "discount": 0.0,
          "gfcnr": 0,
          "gfcnrdiscount": 0,
          "scorecardnr": 0,
          "qualifyingnr": 0,
          "carnr": 0,
          "rentals": [
            {
              "rentalnr": 155200,
              "rentaltypenr": 121,
              "rentaltype": "handicart",
              "rentalitemnr": 93,
              "rentalitem": "handicart 2",
              "rentaltimefrom": 510,
              "rentaltimeto": 750,
              "extratimebefore": 10,
              "extratimeafter": 15,
              "extrainfo": "",
              "rentalprice": 0.0,
              "checkedin": false
            }
          ]
        },
        {
          "flpnr": 11162607,
          "relnr": 701160,
          "relnrlocal": 193732,
          "name": "knol, r.j.w.",
          "phone": "0135159339",
          "handicap": 54.0,
          "grfnr": 57,
          "grfname": "greenfee",
          "greenfee": 47.25,
          "grfnrdiscount": 48,
          "grfnamediscount": "bonus",
          "discount": 5.0,
          "gfcnr": 0,
          "gfcnrdiscount": 0,
          "scorecardnr": 0,
          "qualifyingnr": 0,
          "carnr": 0,
          "rentals": [
            {
              "rentalnr": 155199,
              "rentaltypenr": 36,
              "rentaltype": "trolley",
              "rentalitemnr": null,
              "rentalitem": null,
              "rentaltimefrom": 510,
              "rentaltimeto": 750,
              "extratimebefore": 0,
              "extratimeafter": 0,
              "extrainfo": "",
              "rentalprice": 0.0,
              "checkedin": false
            }
          ]
        },
        {
          "flpnr": 11162608,
          "relnr": 243520,
          "relnrlocal": 22359,
          "name": "aikema, annerie",
          "phone": "0118561413",
          "handicap": 45.0,
          "grfnr": 340,
          "grfname": "10 rittenkaart",
          "greenfee": 0.0,
          "grfnrdiscount": 0,
          "grfnamediscount": null,
          "discount": 0.0,
          "gfcnr": 12365,
          "gfcnrdiscount": 0,
          "scorecardnr": 0,
          "qualifyingnr": 0,
          "carnr": 0,
          "gfcname": "10 rittenkaart",
          "gfcdatefrom": 20130501,
          "gfcdateto": 20140430,
          "totalrounds": 10,
          "usedrounds": 0,
          "rentals": [

          ]
        }
      ]
    }
  ]
}

Flight info:

fltnr internal id of this flight
startdate date at which the golfround will be played in YYYYMMDD format
starttimebookedteetime that was booked in minutes since midnight
starttimefixed if true, this teetime is not allowed to shift for teesheet optimization
starttime teetime (same as starttimebooked unless automatic teesheet optimization is enabled)
breaktime pauze in minutes between 9th hole and 10th tee
time2 teetime on the second course loop (10th tee)
crlnr1 internal id of first courseloop
crlnr2 internal id of 2nd courseloop. If 0 only 9 holes are played
nrofplayers number of players in the flight (can be more than 4)
nomerging if true it is not possible to add another booking to fill up the 4 places in a flight
origin 1 - phone/reception, 2 - internet
timestamp date and time the booking was made
carnr internal id of reason if the booking was canceled
carname description of cancelreason
locked_by id of the computer that holds the flight in a lock

Players (if the parameter fltnr was provided, these subrecords may also include players that have canceled (carnr>0):

flpnrinternal id of the flight player
relnrglobal id of the golfer (can be 0 if the golfer is not known globally)
relnrlocallocal id of the golfer for this golfcourse (can be 0 if the golfer is not known locally)
namename of the golfer
phonephone number
handicaphandicap of the golfer
grfnrinternal id of the greenfee
grfnamename of the greenfee
greenfeegreenfee price
grfnrdiscountinternal id of discount
grfnamediscountname of discount
discountdiscount amount
gfcnrinternal id of greenfeecard
gfcnamename of the greenfeecard
gfcdatefromdate the greenfeecard became valid
gfcdateto date after which the greenfeecard is expired
totalroundstotal value of the greenfeecard
usedroundsused up value of the greenfeecard (totalrounds - usedrounds = balance). Beware that this value will only include the current flight if the player has checked in
gfcnrdiscountinternal id of discountcard
gfcdatefromdiscountdate the discountcard became valid
gfcdatetodiscount date after which the discountcard is expired
totalroundsdiscounttotal value of the discountcard
usedroundsdiscountused up value of the discountcard (totalrounds - usedrounds = balance). Beware that this value will only include the current flight if the player has checked in
scorecardnrinternal id of scorecard if the player has checked in (use this to test if the player has checked in and payed)
qualifyingnrinternal id of qualifying card
carnrinternal id of cancel reason if this player was canceled

Rentals (if a rental record was assigned to a specific player, the record will appear as a subrecord to that player in the resultset. All rental records that are not assigned to a player will be treated as if they were assigned to the first player in the flight):

rentalnrinternal id id the rental record
rentaltypenrinternal id of the type of object that was rented
rentaltypename of the type of object that was rented
rentalitemnrinternal id of the item that was rented (if specified)
rentalitemname if the item that was rented if specified (i.e. Buggy 3)
rentaltimefromtime from in minutes since midnight
rentaltimetotime to in minutes since midnight
extratimebeforeextra time the item is blocked before time from
extratimeafterextra time the item is blocked after time to
extrainfoextra info textfield
rentalpricerental fee
checkedinif true the rental item was checked in together with the player and has been paid for
getflight.txt · Last modified: 2014/05/21 10:48 (external edit)