HintRequest Messages

An alternative method for implementing the price feed is to use Pull with Hints. In this method:

  1. Google sends a HintRequest message that contains the time it last received an update from your server.
  2. Your server responds to a HintRequest message with a Hint Response message that lists the hotels whose prices have changed since that time.
  3. Google then responds with a Query message.
  4. Your server responds with a Transaction message that includes the updated data.

The following image shows the request/response flow for Pull with hints:

For an overview of the repricing process, see Updating Prices.

Google sends a HintRequest message to your servers at a specified rate (we recommend 5 minutes). The frequency of the HintRequest messages is configurable. To set or modify the frequency, contact us.

The message is sent using an HTTP POST request with the Content-Type header set to "application/xml" and the User-Agent header set to Google-HotelAdsPrices.

Ensure that the endpoint that Google sends HintRequest messages to is OK by contacting your Technical Account Manager (TAM). You configured this setting during your Hotel Prices initial setup.

HintRequest messages have a root element of <HintRequest> and a single child element, <LastFetchTime>.

The <LastFetchTime> element uses the following syntax:

<LastFetchTime>YYYY-MM-DDTHH:MM:SS[<+|->HH:MM]</LastFetchTime>

Where:

  • YYYY is the four-digit year
  • MM is the two-digit month
  • DD is the two-digit day
  • T separates the date from the time
  • HH is the hours
  • MM is the minutes
  • SS is the seconds (optional)

You can optionally add a number of hours and minutes for the UTC offset (either positive ("+") or negative ("-")).

The value of the <LastFetchTime> element is the last time that Google succeeded in getting a Hint Response message to a HintRequest message. If this time is older than the last time you updated prices on your server, then you should respond with a Hint Response message specifying which hotels have changed. For more information, see Hint Response Messages.

The following example shows a typical HintRequest message:

<?xml version="1.0" encoding="UTF-8"?>
<HintRequest id="ABCDEF" timestamp="2014-03-25T00:09:09Z">
  <LastFetchTime>2014-03-25T00:04:09Z</LastFetchTime>
</HintRequest>

The HintRequest Message Schema defines the structure and constraints of a HintRequest message. For more information, see Schemas.