<OTA_HotelRateAmountNotifRQ>
を通じて送信される料金は、料金の元の宿泊客数に加えて、大人と子供も考慮するように変更できます。ExtraGuestCharges
メッセージを使用すると、追加ゲストの料金の計算方法と、料金が適用される客室、料金プラン、滞在日を指定できます。
容量の要件
ExtraGuestCharges
メッセージから計算された料金は、すべての容量要件が満たされている場合にのみ有効です。詳しくは、Transaction(宿泊施設データ)をご覧ください。
Requests
構文
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
メッセージには次の要素と属性があります。
要素 / @属性 | 発生回数 | タイプ | 説明 |
---|---|---|---|
ExtraGuestCharges | 1 | Complex element | このメッセージのルート要素。 |
ExtraGuestCharges / @partner | 1 | string | このメッセージのパートナー アカウント。この文字列値は、Hotel Center の
[アカウント設定] ページに表示されている Partner key の値です。
注: 複数のアカウントにフィードを提供するバックエンドがある場合、この値は、同じアカウントの |
ExtraGuestCharges / @id | 1 | string | このリクエスト メッセージの一意の識別子。この値はレスポンス メッセージで返されます。使用できる文字は、a-z 、A-Z 、0-9 、_ (アンダースコア)、- (ダッシュ)です。 |
ExtraGuestCharges / @timestamp | 1 | DateTime | このメッセージの作成日時。 |
ExtraGuestCharges / HotelExtraGuestCharges | 0..n | HotelExtraGuestCharges | 1 つの宿泊施設の料金のコンテナ。 |
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 | 宿泊施設に対する単一の料金セット。これには、料金の適用方法や、年齢またはゲストカテゴリ別の料金の計算方法に関する制限が含まれる場合があります。
|
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 人あたりの請求金額を一律で指定する正の 10 進値。この料金には、1 泊の料金で指定された通貨と同じ通貨が使用されます。 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets | 0..1 | ChildAgeBrackets | 追加の子料金のコンテナ。これらの年齢層の対象は 0 ~ 17 歳のみです。 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket | 1..99 | ChildAgeBracket | 特定の年齢層の子供に適用される料金。昇順をmax_age 降順にする必要があります。max_age 請求金額は、amount 、percentage 、discount_amount のいずれかを使用して指定できます。これらの属性のいずれか 1 つのみを <ChildAgeBracket> ごとに指定する必要があります。 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @max_age | 1 | integer | <ChildAgeBracket> で指定された料金が適用される最長期間。この値より前に他の <ChildAgeBracket> が指定されていない場合、最小存続期間はゼロになります。それ以外の場合は、前の範囲の最長存続期間よりも 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 ~ 99 の小数値。この範囲に含まれる子供 1 人あたりの課金となる大人料金の割合を指定します。この料金には、1 泊の料金で指定された通貨と同じ通貨が使用されます。 大人料金の計算方法の詳細については、 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @discount_amount | 0..1 | float | この範囲の子供 1 人あたりの大人料金からの定額割引を指定する正の 10 進数。この料金には、1 泊の料金で指定された通貨と同じ通貨が使用されます。 通常、このかっこ内の子供の料金は、「単価」から定額を差し引いて計算されます。単価について詳しくは、 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @counts_as_base_occupant | 0..1 | string |
ここでの目標は、実際の料金を計算できる「単価」を取得することです。
この属性の値は、
|
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 | 料金プランを指定します。料金プランは、パッケージ、料金、空室状況の組み合わせで構成され、Transaction(宿泊施設データ)、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」は、日付範囲内で平日を許可することを指定します。 有効な文字は次のとおりです。
任意の文字の組み合わせを使用できます。 |
例
大人料金
2 人目の料金は一律料金でしか表示できません。次の例は、大人料金を指定する 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 日までの間に、料金プランが「free-wifi」または「hot-breakfast」の客室タイプが「queen」または「king」である商品については、大人の料金が請求されるよう指定されています。
重複する請求
このセクションでは、日付と商品の同じ組み合わせに対して異なる料金を指定する無効なメッセージの例を示します。
<?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 日の期間中、「queen」または「king」のいずれかが「free-wifi」または「hot-breakfast」のいずれかである場合に、20 名分の追加料金を支払うよう指定します。9 月 1 ~ 5 日は「queen」と「free-wifi」の料金が重複しており、大人 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
メッセージには、次の要素と属性があります。
要素 / @属性 | 発生回数 | タイプ | 説明 |
---|---|---|---|
ExtraGuestChargesResponse | 1 | Complex element | 受信した ExtraGuestCharges リクエスト メッセージの成功または問題を示すルート要素。 |
ExtraGuestChargesResponse / @timestamp | 1 | DateTime | このメッセージの作成日時。 |
ExtraGuestChargesResponse / @id | 1 | string | 関連付けられた ExtraGuestCharges メッセージから得られる一意の識別子。 |
ExtraGuestChargesResponse / @partner | 1 | string | このメッセージのパートナー アカウント。 |
ExtraGuestChargesResponse / Success | 0..1 | Success | ExtraGuestCharges メッセージが、警告、エラー、失敗なしで正常に処理されたことを示します。各メッセージには、 |
ExtraGuestChargesResponse / Issues | 0..1 | Issues | ExtraGuestCharges メッセージの処理中に発生した 1 つ以上の問題のコンテナ。各メッセージには、 |
ExtraGuestChargesResponse / Issues / Issue | 1..n | Issue | ExtraGuestCharges メッセージの処理中に発生した警告、エラー、または失敗の説明。これらの問題について詳しくは、フィード ステータスのエラー メッセージをご覧ください。 |
ExtraGuestChargesResponse / Issues / Issue / @code | 1 | integer | 問題の識別子。 |
ExtraGuestChargesResponse / Issues / Issue / @status | 1 | enum | 発生した問題の種類。 有効な値は |
例
完了
以下は、正常に処理された 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>