Link Search Menu Expand Document

Bookings Details endpoint

Returns all available details of a booking.

Parameters:

  • id string or integer to indicate the required booking. It can be included as part of the path bookings/ABC123 or as a query parameter bookings?id=ABC123
  • pool string to identify the Wherewolf app requesting the booking details.

Headers:

  • api-key API 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:

  • id identifier the booking
  • status the booking status. Check the supported statuses here.
  • startsAt the start date and time of the booked activity. In UTC ISO 8601.
  • endsAt the end date and time of the booked activity. In UTC ISO 8601.
  • activities an array describing the booked activities.
  • contact an object containing the name the main guest or booker, when available this object should also contain email address and/or a phone number.
  • pax an integer to indicate how many guests are expected to be checked-in for this booking.
  • guests an 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."
}