Booking

Book a Tee Time

To book a tee time send a request to below url.

POST /api/v2/bookings
  • Json body parameters.
    • facilityId (Type: Integer) ID of the facility.
    • teetime (Type: Date yyyy-mm-dd HH:MM:ss) Date of the booking
    • round (Type: String) Name of the round.
    • players (Type: Integer) Number of players participating in the booking (between 1-4).
    • contactPhone (Type: String) Phone number.
    • contactEmail (Type: String) E-mail.
    • contactFirstName (Type: String) First name of the contact person for this booking.
    • contactLastName (Type: String) Last name of the contact person for this booking.
    • holes (Type: Integer) Number of holes (9 or 18).
    • teeId (Type: Integer) ID of the tee time.
    • comments (Type: String): Comment for booking (Optional Field).

All of the above fields are required. An example request could look like this :

curl -X POST -H 'Content-Type:application/json'  --user [[username]]:[[password]] '[[base-url]]/api/v2/bookings'
    -d '{"facilityId":"1",
        "teetime":"2018-08-20 07:20:00",
        "round":"1",
        "players":3,
        "contactPhone":"07712345678",
        "contactEmail":"james.smith@gmail.com",
        "contactName":"James Smith",
        "holes":9,
        "teeId":4250490},
        "comments":"This is a test comment"'
  • Successful response (application/json)
    {
        "success": true,
        "data": {
            "bookingId": "ZG1234"
        }
    }
    

Common Error Response From Booking

When attempting to make a booking via the API, there are instances where the process may encounter errors resulting in a failure to complete the booking. In such cases, the API responds with an HTTP Status Code 400 along with specific error messages to indicate the nature of the failure.

Below are some common error messages you may encounter when a booking fails:

  • It appears that the Tee Sheet Servers are currently unresponsive. Please try again. If the error persists, kindly reach out to our support for further assistance.
  • Transfer of funds from Zest Stripe to Facility Stripe failed for booking with request id ${requestId}. Please try again. If the error persists, kindly reach out to our support for further assistance.
  • It appears that Booking Creation has failed. Please try again. If the error persists, kindly reach out to our support for further assistance.
  • It appears that payment (PI) has failed. Please try again. If the error persists, kindly reach out to our support for further assistance.
  • It appears that payment (PV) has failed. Please try again. If the error persists, kindly reach out to our support for further assistance.
  • There seems to be an issue with the tee times in your cart. Please try searching and booking your desired tee times again. If the error persists, kindly reach out to our support for further assistance.
  • Unfortunately, we were unable to process your booking at the moment. Please try again, and if the error persists, kindly reach out to our support for further assistance.