Listing bookings
Returns list of bookings made by the current channel. When no parameters are specified the endpoint returns all bookings with a teetime in the future.
By specifying the fromDate
parameter, this list can be made to include past bookings.
By specifying the toDate
parameter the selection can be filtered down even further.
This overview also contains canceled bookings.
GET /api/v1/bookings
- Query Parameters
- fromDate:
e.g. 30-12-2017
(date, optional) - Filter the list of bookings based on their teetime. - toDate:
e.g. 30-12-2017
(date, optional) - Filter the list of bookings based on their teetime.
- fromDate:
This can be done with a curl command like so :
curl -X GET -H 'Content-Type:application/json' --user [[username]]:[[password]] '[[base-url]]/api/v1/bookings'
- Successful Response (application/json)
{
"success":true,
"data":[
{
"teetime":"2018-11-24T10:30:00",
"round":"1",
"players":3,
"teeId":0,
"contactName":"Test contact",
"contactPhone":"012345566",
"contactEmail":"test@contact.tld",
"createdAt":"2018-10-03T14:57:51.728",
"bookingId":"ZGinMSO05",
"status":"CANCELED"
},
{
"teetime":"2018-11-23T10:30:00",
"round":"1",
"players":3,
"teeId":0,
"contactName":"Test contact",
"contactPhone":"012345566",
"contactEmail":"test@contact.tld",
"createdAt":"2018-10-03T14:57:53.248",
"bookingId":"ZGinVZO1G",
"status":"BOOKED"
}
]
}
2.498