{% admonition type="warning" name="Outdated version" %} This documentation is outdated and is soon going to be deprecated. For the latest in Reservations API documentation, see the [Reservations overview](/connectivity/docs/reservations-api/reservations-overview.md) section. {% /admonition %}
The following section is outdated and Booking.com does not actively verify its accuracy. Use at your own discretion. # Overview Use the Reservations API module to retrieve and modify reservations on Booking.com. If you are using Java, our downloadable [Reservations API Java library][java-library] will make your implementation easier. ## Retrieval process We recommend periodically calling the API — every minute, for example — to retrieve a list of recently created, modified, or cancelled reservations. You can do this with either the [B.XML][b_xml-reservations] or [OTA][OTA_HotelResNotif] endpoint. If you use [OTA][OTA_HotelResNotif], be aware that there is an extra step to the retrieval process. In addition to successfully retrieving reservations, you must also send a call to let the API know that you have received everything in good order. The steps are described in more detail on the [/ota/OTA_HotelResNotif][OTA_HotelResNotif] endpoint page. See [our overview of recommendations](/connectivity/docs/reservations_best_practices.md) for all Reservation API implementations. ## Retrieval time limit You should strive to process new, modified, and cancelled reservations almost instantly (see [Retrieval process][retrieval-process]). However, if you do not successfully retrieve a reservation within 30 minutes after creation or modification, we forward it to the property as an e-mail. This ensures that a property never misses important updates. As described under [Retrieval process][retrieval-process], the steps for processing are different depending on the endpoint you use. ## Java library If your software uses Java, our Java library will make it easier to implement the Reservations API: * [Download Java library][java-lib] * [Download Javadoc library, with details about Java methods and functions][javadoc-lib] This is a generic example that demonstrates how to use the library: ```java BookingReservationAPI api = new BookingReservationAPI("", "", new BookingReservationHandler() { @Override public BookingReservationAcknowledgement handle(BookingReservation reservation) { // Handle reservation. } }); api.pullPeriodically(); // Create a separate thread internally. api.cancelPeriodicPull(); // Only use if you really need to cancel periodic pull! ``` For more details about the available methods, see the [Javadoc library][javadoc-lib]. ## Errors The API returns errors both as HTTP status codes, as well as in the response body as XML elements. The most common error response is `HTTP 403 Forbidden`. This usually indicates that you are trying to retrieve reservations for a property to which you don't have access. [OTA_HotelResNotif]: /connectivity/docs/ota-resnotif.md [OTA_HotelResModifyNotif]: /connectivity/docs/ota-resmodifynotif.md [retrieval-process]: /connectivity/docs/res.md#retrieval-process [java-library]: /connectivity/docs/res.md#java-library [java-lib]: lib/reservations-0.1-SNAPSHOT.jar [javadoc-lib]: lib/reservations-0.1-SNAPSHOT-javadoc.jar [b_xml-reservations]: /connectivity/docs/b_xml-reservations.md