Skip to content

OTA_HotelRatePlanRQ

Method for

  • retrieving room data and offer data from Kurzurlaub.de.
  • retrieving daily rates for selected rate plans/offers and assigned rooms

OTA_HotelRatePlanRQ - Request via GET - REST API

each method can be called via REST API using GET.

Parameters used:

  • AgentDutyCode (optional if IP WhiteList or HTTP Basic Auth is used)
  • HotelCode (mandatory)

Example:

GET /ota/api/HotelRatePlan?AgentDutyCode=1&HotelCode=4

OTA_HotelRatePlanRQ - Request per POST

Retrieving room data and offer data from Kurzurlaub.de

HotelRatePlan Request (RQ) and Response (RS) using the example of the test hotel with required Attributes for

  • @AgentDutyCode (Agent-ID): 1
  • @HotelCode (Hotel-ID): 4
  • RequestorID@ID (Hotel-ID): 4

Example OTA_HotelRatePlanRQ (Request)

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanRQ xsi:schemaLocation="http://opentravel.org/2010A/OTA_HotelRatePlanRQ.xsd" EchoToken="938a6a32-c526-485b-b641-f69d635cda41" TimeStamp="2011-11-23T09:44:06" Version="1.001" xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLXSchema-instance">
<POS>
    <Source AgentDutyCode="1">
        <RequestorID ID="4" Type="4"/>
    </Source>
</POS>
<RatePlans>
    <RatePlan>
        <HotelRef HotelCode="4"/>
    </RatePlan>
</RatePlans>
</OTA_HotelRatePlanRQ>

Retrieving daily rates for selected rate plans/offers and assigned rooms (using RatePlanCode)

This method is used, for example, to control sent data such as daily rates for rooms or offers.

The prices are queried for an offer and period (with RatePlanCode)

If a parameter RatePlanCode was specified in the RatePlanCandidate in the request, the response provides all prices for the associated rooms in the requested period. Dynamic rates (if used) are also taken into account and delivered here. E.g.

  • DateRange@Start (Start date): YYYY-MM-DD
  • DateRange@End (End date): YYYY-MM-DD
  • RatePlanCandidate@RatePlanCode (RatePlanCode): KU-TEST

Example OTA_HotelRatePlanRQ (Request with RatePlanCode)

for querying rates for 2 installment plans in the period 01.06.2024 - 10.06.2024

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanRQ TimeStamp="2024-03-29T08:40:10+01:00" Version="1.000">
    <POS>
        <Source AgentDutyCode="1">
            <RequestorID ID="4" Type="4"/>
        </Source>
    </POS>
    <RatePlans>
        <RatePlan>
            <DateRange Start="2024-06-01" End="2024-06-10"/>
            <RatePlanCandidates>
                <RatePlanCandidate RatePlanCode="KU-TEST"/>
                <RatePlanCandidate RatePlanCode="KU-TEST-BAR-MAI"/>
            </RatePlanCandidates>
            <HotelRef HotelCode="4"/>
        </RatePlan>
    </RatePlans>
</OTA_HotelRatePlanRQ>

OTA_HotelRatePlanRS - Versions of the response

Response with all combinations of room and offer data

The OTA_HotelRatePlanRS response returns room data and offer data

A RoomType / RatePlan combination is delivered here, i.e. available offers (RatePlan) with attributes and all associated rooms with prices in this offer.

The following attributes are used for the rooms (SellableProduct).

  • @InvCode (RoomID)
  • @InvType (always ROOM)
  • @RoomTypeName (room name, size and max. occupancy)
  • @Quantity (number of rooms 1-n)

Example SellableProduct:

<SellableProduct InvCode="5306" InvType="ROOM">
    <GuestRoom Code="5306" RoomTypeName="Doppelzimmer (20m², ID:5306, 2E/1K)" Quantity="43"/>
</SellableProduct>

The following attributes are used for the offers (RatePlan).

  • RatePlan@RatePlanID
  • RatePlan@RatePlanCode
  • Description@Name
  • Text
  • Offer Period (@Start - @End)

The RatePlanID and RatePlanCode (e.g. BEST-RATE or BAR - Best Available Rate) are usually different. If no RatePlanCode is specified, the ID is also sent here.

Example RatePlan Block:

<RatePlan RatePlanID="20540" RatePlanCode="BEST-BAR">
      <DestinationSystemsCode/>
      <Description Name="Testarrangement schönes Schwerin - bitte nicht buchen">
        <Text>Kurzurlaub Angebot 2 ÜN gültig bis 11.04.2022</Text>
      </Description>
      <Rates>
        <Rate Start="2017-03-01" End="2022-04-11" InvCode="3">
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="99.00" CurrencyCode="EUR"/>
          </BaseByGuestAmts>
        </Rate>

...
</RatePlan>

Example OTA_HotelRatePlanRS (Response)

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" EchoToken="4fdb4388d960c0242f1ea79b6c3a41b5" PrimaryLangID="de" TimeStamp="2022-02-03T15:27:58+01:00" Target="Production" Version="1.000">
  <Success/>
  <RatePlans HotelCode="4">
    <RatePlan RatePlanID="20540" RatePlanCode="test">
      <DestinationSystemsCode/>
      <Description Name="Testarrangement schönes Schwerin - bitte nicht buchen">
        <Text>Kurzurlaub Angebot 2 ÜN gültig bis 11.04.2022</Text>
      </Description>
      <Rates>
        <Rate Start="2017-03-01" End="2022-04-11" InvCode="3">
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="99.00" CurrencyCode="EUR"/>
          </BaseByGuestAmts>
        </Rate>
        <Rate Start="2017-03-01" End="2022-04-11" InvCode="2625">
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="799.00" CurrencyCode="EUR"/>
          </BaseByGuestAmts>
        </Rate>
        <Rate Start="2017-03-01" End="2022-04-11" InvCode="5306">
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="995.00" CurrencyCode="EUR"/>
          </BaseByGuestAmts>
        </Rate>
        <Rate Start="2017-03-01" End="2022-04-11" InvCode="5307">
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="1200.00" CurrencyCode="EUR"/>
          </BaseByGuestAmts>
        </Rate>
      </Rates>
      <SellableProducts>
        <SellableProduct InvCode="3" InvType="ROOM">
          <GuestRoom Code="3" RoomTypeName="Appartement Wasserseite (12m², ID:3, 2E/2K)" Quantity="1"/>
        </SellableProduct>
        <SellableProduct InvCode="2625" InvType="ROOM">
          <GuestRoom Code="2625" RoomTypeName="Appartement/s (28m², ID:2625, 4E/2K)" Quantity="10"/>
        </SellableProduct>
        <SellableProduct InvCode="5306" InvType="ROOM">
          <GuestRoom Code="5306" RoomTypeName="Doppelzimmer (20m², ID:5306, 2E/1K)" Quantity="43"/>
        </SellableProduct>
        <SellableProduct InvCode="5307" InvType="ROOM">
          <GuestRoom Code="5307" RoomTypeName="Einzelzimmer (15m², ID:5307, 1E/0K)" Quantity="5"/>
        </SellableProduct>
      </SellableProducts>
    </RatePlan>
  </RatePlans>
</OTA_HotelRatePlanRS>

Response with daily rates for selected rate plans / offers and assigned rooms (with RatePlanCode)

if a parameter for RatePlanCode was specified in the request, the response provides all prices for the associated rooms in the requested period. Dynamic rates (if used) are also taken into account and delivered here.

For example, for querying rates for 1 installment plan in the period June 1st, 2024 - June 10th, 2024

<?xml version="1.0" encoding="utf-8"?>
<OTA_HotelRatePlanRS xmlns="http://www.opentravel.org/OTA/2003/05"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     EchoToken="4f2f572109b0cdcdac77523676198e38" TimeStamp="2024-05-29T11:17:55+02:00"
                     Version="2.064">
    <Success/>
    <RatePlans HotelCode="4">
        <RatePlan RatePlanID="123467" RatePlanCode="TEST-BAR-2N-MAI" CurrencyCode="EUR">
            <Rates>
                <!-- Rates for Single Room 1234 -->
                <Rate InvTypeCode="1234" Start="2024-06-01" End="2024-06-02" CurrencyCode="EUR" IsRoom="true">
                    <BaseByGuestAmts>
                        <BaseByGuestAmt AmountAfterTax="220.00"/>
                    </BaseByGuestAmts>
                </Rate>
                <Rate InvTypeCode="1234" Start="2024-06-03" End="2024-06-08" CurrencyCode="EUR" IsRoom="true">
                    <BaseByGuestAmts>
                        <BaseByGuestAmt AmountAfterTax="218.00"/>
                    </BaseByGuestAmts>
                </Rate>
                <Rate InvTypeCode="1234" Start="2024-06-09" End="2024-06-10" CurrencyCode="EUR" IsRoom="true">
                    <BaseByGuestAmts>
                        <BaseByGuestAmt AmountAfterTax="230.50"/>
                    </BaseByGuestAmts>
                </Rate>
                <!-- Rates for Double Room 2345 -->
                <Rate InvTypeCode="2345" Start="2024-06-01" End="2024-06-09" CurrencyCode="EUR" IsRoom="true">
                    <BaseByGuestAmts>
                        <BaseByGuestAmt AmountAfterTax="280.00"/>
                    </BaseByGuestAmts>
                </Rate>
                <Rate InvTypeCode="2345" Start="2024-06-10" End="2024-06-10" CurrencyCode="EUR" IsRoom="true">
                    <BaseByGuestAmts>
                        <BaseByGuestAmt AmountAfterTax="290.00"/>
                    </BaseByGuestAmts>
                </Rate>
            </Rates>
            <Description Name="Test OTA Raten">
                <Text>Kurzurlaub Angebot 2 ÜN gültig bis 30.06.2024</Text>
            </Description>
        </RatePlan>
    </RatePlans>
</OTA_HotelRatePlanRS>

Error messages

If errors occur, they will be sent in an OTA_ErrorRS Response with @ErrorCode and @ErrorMessage

Here is a list of common errors

ErrorCode ErrorMessage
210 HotelNotLinked - Hotel (HotelCode 1234) linked to another channel manager (your AgentDutyCode is 123)
211 HotelNotActivated - Hotel not found (HotelCode 1234 / AgentDutyCode 123)
104 InternalError - Empty HotelCode (HotelId) in accepted params (agentdutycode, hotelcode, ...)
249 InvalidRateCode - No RatePlan found for requested RatePlanCode (RATE-PLAN-CODE)

Example OTA_ErrorRS (Response)

<OTA_ErrorRS xmlns="http://www.opentravel.org/OTA/2003/05" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    EchoToken="29419a3b53ee97680b01c40f377eb98f" 
    PrimaryLangID="de" 
    TimeStamp="2022-02-03T15:18:47+01:00" 
    Target="Production" 
    Version="1.000" 
    ErrorCode="210" 
    ErrorMessage="HotelNotLinked - Hotel (HotelCode 4) linked to another channel manager (your AgentDutyCode is 22)"
    />