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 訊息包含下列元素和屬性:

元素 / @屬性 發生次數 類型 說明
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 的 帳戶設定頁面列出的合作夥伴鍵值。

注意:如果您的後端為多個帳戶提供動態饋給,這個值必須符合同一帳戶 <OTA_HotelRateAmountNotifRQ> 訊息中 <RequestorID> 訊息的 partner 屬性值,以及 ID 屬性值。

OTA_HotelInvCountNotifRQ / Inventories 1 Inventories 一或多個 <Inventory> 元素的容器。
OTA_HotelInvCountNotifRQ / Inventories / @HotelCode 1 string 房源的專屬 ID。這個值必須與飯店清單動態饋給的<listing> 元素中使用 <id> 來指定的飯店 ID。飯店 ID 也會列在 Hotel Center 中。
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 可預訂不同房型的會議室數量。 如果值為 0,表示客房類型已售罄。系統會將負值視為零。
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 訊息包含下列元素和屬性:

元素 / @屬性 發生次數 類型 說明
1 Complex element 回應可用性訊息的根元素。
OTA_HotelInvCountNotifRS / @TimeStamp 1 DateTime 這則訊息的建立日期和時間。
OTA_HotelInvCountNotifRS / @EchoToken 1 string 相關聯 OTA_HotelInvCountNotifRQ 訊息中的專屬 ID。
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 識別碼。如需這些錯誤的詳細資料,請參閱動態饋給狀態錯誤訊息

示例

成功

以下為對成功處理的 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>