BookingNotification Ready
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
BookingNotification
方法(也称为 UpdateBooking
实时更新 [RTU])会在您的系统上对“Action 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
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):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 }"]]