GET https://yourdomain.com/bookyflow/api/booking/rooms
Intended for MRPs (hotels, B&Bs). Properties where you rent out a room in the property and not the property itself.
During the booking process the client (HTML/Javascript) UI needs to offer to the guest a selection of rooms or room types that they can choose. When the guest has made their selection then the client UI can get prices and confirm the booking.
The data is returned in two different arrays, room_types and rooms. Which one the client UI uses is the client's choice, the choice needs to be handed back to the BookyFlow API through the Set Rooms Booking endpoint.
| Header | Value | Required | Description |
|---|---|---|---|
X-BOOKYFLOW-BOOKING-SESSION-ID |
YOUR_SESSION_ID |
Yes |
Status: OK (200)
{
"data": {
"rooms_available_on_selected_dates": {
"room_types": {
"1": {
"room_type_info": {
"room_class_abbv": "Double bed",
"room_class_full_desc": "",
"image": "double.png",
"images": [
{
"large": "http://localhost/wordpress-5.9.3/bookyflow/uploadedimages/rmtypes/double.png"
}
],
"room_type_id": "1"
},
"room_type_rooms": [
{
"tariff_name": "Double room rate",
"hatPairs": [
"2^57"
]
}
],
"room_type_tariffs": [
{
"tariffs": {
"2022-06-09": {
"date": "2022-06-09",
"rate_id": "57",
"adult_price": 110,
"seven_day_price": 110,
"thirty_day_price": 110,
"mindays": "1",
"next_checkin_date": "2022-06-10",
"room_type_id": "1"
},
"2022-06-10": {
"date": "2022-06-10",
"rate_id": "57",
...
(Response truncated for brevity)
}
GET https://yourdomain.com/bookyflow/api/booking/prices
It is mandatory to use this endpoint during the booking process.
This endpoint calculates the prices based on the dates and number of guests. It also sets the deposit, city tax and cleaning fee values, without all of which the booking will not validate.
| Header | Value | Required | Description |
|---|---|---|---|
X-BOOKYFLOW-BOOKING-SESSION-ID |
YOUR_SESSION_ID |
Yes |