# Pre-Book Request message format

| **Element Path**                                                           | **Attribute**                       | **Occ**                  | **Type**                    | **Notes**                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------------------------------------------------------- | ----------------------------------- | ------------------------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><br></p><p>HotelML/Head/Process</p>                                     | <p><br></p>                         | <p><br></p><p>1</p>      | <p><br></p>                 | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p>                                                                | <p><br></p><p>DataPath</p>          | <p><br></p><p>1</p>      | <p><br></p><p>Char</p>      | <p><br></p><p>Set to "/HotelML/Form/PreBook”</p>                                                                                                                                                                                                                                                                                                                                           |
| <p><br></p>                                                                | <p><br></p><p>Function</p>          | <p><br></p><p>1</p>      | <p><br></p><p>Char</p>      | <p><br></p><p>Set to “TI\_PreBookV1\_1”</p>                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p>                                                                | <p><br></p><p>Token</p>             | <p><br></p><p>1</p>      | <p><br></p><p>Char</p>      | <p><br></p><p>Unique ID for the transaction generated by the system sending the transaction.</p>                                                                                                                                                                                                                                                                                           |
| <p><br></p><p>HotelML/Head/Route</p>                                       | <p><br></p>                         | <p><br></p><p>1</p>      | <p><br></p>                 | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p>                                                                | <p><br></p><p>Source</p>            | <p><br></p><p>1</p>      | <p><br></p><p>Char 2-3</p>  | <p><br></p><p>Identifies the organization sending the transaction. The value to use will be provided during the implementation project.</p>                                                                                                                                                                                                                                                |
| <p><br></p>                                                                | <p><br></p><p>Destination</p>       | <p><br></p><p>1</p>      | <p><br></p><p>Char 2</p>    | <p><br></p><p>Always set to “00” (i.e. zero zero).</p>                                                                                                                                                                                                                                                                                                                                     |
| <p><br></p><p>HotelML/Form/PreBook/Property</p>                            | <p><br></p>                         | <p><br></p><p>1</p>      | <p><br></p>                 | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p>                                                                | <p><br></p><p>PropertyCode</p>      | <p><br></p><p>1</p>      | <p><br></p><p>Char</p>      | <p><br></p><p>Chain and property code, separated by a semi-colon – e.g. “UI;AB1234”</p>                                                                                                                                                                                                                                                                                                    |
| <p><br></p>                                                                | Context                             | 0..1                     | Char                        | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p><p>HotelML/Form/PreBook/ Property/Locale</p>                    | <p><br></p>                         | <p><br></p><p>0..1</p>   | <p><br></p>                 | <p><br></p><p>This is used to request the response in a specific language.</p>                                                                                                                                                                                                                                                                                                             |
| <p><br></p>                                                                | <p><br></p><p>Language</p>          | <p><br></p><p>1</p>      | <p><br></p><p>Char 2</p>    | <p><br></p><p>Language code – e.g. “FR”</p>                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p>                                                                | <p><br></p><p>Country</p>           | <p><br></p><p>0..1</p>   | <p><br></p><p>Char</p>      | <p><br></p><p>Optional country name – e.g. “France”.</p>                                                                                                                                                                                                                                                                                                                                   |
| <p><br></p><p>HotelML/Form/PreBook/ RateCriteria</p>                       | <p><br></p>                         | <p><br></p><p>1</p>      | <p><br></p>                 | <p><br></p><p>Specify rate selection criteria.</p>                                                                                                                                                                                                                                                                                                                                         |
| <p><br></p>                                                                | <p><br></p><p>VersionCompliance</p> | <p><br></p><p>  0..1</p> | <p><br></p><p>  Enum</p>    | <p><br></p><p>  Must be “PreBook\_V1”</p><p><br></p>                                                                                                                                                                                                                                                                                                                                       |
| <p><br></p>                                                                | <p><br></p><p>NumberOfRooms</p>     | <p><br></p><p>1</p>      | <p><br></p><p>Integer</p>   | <p><br></p><p>Total number of rooms required, which is used when checking availability. The prices in the response will be per room.</p>                                                                                                                                                                                                                                                   |
| <p><br></p>                                                                | <p><br></p><p>NumberOfBeds</p>      | <p><br></p><p>0..1</p>   | <p><br></p><p>Integer</p>   | <p><br></p><p>Preferred number of beds per room</p>                                                                                                                                                                                                                                                                                                                                        |
| <p><br></p>                                                                | TotalRate                           | 0..1                     | Decimal                     | Expected total rate excluding taxes and fees                                                                                                                                                                                                                                                                                                                                               |
| <p><br></p>                                                                | TotalRateInclusive                  | 0..1                     | Decimal                     | Expected total rate including taxes and fees                                                                                                                                                                                                                                                                                                                                               |
| <p><br></p>                                                                | RatePlanCode                        | 0..1                     | Char                        | Rate plan for the rate being checked.  Will be the same as the rate plan code returned in the availability response                                                                                                                                                                                                                                                                        |
| <p><br></p>                                                                | RateCodeContext                     | 0..1                     | Char                        | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p>                                                                | RoomCode                            | 0..1                     | Char                        | Rate plan for the rate being checked.  Will be the same as the rate plan code returned in the availability response                                                                                                                                                                                                                                                                        |
| <p><br></p>                                                                | RoomCodeContext                     | 0..1                     | Char                        | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p><p>  HotelML/Form/PreBook/</p><p>  RateCriteria/GuestCount</p>  | <p><br></p>                         | <p><br></p><p>0..M</p>   | <p><br></p>                 | <p><br></p><p>This element specifies the number of adults and children (optionally including child counts by age).</p><p><br></p><p>GuestCount must occur once (and only once) with Type=”Adult”.</p><p><br></p><p>It can also occur once with Type=”Child” if no Age attribute is supplied. Alternatively, it can multiple times for Type=”Child” when an Age attribute is specified.</p> |
| <p><br></p>                                                                | <p><br></p><p>  Type</p>            | <p><br></p><p>  1</p>    | <p><br></p><p>  Enum</p>    | <p><br></p><p> Values “Adult” or “Child”</p><p><br></p>                                                                                                                                                                                                                                                                                                                                    |
| <p><br></p>                                                                | <p><br></p><p>  Count</p>           | <p><br></p><p>  1</p>    | <p><br></p><p>  Integer</p> | <p><br></p><p>Number of guests of this type</p><p><br></p>                                                                                                                                                                                                                                                                                                                                 |
| <p><br></p>                                                                | <p><br></p><p>  Age</p>             | <p><br></p><p>  0..1</p> | <p><br></p><p>  Integer</p> | <p><br></p><p>  The optional age of the guest. Only applicable when Type=”Child”.</p>                                                                                                                                                                                                                                                                                                      |
| HotelML/Form/PreBook/ RateCriteria/ExtraBed                                | <p><br></p>                         | 0..2                     | <p><br></p>                 | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p>                                                                | Number                              | 0..2                     | Integer                     | <p>  Number of extra beds</p><p><br></p>                                                                                                                                                                                                                                                                                                                                                   |
| <p><br></p>                                                                | Type                                | 0..2                     | Enum                        | <p>Type of extra bed required. Valid values are:</p><p>  AdultRollAway, ChildRollAway, Crib</p>                                                                                                                                                                                                                                                                                            |
| <p><br></p><p>HotelML/Form/PreBook/ RateCriteria/AgentInfo</p>             | <p><br></p>                         | <p><br></p><p>0..1</p>   | <p><br></p>                 | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p>                                                                | <p><br></p><p>Number</p>            | <p><br></p><p>1</p>      | <p><br></p><p>Char 8</p>    | <p><br></p><p>Travel agent identifier – often the IATA number.</p>                                                                                                                                                                                                                                                                                                                         |
| <p><br></p>                                                                | <p><br></p><p>Type</p>              | <p><br></p><p>1</p>      | <p><br></p><p>Enum.</p>     | <p><br></p><p>Identifies the type of travel agent identifier. Values are: “ARC” , “IATA”, “TIDS”, “CLIA”, “AAA”, “GDS”, “Other”.</p>                                                                                                                                                                                                                                                       |
| <p><br></p>                                                                | <p><br></p><p>City</p>              | <p><br></p><p>0..1</p>   | <p><br></p><p>Char 3</p>    | <p><br></p><p>Originating Agent’s City. Not normally required.</p>                                                                                                                                                                                                                                                                                                                         |
| <p><br></p>                                                                | <p><br></p><p>Country</p>           | <p><br></p><p>0..1</p>   | <p><br></p><p>Char 2</p>    | <p><br></p><p>Originating Agent’s Country Code (ISO Standard Codes). Not normally required.</p>                                                                                                                                                                                                                                                                                            |
| <p><br></p><p>HotelML/Form/PreBook/RateCriteria/ DateRange</p>             | <p><br></p>                         | <p><br></p><p>1</p>      | <p><br></p>                 | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p>                                                                | <p><br></p><p>InDate</p>            | <p><br></p><p>1</p>      | <p><br></p><p>Date</p>      | <p><br></p><p>The arrival date in format “2011-12-24”</p>                                                                                                                                                                                                                                                                                                                                  |
| <p><br></p>                                                                | <p><br></p><p>OutDate</p>           | <p><br></p><p>1</p>      | <p><br></p><p>Date</p>      | <p><br></p><p>The departure date in format “2011-12-27”</p>                                                                                                                                                                                                                                                                                                                                |
| <p><br></p><p>HotelML/Form/PreBook/RateCrieria/RateSearch</p>              | <p><br></p>                         | <p><br></p><p>1</p>      | <p><br></p>                 | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p>                                                                | <p><br></p><p>RatePlanCode</p>      | <p><br></p><p>1</p>      | <p><br></p>                 | <p><br></p><p>Rate access code</p>                                                                                                                                                                                                                                                                                                                                                         |
| <p><br></p>                                                                | <p><br></p><p>RatePlanType</p>      | <p><br></p><p>1</p>      | <p><br></p><p>Date</p>      | <p><br></p><p>“Negotiated”, “Corporate”, “Standard” etc.</p>                                                                                                                                                                                                                                                                                                                               |
| <p><br></p><p>HotelML/Form/PreBook/ RateCriteria/RateSearch/AutoInfo</p>   | <p><br></p><p>Code</p>              | <p><br></p><p>0..5</p>   | <p><br></p><p>Char 25</p>   | <p><br></p><p>Auto Frequent Traveler Number</p>                                                                                                                                                                                                                                                                                                                                            |
| <p><br></p><p>HotelML/Form/PreBook/RateCriteria/ RateSearch/CorpInfo</p>   | <p><br></p><p>Code</p>              | <p><br></p><p>0..1</p>   | <p><br></p><p>Char 25</p>   | <p><br></p><p>Corporate Account Number.</p>                                                                                                                                                                                                                                                                                                                                                |
| <p><br></p><p>HotelML/Form/ PreBook/RateCriteria/ RateSearch/FlyerInfo</p> | <p><br></p><p>Code</p>              | <p><br></p><p>0..5</p>   | <p><br></p><p>Char 25</p>   | <p><br></p><p>Frequent Flyer Number</p>                                                                                                                                                                                                                                                                                                                                                    |
| <p><br></p><p>HotelML/Form/ PreBook/RateCriteria/ RateSearch/FreqGuest</p> | <p><br></p><p>Code</p>              | <p><br></p><p>0..1</p>   | <p><br></p><p>Char 25</p>   | <p><br></p><p>Frequent Guest Number</p>                                                                                                                                                                                                                                                                                                                                                    |


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.rategain.com/our-products/smart-distribution/pre-book/pre-book-api/pre-book-request-message-format.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
