Bookings Details endpoint
Returns all available details of a booking.
Parameters:
idstring or integer to indicate the required booking. It can be included as part of the pathbookings/ABC123or as a query parameterbookings?id=ABC123poolstring to identify the Wherewolf app requesting the booking details.
Headers:
api-keyAPI key to authenticate the request, this can have other name such as ‘authentication’.
Request example
curl -X GET \
__BOOKING_SYSTEM_API__/bookings?id=ABC123&pool=wherewfolapp123 \
-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 the following details:
ididentifier the bookingstatusthe booking status. Check the supported statuses here.startsAtthe start date and time of the booked activity. In UTC ISO 8601.endsAtthe end date and time of the booked activity. In UTC ISO 8601.activitiesan array describing the booked activities.contactan object containing the name the main guest or booker, when available this object should also contain email address and/or a phone number.paxan integer to indicate how many guests are expected to be checked-in for this booking.guestsan array of objects containing any additional details for the expected guests. Note: if your system does not support individual guest details or is not required, you can return an empty array.
Guests
A booking may or not contain individual guests details. When not available, it is ok to leave the guests field as an empty array.
When guests details are available, each guest object must contain a name and optionally other details such as email, phoneNumber or any other relevant data you wish to expose to Wherewolf with the purpose of autocompletion.
When available, Wherewolf will autocomplete name (string), email (string) and phoneNumber (string) for the guest completing a waiver. Any other available field could be exposed by your system to be used by Wherewolf but these will be used only after custom configuration is set (you may also expose different field for different clients).
Response example
{
"id": "ABC123",
"status": "Active",
"notes": "notes or other properties at booking level will extend the properties of the guest",
"startsAt": "2018-01-27T11:30:00",
"endsAt": "2018-01-27T13:30:00",
"activities": [
{ "activity": "Swim", "activityId": "SWIM123" },
{ "activity": "Dive", "activityId": "DIVE1" }
],
"contact": {
"name": "Purchaser Name",
"email": "purchaser@email.net",
"phoneNumber": "(64) 021021021021"
},
"pax": 2,
"guests": [
{
"guestId": "G333",
"name": "John Smith",
"email": "jsmith@email.net",
"phoneNumber": "(64) 021021021021",
"anotherDetail": "another detail"
},
{
"guestId": "G444"
}
]
}
Non-existing bookings should return a 404 status code with a message indicating the booking was not found.
{
"success": false,
"message": "Booking ABC123 not found."
}