User Tools

Site Tools


getflight

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
getflight [2013/05/23 14:39]
richard
getflight [2014/05/21 10:48] (current)
Line 1: Line 1:
 ====/​itg/​getflight==== ====/​itg/​getflight====
-To retreive ​detailed data of teetime reservations (called flights).+To retrieve ​detailed data of teetime reservations (called flights). This function is meant for operational purposes, not for management info or statistics.
  
 parameters: parameters:
Line 10: Line 10:
 |starttime |time the flightreservation is made for in minutes since midnight (600 = 10 o'​clock,​ 720 is noon) | |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 provided, otherwise the return code 449 - Retry with valid parameters is returned.+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 nort provided, the resultset will always be limited to startdates >= today+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 provided all other selection parameters are ignored.
Line 18: Line 18:
 If the parameter fltnr is not provided, only non-canceled flights are returned. If the parameter fltnr is not provided, only non-canceled flights are returned.
  
-The result set will never consist more than 1000 records.+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 example: https://​backend.intogolf.com/​itg/​getflight?​auth=<​your authorisation code>&​relnr=659764&​startdate=20130530
Line 30: Line 32:
     {     {
       "​fltnr":​ 3436124,       "​fltnr":​ 3436124,
-      "​startdate": ​735383,+      "​startdate": ​20130530,
       "​starttimebooked":​ 510,       "​starttimebooked":​ 510,
       "​starttimefixed":​ false,       "​starttimefixed":​ false,
Line 44: Line 46:
       "​carnr":​ 0,       "​carnr":​ 0,
       "​carname":​ null,       "​carname":​ null,
 +      "​locked_by":​ 205,
       "​players":​ [       "​players":​ [
         {         {
Line 134: Line 137:
           "​carnr":​ 0,           "​carnr":​ 0,
           "​gfcname":​ "10 rittenkaart",​           "​gfcname":​ "10 rittenkaart",​
-          "​gfcdatefrom": ​735376+          "​gfcdatefrom": ​20130501
-          "​gfcdateto": ​735740,+          "​gfcdateto": ​20140430,
           "​totalrounds":​ 10,           "​totalrounds":​ 10,
           "​usedrounds":​ 0,           "​usedrounds":​ 0,
Line 147: Line 150:
 }</​code>​ }</​code>​
  
-All times are displayed ​in minutes since midnight ​(0=00:00, 60=1:00, 720=12:00730=12:10, 1439=23:59+Flight info: 
- +|fltnr ​         |internal id of this flight| 
-The attributes sun-rise ​and sunset show the time the sun comes up and goes downAfter 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. +|startdate ​     |date at which the golfround will be played in YYYYMMDD format| 
- +|starttimebooked|teetime that was booked ​in minutes since midnight
-If an early bird fee is defined by the course, ​the ending time for this discount fee is provided in the attribute ebfee+|starttimefixed |if truethis 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 courseloopIf 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|
  
-If a twilight fee is defined by the course, the starting time for this discount ​fee is provided ​in the attribute twfee+Players (if the parameter fltnr was providedthese 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|
  
-crlduration is the number of minutes it takes to play the course loop.+Rentals (if a rental record was assigned to a specific player, ​the record will appear as a subrecord ​to that player in the resultsetAll rental records that are not assigned to a player will be treated as if they were assigned to the first player in the flight):
  
-|time |teetime+|rentalnr|internal id id the rental record
-|timeto |if the teetime is blocked for a longer period, timeto will tell you the end time+|rentaltypenr|internal id of the type of object that was rented
-|minholes |min nr of holes that can be played (9 or 18)+|rentaltype|name of the type of object ​that was rented
-|maxholes |max nr of holes that can be played ​(9 or 18if minholes=9 and maxholes=18,​ the user should be prompted with the option to book 9 or 18 holes+|rentalitemnr|internal id of the item that was rented ​(if specified)| 
-|nextcrlnr |the courseloop ​that will be used for holes 10-18 (only if maxholes=18)| +|rentalitem|name if the item that was rented ​if specified (i.e. Buggy 3)| 
-|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+|rentaltimefrom|time from in minutes since midnight| 
-|blockrefnr |internal id of the booking that is causing the value of blocktype+|rentaltimeto|time ​to in minutes since midnight| 
-|descr |string containing the names of the people in the booking (only if these people are on your friendlist)+|extratimebefore|extra time the item is blocked before time from
-|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)|+|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|
  
-if a wrong authorisation code is provided, the backend will return “no authorisation” 
  
getflight.1369319991.txt.gz · Last modified: 2013/05/23 15:39 (external edit)