Booking

New booking

You can register a new booking by sending a booking information on the endpoint:

POST ${DOMAIN}/realbookersNotify

Make sure to add the Authorization header as defined in the Authorization

Sending a new booking will lower the inventory across the channels for the days that the booking covers.

The property id value should match the property id in the Realbookers database. (See Property for more information) Same is valid for the room identifications as well (See Retrieving Property Rooms).

[{
"customer": {
"firstName": "Armand",
"lastName": "Fisteku",
"email": "armand@*******.com",
"fax": "null",
"telephone": "null",
"mobilePhone": "null",
"country": "AL",
"city": "Tirana",
"zip": "1001",
"region": "null",
"address": "null",
"address2": "null",
"note": "null"
}
},
{
"booking": {
"property": 1,
"startDate": "02-04-2020",
"endDate": "04-04-2020",
"bookingDate": "Tue Dec 31 12:21:13 CET 2019",
"note": "null",
"status": "CONFIRMED",
"totalPrice": "140",
"bookingSource": "AGODA",
"channelManagerCode": "AGODA_123"
}
},
{
"invoice": {
"payment": "null",
"totalPrice": "140",
"status": "UNPAID",
"transaction": "null",
"note": "null",
"currency": "EUR"
}
},
{
"reservations": [{
"reservation": {
"room": "17",
"date": "02-04-2020",
"roomName": "Deluxe Double Room",
"mealPlanName": "Bed & Beakfast",
"price": "35",
"occupancy": "2 Adult(13+), 0 Children(3-12)"
}
},
{
"reservation": {
"room": "17",
"date": "03-04-2020",
"roomName": "Deluxe Double Room",
"mealPlanName": "Bed & Beakfast",
"price": "35",
"occupancy": "2 Adult(13+), 0 Children(3-12)"
}
}
]
},
{
"payment": {
"paymentCardType": null,
"paymentCardNumber": null,
"cardHolderName": null,
"paymentCardCode": null,
"paymentCardExpireDate": null,
"addressLine":"Rruga 1 Prilli",
"city":"Tirana",
"postalCode":1003,
"stateProv":"Tirana",
"countryName":"Albania",
"validFrom":"03/2003",
"validUntil":"03/2023",
"note":"Any additional Information"
}
}
]
caution

"bookingSource" and "channelManagerCode" identify each booking based on the channel. Make sure that BookingSource identifies your solution (E.g your PMS) and the ChannelManagerCode is a unique value for your solution (e.g, the booking id in your system, or a UUID)

If a booking has been added succefully, the status code 4240 will be returned. If the booking will not be added (may happen if you attempt to push twice the same booking), a simple status code: 42 (OK) will be returned.

As it can be seen, many of the fields can be sent with a null value. They add additional value in case a client would like to view the booking at our panel and make little sense for a PMS solution.

KeyValue
Booking.status"CONFIRMED"
Booking.status"CANCELLED_RESERVATION_FROM_GUEST"
Booking.status"CANCELLED_RESERVATION_FROM_HOTEL"
Booking.status"MODIFICATION"

The Boarding Type (Meal Plan) should be altered to match the information at the General Configurations

TODO

  • MealPlan in reservation should be sent by ID (or should we rely in match)
  • reservation does not need a room name
  • Review Occupancy information

Get Bookings

In order to get bookings, a get request should be made at the endpoint:

GET ${DOMAIN}/realbookersNotify

The request must have a reference to a property id and either a reference to a booking date or a checkin date.

A full request would look like this:

{
"pid":2262,
"bookingDate":"2020-06-02"
}

The request above has returned 2 bookings for the property 2262 completed on the 03.04.2020

caution

The bookings dates are returned in GMT timezone. As such, the 2020-06-03T22:00:00Z is actually the 2020-06-04T00:00:00 in CET timezone. This may by considered a bug we have to deal with in the REST interface

THe other option for the query would be by passing the check in date for the bookings

{
"pid": 2262,
"checkInDate": "2020-06-03"
}

Restrictions

To be noted, that for check-in-dates you can query up to 2 days in the past.

You can retrieve bookings by booking date from 30 days in the past.

Get Booking

If you want to retrieve information only regarding to one specific booking, then please make a get request to the following endpoint:

GET ${DOMAIN}/realbookersNotify/${bookingId}

No request body is required in this case.

Considering one of the previous bookings is cancelled from the above retrieved result, the information on getting booking will

{
"id": 322,
"bookingDate": "2020-06-02T22:00:00Z",
"totalPrice": 50.0,
"guest": [],
"bookingReference": [
{
"id": 398,
"date": "2020-06-04T07:46:26Z",
"bookingReference": "322",
"channelName": "panel.realbookers.com",
"operationType": "CANCELLED_RESERVATION_FROM_GUEST",
"description": "MODIFIED booking Status"
},
{
"id": 395,
"date": "2020-06-03T12:48:58Z",
"bookingReference": "322",
"channelName": "panel.realbookers.com",
"operationType": "BOOKING",
"description": "NEW BOOKING"
}
],
"customer": {
"id": 350,
"region": "",
"fax": "",
"firstName": "****",
"mobilePhone": "",
"address2": "",
"zip": "",
"communicationLanguage": {
"id": 1
},
"address": "",
"telephone": "",
"city": "",
"note": "",
"lastName": "****",
"country": "",
"email": "****@***.al"
},
"endDate": "2020-06-03T22:00:00Z",
"sourceId": "",
"startDate": "2020-06-02T22:00:00Z",
"channelManagerCode": "",
"bookingSource": "panel.realbookers.com",
"status": "CANCELLED_RESERVATION_FROM_GUEST",
"note": ""
}

Depending on different channel providers, in most cases they will be booking changes. (Some other channel providers, simply delete the old booking and make a new one).

All changes to the booking information is tracked in Booking Reference information. As it can be seen above, a cancellation has occurred and the operation is logged in a booking reference.