Hint 要求訊息
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
實作價格動態饋給的方式之一,就是使用變更定價 (先前稱為「搭配提示提取」)。
此方法的流程如下:
Google 會透過根元素 <HintRequest>
傳送提示要求訊息,其中包含來自最新伺服器更新的時間資訊。
您的伺服器會傳回提示回應訊息 <Hint>
,其中包含自上次更新後變更的飯店價格清單。
Google 隨後會回傳查詢訊息:<Query>
。
伺服器會回應包含更新資料的交易訊息 <Transaction>
。
如需重新定價的總覽,請參閱「重新定價程序」。
根據預設,Google 會以 5 分鐘的間隔向您的伺服器傳送提示要求訊息。如要調整這項頻率,請與我們聯絡。
要求訊息會透過 HTTP POST
方法傳送,其中 Content-Type
標頭設為 application/xml
,User-Agent
標頭設為 Google-HotelAdsPrices
。請與客戶技術顧問 (TAM) 聯絡,確認 Google 傳回的端點狀態為 OK
。你應該在設定飯店價格時就設定過這項設定。
Hint 要求範例
Hint 要求訊息的根元素為 <HintRequest>
,並含有單一子元素 <LastFetchTime>
。
<?xml version="1.0" encoding="UTF-8"?>
<HintRequest id="request" timestamp="2023-06-03T22:59:48Z">
<LastFetchTime>2023-06-03T22:54:40Z</LastFetchTime>
</HintRequest>
如需更多範例和其他資訊,請參閱「查詢和提示 XML 參考資料」。
保留所有權利。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eGoogle's Changed Pricing method allows you to update hotel prices efficiently by focusing on changes since the last update.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves a Hint Request from Google, a Hint Response from your server with changed hotel IDs, a Query from Google, and a Transaction from your server with updated data.\u003c/p\u003e\n"],["\u003cp\u003eGoogle sends Hint Requests every 5 minutes, but this frequency can be adjusted by contacting Google support.\u003c/p\u003e\n"],["\u003cp\u003eHint Requests use HTTP POST with specific headers; ensure endpoint status is "OK" for successful communication.\u003c/p\u003e\n"],["\u003cp\u003eHint Request messages contain the last fetch time, allowing your server to identify price changes since then.\u003c/p\u003e\n"]]],[],null,["# Hint Request Messages\n\nOne way to implement your price feed is to use [Changed Pricing (formerly Pull\nwith Hints)](/hotels/hotel-prices/dev-guide/delivery-mode#hints).\n\nThe flow for this method is as follows:\n\n1. Google sends a Hint Request message from the root element [`\u003cHintRequest\u003e`](../xml-reference/queries#hintrequest)\n that contains time information from your most recent server update.\n\n2. Your server responds with a [Hint Response\n message](/hotels/hotel-prices/dev-guide/hint-response-messages), [`\u003cHint\u003e`](../xml-reference/queries#Hint),\n which contains a list of hotels prices that have changed since\n the last update.\n\n3. Google then responds with a\n [Query message](/hotels/hotel-prices/dev-guide/query-messages): [`\u003cQuery\u003e`](../xml-reference/queries#Query).\n\n4. Your server responds with a\n [Transaction message](/hotels/hotel-prices/dev-guide/transaction-overview),\n [`\u003cTransaction\u003e`](../xml-reference/transaction-messages#Transaction), that includes the updated data.\n\nFor an overview of repricing, see [Repricing\nprocess](/hotels/hotel-prices/dev-guide/updating-prices#repricing-process).\n\nGoogle sends a Hint Request message to your server at 5-minute intervals by\ndefault. This frequency can be adjusted by setting [contact us](https://support.google.com/hotelprices/gethelp).\n\nThe request message is sent using an HTTP `POST` method with the `Content-Type`\nheader set to `application/xml` and the `User-Agent` header set to\n`Google-HotelAdsPrices`. Ensure the endpoint status that Google sends back is `OK` by\ncontacting your Technical Account Manager (TAM). You should have configured this setting during your\nHotel Prices initial setup.\n\n### Hint Request example\n\nHint Request messages have a root element of\n[`\u003cHintRequest\u003e`](../xml-reference/queries#hintrequest) and a single child element, `\u003cLastFetchTime\u003e`. \n\n \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003cHintRequest id=\"request\" timestamp=\"2023-06-03T22:59:48Z\"\u003e\n \u003cLastFetchTime\u003e\u003cvar translate=\"no\"\u003e2023-06-03T22:54:40Z\u003c/var\u003e\u003c/LastFetchTime\u003e\n \u003c/HintRequest\u003e\n\nFor more examples and additional information, refer to [Query \\& Hints XML Reference](../xml-reference/queries)."]]