Create Booking
Book a Tee Time
To book a tee time send a request to below url.
POST /api/v4/bookings
- Json body parameters.
- facilityId (Type: Integer) ID of the facility.
- teetime (Type: Date yyyy-mm-dd HH:MM:ss) Date of the booking
- course (Type: String) Name of the course.
- players (Type: Integer) Number of players participating in the booking (between 1-4).
- teeId (Type: Integer) ID of the tee time.
- holes (Type: Integer) Number of holes (9 or 18).
- productId (Type: Int) Id of the Product.
- contactFirstName (Type: String) First name of the contact person for this booking.
- contactLastName (Type: String) Last name of the contact person for this booking.
- contactPhone (Type: String) Phone number.
- contactEmail (Type: String) E-mail.
- isKClub: (Type: Boolean) true for KClub Channel otherwise false
- withGroupDetails: (Type: Boolean) true to get group details otherwise false
All of the above fields are required.
- Json optional body parameters.
- netRate (Type: BigDecimal) Total amount that we need to send facility for given tee slot.
- extraProduct (Type: ExtraProduct(mid(Type: Integer), quantity(Type: Integer))) ExtraProduct for Booking
- chronogolfPlayerTypeId: (Type: String) Used in case of Chronogolf(KClub) to specify the type of player based on unique ID
An example request could look like this :
curl -X POST -H 'Content-Type:application/json' --user [[username]]:[[password]] '[[base-url]]/api/v4/bookings'
-d '{"facilityId":"1",
"teetime":"2024-08-20 07:20:00",
"course":"Champions course",
"players":3,
"teeId":4250490,
"holes":9,
"productId": 108,
"contactName":"James Smith",
"contactPhone":"07712345678",
"contactEmail":"james.smith@gmail.com",
"chronogolfPlayerTypeId": "843c598423ncv",
"extraProduct": [
{
"mid": 274,
"quantity": 2
},
{
"mid": 259,
"quantity": 2
}
]
}'
- Successful response (application/json)
{ "success": true, "data": { "bookingId": "ZG1234" } }
Book Multiple Tee Time
To book multiple tee time send a request to below url.
POST /api/v4/bookings
- Json body parameters. As List of
- facilityId (Type: Integer) ID of the facility.
- teetime (Type: Date yyyy-mm-dd HH:MM:ss) Date of the booking
- course (Type: String) Name of the course.
- players (Type: Integer) Number of players participating in the booking (between 1-4).
- teeId (Type: Integer) ID of the tee time.
- holes (Type: Integer) Number of holes (9 or 18).
- productId (Type: Int) Id of the Product.
- contactFirstName (Type: String) First name of the contact person for this booking.
- contactLastName (Type: String) Last name of the contact person for this booking.
- contactPhone (Type: String) Phone number.
- contactEmail (Type: String) E-mail.
- isKClub: (Type: Boolean) true for KClub Channel otherwise false
- withGroupDetails: (Type: Boolean) true to get group details otherwise false
All of the above fields are required.
- Json optional body parameters.
- netRate (Type: BigDecimal) Total amount that we need to send facility for given tee slot.
- extraProduct (Type: ExtraProduct(mid(Type: Integer), quantity(Type: Integer))) ExtraProduct for Booking
- chronogolfPlayerTypeId: (Type: String) Used in case of Chronogolf(KClub) to specify the type of player based on unique ID
An example request could look like this :
curl -X POST -H 'Content-Type:application/json' --user [[username]]:[[password]] '[[base-url]]/api/v4/bookings'
-d '[
{
"facilityId":"1",
"teetime":"2024-08-20 07:20:00",
"course":"Champions course",
"players":3,
"contactPhone":"07712345678",
"contactEmail":"james.smith@gmail.com",
"contactName":"James Smith",
"holes":9,
"productId": 108,
"teeId":4250490,
"chronogolfPlayerTypeId": "843c598423ncv",
"extraProduct": [
{
"mid": 274,
"quantity": 2
},
{
"mid": 259,
"quantity": 2
}
},
{
"facilityId":"1",
"teetime":"2024-08-21 07:20:00",
"course":"Champions course",
"players":3,
"contactPhone":"07712345678",
"contactEmail":"james.smith@gmail.com",
"contactName":"James Smith",
"holes":9,
"productId": 109,
"teeId":4250524,
"chronogolfPlayerTypeId": "843c598423ncv",
"extraProduct": [
{
"mid": 261,
"quantity": 1
},
{
"mid": 272,
"quantity": 2
}]
}
"isKClub": true,
"withGroupDetails": false
]'
- Successful response (application/json)
{ "success": true, "data": { "groupId": 16, "bookingIds": [ { "bookingId": "ZG_xl_DEMO-ZestSalesChannel1_2024-08-20T07:20_511ffa3d", "teetime": "2024-08-20T07:20:00", "courseId": 380 }, { "bookingId": "ZG_xl_DEMO-ZestSalesChannel1_2024-08-21T07:20_b83a651a", "teetime": "2024-08-21T07:20:00", "courseId": 380 } ] } }
Book Multiple Tee Time With Payment
To book multiple tee time along with payment send a request to below url.
POST /api/v4/bookings
- Json body parameters.
- details: As List of
- facilityId (Type: Integer) ID of the facility.
- teetime (Type: Date yyyy-mm-dd HH:MM:ss) Date of the booking
- course (Type: String) Name of the course.
- players (Type: Integer) Number of players participating in the booking (between 1-4).
- teeId (Type: Integer) ID of the tee time.
- holes (Type: Integer) Number of holes (9 or 18).
- productId (Type: Int) Id of the Product.
- contactFirstName (Type: String) First name of the contact person for this booking.
- contactLastName (Type: String) Last name of the contact person for this booking.
- contactPhone (Type: String) Phone number.
- contactEmail (Type: String) E-mail.
- netRate (Type: BigDecimal) Total amount that we need to send facility for given tee slot. (Optional Field)
- extraProduct:As List of [mid(Type: Integer), quantity(Type: Integer)] ExtraProduct for Booking (Optional Field)
- chronogolfPlayerTypeId: (Type: String) Used in case of Chronogolf(KClub) to specify the type of player based on unique ID
- isKClub: (Type: Boolean) true for KClub Channel otherwise false
- withGroupDetails: (Type: Boolean) true to get group details otherwise false
- paymentIntent (Type: String): Payment Intent Id for booking (Optional Field)
An example request could look like this :
curl -X POST -H 'Content-Type:application/json' --user [[username]]:[[password]] '[[base-url]]/api/v4/bookings'
-d '{
"details": [
{
"facilityId":"1",
"teetime":"2024-08-20 07:20:00",
"course":"Champions course",
"players":3,
"contactPhone":"07712345678",
"contactEmail":"james.smith@gmail.com",
"contactName":"James Smith",
"holes":9,
"productId": 108,
"teeId":4250490,
"chronogolfPlayerTypeId": "843c598423ncv",
"extraProduct": [
{
"mid": 274,
"quantity": 2
},
{
"mid": 259,
"quantity": 2
}
},
{
"facilityId":"1",
"teetime":"2024-08-21 07:20:00",
"course":"Champions course",
"players":3,
"contactPhone":"07712345678",
"contactEmail":"james.smith@gmail.com",
"contactName":"James Smith",
"holes":9,
"productId": 109,
"teeId":4250524,
"chronogolfPlayerTypeId": "843c598423ncv",
"extraProduct": [
{
"mid": 261,
"quantity": 1
},
{
"mid": 272,
"quantity": 2
}
}]
],
"paymentIntent":"pi_3KvjDRJ95B5ufks60z6LjwRE",
"isKClub": true,
"withGroupDetails": false
}'
- Successful response (application/json)
{ "success": true, "data": { "groupId": 16, "bookingIds": [ { "bookingId": "ZG_xl_DEMO-ZestSalesChannel1_2024-08-20T07:20_511ffa3d", "teetime": "2024-08-20T07:20:00", "courseId": 380 }, { "bookingId": "ZG_xl_DEMO-ZestSalesChannel1_2024-08-21T07:20_b83a651a", "teetime": "2024-08-21T07:20:00", "courseId": 380 } ] } }
2.377