> For the complete documentation index, see [llms.txt](https://developer.rategain.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.rategain.com/ultradirect/ultradirect-transaction-samples-and-usage/book-reservation.md). Agents can also search and read this documentation through its [MCP server](https://developer.rategain.com/~gitbook/mcp).

# Book Reservation

This request is used to request that a definitive booking be made for one particular rate and room combination.

#### Example Booking request: <a href="#bookreservation-.-examplebookingrequest" id="bookreservation-.-examplebookingrequest"></a>

```xml
<HotelML xmlns="
http://www.xpegs.com/v2001Q3/HotelML
">
<Head>
<Process DataPath="/HotelML/Form/BookReservation" Function="TI_BookReservationV1_1" Token="1259151426733"/>
<Route Destination="00" Source="XX"/>
</Head>
<Form>
<BookReservation CurrencyCode="EUR" GuaranteeMethod="CreditCard" GuaranteeType="Guarantee" InDate="2011-12-10" OutDate="2011-12-12" PropertyCode="XX;04988" RatePlanCode="LV7" RatePlanType="BusinessStandard" RoomRate="2950.00" RoomTypeCode="A03">
<AgentInfo Number="12345678" Type="TIDS"/>
<CreditCard ExpirationDate="2015-12" IssuedName="RateGain Test" Number="4321432143214327" TypeIdentifier="VI"/>
<Guest FirstName="RateGain" LastName="Test" NumberOfAdults="1" NumberOfRooms="1" Primary="true" Remarks="This is a test booking" ServiceRequest="This is a test booking">
<Email Address="
test@RateGain.com
"/>
<Phone Number="0203948890"/>
<PostalAddress City="London" CountryCode="GB" Line1="2 Kew Bridge Rd" PostalCode="TW8 0JF" StateCode="UZ"/>
</Guest>
</BookReservation>
</Form>
</HotelML>

```

* This example uses GuaranteeType="Guarantee" and the GuaranteeMethod="CreditCard”.
* GuaranteeType="Deposit" is used for deposit rates (i.e. when the Deposit indicator is returned in the EST response).
* See appendix A for guarantee type and method combinations.
* The Remarks and ServiceRequest attributes should contain the exact same information as some CRSs may only look at one of these RateGain will pass a maximum of 189 characters for these fields, however, the CRS may have a lower character limit.
* RoomRate attribute is optional – IF included, the value must be the same as the BookableRate value from the EST response.
* Additional character restrictions:
* Phone field - up to 20 characters – no dashes, spaces or periods
* First and Last name combined should not be more than 99 characters
* Email address field - up to 315 characters
* Postal Elements including address, city, state, country, postal code - up to 315 characters combined
* Credit Card field - up to 21 characters - no dashes, spaces or periods
* Credit Card Issued Name field - up to 99 characters
* Agency ID field –8 characters - no dashes, spaces, or periods

#### Example Booking response: <a href="#bookreservation-.-examplebookingresponse" id="bookreservation-.-examplebookingresponse"></a>

```xml
HotelML xmlns="
http://www.xpegs.com/v2001Q3/HotelML
">
<Head>
<Route Destination="XX" Source="00">
<Operation Action="Create" App="TIDispatcher" AppVer="1.12.40.2.8.1" DataPath="/HotelML" StartTime="2009- 11-25T12:17:06.741+00:00" Success="true" TotalProcessTime="1150"/>
</Route>
</Head>
<Reservation BookedRate="2950.00" ConfirmationNumber="3365389728" CurrencyCode="EUR" HotelComments="THANK YOU FOR CHOOSING XX." HotelRoomType="A03LV7" InDate="2011-12-10" NumberOfPersons="1" OutDate="2011-12-12" PropertyCode="XX;04988" RateGuaranteed="true" RatePlanCode="LV7" RoomTypeCode="A03" Token="1259151426733">
<CancelPolicy Description="4PM CXL ON ARR DATE"/>
<GuaranteePolicy Description="CREDIT CARD GUARANTEE"/>
<Guest FirstName="RateGain" LastName="Test" NumberOfAdults="1" NumberOfRooms="1" Primary="true" Remarks="This is a test booking" ServiceRequest="This is a test booking">
<Email Address="
test@RateGain.com
"/>
<Phone Number="0203948890"/>
<PostalAddress City="London" CountryCode="GB" Line1="2 Kew Bridge Rd" PostalCode="TW8 0JF" StateCode="-Select-"/>
</Guest>
</Reservation>
</HotelML>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.rategain.com/ultradirect/ultradirect-transaction-samples-and-usage/book-reservation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
