Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Khi Google gửi thông báo Yêu cầu gợi ý, máy chủ của bạn sẽ phản hồi bằng thông báo Phản hồi gợi ý. Thông báo này xác định những khách sạn đã thay đổi giá kể từ lần gần đây nhất Google nhận được Phản hồi gợi ý thành công từ các máy chủ đó. Nếu có bất kỳ thay đổi nào về giá, Google sẽ gửi <Query> để tìm nạp dữ liệu giá mới cho các khách sạn và hành trình đã chỉ định.
Để biết thông tin tổng quan về quy trình đặt giá lại, hãy xem bài viết Tổng quan về giá.
Thông báo Phản hồi gợi ý sử dụng các phương thức sau để đặt giá lại cho khách sạn và hành trình đã chọn:
Thành phần gốc của thông báo Phản hồi gợi ý là <Hint>. Bạn có thể yêu cầu cập nhật khách sạn hoặc hành trình bằng một hoặc nhiều phần tử <Item>. Một thông báo Phản hồi gợi ý duy nhất có thể xác định số lượng phần tử <Item> bất kỳ.
Mỗi thông báo Phản hồi gợi ý phải chỉ định ít nhất một phần tử <Property> cho mỗi <Item>. <Property> xác định khách sạn bằng cách sử dụng cùng một mã với Danh sách khách sạn. Theo mặc định, bạn sẽ chỉ định một mã khách sạn duy nhất cho mỗi khối <Item>. Tuy nhiên, bạn có thể hướng dẫn để Google cho phép nhiều khách sạn trong một khối nếu bạn đang sử dụng phạm vi ngày nhận phòng hoặc thời gian lưu trú theo phạm vi ngày để định giá lại.
Quy trình yêu cầu và phản hồi đối với hành trình chính xác
Thông báo gợi ý có thể dựa trên các hành trình riêng lẻ, chẳng hạn như tổ hợp ngày nhận phòng và thời gian lưu trú. Trong trường hợp này, bạn cần chỉ định ngày nhận phòng và thời gian lưu trú cho khách sạn của mình và Google sẽ tìm nạp dữ liệu giá mới cho riêng hành trình đó.
Phản hồi của đối tác
Thông báo Phản hồi gợi ý sau đây xác định một cơ sở lưu trú và một hành trình duy nhất:
Sau đó, bạn cần tạo một <Transaction> kèm theo thông tin cập nhật về giá của khách sạn cho lần lưu trú sau đây:
5/20/23 - 5/23/23
Quy trình yêu cầu và phản hồi đối với phạm vi ngày nhận phòng
Thông báo Phản hồi gợi ý có thể chỉ định nhiều ngày nhận phòng, bắt đầu bằng ngày nhận phòng đầu tiên và kết thúc bằng ngày nhận phòng cuối cùng. Khi tìm nạp dữ liệu giá mới, Google sẽ thu thập các hành trình cho mỗi ngày nhận phòng của khách sạn, bắt đầu từ các ngày đó cho đến thời gian lưu trú mà bạn chỉ định.
Phạm vi ngày của đối tác
Ví dụ sau đây về thông báo Phản hồi gợi ý xác định một cơ sở lưu trú duy nhất kèm theo phạm vi ngày nhận phòng:
Ví dụ này sử dụng thời gian lưu trú là 5 đêm. Thời gian lưu trú mặc định là 30 ngày.
Quy trình yêu cầu và phản hồi đối với thời gian lưu trú theo phạm vi ngày
Thông báo Phản hồi gợi ý có thể bao gồm một phạm vi ngày đã thay đổi. Thông tin này giúp Google biết rằng Google cần tìm nạp mọi hành trình chịu ảnh hưởng của bất kỳ ngày nào trong số đó. Tập hợp hành trình thực tế được tìm nạp là một hàm gồm cả tập hợp các ngày có thay đổi và thời gian lưu trú tối đa.
Thời gian lưu trú theo phạm vi ngày của đối tác
Thông báo Phản hồi gợi ý mẫu sau đây sử dụng thời gian lưu trú theo phạm vi ngày:
Mọi quyền được bảo lưu. Java là một nhãn hiệu đã đăng ký của Oracle và/hoặc chi nhánh của Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eWhen Google requests hotel price updates via a Hint Request message, your servers should respond with a Hint Response message detailing the hotels with changed pricing.\u003c/p\u003e\n"],["\u003cp\u003eHint Response messages can specify price changes using three methods: exact itineraries (specific check-in date and length of stay), check-in date ranges, and ranged stays (affecting multiple itineraries).\u003c/p\u003e\n"],["\u003cp\u003eGoogle then sends a Query message requesting updated pricing data for the specified hotels and itineraries based on the Hint Response.\u003c/p\u003e\n"],["\u003cp\u003eAfter receiving the Query, you need to provide a Transaction message containing the updated prices for the requested itineraries.\u003c/p\u003e\n"],["\u003cp\u003eIf Changed Pricing is not implemented, Google fetches data for all hotels in your Hotel List, potentially leading to unnecessary data transfers.\u003c/p\u003e\n"]]],[],null,["# Hint Response Messages\n\nWhen Google sends a [Hint Request\nmessage](/hotels/hotel-prices/dev-guide/hint-request-messages), your servers\nshould respond with a Hint Response message that specifies the hotels whose\nprices have changed since the last time Google received a successful Hint\nResponse from those same servers. If there are any price changes, Google then\nsends a [`\u003cQuery\u003e`](../xml-reference/queries#Query) that fetches the updated pricing data for the indicated\nhotels and itineraries.\n\nFor an overview of the repricing process, see the\n[Pricing Overview](/hotels/hotel-prices/dev-guide/updating-prices).\n| **Key Point:** If you don't implement [Changed Pricing](/hotels/hotel-prices/dev-guide/delivery-mode#hints), Google fetches data for all hotels in your [Hotel List](../xml-reference/hotel-list-feed).\n\nHint Response messages uses the following methods to reprice the selected hotels\nand their itineraries:\n\n- [Exact itineraries](#type1)\n- [Check-in date ranges](#type2)\n- [Ranged stays](#type3)\n\n| **Note:** The default length of stay using Changed Pricing is 30 days.\n\nThe root element of a Hint Response message is [`\u003cHint\u003e`](../xml-reference/queries#Hint). You request a hotel or\nitinerary to be updated by using one or more [`\u003cItem\u003e`](../xml-reference/queries#Item) elements. A single Hint\nResponse message can define any number of `\u003cItem\u003e` elements.\n\nEach Hint Response message must specify at least one `\u003cProperty\u003e` element for\neach `\u003cItem\u003e`. The `\u003cProperty\u003e` identifies a hotel by using the same IDs as\nthe [Hotel List](../xml-reference/hotel-list-feed). By default, you specify a single hotel ID for each `\u003cItem\u003e`\nblock. However, you can instruct Google to allow multiple hotels in an item\nblock if you are using check-in date ranges or ranged stays for repricing.\n\nExact itinerary request and response flow\n-----------------------------------------\n\nHint messages can be based on individual itineraries such as the combination of\ncheck-in date and length of stay. In this case, you specify a check-in date and\nlength of stay for your hotels, and Google fetches the new pricing data for just\nthat itinerary. \n\n### Partner's response\n\nThe following Hint Response message defines a single property and a single\nitinerary: \n\n \u003cHint\u003e\n \u003cItem\u003e\n \u003cProperty\u003e12345\u003c/Property\u003e\n \u003cStay\u003e\n \u003cCheckInDate\u003e2023-05-20\u003c/CheckInDate\u003e\n \u003cLengthOfStay\u003e3\u003c/LengthOfStay\u003e\n \u003c/Stay\u003e\n \u003c/Item\u003e\n \u003c/Hint\u003e\n\n### Google's response\n\nGoogle responds to your Hint Response message with a [`\u003cQuery\u003e`](../xml-reference/queries#Query) similar to the\nfollowing: \n\n \u003cQuery\u003e\n \u003cCheckin\u003e2023-05-20\u003c/Checkin\u003e\n \u003cNights\u003e3\u003c/Nights\u003e\n \u003cPropertyList\u003e\n \u003cProperty\u003e12345\u003c/Property\u003e\n \u003c/PropertyList\u003e\n \u003c/Query\u003e\n\n### Create `\u003cTransaction\u003e`\n\nYou are then expected to create a [`\u003cTransaction\u003e`](../xml-reference/transaction-messages#Transaction) with price updates for the\nhotel for the following stay: \n\n 5/20/23 - 5/23/23\n\nCheck-in date ranges request and response flow\n----------------------------------------------\n\nA Hint Response message can specify a range of check-in dates, beginning with\nthe first check-in date and ending with the last check-in date. When Google\nfetches new pricing data, Google pulls itineraries for every check-in date for\nthe hotel starting with those dates and extending up to the length of stay that\nyou indicate. \n\n### Partner's ranged dates\n\nThe following example for Hint Response message defines a single property with\na range of dates for the check-in: \n\n \u003cHint\u003e\n \u003cItem\u003e\n \u003cProperty\u003e12345\u003c/Property\u003e\n \u003cFirstDate\u003e2023-05-20\u003c/FirstDate\u003e\n \u003cLastDate\u003e2023-05-23\u003c/LastDate\u003e\n \u003c/Item\u003e\n \u003c/Hint\u003e\n\n### Google's response\n\nGoogle responds to this Hint Response message with [`\u003cQuery\u003e`](../xml-reference/queries#Query) similar to\nthe following: \n\n \u003cQuery\u003e\n \u003cFirstDate\u003e2023-05-20\u003c/FirstDate\u003e\n \u003cLastDate\u003e2023-05-23\u003c/LastDate\u003e\n \u003cNights\u003e5\u003c/Nights\u003e\n \u003cPropertyList\u003e\n \u003cProperty\u003e12345\u003c/Property\u003e\n \u003c/PropertyList\u003e\n \u003c/Query\u003e\n\n### Create `\u003cTransaction\u003e`\n\nYou are then expected to create a [`\u003cTransaction\u003e`](../xml-reference/transaction-messages#Transaction) with price updates\nfor the following stays for that hotel: \n\n 5/20/23 - 5/21/23\n 5/20/23 - 5/22/23\n 5/20/23 - 5/23/23\n 5/20/23 - 5/24/23\n 5/20/23 - 5/25/23\n\n 5/21/23 - 5/22/23\n 5/21/23 - 5/23/23\n 5/21/23 - 5/24/23\n 5/21/23 - 5/25/23\n 5/21/23 - 5/26/23\n\n 5/22/23 - 5/23/23\n 5/22/23 - 5/24/23\n 5/22/23 - 5/25/23\n 5/22/23 - 5/26/23\n 5/22/23 - 5/27/23\n\nThis example uses length of stay of 5 nights. The default length of stay is 30\ndays.\n\nRanged stays request and response flow\n--------------------------------------\n\nA Hint Response message can include a range of dates that have changed. This\ninforms Google that it should fetch any itinerary affected by any of those\ndates. The actual set of itineraries fetched is a function of both the set of\ndates with changes and the maximum length of stay. \n\n### Partner's ranged stays\n\nThe following example Hint Response message uses ranged stays: \n\n \u003cHint\u003e\n \u003cItem\u003e\n \u003cProperty\u003e12345\u003c/Property\u003e\n \u003cStaysIncludingRange\u003e\n \u003cFirstDate\u003e2023-05-20\u003c/FirstDate\u003e\n \u003cLastDate\u003e2023-05-23\u003c/LastDate\u003e\n \u003c/StaysIncludingRange\u003e\n \u003c/Item\u003e\n \u003c/Hint\u003e\n\n### Google's response\n\nGoogle responds to your Hint Response message with a [`\u003cQuery\u003e`](../xml-reference/queries#Query) similar to the\nfollowing: \n\n \u003cQuery\u003e\n \u003cFirstDate\u003e2023-05-20\u003c/FirstDate\u003e\n \u003cLastDate\u003e2023-05-23\u003c/LastDate\u003e\n \u003cAffectedNights\u003e3\u003c/AffectedNights\u003e\n \u003cPropertyList\u003e\n \u003cProperty\u003e12345\u003c/Property\u003e\n \u003cProperty\u003e67891\u003c/Property\u003e\n \u003c/PropertyList\u003e\n \u003c/Query\u003e\n\n### Create `\u003cTransaction\u003e`\n\nYou are then expected to create a [`\u003cTransaction\u003e`](../xml-reference/transaction-messages#Transaction) with price updates for the\nhotel for the following stays: \n\n 5/17/23 - 5/20/23\n\n 5/18/23 - 5/20/23\n 5/18/23 - 5/21/23\n\n 5/19/23 - 5/20/23\n 5/19/23 - 5/21/23\n 5/19/23 - 5/22/23\n\n 5/20/23 - 5/21/23\n 5/20/23 - 5/22/23\n 5/20/23 - 5/23/23\n\n 5/21/23 - 5/22/23\n 5/21/23 - 5/23/23\n 5/21/23 - 5/24/23\n\n 5/22/23 - 5/23/23\n 5/22/23 - 5/24/23\n 5/22/23 - 5/25/23\n\n 5/23/23 - 5/24/23\n 5/23/23 - 5/25/23\n 5/23/23 - 5/26/23\n\n| **Note:** With ranged stays, all itineraries including those that start *before* the first date and those that overlap with it should be repriced."]]