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

The **OTA\_TourActivityBookRS** (Excursion Book **Response**) confirms a quote or a committed booking for a tour/activity service. It returns confirmation details such as service identifiers, participant data, pricing, partner/internal references, cancellation rules, and (optionally) QR codes.

## Purpose

* **Quote**: Confirms availability and final price without creating a reservation (no commitment).
* **Commit**: Creates a binding booking in the reservation system; penalties may apply to changes/cancellations.
* If the booking cannot be processed, the response **omits** `<Success/>` and returns error details under `<Errors/>`. [Error Scenarios](../glossary/errors)

## Structure – Root Element

```xml theme={null}
<OTA_TourActivityBookRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="2008.1">
  ...
</OTA_TourActivityBookRS>
```

**Key attributes**

* `Version`: OTA spec version (e.g., `2008.1`).
* `xmlns`: `http://www.opentravel.org/OTA/2003/05`.

## Structure – Core Elements

### BasicInfo

Confirms the booked service identifiers returned from search/detail.

```xml theme={null}
<BasicInfo TourActivityID="XESPMIAZ9U" SupplierProductCode="TE0CC00A" SupplierServiceCode="TRF"/>
```

### Location

Optional region/location context for the service.

```xml theme={null}
<Location Context="Service">
  <Region RegionCode="Region">Mallorca</Region>
</Location>
```

### ParticipantInfo

Echoes each participant’s **age at the time of service**, a unique `ParticipantID`, and the age qualifier code (`QualifierInfo`) following OTA AQC conventions (e.g., `10` adult, `8` child).

```xml theme={null}
<ParticipantInfo>
  <Category QualifierInfo="10"/>
  <Individual Age="36" ParticipantID="1">
    <NamePrefix>Mr</NamePrefix>
    <GivenName>Bender</GivenName>
    <Surname>Bending</Surname>
  </Individual>
</ParticipantInfo>
```

### Pricing

Final confirmed amounts appear under `Pricing`. Values in `Summary` are **final for accountancy**. Group size (when relevant) is returned as `KnownGroupsize`.

```xml theme={null}
<Pricing>
  <Summary Amount="130.00" CurrencyCode="EUR"/>
  <Group KnownGroupsize="3"/>
</Pricing>
```

### Extras

Extras confirmed in the booking appear in the response; their amounts are already included in the total charge.

```xml theme={null}
<Extra SupplierCode="EXFOOD" Description="Extra Food" quantity="1"/>
```

### TPA\_Extensions

Includes general information returned by the provider.

#### References

Partner and AxisData internal references are returned as `UniqueID` entries. Use **client** references for vouchers and communications; both client and internal references support cancellation. Master (`Type=36`) and child (`Type=37`) references are provided.

```xml theme={null}
<TPA_Extensions>
  <UniqueID Type="36" ID_Context="Client"   ID="1234567890"/>
  <UniqueID Type="36" ID_Context="Internal" ID="121212121212"/>
  <UniqueID Type="37" ID_Context="Client"   ID="1234567890_1"/>
  <UniqueID Type="37" ID_Context="Internal" ID="1"/>
</TPA_Extensions>
```

#### CancelPenalties

Cancellation policy is returned for **both** Quote and Commit responses. Use child references for **partial** cancellations.

```xml theme={null}
<TPA_Extensions>
  <CancelPenalties>
    <CancelPenalty>
      <Deadline OffsetUnitMultiplier="24" OffsetTimeUnit="Hour" OffsetDropTime="BeforeArrival"/>
      <AmountPercent Percent="50" BasisType="FullStay"/>
    </CancelPenalty>
    <CancelPenalty>
      <Deadline OffsetUnitMultiplier="72" OffsetTimeUnit="Hour" OffsetDropTime="BeforeArrival"/>
      <AmountPercent Percent="5" BasisType="FullStay"/>
    </CancelPenalty>
  </CancelPenalties>
</TPA_Extensions>
```

#### QR Codes

Some providers return **tickets/QR codes** via `UniqueID Type="30"` under `TPA_Extensions`:

* **Direct QR value**: `ID` contains the QR string to render as a code.
* **QR URL**: `ID` contains a URL to download the QR/ticket.

```xml theme={null}
<TPA_Extensions>
  <!-- Direct QR value -->
  <UniqueID Type="30" ID_Context="Client" ID="/OI/P1437/I0/AN002137/E176/N001/B003/J1/F210605/H1600/G51/R1:Y2-B3F210605-H1600"/>
  <!-- QR download URL -->
  <UniqueID Type="30" ID_Context="Client" ID="https://pre-portaventuraworld.api.experticket.com/TransactionDownload/SalesDocument?SaleId=5603191358506446612"/>
</TPA_Extensions>
```

#### BookingStatus

When present, booking status may also be returned as a TPA element:

```xml theme={null}
<ns1:BookingStatus
  xmlns:ns1="http://www.opentravel.org/OTA/2003/05/tpa"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:type="ns1:BookingStatusType"
  ReservationStatusType="Reserved"/>
```

## Complete Examples

<CodeGroup>
  ```xml Book RS expandable theme={null}
  <OTA_TourActivityBookRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="2008.1">
    <Success/>
    <BasicInfo TourActivityID="XESPMIAZ9U" SupplierProductCode="TE0CC00A" SupplierServiceCode="TRF"/>
    <Location Context="Service">
      <Region RegionCode="Region">Mallorca</Region>
    </Location>
    <ParticipantInfo>
      <Category QualifierInfo="10"/>
      <Individual Age="36" ParticipantID="1">
        <NamePrefix>Mr</NamePrefix>
        <GivenName>Bender</GivenName>
        <Surname>Bending</Surname>
      </Individual>
    </ParticipantInfo>
    <Pricing>
      <Summary Amount="130.00" CurrencyCode="EUR"/>
      <Group KnownGroupsize="3"/>
    </Pricing>
    <TPA_Extensions>
      <CancelPenalties>
        <CancelPenalty>
          <Deadline OffsetUnitMultiplier="24" OffsetTimeUnit="Hour" OffsetDropTime="BeforeArrival"/>
          <AmountPercent Percent="50" BasisType="FullStay"/>
        </CancelPenalty>
        <CancelPenalty>
          <Deadline OffsetUnitMultiplier="72" OffsetTimeUnit="Hour" OffsetDropTime="BeforeArrival"/>
          <AmountPercent Percent="5" BasisType="FullStay"/>
        </CancelPenalty>
      </CancelPenalties>
      <UniqueID Type="36" ID_Context="Client"   ID="1234567890"/>
      <UniqueID Type="36" ID_Context="Internal" ID="121212121212"/>
      <UniqueID Type="37" ID_Context="Client"   ID="1234567890_1"/>
      <UniqueID Type="37" ID_Context="Internal" ID="1"/>
      <!-- Example QR representations -->
      <UniqueID Type="30" ID_Context="Client" ID="/OI/P1437/I0/AN002137/E176/N001/B003/J1/F210605/H1600/G51/R1:Y2-B3F210605-H1600"/>
      <UniqueID Type="30" ID_Context="Client" ID="https://pre-portaventuraworld.api.experticket.com/TransactionDownload/SalesDocument?SaleId=5603191358506446612"/>
      <ns1:BookingStatus xmlns:ns1="http://www.opentravel.org/OTA/2003/05/tpa" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:BookingStatusType" ReservationStatusType="Reserved"/>
    </TPA_Extensions>
    <Extra SupplierCode="EXFOOD" Description="Extra Food" quantity="1"/>
  </OTA_TourActivityBookRS>
  ```
</CodeGroup>

## Best Practices

1. Use **client** references for external communications (voucher/finance), but retain **internal** references for support and cancellations.
2. Provide accurate **ages at service date** with correct OTA AQC codes in `ParticipantInfo`.
3. Read `CancelPenalties` for both quotes and commits; use child references to scope **partial** cancellations.
