> ## 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.

# Excursion

## Introduction

OTA-based notifications for excursions use the **OTA\_TourActivityRQ/RS** message set (OpenTravel). These are used in push-model integrations to provide partners with up-to-date **rates**, **availability**, and **product content** for excursions and activities. A typical notification horizon is **12–18 months**. Delta notifications are commonly sent **every 15 minutes** during daytime and **hourly** overnight.

<Info>
  This page keeps a **transactional focus**: structures and rules are aligned with the real-time messages you use in pricing/booking flows (OTA\_TourActivityRQ/RS), while showing how the same elements appear in push notifications.
</Info>

***

## Notification Schedule

* **Full notification**: inventories, rates, and/or availabilities for all products and for the full period.
* **Delta notification**:
  * **Stock** (availability) deltas only include affected dates.
  * **Rates** deltas ship the full rate scope for the affected product/period.
* Frequency guideline: full **weekly**; deltas **every 15 min** (09:00–22:59 CET) and **hourly** overnight.

***

## Allotment (Availability)

`OTA_TourActivityAvailRS` with `Target="Stock"`. Used to communicate **when** a service operates, what **release** applies, and how many **units** remain.

### Skeleton

```xml theme={null}
<OTA_TourActivityAvailRS Version="2016.2" Target="Stock">
  <TourActivityInfo>
    <BasicInfo SupplierServiceCode="TIC" SupplierProductCode="ST" TourActivityID="PESLPA4GTA"/>
    <Schedule>
      <Summary Start="09:15:00"/>
      <Detail Start="2017-11-01" End="2018-04-30"/>
      <!-- Daily patterns covering the Detail range -->
      <OperationTime Pattern="11111" PatternLength="1"/>
      <Release      Pattern="PT00HPT00HPT00HPT00HPT00H" PatternLength="5"/>
      <Allotment    Pattern="9999999999" PatternLength="2"/>
    </Schedule>
    <TPA_Extensions>
      <PickupDropoffs>
        <PickupDropoff Code="70706" LocationName="Arenas del Mar Hotel" OtherInfo="Hotel" PickupInd="true"/>
        <!-- … more pickup points … -->
      </PickupDropoffs>
    </TPA_Extensions>
  </TourActivityInfo>
</OTA_TourActivityAvailRS>
```

### Technical Notes (Availability Patterns)

* The **`Detail`** node’s `Start`/`End` bounds the date range covered by all patterns underneath it.
* **`OperationTime`** (`PatternLength="1"`):
  * `1` = service operates; `0` = closed (closeouts, DOW restrictions, etc.).
* **`Release`** (`PatternLength="5"`):
  * Each day consumes **5 chars** in **XML duration** format (e.g., `PT00H`, `P1D`).
* **`Allotment`** (`PatternLength="2"`):
  * `XX` = remaining integer units (e.g., `07`)
  * `99` = **Free sale**
  * `RQ` = **On request**
  * `SS` = **Stop sale**
* A date is **bookable** only if **all three** concepts pass: `OperationTime=open` **AND** `Release satisfied` **AND** `Allotment available`.

### Pickup/Dropoff Logic

* Services with transfers list allowed hotel pickup points in **`TPA_Extensions/Stocks/Stock/PickupDropoffs`**.
* All hotels in the list are valid pickup/dropoff candidates; some allotment conditions may be constrained to **specific pickup points**.

### Deactivation

Communicated with the same RS envelope, marking `StockStatusType="Deactivated"`. Without dates, the product is deactivated **entirely**.

```xml theme={null}
<OTA_TourActivityAvailRS Version="2016.2" Target="Stock">
  <Success/>
  <TourActivityInfo>
    <BasicInfo TourActivityID="PESLPA4GTA"/>
    <Schedule>
      <Detail Start="2018-01-01" End="2018-12-31">
        <TPA_Extensions>
          <Stock Type="Main" StockStatusType="Deactivated"/>
        </TPA_Extensions>
      </Detail>
    </Schedule>
  </TourActivityInfo>
</OTA_TourActivityAvailRS>
```

***

## Rates

`OTA_TourActivityAvailRS` with `Target="Rates"`. Used to communicate **amounts**, **pricing base** (per person / per group), **brand-specific rates**, pickup scope for transfer services, and **participant policies**.

### Skeleton

```xml theme={null}
<OTA_TourActivityAvailRS Version="2016.2" Target="Rates">
  <TourActivityInfo>
    <BasicInfo SupplierServiceCode="TIC" SupplierProductCode="ST" TourActivityID="PESLPA4GTA"/>
    <Schedule>
      <Detail Start="2018-01-01" End="2018-06-30"/>
      <Detail Start="2018-07-01" End="2018-12-31"/>
    </Schedule>

    <Pricing>
      <Summary CurrencyCode="EUR" Amount="50.00"/>
      <PricingType>PerPerson</PricingType>
      <!-- Optional brand scoping -->
      <Group GroupCode="BRAND1"/>
      <Group GroupCode="BRAND2"/>
    </Pricing>

    <Policies>
      <!-- Age windows & group-size limits -->
      <Participant MinAge="13" MaxAge="99" MinParticipants="1" MaxParticipants="1"/>
    </Policies>

    <!-- Transfers only: pickup scoping -->
    <TPA_Extensions>
      <PickupDropoffs>
        <PickupDropoff Code="74073" LocationName="Lux Mar Apartments" OtherInfo="Hotel" PickupInd="true"/>
        <!-- … -->
      </PickupDropoffs>
    </TPA_Extensions>
  </TourActivityInfo>
</OTA_TourActivityAvailRS>
```

### Technical Notes (Pricing & Policies)

* **`PricingType`**:
  * `PerPerson`: multiply by pax that fall into priced participant categories.
  * `PerGroup`: amount covers a whole **group window** (see Policies).
    * If booking pax exceed `MaxParticipants`, compute **multiple units** (ceil division).
* **Brand-specific pricing**:
  * Presence of `<Group GroupCode="…"/>` means **rate applies only to those brands**.
  * **Override rule**: brand-specific beats generic for matching conditions.
* **Policies / Participant windows**:
  * Expressed via **age ranges** and **Min/MaxParticipants**.
  * If only ADT policies are present, you effectively signal **adult-only** experiences; CHD/INF ranges can be omitted entirely when not permitted.

<Warning>
  **Authoritative price & availability** are those returned by **`OTA_TourActivityBookRQ/RS`** at booking time. Do **not** commit to fixed prices solely from notifications or search responses.
</Warning>

***

## Transactional Flow Hints (OTA\_TourActivityRQ/RS)

While this page shows push **RS** envelopes, the same structures carry over to the **transactional pull** flow:

1. **Search/Price**: `OTA_TourActivityAvailRQ/RS`
   * Request filters by **TourActivityID**, **date**, **pax composition (ages)**, optional **brand**, and **pickup** scope.
   * Response mirrors **Schedule**, **Pricing**, **Policies**, and (for transfers) **PickupDropoffs**.
2. **Book**: `OTA_TourActivityBookRQ/RS`
   * Send the selected **date**, **pax detail (ages)**, **pickup** (if required), and any **brand** context used in pricing.
   * RS confirms inventory, final price, and returns **record locator**.
3. **Retrieve/Cancel**: `OTA_TourActivityResRetrieveRQ/RS` and `OTA_CancelRQ/RS` (when supported).

<Tip>
  When computing eligibility for a date, apply **OperationTime → Release → Allotment** in that order. For price, apply **brand override**, then **PricingType math** (`PerPerson` vs `PerGroup`), then **policies**.
</Tip>

***

## Packaging Notes

* **Pre-package**: Combine multiple services (e.g., **hotel + rent-a-car**) under a single offer.
* **Dynamic package**: Compose at runtime.
* Car packages: use **Inventory Block Codes** (ACRISS-based).

***
