Getting Bookings

To get bookings for hotelId and specific period use the following XML request:

<?xml version="1.0" encoding="UTF-8"?><request apiKey="your_api_key" userName="your_property_username" password="your_property_password">
<getBookings hotelId="111" dateFrom="2021-04-28" dateTo="2021-04-29"/>
</Request>

hotelId, dateFrom and dateTo attributes are all required.

dateFrom and dateTo should be in one of following formats:

  • YYYY-MM-DD
  • DDMMYYYY

If request was successful you should retrieve XML like this:

<?xml version="1.0" encoding="UTF-8"?>
<Response><booking bookingid="3986846085" bookingdate="2021-04-27T19:56:02+02:00" modifieddate="2021-04-29T08:58:03+02:00" status_changed="2021-04-29T08:58:03+02:00" status="6" source="boo"/><booking bookingid="1W38549DKA" bookingdate="2021-04-28T11:19:22+02:00" status_changed="2021-04-28T11:21:04+02:00" status="2" source=""/><booking bookingid="5W04MQYN2O" bookingdate="2021-04-28T17:41:03+02:00" status_changed="2021-04-28T17:43:52+02:00" status="2" source=""/><booking bookingid="GWPJ50QCYM" bookingdate="2021-04-28T18:38:15+02:00" status_changed="2021-04-28T18:38:50+02:00" status="2" source=""/><booking bookingid="3390878623" bookingdate="2021-04-24T17:08:02+02:00" modifieddate="2021-04-28T20:04:04+02:00" status="2" source="boo"/><booking bookingid="2762087198" bookingdate="2021-04-29T08:32:02+02:00" status="2" source="boo"/><booking bookingid="3007995072" bookingdate="2021-04-27T13:12:03+02:00" modifieddate="2021-04-29T09:44:04+02:00" status="2" source="boo"/></Response>

bookingdate, modifiedddate, status_changed are DateTime in RFC3339 format with timezone correction.

modifieddate shows only if reservation is modified or status changed.

status_changed shows only if status has been modified with time of modify.

source represents OTA shortcode or if empty it means direct WBP reservation

status can be:

  • 2 - reserved
  • 6 - cancelled

 

Previous Article

Getting Rooms