处理查询消息

如果注册拉取请求或使用提示请求注册拉取,Microsoft 将向你发送一条 查询 消息,其中指定需要在下一个 价格源中发送的行程数据。

使用拉取请求

如果使用拉取请求,Microsoft 可能会向你发送类似于以下查询消息的请求。

<?xml version="1.0" encoding="UTF-8"?>
<Query>
  <Checkin>2017-10-20</FirstDate>
  <Nights>1</Nights>

  <PropertyList>
    <Property>223</Property>
    <Property>256</Property>
    <Property>289</Property>
  </PropertyList>
</Query>

根据你拥有的酒店数量,Microsoft 可能会将查询分解为多个较小的查询,每个查询都包含属性列表中酒店的子集。

收到查询消息时,响应应包含具有以下<结果>的价格源。

  <Result>
    <Property>223</Property>
    <Checkin>2017-10-20</Checkin>
    <Nights>1</Nights>
    <!-- Pricing and other elements that changed -->
  </Result>
  <Result>
    <Property>223</Property>
    <Checkin>2017-10-20</Checkin>
    <Nights>2</Nights>
    <!-- Pricing and other elements that changed -->
  </Result>
  <Result>
    <Property>223</Property>
    <Checkin>2017-10-20</Checkin>
    <Nights>3</Nights>
    <!-- Pricing and other elements that changed -->
  </Result>
  
  . . .
  
  <Result>
    <Property>223</Property>
    <Checkin>2017-10-30</Checkin>
    <Nights>1</Nights>
    <!-- Pricing and other elements that changed -->
  </Result>
  <Result>
    <Property>223</Property>
    <Checkin>2017-10-30</Checkin>
    <Nights>2</Nights>
    <!-- Pricing and other elements that changed -->
  </Result>
  <Result>
    <Property>223</Property>
    <Checkin>2017-10-30</Checkin>
    <Nights>3</Nights>
    <!-- Pricing and other elements that changed -->
  </Result>
  
  . . .
  
  <Result>
    <Property>256</Property>
    <Checkin>2017-10-20</Checkin>
    <Nights>1</Nights>
    <!-- Pricing and other elements that changed -->
  </Result>
  <Result>
    <Property>256</Property>
    <Checkin>2017-10-20</Checkin>
    <Nights>2</Nights>
    <!-- Pricing and other elements that changed -->
  </Result>
  <Result>
    <Property>256</Property>
    <Checkin>2017-10-20</Checkin>
    <Nights>3</Nights>
    <!-- Pricing and other elements that changed -->
  </Result>

  . . .
    

使用带有提示请求的拉取

有关显示使用带有提示请求的拉取时 Microsoft 发送的不同类型的查询消息的示例,请参阅 创建提示消息。