> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axisdata.net/llms.txt
> Use this file to discover all available pages before exploring further.

# OTA_ReadRQ

The OTA\_ReadRQ (Booking Search & Retrieve Request) allows partners to **search** bookings and **retrieve booking details** from Axis Data using the standard OpenTravel schema.

<Tip>Recommended flow: perform a **search** to get booking references, then **retrieve details** per reference. Use `ReturnListIndicator` to switch modes.</Tip>

<Card title="OTA_ReadRQ API call" icon="eye" href="/api-reference/endpoint/bookingmgmt/read" arrow="true" horizontal>
  Skip & Hit the Playground.
</Card>

## Purpose

This message is used to:

* Search bookings that match selection criteria (e.g., date windows, hotel filters, status).
* Retrieve lists of booking references (up to service limits) for synchronization.
* Retrieve the full booking details for a specific reference (hotel, excursions, etc.).
* Request optional enrichment in the response via `Instance` flags.

## Structure – Root Element

```xml theme={null}
<OTA_ReadRQ>
```

**Key Attributes:**

* `xmlns`: `"http://www.opentravel.org/OTA/2003/05"`.
* `Version`: Specification version (e.g., `"2008.1"`).
* `ReturnListIndicator`: `true` → **Search/List** mode · `false` → **Retrieve Details** mode.
* `PrimaryLangID`: Desired language for textual descriptions in the **details** response (fallback to English if unavailable).

## Structure – Core Elements

### POS (Point of Sale)

Identifies the requesting party and carries credentials and optional enrichment selector (`Instance`).

```xml theme={null}
<POS>
  <Source>
    <RequestorID ID_Context="AxisData" ID="TEST" Type="22" Instance="MF123"/>
  </Source>
  <Source>
    <RequestorID Type="88" ID="TEST" MessagePassword="testpass"/>
  </Source>
</POS>
```

**Attributes (Common):**

* `ID_Context`, `ID`, `Type`: Authentication identifiers.
* `MessagePassword`: Password for the Type `88` credential.
* `Instance` (on the Type `22` credential): Optional flags to **enrich** the response. Combine digits as needed, e.g., `MF1`, `MF12`, `MF123`.

**Instance Flags:**

| Digit | Adds to response                                                  |
| :---- | :---------------------------------------------------------------- |
| `1`   | Item status (include cancelled items)                             |
| `2`   | Cancellation policies (confirmed) / cancellation cost (cancelled) |
| `3`   | Per-pax rate breakdown (active bookings)                          |

> The enrichment is applied to **OTA\_ResRetrieveRS**; the request only signals which enrichments to include.

***

### ReadRequests / HotelReadRequest (Search Mode)

Container for one or more hotel search filters.

```xml theme={null}
<ReadRequests>
  <HotelReadRequest HotelCode="AESPMI5L46">
    <!-- "ChainName=" can also be added -->
    <SelectionCriteria Start="2026-07-17" End="2026-07-24" DateType="ArrivalDate" ResStatus="Reserved"/>
    <!-- Values allowed for DateType: "ArrivalDate", "CreateDate", "DepartureDate", "LastUpdateDate" -->
    <TPA_Extensions>
      <Criterion>
        <RefPoint CodeContext="Country" Name="Spain"/>
        <RefPoint CodeContext="Region" Name="Mallorca"/>
        <RefPoint CodeContext="Resort" Name="Palma City"/>
      </Criterion>
    </TPA_Extensions>
  </HotelReadRequest>
</ReadRequests>
```

#### SelectionCriteria

* `Start`, `End`: Date (YYYY-MM-DD) or datetime (e.g., `YYYY-MM-DDThh:mm`) bounds.
* `DateType`: One of `ArrivalDate`, `CreateDate`, `DepartureDate`, `LastUpdateDate`.
* `ResStatus` *(optional)*: Booking status filter.

**Typical Interpretations:**

* `Start="2020-06-21" End="2020-06-21" DateType="LastUpdateDate"` → bookings created/modified on June 21.
* `Start="2020-06-21" End="2020-06-28" DateType="LastUpdateDate"` → created/modified between June 21–28.
* `Start="2020-06-21" DateType="LastUpdateDate"` → created/modified on/after June 21.
* `Start="2020-06-21T17:15" DateType="LastUpdateDate"` → created/modified on/after June 21 at 17:15 CET.
* `End="2020-06-21" DateType="LastUpdateDate"` → created/modified **before** June 21 (service limit applies).
* `DateType="ArrivalDate"` or `"DepartureDate"` → filter by check-in/out dates.

#### Criterion → RefPoint

Use `RefPoint` with `CodeContext` to filter by geography:

* `Country`, `Airport`, `Region`, `Resort`.
  Multiple `RefPoint` entries can be combined in one `Criterion`.

***

### UniqueID (Details Mode)

Provide a booking reference to retrieve **full** details. Either the client’s reference or the internal Axis Data reference can be used.

```xml theme={null}
<UniqueID Type="36" ID="TEST_AXIS" ID_Context="Client"/>
```

## Complete Examples

<CodeGroup>
  ```xml Search (ReturnListIndicator=true) expandable theme={null}
  <OTA_ReadRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="2008.1" ReturnListIndicator="true">
    <POS>
      <Source>
        <RequestorID ID_Context="AxisData" ID="TEST" Type="22"/>
      </Source>
      <Source>
        <RequestorID Type="88" ID="TEST" MessagePassword="testpass"/>
      </Source>
    </POS>
    <ReadRequests>
      <HotelReadRequest HotelCode="AESPMI5L46">
        <!-- "ChainName=" can also be added -->
        <SelectionCriteria Start="2026-07-17" End="2026-07-24" DateType="ArrivalDate" ResStatus="Reserved"/>
        <!-- Values allowed for DateType: "ArrivalDate", "CreateDate", "DepartureDate", "LastUpdateDate" -->
        <TPA_Extensions>
          <Criterion>
            <RefPoint CodeContext="Country" Name="Spain"/>
            <RefPoint CodeContext="Region" Name="Mallorca"/>
            <RefPoint CodeContext="Resort" Name="Palma City"/>
          </Criterion>
        </TPA_Extensions>
      </HotelReadRequest>
    </ReadRequests>
  </OTA_ReadRQ>
  ```

  ```xml Retrieve details (ReturnListIndicator=false) expandable theme={null}
  <OTA_ReadRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="2008.1" ReturnListIndicator="false" PrimaryLangID="EN">
    <POS>
      <Source>
        <RequestorID ID_Context="AxisData" ID="TEST" Type="22" Instance="MF123"/>
      </Source>
      <Source>
        <RequestorID Type="88" ID="TEST" MessagePassword="testpass"/>
      </Source>
    </POS>
    <UniqueID Type="36" ID="TEST_AXIS" ID_Context="Client"/>
  </OTA_ReadRQ>
  ```
</CodeGroup>

## Common Use Cases

* **Delta sync**: `ReturnListIndicator="true"` with `DateType="LastUpdateDate"` to get references changed since last poll; then request details per `UniqueID`.
* **Direct lookup**: `ReturnListIndicator="false"` with `UniqueID` when you already know the distributor or internal reference.
* **Bulk list**: Omit filters to retrieve up to the service’s maximum list (avoid exceeding 1,000 to prevent timeouts).

## Best Practices

1. Always set `ReturnListIndicator` to reflect intent (list vs. details).
2. Include `PrimaryLangID` when you need localized descriptions in the details response.
3. Use ISO `YYYY-MM-DD` (and optional `Thh:mm`) formats for date filters.
4. Keep search windows tight to reduce payload size and processing time.
5. For region filtering, prefer `RefPoint` with clear `CodeContext` values.
6. Respect service limits (max list size \~1,000) and paginate by date windows if needed.

## Playground

<Card title="OTA_ReadRQ API call" icon="eye" href="/api-reference/endpoint/bookingmgmt/read" arrow="true" horizontal>
  Try our API playground in real time.
</Card>

<Tip>Use the examples to hit the TEST environment;     </Tip>
