> 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/modification.md).

# Modification

This transaction set is used to modify certain fields in a confirmed booking without the need to cancel and rebook the reservation. Canceling and rebooking has the risk that accommodations may not be available. Not all CRSs support reservation modification.

It is suggested that modification be used in conjunction with Session Control. This is to ensure that if a modification is not successful or if the modified booking is no longer required, it can be ignored in preference to the original booking.

#### Example Modification Request: <a href="#modification-examplemodificationrequest" id="modification-examplemodificationrequest"></a>

```xml
<HotelML xmlns="
http://www.xpegs.com/v2001Q3/HotelML
">
<Head>
<Process DataPath="/HotelML/Form/ModifyReservation" Function="TI_ModifyReservationV1_1" Token="1080740396082"/>
<Route Destination="00" Source="XX"/>
</Head>
<Form>
<ModifyReservation Session="New">
<Reservation ConfirmationNumber="1118JE9512" InDate="2013-05-10" OutDate="2013-05-12" PropertyCode="XN;1118">
<Guest FirstName="RateGain" LastName="Test"/>
</Reservation>
<UpdateReservation CurrencyCode="GBP" GuaranteeMethod="CreditCard" GuaranteeType="Guarantee" InDate="2009-05-15" OutDate="2009-05-20" RatePlanCode="RA3" RatePlanType="BusinessStandard" RoomRate="69.00" RoomTypeCode="B1Q">
<AgentInfo CountryCode="GB" Number="12345678" Type="TIDS"/>
<CreditCard ExpirationDate="2015-12" IssuedName="P Test" Number="4321432143214327" TypeIdentifier="VI"/>
<Guest FirstName="RateGainTest" LastName="Testing" NumberOfAdults="1" NumberOfRooms="1" Primary="true">
<Email Address="
test@RateGain.com
"/>
<Phone Number="1111"/>
<PostalAddress City="London" CountryCode="US" Line1="111" PostalCode="1111"/>
</Guest>
</UpdateReservation>
</ModifyReservation>
</Form>
</HotelML>

```

* If the guest wishes to modify the date range or the rate, then an availability request must be generated to confirm availability before the modification.
* Changes to arrival date/departure/length of stay/room type/number of guests or rate plan may affect pricing.
* The ConfirmationNumber used is the number originally returned in the booking response.
* The UpdateReservation element is used to send all the new data and overwrite the data that the hotel CRS currently has stored.
* The fields that may be modified instead of requiring a cancel/rebook may vary by CRS.

#### Example Modification Response: <a href="#modification-examplemodificationresponse" id="modification-examplemodificationresponse"></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- 02-13T10:38:25.082+00:00" Success="true" TotalProcessTime="1818"/>
</Route>
</Head>
<Reservation BookedRate="74.00" CurrencyCode="GBP" HotelRoomType="B1QRA3" InDate="2009-05-15" NumberOfPersons="1" OutDate="2009-05-20" PropertyCode="XN;1118" RateGuaranteed="true" RatePlanCode="RA3" RoomTypeCode="B1Q" SessionID="UD186230:11f45a1d811:-73e0a6c" TaxInformation="NATIONAL TAXES ON ACCOMMODATION 0.00 GBP" Token="1080740396082">
<Guest FirstName="RateGainTest" LastName="Testing" NumberOfAdults="1" NumberOfRooms="1" Primary="true">
<Email Address="
test@RateGain.com
"/>
<Phone Number="1111"/>
<PostalAddress City="London" CountryCode="US" Line1="111" PostalCode="1111"/>
</Guest>
<RateChange Charge="64.00" CurrencyCode="GBP" Date="2009-05-15"/>
<RateChange Charge="74.00" CurrencyCode="GBP" Date="2009-05-16"/>
<RateChange Charge="64.00" CurrencyCode="GBP" Date="2009-05-17"/>
<RateChange Charge="69.00" CurrencyCode="GBP" Date="2009-05-18"/>
<RateChange Charge="74.00" CurrencyCode="GBP" Date="2009-05-19" MoreRateChange="true"/>
</Reservation>
</HotelML>

```

The SessionID in the response confirms that the modification was accepted by the hotel. The next step is the Commit transaction. If the response does not contain this element, then it was not accepted.

#### **Confirm Modification request:** <a href="#modification-confirmmodificationrequest" id="modification-confirmmodificationrequest"></a>

```xml
<HotelML xmlns="
http://www.xpegs.com/v2001Q3/HotelML
">
<Head>
<Process DataPath="/HotelML/Form/ModifyReservation" Function="TI_ModifyReservationV1_1" Token="1080224081875"/>
<Route Destination="00" Source="XX"/>
</Head>
<Form>
<SessionControl Action="Commit" SessionID="UD186230:11f45a1d811:-73e0a6c"/>
</Form>
</HotelML>
```

#### **Confirm Modification Response:** <a href="#modification-confirmmodificationresponse" id="modification-confirmmodificationresponse"></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- 02-13T10:40:44.598+00:00" Success="true" TotalProcessTime="18780"/>
</Route>
</Head>
<Reservation BookedRate="74.00" ConfirmationNumber="1118JE9512" CurrencyCode="GBP" HotelRoomType="B1QRA3" InDate="2009-05-15" NumberOfPersons="1" OutDate="2009-05-20" PropertyCode="XN;1118" RateGuaranteed="true" RatePlanCode="RA3" RoomTypeCode="B1Q" TaxInformation="NATIONAL TAXES ON ACCOMMODATION 0.00 GBP" Token="1080740396082">
<Guest FirstName="RateGain" LastName="Testing" NumberOfAdults="1" NumberOfRooms="1" Primary="true">
<Email Address="
test@RateGain.com
"/>
<Phone Number="1111"/>
<PostalAddress City="London" CountryCode="US" Line1="111" PostalCode="1111"/>
</Guest>
<RateChange Charge="64.00" CurrencyCode="GBP" Date="2009-05-15"/>
<RateChange Charge="74.00" CurrencyCode="GBP" Date="2009-05-16"/>
<RateChange Charge="64.00" CurrencyCode="GBP" Date="2009-05-17"/>
<RateChange Charge="69.00" CurrencyCode="GBP" Date="2009-05-18"/>
<RateChange Charge="74.00" CurrencyCode="GBP" Date="2009-05-19" MoreRateChange="true"/>
</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/modification.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.
