# Book and Cancel Reservation

**Overview**

The purpose of this document is to provide detailed descriptions of the transactions and functionality in the RateGain pull connectivity model. The primary component of this model is **UltraDirect**, and the API outlined in this documentation is part of the **XML UltraDirect** system. This includes:

* **Message Formats**: A detailed description of all fields (XML elements and attributes) used in request and response messages. This is especially useful for developers, complementing the XML message definitions provided in the HotelML XML Schema Definition (XSD) files.
* **Request and Response Examples**: Samples of each request and response message showcasing the key functionality.
* **Process/Transaction Flows**: Illustrations of typical processes and transaction flows.

Below is a summary of the **UltraDirect Book** and **Cancel Reservation** transactions:

| Booking Request | Makes a new hotel reservation in real time       |
| --------------- | ------------------------------------------------ |
| Cancel Booking  | Cancel an existing (confirmed) hotel reservation |


---

# 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/book-and-cancel-reservation.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.
