BookingNotification Ready
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
BookingNotification
หรือที่เรียกว่าUpdateBooking
การอัปเดตแบบเรียลไทม์ (RTU) จะแจ้งให้
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 Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],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 }"]]