User Tools

Site Tools


getflight

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
getflight [2013/05/23 14:27]
richard created
getflight [2014/05/21 10:48] (current)
Line 1: Line 1:
-test+====/​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):​ 
 +<​code>​{ 
 +
 +  "​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":​ [ 
 + 
 +          ] 
 +        } 
 +      ] 
 +    } 
 +  ] 
 +}</​code>​ 
 + 
 +Flight info: 
 +|fltnr ​         |internal id of this flight| 
 +|startdate ​     |date at which the golfround will be played in YYYYMMDD format| 
 +|starttimebooked|teetime 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):​ 
 +|flpnr|internal id of the flight player| 
 +|relnr|global id of the golfer (can be 0 if the golfer is not known globally)| 
 +|relnrlocal|local id of the golfer for this golfcourse (can be 0 if the golfer is not known locally)| 
 +|name|name of the golfer| 
 +|phone|phone number| 
 +|handicap|handicap of the golfer| 
 +|grfnr|internal id of the greenfee| 
 +|grfname|name of the greenfee| 
 +|greenfee|greenfee price| 
 +|grfnrdiscount|internal id of discount| 
 +|grfnamediscount|name of discount| 
 +|discount|discount amount| 
 +|gfcnr|internal id of greenfeecard| 
 +|gfcname|name of the greenfeecard| 
 +|gfcdatefrom|date the greenfeecard became valid| 
 +|gfcdateto| date after which the greenfeecard is expired| 
 +|totalrounds|total value of the greenfeecard| 
 +|usedrounds|used up value of the greenfeecard (totalrounds - usedrounds = balance). Beware that this value will only include the current flight if the player has checked in| 
 +|gfcnrdiscount|internal id of discountcard| 
 +|gfcdatefromdiscount|date the discountcard became valid| 
 +|gfcdatetodiscount| date after which the discountcard is expired| 
 +|totalroundsdiscount|total value of the discountcard| 
 +|usedroundsdiscount|used up value of the discountcard (totalrounds - usedrounds = balance). Beware that this value will only include the current flight if the player has checked in| 
 +|scorecardnr|internal id of scorecard if the player has checked in (use this to test if the player has checked in and payed)| 
 +|qualifyingnr|internal id of qualifying card| 
 +|carnr|internal 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): 
 + 
 +|rentalnr|internal id id the rental record| 
 +|rentaltypenr|internal id of the type of object that was rented| 
 +|rentaltype|name of the type of object that was rented| 
 +|rentalitemnr|internal id of the item that was rented (if specified)| 
 +|rentalitem|name if the item that was rented if specified (i.e. Buggy 3)| 
 +|rentaltimefrom|time from in minutes since midnight| 
 +|rentaltimeto|time to in minutes since midnight| 
 +|extratimebefore|extra time the item is blocked before time from| 
 +|extratimeafter|extra time the item is blocked after time to| 
 +|extrainfo|extra info textfield| 
 +|rentalprice|rental fee| 
 +|checkedin|if true the rental item was checked in together with the player and has been paid for| 
 + 
getflight.1369319237.txt.gz · Last modified: 2013/05/23 15:27 (external edit)