Push Delivery Method for Hotel Prices
NOTE : Google supports Push for a limited set of usecases and partners. This document is for existing partners that currently use Push and for new partners who pass Google's strict guidelines for using Push . If you have system limitations barring you from supporting the Pull or Pull with Hints delivery methods, please use the Contact Us form .
Overview of the Push Delivery Mode With the Push delivery mode, you send incremental updates whenever prices or availability changes. The following image shows the request/response flow for the Push delivery mode:
NOTE: Before you can use Push to send price updates to Google, you must get your server's IP addresses whitelisted as described in Configuring Push in the Protocol Configuration File
Configuring Push in the Protocol Configuration File To update prices with the Push delivery mode, specify the following elements in your Protocol Configuration File. You do this only when you first configure your environment to work with the Hotel Prices API: ●
: Set the value of the element to “push”. ● : Lists your IP addresses that you use to authenticate communication between you and Google. The value of this element can be a semicolon separated list of your IP addresses, or a range of IP addresses with CIDR notation. This
takes the form xxx.xxx.xxx.xxx/YY . For more information on CIDR notation, see CIDR Notation .
The following example shows a Protocol Configuration File for partners who use Push: push 216.239.32.0/19;64.233.160.0/19 For more information, see Protocol Configuration File .
Updating Prices with Push To update your data with Push, send a Transaction message whenever your data changes. Use the following guidelines when sending the Transaction message: ● Send the message to the following endpoint: ○ http://www.google.com/travel/hotels/uploads/price ● Use the HTTP POST method. ● Set the ContentType header to “application/xml”. ● The body of the message must conform to the Transaction message syntax, as described in Setting Prices (for pricing updates) or Defining Room and Package Metadata (for metadata updates). ● For pricing updates, define a element for each itinerary that you want to update. For metadata updates, define room data and package data for each property that has changed. For each Transaction message that it receives, Google responds with an HTTP 200 OK message from the server to indicate success. If Google responds with an HTTP error code, resend the Transaction message. If you encounter problems when sending or receiving messages, see the Troubleshooting Feeds . You should send a Transaction message for each itinerary (property/checkin date/lengthofstay combination) in which the price has changed. You can send up to 5 Transaction messages per second. Google will not block messages that are sent more frequently than 5 per second, but your message might time out waiting for other requests to finish. To reduce network traffic, you can combine multiple elements into a single Transaction message.
Google typically processes your updated prices and availability data in approximately 5 minutes. For more information on using Transaction messages to update prices, see Setting Prices .
Updating Room and Package Metadata with Push To update room and package metadata, send updates just as you would any other update. In this case, you send a Transaction message with the new information in the and elements. These elements are children of the element. For more information, see Defining Room and Package Metadata .
Delivery Mode Errors If you receive an HTTP error when sending a Transaction message to Google, retry the request at 1, 5, and 20 minute intervals. If the problem persists after 3 retries, stop sending messages and contact your Google account manager. Google runs tests for roughly 10 hotels, working with you to verify your feeds are configured properly. If successful, Google crawls the full set of hotels specified in your Hotel Price Feed . This ensures that loads are acceptable and that your prices remain accurate for 3 to 5 days. After this, Google notifies you of the launch at which point you will be able to see your results live.
What is the frequency prices should be pushed? Ideally, you push all updates as soon as you know that a price has changed. If you don't know when prices have changed, you should attempt to keep prices updatedas often as possible. This usually includes multiple pushes a day. Typically, itineraries for the current day and week are pushed much more frequently.