同伴者の料金

<OTA_HotelRateAmountNotifRQ> を介して送信された料金は、料金の元の宿泊人数に加えて、大人と子供も考慮するように変更できます。ExtraGuestCharges メッセージを使用すると、追加ゲストの料金の計算方法と、料金が適用される客室、料金プラン、滞在日を指定できます。

容量の要件

ExtraGuestCharges メッセージから計算された料金は、すべての容量要件が満たされている場合にのみ有効です。詳しくは、Transaction(宿泊施設データ)をご覧ください。

リクエスト

構文

ExtraGuestCharges メッセージには次の構文が使用されます。

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges partner="partner_account_name"
                   id="message_ID"
                   timestamp="timestamp">
  <HotelExtraGuestCharges hotel_id="HotelID" action="[overlay]">
    <ExtraGuestCharge>
      <RatePlans>
        <RatePlan id="PackageID_1"/>
        <RatePlan id="PackageID_2"/>
      </RatePlans>
      <RoomTypes>
        <RoomType id="RoomID_1"/>
        <RoomType id="RoomID_2"/>
      </RoomTypes>
      <StayDates>
        <DateRange start="YYYY-MM-DD" end="YYYY-MM-DD"
                   days_of_week="MTWHFSU_or_subset"/>
      </StayDates>
      <AgeBrackets>
        <AdultCharge amount="float"/>
        <ChildAgeBrackets>
        <!-- The following are different ways child charges can be specified.
        Use the option that matches your system. -->
          <ChildAgeBracket max_age="integer" amount="float"
                           exclude_from_capacity="[true|false]"/>
          <ChildAgeBracket max_age="integer" percentage="float"
                           exclude_from_capacity="[true|false]"
                           counts_as_base_occupant="[never|preferred|always]"/>
          <ChildAgeBracket max_age="integer" discount_amount="float"
                           exclude_from_capacity="[true|false]"
                           counts_as_base_occupant="[never|preferred|always]"/>
        </ChildAgeBrackets>
      </AgeBrackets>
    </ExtraGuestCharge>
  </HotelExtraGuestCharges>
</ExtraGuestCharges>

要素と属性

ExtraGuestCharges メッセージには、次の要素と属性があります。

要素 / @Attribute 発生回数 タイプ 説明
ExtraGuestCharges 1 Complex element このメッセージのルート要素。
ExtraGuestCharges / @partner 1 string このメッセージのパートナー アカウント。この文字列値は、Hotel Center の [アカウント設定] ページに表示される Partner key の値です。

注: 複数のアカウントにフィードを提供するバックエンドがある場合、この値は、同じアカウントの <OTA_HotelRateAmountNotifRQ> および <OTA_HotelAvailNotifRQ> メッセージの <RequestorID> 要素で指定された ID 属性値と一致する必要があります。

ExtraGuestCharges / @id 1 string このリクエスト メッセージの一意の識別子。この値はレスポンス メッセージで返されます。使用できる文字は、a-zA-Z0-9_(アンダースコア)、-(ダッシュ)です。
ExtraGuestCharges / @timestamp 1 DateTime このメッセージの作成日時。
ExtraGuestCharges / HotelExtraGuestCharges 0..n HotelExtraGuestCharges 単一プロパティの料金のコンテナ。
ExtraGuestCharges / HotelExtraGuestCharges / @hotel_id 1 string 宿泊施設の一意の識別子。この値は、ホテルリスト フィードの <listing> 要素の <id> を使用して指定したホテル ID と一致する必要があります。ホテル ID は Hotel Center にも表示されます。
ExtraGuestCharges / HotelExtraGuestCharges / @action 0..1 enum 更新の適用方法を指定します。overlay のみがサポートされ、デフォルトはオーバーレイです。このプロパティに対する以前の料金は、更新が適用される前に消去されます。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge 0..99 ExtraGuestCharge

プロパティに対する 1 つの料金セット。これには、料金の適用方法や、年齢またはゲストカテゴリによる料金の算出方法に関する制限が含まれている場合があります。

HotelExtraGuestCharges 内の各 ExtraGuestCharge は、一意の日付と商品のセットに適用する必要があります。2 つの ExtraGuestCharge 要素が同じ日付と商品の組み合わせを参照する場合、メッセージ全体が拒否されます。

ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets 1 AgeBrackets 年齢またはゲストカテゴリ別に料金を計算するための年齢層のコンテナ。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / AdultCharge 0..1 AdultCharge 追加の大人 1 名分の料金のコンテナ。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / AdultCharge / @amount 0..1 float 1 人の大人 1 人につき請求される定額を指定する正の小数値。この料金では、1 泊の料金で指定された通貨と同じ通貨が使用されます。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets 0..1 ChildAgeBrackets 子供の追加料金のコンテナ。これらの年齢層が対象とする年齢層は 0 ~ 17 歳に限られます。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket 1..99 ChildAgeBracket 特定の年齢層の子供に適用される料金。小さい方のmax_ageから大きい方へmax_ageの順番で並べてください。請求額は、amountpercentagediscount_amount のいずれかを使用して指定できます。これらの属性のいずれか 1 つのみを各 <ChildAgeBracket> に対して指定する必要があります。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @max_age 1 integer <ChildAgeBracket> で指定された料金が適用される最大年齢。これより前に他の <ChildAgeBracket> が指定されていない場合、最小存続期間は 0 になります。それ以外の場合は、前の角かっこの最長存続期間よりも 1 つ大きい値になります。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @exclude_from_capacity 1 boolean この年齢層の子供を客室の合計宿泊人数と子供の定員にカウントするかどうかを示すブール値。収容人数は Transaction(Property Data) で設定できます。たとえば、一定の年齢に満たない乳児については、定員にカウントする必要がない場合があります。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @amount 0..1 float この角かっこ内の追加の子に対して請求される定額を指定します。負でない 10 進数値を指定します。この料金では、1 泊の料金で指定された通貨と同じ通貨が使用されます。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @percentage 0..1 float

この角かっこ内の 1 人目の子供に対して請求する大人料金の割合を示す 1 ~ 99 の小数値。この料金では、1 泊の料金で指定された通貨と同じ通貨が使用されます。

大人料金の計算方法について詳しくは、counts_as_base_occupant の説明をご覧ください。

ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @discount_amount 0..1 float

この角かっこ内の子供 1 人分に対して、大人料金に対する一律の割引額を指定する正の小数値。この料金では、1 泊の料金で指定された通貨と同じ通貨が使用されます。

通常、この区分の子供の料金は「単価」から均一料金を差し引いて計算されます。単価について詳しくは、counts_as_base_occupant 属性のセクションをご覧ください。

ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @counts_as_base_occupant 0..1 string

percentage 属性または discount_amount 属性を指定する場合は、counts_as_base_occupant も指定する必要があります。この値は、パーセント料金と割引の適用に <BaseByGuestAmount> レートを選択する際に、子を NumberOfGuest に含めるかどうかを決定します。

ここでの目標は、実際の請求額を計算できる「単価」を取得することです。

unit price = rate / occupancy

この属性の値は、neverpreferredalways のいずれかにする必要があります。

  • never を指定した場合、子供は料金の宿泊人数に含まれません。

    大人 2 人と子供 2 人(2 + 2)分の料金を計算する場合は、子供が含まれないため、大人 2 人分の料金を使用する必要があります。

  • preferred が指定されている場合、子供を料金の宿泊人数に含める必要があります。

    大人 2 人と子供 1 人(2 + 1)の料金を計算する場合は、大人 3 人分の料金を使用することをおすすめしますが、見つからない場合は、大人 2 人分の料金を使用する必要があります。

  • always を指定した場合、料金の宿泊人数に常に子供を含める必要があります。

    大人 2 人と子供 2 人(2 + 2)の料金を計算する場合は、子供も含まれている必要があるため、大人 4 人分の料金を使用する必要があります。

ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes 0..1 RoomTypes 料金が適用される客室タイプのリストのコンテナ。料金は、指定された各 <RoomType> に適用されます。<RoomTypes> が指定されていない場合は、指定された宿泊施設内のすべての部屋に料金が適用されます。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes / RoomType 1..n RoomType 客室タイプを指定します。客室タイプは、Transaction(宿泊施設データ)メッセージの <RoomData> 要素で定義され、<RoomID> 値を使用して参照されます。(その <RoomID> 値は、OTA_HotelRateAmountNotifRQ メッセージの InvTypeCode 属性でも参照されます)。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes / RoomType / @id 1 string インベントリの一意の識別子(客室タイプ)。この値は、Transaction(宿泊施設データ)メッセージの <RoomID> にマッピングされます。入力可能な最大文字数は 50 文字です。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans 0..1 RatePlans 料金が適用される料金プランのリストのコンテナ。<RatePlans> が指定されていない場合、すべての料金プランに料金が適用されます。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans / RatePlan 1..n RatePlan 料金プランを指定します。料金プランは、パッケージ、料金、空室状況の組み合わせによって定義されます。この組み合わせは、トランザクション(宿泊施設データ)、OTA_HotelRateAmountNotifRQ、OTA_HotelAvailNotifRQ メッセージで定義され、PackageID で識別されます。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans / RatePlan / @id 1 string 料金プランの一意の識別子。この値は、Transaction(宿泊施設データ)メッセージの <PackageData> と、<OTA_HotelRateAmountNotifRQ> および <OTA_HotelAvailNotifRQ> メッセージの両方の <StatusApplicationControl>RatePlanCode 属性の PackageID 値にマッピングされます。 入力可能な最大文字数は 50 文字です。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates 0..1 StayDates 料金の適用方法を決定する 1 つ以上の期間のコンテナ。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange 1..99 DateRange プロモーションが適用される日付を指定する期間。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange / @start 0..1 Date 期間の開始日(プロパティのタイムゾーンに基づく)。この日付は、end と同じかそれより前の日付にする必要があります。start が指定されていない場合、開始日に関する期間は実質的に無制限になります。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange / @end 0..1 Date 期間の終了日(プロパティのタイムゾーンに基づく)。その日付を含む期間が含まれます。この日付は、start 以降の日付にする必要があります。end が指定されていない場合、終了日については、期間は事実上無制限になります。
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange / @days_of_week 0..1 string

日付範囲内の曜日です。指定しない場合、期間内のすべての日が許可されます。文字列内の各文字は日付を示します。たとえば、「MTWHF」は、その日付範囲内で平日を許可することを指定します。

有効な文字は次のとおりです。

  • M(月曜日)
  • T(火曜日)
  • W(水曜日)
  • H(木曜日)
  • F(金曜日)
  • S(土曜日)
  • U(日曜日)

任意の文字の組み合わせが有効です。

大人料金

大人 1 人目の追加料金は、定額でのみ提示できます。次の例は、大人料金を指定する ExtraGuestCharges メッセージを示しています。

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
  <HotelExtraGuestCharges hotel_id="ABC" action="overlay">
    <ExtraGuestCharge>
      <StayDates />
      <AgeBrackets>
        <AdultCharge amount="50" />
      </AgeBrackets>
    </ExtraGuestCharge>
  </HotelExtraGuestCharges>
</ExtraGuestCharges>

対応する料金は次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRateAmountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
                            EchoToken="12345678"
                            TimeStamp="2020-05-19T20:50:37-05:00"
                            Version="3.0">
  <RateAmountMessages HotelCode="ABC">
    <RateAmountMessage>
      <StatusApplicationControl Start="2020-05-18"
                                End="2020-05-23"
                                InvTypeCode="RoomID_1"
                                RatePlanCode="PackageID_1"/>
      <Rates>
        <Rate>
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="100.00"
                            CurrencyCode="USD"
                            NumberOfGuests="1"/>
            <BaseByGuestAmt AmountAfterTax="110.00"
                            CurrencyCode="USD"
                            NumberOfGuests="2"/>
            <BaseByGuestAmt AmountAfterTax="120.00"
                            CurrencyCode="USD"
                            NumberOfGuests="3"/>
          </BaseByGuestAmts>
        </Rate>
      </Rates>
    </RateAmountMessage>
  </RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>

ユーザーが Google で大人 4 人を検索した場合、合計料金は 170 = 120 + 50 になります。

120 は NumberOfGuests="3"<BaseByGuestAmt> レートから、50 は AdultCharge amount="50" から取得できます。

子供料金

子供の料金は、17 歳までの年齢層で表現され、定額、割合、割引で表現できます。

次の例は、子料金を指定する ExtraGuestCharges メッセージを示しています。

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
  <HotelExtraGuestCharges hotel_id="ABC" action="overlay">
    <ExtraGuestCharge>
      <AgeBrackets>
        <ChildAgeBrackets>
          <ChildAgeBracket max_age="3" percentage="10"
                           counts_as_base_occupant="never" />
          <ChildAgeBracket max_age="10" percentage="30"
                           counts_as_base_occupant="preferred"/>
          <ChildAgeBracket max_age="17" discount_amount="10"
                           counts_as_base_occupant="always" />
        </ChildAgeBrackets>
      </AgeBrackets>
    </ExtraGuestCharge>
  </HotelExtraGuestCharges>
</ExtraGuestCharges>

対応する料金は次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRateAmountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
                            EchoToken="12345678"
                            TimeStamp="2020-05-19T20:50:37-05:00"
                            Version="3.0">
  <RateAmountMessages HotelCode="ABC">
    <RateAmountMessage>
      <StatusApplicationControl Start="2020-05-18"
                                End="2020-05-23"
                                InvTypeCode="RoomID_1"
                                RatePlanCode="PackageID_1"/>
      <Rates>
        <Rate>
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="100.00"
                            CurrencyCode="USD"
                            NumberOfGuests="1"/>
            <BaseByGuestAmt AmountAfterTax="110.00"
                            CurrencyCode="USD"
                            NumberOfGuests="2"/>
          </BaseByGuestAmts>
        </Rate>
      </Rates>
    </RateAmountMessage>
  </RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>
```

  1.  Suppose you want the total price for 2 adults and 1 child of 2 years
      of age.

      Children aged 0-3 are never included in the rate's occupancy,
      so here you should take the double occupancy rate and divide by 2 to
      get the unit price. Then, multiply by the percentage rate and sum
      with the rate to get the total price.

      `unit price ` = 110 / 2 = 55

      `total price` = 110 + 55 * 0.1 = 115.5

  1.  Suppose you want the total price for 1 adult and 2 children, both of 5
      years of age.

      Children aged 4-10 are preferably included in the rate's
      occupancy. you should start by looking for a 3 adult rate since both
      children are preferably included in the rate's occupancy. Since
      that doesn't exist you should fall back to the 2 adult rate and then,
      take this rate and divide by two to get the unit price. Finally,
      multiply by the percentage rate and sum with the scaled rate to
      get the total price.

      `unit price` = 110 / 2 = 55

      `total price` = 55 + 55 * 0.3 + 55 * 0.3 = 88

  1.  Suppose you want the total price for 1 adult and 1 child of 17
      years of age.

      Children aged 11-17 are always included in the rate's occupancy, so,
      in this case, take the double occupancy rate and divide by 2 to get
      the unit price. Then, deduct it by the discount amount and sum with
      the scaled rate to get the total price.

      `unit price` = 110 / 2 = 55

      `total price` = 55 + (55 - 10) = 100

料金制限

すべてのタイプの制限は省略可能で、任意の組み合わせを使用できます。

次の例は、制限を指定する ExtraGuestCharges メッセージを示しています。

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
  <HotelExtraGuestCharges hotel_id="ABC" action="overlay">
    <ExtraGuestCharge>
      <RoomTypes>
        <RoomType id="queen" />
        <RoomType id="king" />
      </RoomTypes>
      <RatePlans>
        <RatePlan id="free-wifi" />
        <RatePlan id="hot-breakfast" />
      </RatePlans>
      <StayDates>
        <DateRange start="2020-09-01" end="2020-09-14"/>
      </StayDates>
      <AgeBrackets>
        <AdultCharge amount="50" />
      </AgeBrackets>
    </ExtraGuestCharge>
  </HotelExtraGuestCharges>
</ExtraGuestCharges>

上記のメッセージでは、2020 年 9 月 1 日から 2020 年 9 月 14 日の期間に、客室タイプが「クイーン」または「キング」で料金プランが「無料 Wi-Fi」または「ホットブレック」の場合に、大人が料金が発生するように指定されています。

重複する請求

このセクションでは、日付とプロダクトの同じ組み合わせに対して異なる料金を指定する無効なメッセージの例を示します。


<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
  <HotelExtraGuestCharges hotel_id="ABC" action="overlay">
    <ExtraGuestCharge>
      <RoomTypes>
        <RoomType id="queen" />
      </RoomTypes>
      <RatePlans>
        <RatePlan id="free-wifi" />
      </RatePlans>
      <StayDates>
        <DateRange start="2020-09-01" end="2020-09-14"/>
      </StayDates>
      <AgeBrackets>
        <AdultCharge amount="50" />
      </AgeBrackets>
    </ExtraGuestCharge>
    <ExtraGuestCharge>
      <RoomTypes>
        <RoomType id="queen" />
        <RoomType id="king" />
      </RoomTypes>
      <RatePlans>
        <RatePlan id="free-wifi" />
        <RatePlan id="hot-breakfast" />
      </RatePlans>
      <StayDates>
        <DateRange start="2020-09-01" end="2020-09-05"/>
      </StayDates>
      <AgeBrackets>
        <AdultCharge amount="20" />
      </AgeBrackets>
    </ExtraGuestCharge>
  </HotelExtraGuestCharges>
</ExtraGuestCharges>

最初の <ExtraGuestCharge> で、9 月 1 ~ 14 日に適用される「queen」と「free-wifi」では、大人 50 名分が追加で請求されることになるため、上記のメッセージは無効です。2 つ目の <ExtraGuestCharge> 「クイーン」または「キング」で 9 月 1 日~ 5 日の間に「無料 Wi-Fi」または「ホット 朝食」のいずれかを使用する場合、大人 20 名の追加料金を請求することを指定します。9 月 1 日から 5 日までの「クイーン」と「無料 Wi-Fi」の料金は重複し、追加の大人 1 人につき 20 と 50 のどちらを請求するかが競合します。

レスポンス

構文

ExtraGuestChargesResponse メッセージでは、次の構文を使用します。

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestChargesResponse timestamp="timestamp"
                    id="message_ID"
                    partner="partner_key">
  <!-- Either Success or Issues will be populated. -->
  <Success/>
  <Issues>
    <Issue code="issue_code" status="issue_type">issue_description</Issue>
  </Issues>
</ExtraGuestChargesResponse>

要素と属性

ExtraGuestChargesResponse メッセージには、次の要素と属性があります。

要素 / @Attribute 発生回数 タイプ 説明
ExtraGuestChargesResponse 1 Complex element 受信した ExtraGuestCharges リクエスト メッセージの成功または問題を示すルート要素。
ExtraGuestChargesResponse / @timestamp 1 DateTime このメッセージの作成日時。
ExtraGuestChargesResponse / @id 1 string 関連付けられた ExtraGuestCharges メッセージからの一意の識別子。
ExtraGuestChargesResponse / @partner 1 string このメッセージのパートナー アカウント。
ExtraGuestChargesResponse / Success 0..1 Success ExtraGuestCharges メッセージが正常に処理され、警告、エラー、失敗がなかったことを示します。

各メッセージには、<Success> または <Issues> のいずれかが存在します。

ExtraGuestChargesResponse / Issues 0..1 Issues ExtraGuestCharges メッセージの処理中に発生した 1 つ以上の問題のコンテナ。

各メッセージには、<Success> または <Issues> のいずれかが存在します。

ExtraGuestChargesResponse / Issues / Issue 1..n Issue ExtraGuestCharges メッセージの処理中に発生した警告、エラー、失敗の説明。これらの問題について詳しくは、フィード ステータスのエラー メッセージをご覧ください。
ExtraGuestChargesResponse / Issues / Issue / @code 1 integer 問題の識別子。
ExtraGuestChargesResponse / Issues / Issue / @status 1 enum

発生した問題の種類。

有効な値は warningerrorfailure です。

完了

以下は、正常に処理された ExtraGuestCharges メッセージに対するレスポンスです。

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestChargesResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Success/>
</ExtraGuestChargesResponse>

問題

以下は、エラーのため処理されなかった ExtraGuestCharges メッセージに対するレスポンスです。

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestChargesResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Issues>
    <Issue code="1001" status="error">Example</Issue>
  </Issues>
</ExtraGuestChargesResponse>