リクエスト
構文
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 | このリクエスト メッセージの一意の識別子。この値はレスポンス メッセージ内で返されます。使用できる文字は、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 の
[アカウント設定] ページに表示されているパートナーキーの値です。 注: 複数のアカウントのフィードを提供するバックエンドを使用している場合、この値は、Transaction(宿泊施設データ)メッセージの |
OTA_HotelInvCountNotifRQ / Inventories | 1 | Inventories | 1 つ以上の <Inventory> 要素のコンテナ。 |
OTA_HotelInvCountNotifRQ / Inventories / @HotelCode | 1 | string | 宿泊施設の一意の識別子。この値は、ホテルリスト フィードの <listing> 要素の <id> を使用して指定した HotelID と一致する必要があります。HotelID は Hotel Center にも表示されます。 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory | 1..n | Inventory | 1 つの宿泊施設に関して、さまざまな期間で提供できる空室の数を定義します。 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl | 1 | StatusApplicationControl | 期間のほか、客室タイプの識別子(InvTypeCode )を定義します。 |
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 | 在庫の一意の識別子(客室タイプ)。この値は、Transaction(宿泊施設データ)メッセージの <RoomID> に対応します。 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory / InvCounts | 1 | InvCounts | 1 つの在庫数を定義するコンテナ。 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory / InvCounts / InvCount | 1 | InvCount | 予約できる空室の数を定義します。 |
OTA_HotelInvCountNotifRQ / Inventories / Inventory / InvCounts / InvCount / @Count | 1 | integer | 客室タイプに関する、予約できる空室の数。 値 0 は、客室タイプが完売であることを示します。負の値は 0 として扱われます。 |
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
メッセージには、次の要素と属性があります。
要素 / @属性 | 発生回数 | タイプ | 説明 |
---|---|---|---|
1 | Complex element | 空室状況メッセージへのレスポンスのルート要素。 | |
OTA_HotelInvCountNotifRS / @TimeStamp | 1 | DateTime | このメッセージの作成日時。 |
OTA_HotelInvCountNotifRS / @EchoToken | 1 | string | 関連する OTA_HotelInvCountNotifRQ メッセージから得られる一意の識別子。 |
OTA_HotelInvCountNotifRS / Success | 0..1 | Success | OTA_HotelInvCountNotifRQ メッセージが正常に処理されたことを示します。
各メッセージには、 |
OTA_HotelInvCountNotifRS / Errors | 0..1 | Errors | OTA_HotelInvCountNotifRQ メッセージの処理中に発生した 1 つ以上の問題のコンテナ。
各メッセージには、 |
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>