When Google sends a Hint Request message,
your servers should respond with a Hint Response message that specifies the hotels
whose prices have changed since the last time Google received a successful Hint
Response from those same servers. If there are any price changes, Google then
sends a <Query>
that fetches the updated pricing data for the indicated hotels
and itineraries.
For an overview of the repricing process, see Updating Prices.
Hint Response messages can use the following methods to specify which hotels and itineraries Google should reprice:
The default length of stay when using hints is 5 days.
The root element of a Hint Response message is <Hint>
.
You request a hotel/itinerary to be updated by using one or more <Item>
elements. A single Hint Response message can define any number of <Item>
elements.
Each Hint Response message must specify at least one <Property>
element for each <Item>
. The <Property>
identifies a
hotel by using the same IDs as the Hotel List.
By default, you specify a single hotel ID for each <Item>
block.
However, you can instruct Google to allow multiple hotels in an item block if
you are using check-in date ranges or ranged itineraries for repricing.
Exact itinerary request/response flow
Hint messages can be based on individual itineraries (the combination of check-in date and length of stay). In this case, you specify a check-in date and length of stay for your hotels, and Google fetches the new pricing data for just that itinerary.
The following Hint Response message defines a single property and a single itinerary:
<Hint> <Item> <Property>12345</Property> <Stay> <CheckInDate>2014-06-10</CheckInDate> <LengthOfStay>3</LengthOfStay> </Stay> </Item> </Hint>
Google responds to your Hint Response message with a <Query>
similar to the
following:
<Query> <Checkin>2014-06-10</Checkin> <Nights>3</Nights> <PropertyList> <Property>12345</Property> </PropertyList> </Query>
You are then expected to create a <Transaction>
with price updates for the
hotel for the following stay:
6/10/14 - 6/13/14
Check-in date ranges request/response flow
A Hint Response message can specify a range of check-in dates, beginning with the first check-in date and ending with the last check-in date. When Google fetches new pricing data, Google pulls itineraries for every check-in date for the hotel starting with these dates, and extending up to the length of stay that you indicate.
The following example Hint Response message defines a single property with a range of dates for the check-in:
<Hint> <Item> <Property>12345</Property> <FirstDate>2014-06-10</FirstDate> <LastDate>2014-06-13</LastDate> </Item> </Hint>
Google responds to this Hint Response message with <Query>
similar to
the following:
<Query> <FirstDate>2014-06-10</FirstDate> <LastDate>2014-06-12</LastDate> <Nights>5</Nights> <PropertyList> <Property>12345</Property> </PropertyList> </Query>
You are then expected to create a <Transaction>
with price updates
for the following stays for that hotel:
6/10/14 - 6/11/14 6/10/14 - 6/12/14 6/10/14 - 6/13/14 6/10/14 - 6/14/14 6/10/14 - 6/15/14 6/11/14 - 6/12/14 6/11/14 - 6/13/14 6/11/14 - 6/14/14 6/11/14 - 6/15/14 6/11/14 - 6/16/14 6/12/14 - 6/13/14 6/12/14 - 6/14/14 6/12/14 - 6/15/14 6/12/14 - 6/16/14 6/12/14 - 6/17/14
This example uses the default length of stay, 5 nights.
Ranged itineraries (or ranged stays) request/response flow
A Hint Response message can include a range of nights for an itinerary. This informs Google that it should fetch any itinerary containing any of those nights. The actual set of itineraries fetched is a function of both the set of nights with changed prices and the maximum length of stay.
The following example Hint Response message uses ranged stays:
<Hint> <Item> <Property>12345</Property> <StaysIncludingRange> <FirstDate>2014-06-10</FirstDate> <LastDate>2014-06-13</LastDate> </StaysIncludingRange> </Item> </Hint>
Google responds to your Hint Response message with a <Query>
similar to the following:
<Query> <FirstDate>2014-06-10</FirstDate> <LastDate>2014-06-13</LastDate> <AffectedNights>3</AffectedNights> <PropertyList> <Property>12345</Property> <Property>67891</Property> </PropertyList> </Query>
You are then expected to create a <Transaction>
with price updates for the
hotel for the following stays:
6/07/14 - 6/10/14 6/08/14 - 6/10/14 6/08/14 - 6/11/14 6/09/14 - 6/10/14 6/09/14 - 6/11/14 6/09/14 - 6/12/14 6/10/14 - 6/11/14 6/10/14 - 6/12/14 6/10/14 - 6/13/14 6/11/14 - 6/12/14 6/11/14 - 6/13/14 6/11/14 - 6/14/14 6/12/14 - 6/13/14 6/12/14 - 6/14/14 6/12/14 - 6/15/14 6/13/14 - 6/14/14 6/13/14 - 6/15/14 6/13/14 - 6/16/14
Notice that with ranged stays, all itineraries, including those that start before the first date but overlap with it, should be repriced.