Searching for Tee Times

The first step in any workflow is to search for a tee time rate to book. There are many API methods to do so, but we will do this using a popular method, GetTeeTimesByGeolocation. Among other parameters, this method accepts a latitude-longitude pair, and a radius in which to search - it will leverage these parameters to find tee times at facilities within the confines of the resultant circle.


Note that all of the parameters specified in the URI below are required. GetTeeTimesByGeolocation accepts a number of other parameters, which further aid in tailoring results to your particular needs. Its full specification may be found on the API Specification page.

HTTP Request

GET /rest/channel/331/facilities/tee-times?q=geo-location&latitude=28.4158&longitude=-81.2989&proximity=25&date-min=2015-06-09T00%3a00%3a00&date-max=2015-06-09T23%3a59%3a59&take=100 HTTP/1.1
Content-Type: application/json; charset=utf-8
UserName: UserName
Password: Password
Host: sandbox.api.gnsvc.com
Accept-Encoding: gzip, deflate
AdvancedErrorCodes: True

HTTP Response


The result set has been artificially truncated for ease of reading.


There are three fields in the top level object of the search. LimitReached allows you to know whether or not the API has hit its limit for the number of results it will return at one time. At this time, the limit is 1200.


The TeeTimes array the bookable rates you have searched for. Each entry details:


This object is known as a rate set. The rate object associated with the rate set are contained in the Rates array beneath the rate set, and detail the price, number of seats available, and other useful information about the tee time. Of particular importance to this method call is the TeeTimeRateID field, which is a key into locking in a booking.


For the purpose of our example, we will be using the rate with TeeTimeRateId -935134208.


Click to continue to: Authenticating a Customer.


Return to the end-to-end example index.