GolfNow API Frequently Asked Questions

Is there a test API available to develop against?

Yes. The api is located at https://sandbox.api.gnsvc.com

What fields are required when registering a customer?

  • EmailAddress
  • Password
  • FirstName
  • LastName
  • Address1
  • City
  • StateProvince
  • PostalCode (only if Country is not Ireland, Scotland, Bermuda)
  • Country
  • Phone

What is the policy for customer passwords?

  1. Password length must be at least 8 characters.
  2. Password must contain no space.
  3. Password must contain at least one letter.
  4. Password must contain at least one number.

Can I book tee times in the Sandbox environment?

Yes, you are able to book tee times in the Sandbox environment. Booked tee times will not be sent to course tee sheets and the payment information used will not be charged. By convention, only tee times where the time ends in a multiple of 10 can be booked (ie: 10:00, 10:10, 10:20, etc...). Other tee times will result in a tee time not found error when reserving the round.

What's with the __type properties on JSON objects?

In our examples, you might see a JSON object with a __type property. For example, when adding a reservation, the payment information property of the request body makes use of a property called

"__type" : "CreditCardPayment:#GolfNow.API.Contracts.DataContracts"

This is an unfortunate implementation detail that is present due to the fact that the classes that implement that part of the contract make use of inheritance. This is how the client must specify to the API the type of object that should be created when deserializing the message.


An additional limitation is that the property must be the first property. If it is not, the deserializer will not know what properties to look for during deserialization.

What are skip and take?

Skip and take are paging parameters that let you retrieve the information returned by certain operations. Skip is the ordinal distance from the first item in the full result set. Take is the maximum number of items to be returned.

For example, using the set {A, B, C, D}

  • &skip=0&take=1 yields {A}
  • &skip=1&take=1 yields {B}
  • &skip=2&take=2 yields {C, D}
  • &skip=4&take=1 yields { }
  • &skip=0&take=4 yields {A, B, C, D}

What are expanded properties?

Expanded properties gives the API client the ability to load optional data that is not returned by default. User have the option to populate one or more expandable properties. If no value is specified then no expanded properties will be populated. The values of the "expand" parameter will vary depending on the operation being called and the return type supported. For details of expanded properties that are supported for each operation please refer to the documentation for the operation. To specify multiple expanded properties, use the pipe delimiter which has a url encoding of "%7c".

 

REST Call With One Expanded Property

 

GET /rest/customers/[email protected]?expand=LoyaltyStatus

 

REST Call With Two Expanded Properties

 

GET /rest/channel/1650/facilities/11107?expand=CourseStatistics%7cRatingSummary

 

When requesting an invoice for a customer, are the $ amounts returned representative of rates for a single player or all the players on the invoice?

All pricing is for the total number of players on the invoice.

What credit cards can I use to test tee time bookings in the Sandbox?

The numbers below will satisfy the algorithm for their respective credit card type but do not provide actual functionality to authorize any real financial transaction. Any expiration date in the future will work. Address can be anything as long as required fields are filled with required form of data (text or number). These numbers are exclusive to the DEV environment.

Visa
  • 4012 8888 8888 1881
American Express
  • 3400 0000 0000 009
  • 3434 3434 3434 343
Discover (only valid in the U.S.)
  • 6011 0000 0000 0004
MasterCard
  • 5123 6197 4539 5853
  • 5555 5555 5555 4444