Bookings endpoint
Returns a list of bookings for a given time period and specified Wherewolf app.
Note: the returned list is expected to contain all bookings in any of the recognised statuses.
Parameters:
poolstring to identify the Wherewolf app from where the bookings are requested.fromDateis the start date and time for the required period, ISO 8601 UTCtoDateis the end date and time for the required period, ISO 8601 UTCskipinteger to indicate how many records are to be skipped.
Headers:
API-keyAPI key to authenticate the request.
Request example
curl -X GET \
__BOOKING_SYSTEM_API__/bookings?pool=wherewfolapp123&fromDate=2018-01-01T00:00:00.000Z&toDate=2018-01-14T23:59:59.000Z&skip=0 \
-H 'API-key: 123-123-123-123'
Where BOOKING_SYSTEM_API is a placeholder for the base url of your booking system’s API
The response is expected to return an object containing at least two properties:
bookingsan array of booking objects, where each object should at least contain a reference to the booking id.morea boolean flag to indicate if there are more bookings available to be retrieved with pagination. When set totrue, Wherewolf will execute a subsequent call withskipset to be the number of already retrieved booking id’sskip += bookings.length.
Response example
{
"bookings": [
{ "id": 123 },
{ "id": 124 },
{ "id": 125 }
],
"more": false
}
Optionally, each booking object may be already fully populated with the booking details