Skip to content

4.6. BaseRates

If the action parameter is OTA_HotelRatePlan:BaseRates, the client sends a pull request to query rate plans from the server in order to import data back into a PMS or portal.

4.6.1. Client request

The parameter request contains an OTA_HotelRatePlanRQ document.

Nested inside one RatePlan element the following sub-elements are given in order:

  • Zero or one DateRange element with Start and End attributes.

  • Zero or more RatePlanCandidate elements with attributes RatePlanCode and RatePlanID.

  • One HotelRef element with attributes HotelCode and HotelName - the rules are the same as for room availability notifications (section 4.1.1).

Here is an example:

<OTA_HotelRatePlanRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="3.000"> <RatePlans> <RatePlan> <DateRange Start="2016-12-25" End="2017-01-03" /> <RatePlanCandidates> <RatePlanCandidate RatePlanCode="DZ" RatePlanID="DailyRate"/> <RatePlanCandidate RatePlanCode="SPECIAL"/> </RatePlanCandidates> <HotelRef HotelCode="123" HotelName="Frangart Inn" /> </RatePlan> </RatePlans> </OTA_HotelRatePlanRQ>

samples/BaseRates/BaseRates-OTA_HotelRatePlanRQ.xml

Regarding DateRange and RatePlanCandidate six cases need to be distinguished:

  1. DateRange omitted, RatePlanCandidate present:

    The server will answer with the matching rate plans.

  2. DateRange omitted, RatePlanCandidate omitted:

    The server will answer with all the rate plans it has on record. Note that the Rate elements are omitted, the response contains just the RatePlan elements with the Description whose Name attribute is set to Title.

  3. DateRange empty, RatePlanCandidate present:

    If the server supports deltas, it must return the changes to the requested rate plans since the last request by the same client. If the server does not support deltas, this is not possible and will trigger a warning response.

  4. DateRange empty, RatePlanCandidate omitted:

    This is not possible and will trigger a warning response.

  5. DateRange set, RatePlanCandidate present:

    Server responds with all rates matching the given date range and rate plan.

  6. DateRange set, RatePlanCandidate omitted:

    The server response contains descriptions of the rate plans having rates in the given date range. Note that the Rate elements are omitted, the response contains just the RatePlan elements with the Description whose Name attribute is set to Title.

4.6.2. Server response

The server will send a response indicating the outcome of the request. The response is a OTA_HotelRatePlanRS document. Any of the four possible AlpineBits® server response outcomes (success, advisory, warning or error) are allowed. See Appendix A for details.

In case of a successful outcome, the Success element is followed by a RatePlans element with the information about the hotel.

Here is an example:

<OTA_HotelRatePlanRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="3.000"> <Success/> <RatePlans HotelCode="123" HotelName="Frangart Inn"> <RatePlan RatePlanCode="Base" CurrencyCode="EUR"> <Rates> <Rate RateTimeUnit="Day" UnitMultiplier="1"> <BaseByGuestAmts> <BaseByGuestAmt Type="7"/> </BaseByGuestAmts> <MealsIncluded MealPlanIndicator="true" MealPlanCodes="12"/> </Rate> <Rate Start="2016-12-29" End="2016-12-31" InvTypeCode="EZ"> <BaseByGuestAmts> <BaseByGuestAmt NumberOfGuests="1" AmountAfterTax="130.00"/> </BaseByGuestAmts> </Rate> <Rate Start="2016-12-29" End="2016-12-31" InvTypeCode="DZ"> <BaseByGuestAmts> <BaseByGuestAmt NumberOfGuests="2" AmountAfterTax="180.00"/> </BaseByGuestAmts> </Rate> </Rates> <Description Name="title"> <Text TextFormat="PlainText" Language="en">Lorem ipsum.</Text> <Text TextFormat="PlainText" Language="it">Lorem ipsum.</Text> </Description> </RatePlan> </RatePlans> </OTA_HotelRatePlanRS>

samples/BaseRates/BaseRates-OTA_HotelRatePlanRS.xml