要求
語法
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
帳戶設定頁面中列出的合作夥伴鍵值。 注意:如果您有提供多個帳戶動態饋給的後端,這個值必須與交易 (資源資料) 訊息的 |
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 值。
如果 start 和 end 相等,更新會套用至該日期。 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Mon | 0..1 | boolean | 設為 true 或 1 ,即可明確納入星期一。如果設為 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Tue | 0..1 | boolean | 設為 true 或 1 ,即可明確納入星期二。如果設為 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Weds | 0..1 | boolean | 設為 true 或 1 ,即可明確納入星期三。如果設為 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Thur | 0..1 | boolean | 設為 true 或 1 ,即可明確納入星期四。如果設為 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Fri | 0..1 | boolean | 設為 true 或 1 ,即可明確納入週五。如果設為 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Sat | 0..1 | boolean | 設為 true 或 1 ,即可明確納入週六。如果設為 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Sun | 0..1 | boolean | 設為 true 或 1 ,即可明確納入週日。如果設為 |
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 | 指定的廣告空間計數類型。有效值如下:
|
範例
剩餘廣告空間
將 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 | 相關聯 OTA_HotelInvCountNotifRQ 訊息的專屬 ID。 |
OTA_HotelInvCountNotifRS / Success | 0..1 | Success | 表示 OTA_HotelInvCountNotifRQ 訊息已順利處理。每則訊息都會提供 |
OTA_HotelInvCountNotifRS / Errors | 0..1 | Errors | 處理 OTA_HotelInvCountNotifRQ 訊息時遇到一或多個問題的容器。每則訊息都會提供 |
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>