The Reservations API is designed customers who wish to
retrieve details of Reservations in order to power their own login area, or to send “How was your stay?”-type emails.
Requests are scoped to – currently - one of two params:
1. Email
You tell us the customer’s email address, and we respond with a list of all Reservations made for that customer.
This enables you to be lazy about loading in data – you can initiate this
API request when somebody logs in.
2. Departure Date
You tell us a departure date, and we’ll respond with a list of all Reservations with Bookings that depart on that date.
Request
1. Email
Make a GET request to the following endpoint, replacing {email} with the
email address you wish to query.
Make a GET request to the following endpoint, replacing {departure_date} with the departure date you wish to query. Please supply the date in YYYY-MM-DD format.
The outermost JSON object will contain a list (array) of Reservations made on your Staylist by the owner of the email address you supplied.
Each Reservation has details of:
the Bookable Owner (the hotel, B&B, inn, or campsite)
the Bookings (note this is an array as one Reservation could be for multiple rooms)
Each Booking has details of the Bookable – an abstraction to describe the particular type of accommodation that was stayed in (a room, pitch, cottage, apartment etc)
When there are no Reservations for this email address or departure date