---
title: Reservation
slug: reservation
docTags: 
createdAt: 2024-06-25T20:54:33.514Z
---

# Request

This interface is used to confirm a reservation. Please note that rates and inventory may change between the availability response and reservation confirmation stages. In such a situation the system would return an appropriate response message.

The table below describes the elements present in a request along with details around their implementation. Please take special note of required fields.&#x20;

## Primary Information

**Endpoint:&#x20;**

/GetReservation.do

| **Element Group**  | **Element Name**        | **Type**  | **Req.** | **Element Description**                                                                              |
| ------------------ | ----------------------- | --------- | -------- | ---------------------------------------------------------------------------------------------------- |
| reservationRequest | reservationRequest      | Group     | Yes      |                                                                                                      |
| reservationRequest | control                 | Group     | Yes      |                                                                                                      |
| Control            | userName                | Element   | Yes      | The user identifier assigned. This is the unique ID given to you by Bonotel.                         |
| Control            | passWord                | Element   | Yes      | The password assigned. This is the unique password given to you by Bonotel.                          |
| reservationRequest | reservationDetails      | Group     | Yes      |                                                                                                      |
| reservationDetails | timeStamp               | Attribute | Yes      | The current time stamp of the request. (yyyyMMddThh\:mm\:ss)                                         |
| reservationDetails | confirmationType        | Element   | Yes      | Always CON                                                                                           |
| reservationDetails | tourOperatorOrderNumber | Element   | Yes      | Reference number of the tour operator booking. Maximum length: 100 characters. No special characters |
| reservationDetails | checkIn                 | Element   | Yes      | Check in date.                                                                                       |
| reservationDetails | checkOut                | Element   | Yes      | Check out date.                                                                                      |
| reservationDetails | noOfRooms               | Element   | Yes      | No of rooms booked.                                                                                  |
| reservationDetails | noOfNights              | Element   | Yes      | No of Nights booked.                                                                                 |
| reservationDetails | hotelCode               | Element   | Yes      | The selected hotel code.                                                                             |
| reservationDetails | total                   | Element   | Yes      | The total value of this reservation.   (including taxes)                                             |
| Total              | currency                | Attribute | Yes      | The currency of the total reservation. Always USD.                                                   |
| reservationRequest | totalTax                | Element   | Yes      | The total tax associated with the reservation. Always 0.00 tax is included with the rates.           |
| totalTax           | currency                | Element   | Yes      | The currency of the Tax.                                                                             |

## Room Data

| **Element Group**  | **Element Name** | **Type** | **Req.** | **Element Description**                                                                                         |
| ------------------ | ---------------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| reservationRequest | roomData         | Group    | Yes      | The room’s details, this should be repeated up to the no of rooms.                                              |
| roomData           | roomNo           | Element  | Yes      | The room no. selected.                                                                                          |
| roomData           | roomCode         | Element  | Yes      | The room code assigned by Bonotel.                                                                              |
| roomData           | roomTypeCode     | Element  | Yes      | Room type code.                                                                                                 |
| roomData           | bedTypeCode      | Element  | Yes      | Bed type code.                                                                                                  |
| roomData           | ratePlanCode     | Element  | Yes      | Rate plan code.                                                                                                 |
| roomData           | noOfAdults       | Element  | Yes      | No of adults for this room.                                                                                     |
| roomData           | noOfChildren     | Element  | Yes      | No of children for this room.                                                                                   |
| roomData           | occupancy        | Group    | Yes      | Occupancy details are wrapped with in this group.                                                               |
| Occupancy          | guest            | Group    | Yes      | Occupancy group for this room. Note that the no of adults and children should be represented by this occupancy. |

## Guest Data

| **Element Group**  | **Element Name** | **Type** | **Req.** | **Element Description**                                                                                                                                                                                                                                                                      |
| ------------------ | ---------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Guest              | title            | Element  | Yes      | Title of the guest, applicable only for Adults<br />List of Titles: List of Titles: \["Dr.", "Prof.", "Mstr.", "Mr.", "Miss.", "Ms.", "Mrs.", "Mr/Mrs."]                                                                                                                                     |
| Guest              | firstName        | Element  | Yes      | First name of the guest. Number of characters should be equal or less than 100. Primary guest name is required. ‘TBA’ and single letter names are not accepted.                                                                                                                              |
| Guest              | lastName         | Element  | Yes      | Last name of the guest. Number of characters should be equal or less than 100. Primary guest name is required. ‘TBA’ and single letter names are not accepted.                                                                                                                               |
| Guest              | age              | Element  | No       | Age of the guest. Applicable only for children. This should not be sent in case of an adult. Hotels have different child age cutoffs, but all are less than 18. Do not send an age for any occupant provided as an Adult in the `noOfAdults` element in Room Data section.<br /><br /><br /> |
| reservationRequest | comment          | Group    | Yes      |                                                                                                                                                                                                                                                                                              |
| Comment            | hotel            | Element  | Yes      | Any comments for internal use. Do not enter special requests for the hotel. Leave blank when there are no comments.                                                                                                                                                                          |
| Comment            | customer         | Element  | Yes      | Any comments/special requests to be sent to the hotel.  Leave blank when there are no comments. NOTE: some hotels do not accept special requests. We recommend to send this element closed with no value.                                                                                    |

# Response

| **Element Group**    | **Element Name**     | **Type**  | **Req.** | **Element Description**                                                                                                            |
| -------------------- | -------------------- | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| reservationResponse  | reservationResponse  | Group     | Yes      |                                                                                                                                    |
| reservationResponse  | status               | Attribute | Yes      | Status of the reservation. Valid values are <br />Y – Reservation processed successfully.  <br />N – Reservation was unsuccessful. |
| reservationResponse  | errors               | Group     | No       |                                                                                                                                    |
| Errors               | code                 | Element   | No       | An internal error code provided by Bonotel.                                                                                        |
| Errors               | description          | Element   | No       | A message describing the error.                                                                                                    |
| reservationResponse  | referenceNo          | Element   | Yes      | Your booking confirmation number.                                                                                                  |
| reservationResponse  | roomReferenceDetails | Group     | No       | Room wise Reference Details                                                                                                        |
| roomReferenceDetails | roomReferenceNo      | Element   | No       | Reference no of the room                                                                                                           |
| roomReferenceNo      | roomNo               | Attribute | No       | Room no of the room                                                                                                                |

# Code Example

## Request

/GetReservation.do

```xml
<?xml version="1.0" encoding="utf-8" ?>
<reservationRequest>
	<control>
		<userName>{{Username}}</userName>
		<passWord>{{Password}}</passWord>
	</control>
	<reservationDetails timeStamp="20150325T13:57:46">
		<confirmationType>CON</confirmationType>
		<tourOperatorOrderNumber>123456</tourOperatorOrderNumber>
		<checkIn>01-Dec-2024</checkIn>
		<checkOut>03-Dec-2024</checkOut>
		<noOfRooms>1</noOfRooms>
		<noOfNights>2</noOfNights>
		<hotelCode>1</hotelCode>
		<total currency="USD">1262.01</total>
		<totalTax currency="USD">0.0</totalTax>
		<roomData>
			<roomNo>1</roomNo>
			<roomCode>1385</roomCode>
			<roomTypeCode>246</roomTypeCode>
			<bedTypeCode>10</bedTypeCode>
			<ratePlanCode>1</ratePlanCode>
			<noOfAdults>2</noOfAdults>
			<noOfChildren>0</noOfChildren>
			<occupancy>
				<guest>
					<title>Mr.</title>
					<firstName>testFirst1n</firstName>
					<lastName>testLast1n</lastName>
				</guest>
				<guest>
					<title>Mrs.</title>
					<firstName>testFirst2n</firstName>
					<lastName>testLast2n</lastName>
				</guest>
			</occupancy>
		</roomData>
		<comment>
			<hotel> </hotel>
			<customer> ground floor, non-smoking </customer>
		</comment>
	</reservationDetails>
</reservationRequest> 
```

## Response

```xml
<?xml version="1.0" encoding="utf-8" ?>
<reservationResponse status="Y">
	<referenceNo>PRGFOUSCG</referenceNo>
	<roomReferenceDetails>
		<roomReferenceNo roomNo="1"> PRGFOUSCG_1</roomReferenceNo>
	</roomReferenceDetails>
</reservationResponse>
```

# Response Codes

| **Code** | **Description**                                                                                                                                                                                                                             |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| R1       | Unspecified error. Please contact customer support.                                                                                                                                                                                         |
| R2       | User ID not supplied or not valid                                                                                                                                                                                                           |
| R3       | Inventory has Expired. You will need to retry the reservation.                                                                                                                                                                              |
| R4       | Wrong Rates or Rates have changed. You will need to retry the reservation.                                                                                                                                                                  |
| R5       | Inventory has Expired and the Rates have changed. You will need to retry the reservation.                                                                                                                                                   |
| R6       | Arrival or Departure Date format incorrect.                                                                                                                                                                                                 |
| R7       | Erroneous or Incomplete Data in Reservation Request.                                                                                                                                                                                        |
| R8       | Incorrect Hotel Id / Room Type Id/ Bed Type Id/ Rate Plan Id Combination.                                                                                                                                                                   |
| R9       | Occupancy Details do not match with the Number of Rooms.                                                                                                                                                                                    |
| R10      | Mandatory Customer Details Field is missing or having an incorrect format.                                                                                                                                                                  |
| R11      | You are attempting to book more than the maximum number of bookings per day for the same booking criteria. The maximum number of bookings allowed is 10 per day for the same booking criteria. Please contact us for further clarification. |
| R12      | Error code no longer in use.                                                                                                                                                                                                                |
| R13      | No XML input detected.                                                                                                                                                                                                                      |
| R14      | This booking cannot be confirmed due to restrictions.                                                                                                                                                                                       |
| R15      | The number of nights does not match the check in date and the checkout date.                                                                                                                                                                |
| R16      | (Deprecated)                                                                                                                                                                                                                                |
| R17      | No of child is not matching the child age details provided in the guest occupancy details.                                                                                                                                                  |
| R18      | Room No: (#) cannot be occupied with the given number of adults and children.                                                                                                                                                               |
| R19      | Tour operator order number element is exceeded the characters limit                                                                                                                                                                         |
| R20      | Reservations require a minimum of one adult per room                                                                                                                                                                                        |
| R21      | (Deprecated)                                                                                                                                                                                                                                |
| R22      | The XML Request has not been completed within your timeout period. Please try again                                                                                                                                                         |
| R23      | Character limit for the Guest Name has exceeded. First Name or Last Name should be less than or equal to 100 Characters.                                                                                                                    |
| R24      | Error While saving reservation. Please try again later                                                                                                                                                                                      |
| R25      | Multiple Rate Type or Multiple Inventory Type information are not present in the request.                                                                                                                                                   |
| R26      | Children count is not matching with child age details provided.                                                                                                                                                                             |
| R27      | Please Check, Rate Must Be More Than Zero                                                                                                                                                                                                   |
| R28      | Hotel does not have a valid contract for checkin and check out date.                                                                                                                                                                        |
| R29      | Room Net Rate is Less Than the Threshold value                                                                                                                                                                                              |
| R31      | This booking has failed, please try your booking again later, or contact Bonotel Reservations directly                                                                                                                                      |
| R32      | This booking cannot be made due to different roomtypes or rateplans combinations                                                                                                                                                            |

