Welcome to the home of the GolfNow API, an easy to use reservation and booking service that makes it easy to find courses, tee times, and make reservations. It provides resources to GolfNow partners and affiliate golf courses to integrate their websites and mobile apps with this reservation and booking service for searching and booking tee times at all GolfNow affiliated golf courses.

Requesting Access

First things first, you will need access to the API. The development API endpoint is located at https://sandbox.api.gnsvc.com/rest and access can be granted by clicking here.

Client Authentication

Two methods are available for client authentication: Simple Authentication and authentication using an Authorization Signature.

Simple Authentication

For simple authentication, just pass in your API client's assigned UserName and Password request headers with your assigned UserName and Password.
The following is a sample request using simple authentication:

HTTP Request

POST /rest/system/status/secure-echo HTTP/1.1
Content-Type: application/json; charset=utf-8
UserName: UserName
Password: Password
Host: sandbox.api.gnsvc.com
Content-Length: 37
Accept-Encoding: gzip, deflate
AdvancedErrorCodes: True

Body

Authorization Signature

To use the more secure Authorization signature, you must generate an Authorization signature using your assinged UserName, Password and ClientApplicationSecret, plus a Unix Timestamp representing the current date and time in UTC. For security purposes, the timestamp is valid for only one minute and will be rejected if it is older than one minute.

The generated Authorization signature is passed in as the "Authorization" http header, along with the "Timestamp" header, which is used to pass in the timestamp used to generate the Authorization string.

The Authorization signature is created by HMAC-256 signing the following string concatenation, using your assigned ClientApplicationSecret as the key, and Base64 encoding the results:

Username + SHA1-Hashed Password as Base64-encoded string + UTC Timestamp

Click here for more detailed instructions and code samples.

The following is a sample request using the Timestamp and Authorization headers:

HTTP Request

POST /rest/system/status/secure-echo HTTP/1.1
Content-Type: application/json; charset=utf-8
UserName: UserName
Timestamp: 1397500408
Authorization: /pO71xQDqtAyMi9KOAzg4zUlNOhoFvROo4ZZp0GDqLE=
Host: sandbox.api.gnsvc.com
Content-Length: 37
Accept-Encoding: gzip, deflate
AdvancedErrorCodes: True

Body

Hello World

The following sample demonstrates a successful hello world request to the GolfNow API.

HTTP Request

POST /rest/system/status/secure-echo HTTP/1.1
Content-Type: application/json; charset=utf-8
UserName: UserName
Password: Password
Host: sandbox.api.gnsvc.com
Content-Length: 37
Accept-Encoding: gzip, deflate
AdvancedErrorCodes: True

Body

HTTP Response

HTTP/1.1 200 OK
Content-Length: 37
Content-Type: application/json; charset=utf-8

Body

Getting Tee Times

The following code sample will get facilities and tee times near a specified geo-location.

HTTP Request

GET /rest/channel/11329/facilities?q=geo-location&latitude=28.4158&longitude=-81.2989&proximity=25&expand=FacilityDetail.Ratesets 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

HTTP/1.1 200 OK
Content-Length: 145608
Content-Type: application/json; charset=utf-8

Body

Authenticating A Customer

HTTP Request

POST /rest/customers/[email protected]/authentication-token HTTP/1.1
Content-Type: application/json; charset=utf-8
UserName: UserName
Password: Password
Host: sandbox.api.gnsvc.com
Content-Length: 89
AdvancedErrorCodes: True

Body

HTTP Response

HTTP/1.1 200 OK
Content-Length: 706
Content-Type: application/json; charset=utf-8

Body


Continuation Token

When the client makes an API call that uses a customer token, the API will respond with a new customer token that can be used for a specified time period after the use of the first token. This new token will be in the response headers as 'CustomerToken'. The client can specify the timeout in minutes of this new token by using a 'CustomerTokenTimeout' header value in the request. The maximum timeout value is 15 minutes.