处理查询消息
如果注册拉取请求或使用提示请求进行拉取,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>的价格源<。
<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发送的不同类型的查询消息的示例,请参阅 创建提示消息。