OTA_HotelInvCountNotifRQ

要求

語法

OTA_HotelInvCountNotifRQ 訊息使用下列語法:

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
                          EchoToken="message_ID"
                          TimeStamp="timestamp"
                          Version="3.0">
  <POS>
    <Source>
      <RequestorID ID="partner_key"/>
    </Source>
  </POS>
  <Inventories HotelCode="HotelID">
    <Inventory>
      <StatusApplicationControl Start="YYYY-MM-DD"
                                End="YYYY-MM-DD"
                                Mon="boolean_value"
                                Tue="boolean_value"
                                Weds="boolean_value"
                                Thur="boolean_value"
                                Fri="boolean_value"
                                Sat="boolean_value"
                                Sun="boolean_value"
                                InvTypeCode="RoomID"/>
      <InvCounts>
        <InvCount Count="integer" CountType="2"/>
      </InvCounts>
    </Inventory>
  </Inventories>
</OTA_HotelInvCountNotifRQ>

元素和屬性

OTA_HotelInvCountNotifRQ 訊息包含下列元素和屬性:

元素 / @Attribute 發生次數 類型 說明
OTA_HotelInvCountNotifRQ 1 Complex element 訊息的根元素,用於定義房價供應情形。
OTA_HotelInvCountNotifRQ / @xmlns 0..1 string (URI) XML 命名空間。
OTA_HotelInvCountNotifRQ / @EchoToken 1 string 這則要求訊息的專屬 ID。這個值會傳回至回應訊息。允許的字元包括 a-z、A-Z、0-9、_ (底線) 和 - (連字號)。
OTA_HotelInvCountNotifRQ / @TimeStamp 1 DateTime 這則訊息的建立日期和時間。
OTA_HotelInvCountNotifRQ / @Version 1 decimal OpenTravel 訊息版本。
OTA_HotelInvCountNotifRQ / POS 0..1 POS 這個容器用於指定這則訊息的合作夥伴帳戶 (如果後端為多個合作夥伴帳戶提供價格動態饋給,通常會使用這個容器)。
OTA_HotelInvCountNotifRQ / POS/ Source 1 Source 如果 <POS> 存在,則為必要欄位。<RequestorID> 的容器。
OTA_HotelInvCountNotifRQ / POS / RequestorID 1 RequestorID 如果 <POS> 存在,則為必要欄位。定義合作夥伴帳戶。
OTA_HotelInvCountNotifRQ / POS / RequestorID / @ID 1 string 這封郵件的合作夥伴帳戶。這個字串值是 Hotel Center「帳戶設定」頁面列出的「合作夥伴金鑰」值。

注意:如果後端會為多個帳戶提供動態饋給,這個值必須與「交易」(房源資料) 訊息的 partner 屬性值,以及相同帳戶的 <OTA_HotelRateAmountNotifRQ> 訊息中 <RequestorID> 元素的 ID 屬性值相符。

OTA_HotelInvCountNotifRQ / Inventories 1 Inventories 一或多個 <Inventory> 元素的容器。
OTA_HotelInvCountNotifRQ / Inventories / @HotelCode 1 string 房源的專屬 ID。這個值必須與飯店清單動態饋給<listing> 元素中,使用 <id> 指定的飯店 ID 相符。Hotel Center 也會列出飯店 ID。
OTA_HotelInvCountNotifRQ / Inventories / Inventory 1..n Inventory 定義單一房源在不同時間範圍內可用的房間數量。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl 1 StatusApplicationControl 定義日期範圍,以及房型 (InvTypeCode) 的 ID。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Start 1 Date 日期範圍的開始日期 (以資源時區為準)。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @End 1 Date 日期範圍的結束日期 (以資源時區為準,含此日期)。必須大於或等於 start 值。 如果 startend 相等,更新就會套用至該日期。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Mon 0..1 boolean 設為 true1,明確加入星期一。

如果設為 true,系統會排除未明確設為 true 的其他星期幾 (實際上,這些日期會從 StartEnd 內篩除)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Tue 0..1 boolean 設為 true1,即可明確納入星期二。

如果設為 true,系統會排除未明確設為 true 的其他星期幾 (實際上,這些日期會從 StartEnd 內篩除)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Weds 0..1 boolean 設為 true1,即可明確納入星期三。

如果設為 true,系統會排除未明確設為 true 的其他星期幾 (實際上,這些日期會從 StartEnd 內篩除)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Thur 0..1 boolean 設為 true1,明確納入星期四。

如果設為 true,系統會排除未明確設為 true 的其他星期幾 (實際上,這些日期會從 StartEnd 內篩除)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Fri 0..1 boolean 設為 true1,明確納入星期五。

如果設為 true,系統會排除未明確設為 true 的其他星期幾 (實際上,這些日期會從 StartEnd 內篩除)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Sat 0..1 boolean 設為 true1,明確納入週六。

如果設為 true,系統會排除未明確設為 true 的其他星期幾 (實際上,這些日期會從 StartEnd 內篩除)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Sun 0..1 boolean 設為 true1,明確納入星期日。

如果設為 true,系統會排除未明確設為 true 的其他星期幾 (實際上,這些日期會從 StartEnd 內篩除)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @InvTypeCode 1 string 房源 (房型) 的專屬 ID。這個值會對應至<RoomID>「交易」(資源資料) 訊息。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / InvCounts 1 InvCounts 定義單一庫存數量的容器。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / InvCounts / InvCount 1 InvCount 定義可預訂的空房數量。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / InvCounts / InvCount / @Count 1 integer 可預訂的房型空房數。 如果值為零,表示該房型已售完。系統會將負值視為零。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / InvCounts / InvCount / @CountType 1 enum

要指定的廣告空間數量類型。有效值為:

  • 2:確定有空。

範例

剩餘廣告空間

在指定日期為 RoomID_1 設定 5 間剩餘客房。

<OTA_HotelInvCountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
                          EchoToken="12345678"
                          TimeStamp="2023-07-13T20:50:37-05:00"
                          Version="3.0">
  <Inventories HotelCode="Property_1">
    <Inventory>
      <StatusApplicationControl Start="2023-07-18"
                                End="2023-07-23"
                                InvTypeCode="RoomID_1"/>
      <InvCounts>
        <InvCount Count="5" CountType="2"/>
      </InvCounts>
    </Inventory>
  </Inventories>
</OTA_HotelInvCountNotifRQ>

已售完的商品

在指定日期標示為「售完」RoomID_1

<OTA_HotelInvCountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
                          EchoToken="12345678"
                          TimeStamp="2023-07-13T20:50:37-05:00"
                          Version="3.0">
  <Inventories HotelCode="Property_1">
    <Inventory>
      <StatusApplicationControl Start="2023-07-18"
                                End="2023-07-23"
                                InvTypeCode="RoomID_1"/>
      <InvCounts>
        <InvCount Count="0" CountType="2"/>
      </InvCounts>
    </Inventory>
  </Inventories>
</OTA_HotelInvCountNotifRQ>

回應

語法

OTA_HotelInvCountNotifRS 訊息使用下列語法:

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountNotifRS xmlns="http://www.opentravel.org/OTA/2003/05"
                          TimeStamp="timestamp"
                          EchoToken="echo_token"
                          Version="3.0">
  <!-- Either Success or Errors will be populated. -->
  <Success/>
  <Errors>
    <Error Type="12" Status="NotProcessed" ShortText="issue_code">issue_description</Error>
  </Errors>
</OTA_HotelInvCountNotifRS>

元素和屬性

OTA_HotelInvCountNotifRS 訊息包含下列元素和屬性:

元素 / @Attribute 發生次數 類型 說明
1 Complex element 有空與否訊息回覆的根元素。
OTA_HotelInvCountNotifRS / @TimeStamp 1 DateTime 這則訊息的建立日期和時間。
OTA_HotelInvCountNotifRS / @EchoToken 1 string 相關聯訊息的專屬 ID。OTA_HotelInvCountNotifRQ
OTA_HotelInvCountNotifRS / Success 0..1 Success 表示 OTA_HotelInvCountNotifRQ 訊息已順利處理完畢。

每則訊息中都會有 <Success><Errors>

OTA_HotelInvCountNotifRS / Errors 0..1 Errors 容器,用於處理 OTA_HotelInvCountNotifRQ 訊息時發生的一或多個問題。

每則訊息中都會有 <Success><Errors>

OTA_HotelInvCountNotifRS / Errors / Error 1..n Error 處理 OTA_HotelInvCountNotifRQ 訊息時發生的錯誤說明。如要瞭解這些錯誤的詳細資料,請參閱「動態饋給狀態錯誤訊息」。
OTA_HotelInvCountNotifRS / Errors / Error / @Type 1 integer 與錯誤相關聯的 OpenTravel Alliance EWT (錯誤警告類型)。僅使用 12 (Processing exception) 值。
OTA_HotelInvCountNotifRS / Errors / Error / @Code 1 integer 與錯誤相關的 OpenTravel Alliance ERR (錯誤代碼)。 僅使用 450 (Unable to process) 值。
OTA_HotelInvCountNotifRS / Errors / Error / @Code 1 enum 原始要求的狀態。系統只會使用值 NotProcessed
OTA_HotelInvCountNotifRS / Errors / Error / @ShortText 1 string 問題的 Google ID。如要瞭解這些錯誤的詳細資訊,請參閱「動態饋給狀態錯誤訊息」。

範例

成功

以下是成功處理 OTA_HotelInvCountNotifRQ 訊息的回應。

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountNotifRS xmlns="http://www.opentravel.org/OTA/2003/05"
                          TimeStamp="2023-07-23T20:50:37-05:00"
                          Version="3.0">
  <Success/>
</OTA_HotelInvCountNotifRS>

錯誤

以下是因發生錯誤而未處理 OTA_HotelInvCountNotifRQ 訊息的回應。

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountNotifRS xmlns="http://www.opentravel.org/OTA/2003/05"
                          TimeStamp="2023-07-23T20:50:37-05:00"
                          Version="3.0">
  <Errors>
    <Error Type="12" Code="450" Status="NotProcessed" ShortText="8001">Example</Error>
  </Errors>
</OTA_HotelInvCountNotifRS>