This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
getflight [2013/05/23 14:36] 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 prvided, 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. | ||
+ | |||
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. | ||
- | example: https://backend.ikgagolfen.nl/igg/teetimes?auth=<your authorisation code>&date=20120926&players=2&category=0&cols=3¢ercrsnr=19 | + | If the result set is longer than 1000 records, it will be truncated. |
- | To obtain the teesheet for 26/9/2012 for Golfbaan Sluispolder, displaying 3 columns | + | 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): | result (shortened for readability): | ||
<code>{ | <code>{ | ||
- | "teetimes": [ | + | { |
+ | "getflight": [ | ||
{ | { | ||
- | "crsnr": 19, | + | "fltnr": 3436124, |
- | "crsshortname": "Sluispolder", | + | "startdate": 20130530, |
- | "crsname": "Golfbaan Sluispolder", | + | "starttimebooked": 510, |
- | "crsaddress1": "Sluispolderweg 7", | + | "starttimefixed": false, |
- | "crsaddress2": "1817 BM Alkmaar", | + | "starttime": 510, |
- | "crsphone": "072 5111555", | + | "breaktime": 0, |
- | "crspremiumyn": 0, | + | "time2": 630, |
- | "crlnr": 16, | + | "crlnr1": 44, |
- | "crlname": "lus b", | + | "crlnr2": 70, |
- | "crlduration": 126, | + | "nrofplayers": 3, |
- | "sunrise": 438, | + | "nomerging": false, |
- | "sunset": 1186, | + | "origin": 1, |
- | "dark": 1206, | + | "timestamp": "2013-05-23T16:07:45+02:00", |
- | "ebfee": 0, | + | "carnr": 0, |
- | "twfee": 1006, | + | "carname": null, |
- | "times": [ | + | "locked_by": 205, |
+ | "players": [ | ||
{ | { | ||
- | "time": 441, | + | "flpnr": 11162606, |
- | "maxholes": 9 | + | "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 | ||
+ | } | ||
+ | ] | ||
}, | }, | ||
{ | { | ||
- | "time": 448, | + | "flpnr": 11162607, |
- | "maxholes": 9 | + | "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 | ||
+ | } | ||
+ | ] | ||
}, | }, | ||
{ | { | ||
- | "time": 560, | + | "flpnr": 11162608, |
- | "timeto": 566, | + | "relnr": 243520, |
- | "maxholes": 9, | + | "relnrlocal": 22359, |
- | "blocktype": 1 | + | "name": "aikema, annerie", |
- | }, | + | "phone": "0118561413", |
- | { | + | "handicap": 45.0, |
- | "time": 616, | + | "grfnr": 340, |
- | "timeto": 784, | + | "grfname": "10 rittenkaart", |
- | "maxholes": 9, | + | "greenfee": 0.0, |
- | "blocktype": 16, | + | "grfnrdiscount": 0, |
- | "blockrefnr": 85618 | + | "grfnamediscount": null, |
- | }, | + | "discount": 0.0, |
- | { | + | "gfcnr": 12365, |
- | "time": 1036, | + | "gfcnrdiscount": 0, |
- | "maxholes": 9, | + | "scorecardnr": 0, |
- | "status": 17 | + | "qualifyingnr": 0, |
- | } | + | "carnr": 0, |
- | ] | + | "gfcname": "10 rittenkaart", |
- | }, | + | "gfcdatefrom": 20130501, |
- | { | + | "gfcdateto": 20140430, |
- | "crsnr": 19, | + | "totalrounds": 10, |
- | "crsshortname": "Sluispolder", | + | "usedrounds": 0, |
- | "crsname": "Golfbaan Sluispolder", | + | "rentals": [ |
- | "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 | + | |
} | } | ||
] | ] | ||
Line 145: | Line 150: | ||
}</code> | }</code> | ||
- | All times are displayed in minutes since midnight (0=00:00, 60=1:00, 720=12:00, 730=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 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. | + | |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 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| | ||
- | 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 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| | ||
- | 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 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): |
- | |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 18) if 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” | ||