> 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/our-products/smart-distribution/pre-book/pre-book-api.md).

# Pre Book API

**Overview**

The **Precheck API** is a validation API used to re-check and re-validate room availability, rates, and restrictions before finalizing a booking. This step ensures the accuracy of the booking request and verifies that no changes have occurred since the initial search or shopping process.

#### Request Example <a href="#prebookapi-requestexample" id="prebookapi-requestexample"></a>

```xml
<HotelML xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
" xmlns="
http://www.xpegs.com/v2001Q3/HotelML
">
       <Head>
             <Process DataPath="/HotelML/Form/PreBook" Function="TI_PreBookV1_1" Token="xxxxxxxxx_1635512924"/>
             <Route Destination="00" Source="XX"/>
       </Head>
       <Form>
              <PreBook>
                    <Property Code="XM;8500" Context="Xxxx"/>
                    <RateCriteria VersionCompliance="PreBook_V1" NumberOfRooms="1" TotalRate="270.00" TotalRateInclusive="280.00" RatePlanCode="LV7" RoomTypeCode="A03" RoomCodeContext="Native" RateCodeContext="Native">
                           <GuestCount Type="Adult" Count="2"/>
                           <GuestCount Type="Child" Count="1" Age="3"/>
                           <AgentInfo Number="12345678" Type="TIDS"/>
                           <DateRange InDate="2023-01-14" OutDate="2023-01-15"/>
                           <RateSearch RatePlanCode="AB1" RatePlanType="Negotiated"/>
                    </RateCriteria>
             </PreBook>
       </Form>
</HotelML>
```

#### Response Example: <a href="#prebookapi-responseexample" id="prebookapi-responseexample"></a>

```xml
<HotelML xmlns="
http://www.xpegs.com/v2001Q3/HotelML
">
       <Head>
             <Route Destination="XX" Source="00">
                   <Operation Action="Create" App="UltraDirect-d2c3_prod_08" AppVer="V1_1" DataPath="/HotelML" StartTime="2022-02-09T19:03:40.217+00:00" Success="true" TotalProcessTime="1248"/>
             </Route>
<Warning Code="XXXX" Description="PRICE CHANGE" Type="Process"/>
      </Head>
      <Property xml:lang="en" AvailabilityStatus="Open" Code="XM;8500" Token="xxxxxxxxx_1635512924">
             <Rate>
                   <RatePlan Code="LV7" CommissionableStatus="Commissionable" Description="RA1 - Breakfast Included BB Bed and breakfast" InDate="2023-01-14" Indicator="Negotiated" OutDate="2023-01-15" RequestedRatePlanCode="AB1" Status="Open">
<Amenity Code="BRKFST" Confirmable="true" Property="true" Room="true"/>
                         <RoomType BookableRate="290.00" Code="A03" NativeCurrency="EUR" RateFrequency="Daily" RoomDescription="Junior Suite with 1 Double Bed + 1 Sofa cum Dou ble bed" RoomRateText="RA1 - Breakfast Included Junior Suite with 1 Double Bed + 1 Sofa cum Dou ble bed" TotalRate="290.00" TotalRateInclusive="300.00" PriceChangeIndicator="Increased">
                               <CommissionPolicy Percentage="10.00"/>
                               <GuaranteePolicy LateArrivalTime="18:00:00.000" Required="false" HoldTime="18:00:00.000"/>
                               <CancelPolicy Time="18:00:00.000" Date="2022-02-18" PenaltyAmountTaxIndicator="Unknown" PenaltyAmountFeeIndicator="Unknown"/>
                         </RoomType>
                   </RatePlan>
             </Rate>
      </Property>
</HotelML>
```

<br>


---

# 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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
