BookingNotification Ready
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
BookingNotification
方法 (又稱UpdateBooking
即時更新 (RTU)) 會在系統更新 Actions Center 預訂時通知 Google。例如取消或修改預訂。這時就必須傳送 notification.partners.bookings.patch
或 BookingNotification.UpdateBooking
。
BookingNotification 工作需求
如要完成這項工作,請傳送有效且沒有錯誤的 BookingNotifications
。呼叫「Availability Replace」、「Merchant」和「Service」方法可能會使工作失效。
可修改的欄位
startTime
duration
partySize
必須指定 name
、merchant_id
、service_id
和任何變更的特定欄位。其他欄位則為選填。在某些情況下,多個欄位可以同時變更。在這種情況下,updateMask
中的欄位會以半形逗號分隔。例如:updateMask=partySize,startTime
。
如果工作成功,回應主體會包含 Booking 的例項。
取消要求範例
Request:
PATCH https://mapsbooking.googleapis.com/v1alpha/notification/partners/<PARTNER_ID>/bookings/<BOOKING_ID>?updateMask=status
Body:
{
"name": "partners/<PARTNER_ID>/bookings/<BOOKING_ID>",
"merchantId": "10001",
"serviceId": "1001",
"status": "CANCELED"
}
回應主體
取消回覆範例
booking: {
name: "partners/<PARTNER_ID>/bookings/<BOOKING_ID>",
merchant_id: "10001",
service_id: "1001",
start_time: {
seconds: 1736120700
},
duration: {
seconds: 900
},
status: "CANCELED",
party_size: 2
}
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[],[],null,["# BookingNotification Ready\n\n`BookingNotification` method, also known as the `UpdateBooking` Real-Time Update (RTU), notifies\nGoogle when an update is made to the Actions Center booking on your system.\nExample situations include canceled or modified reservations. That is when a\n[`notification.partners.bookings.patch`](/maps-booking/reference/maps-booking-api/rest/v1alpha/notification.partners.bookings/patch) or `BookingNotification.UpdateBooking` must be sent.\n\nBookingNotification task requirements\n-------------------------------------\n\nTo complete this task, send valid `BookingNotifications` with no errors. Calls\nto Availability Replace, Merchant, and Service methods can invalidate the task.\n\n### Modifiable fields\n\n- `startTime`\n- `duration`\n- `partySize`\n\nThe `name`, `merchant_id`, `service_id`, and any specific field that changes\nmust be specified. All other fields are optional. In some cases, multiple fields\ncan change at the same time. In such cases, commas separate the fields in the\n`updateMask`. For example, `updateMask=partySize,startTime`.\n\nIf the task is successful, the response body contains an instance of [Booking](/maps-booking/reference/maps-booking-api/rest/v1alpha/notification.partners.bookings#Booking).\n\nCancelation request example\n---------------------------\n\n Request:\n PATCH https://mapsbooking.googleapis.com/v1alpha/notification/partners/\u003cPARTNER_ID\u003e/bookings/\u003cBOOKING_ID\u003e?updateMask=status\n\n Body:\n {\n \"name\": \"partners/\u003cPARTNER_ID\u003e/bookings/\u003cBOOKING_ID\u003e\",\n \"merchantId\": \"10001\",\n \"serviceId\": \"1001\",\n \"status\": \"CANCELED\"\n }\n\n### Response body\n\n#### Cancelation response example\n\n booking: {\n name: \"partners/\u003cPARTNER_ID\u003e/bookings/\u003cBOOKING_ID\u003e\",\n merchant_id: \"10001\",\n service_id: \"1001\",\n start_time: {\n seconds: 1736120700\n },\n duration: {\n seconds: 900\n },\n status: \"CANCELED\",\n party_size: 2\n }"]]