ตัวอย่างการจองจากต้นทางถึงปลายทาง
BatchAvailabilityLookup (การโหลดหน้าเว็บ)
ส่งคำขอ
{
"merchant_id" : "1234",
"slot_time" : [
{
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606467600"
},
{
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606469400"
},
{
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606471200"
}
]
}
คำตอบ
{
"slot_time_availability" : [
{
"available" : true,
"slot_time" : {
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606467600"
}
},
{
"available" : true,
"slot_time" : {
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606469400"
}
},
{
"available" : true,
"slot_time" : {
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606471200"
}
}
]
}
BatchAvailabilityLookup (การคลิกช่อง)
ส่งคำขอ
{
"merchant_id" : "1234",
"slot_time" : [
{
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606467600"
}
]
}
คำตอบ
{
"slot_time_availability" : [
{
"available" : true,
"slot_time" : {
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606467600"
}
}
]
}
CreateBooking
ส่งคำขอ
{
"idempotency_token" : "18307119013960637991",
"payment_information" : {
"prepayment_status" : "PREPAYMENT_NOT_PROVIDED"
},
"slot" : {
"confirmation_mode" : "CONFIRMATION_MODE_SYNCHRONOUS",
"duration_sec" : "1800",
"merchant_id" : "1234",
"resources" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606467600"
},
"user_information" : {
"email" : "john.smith@gmail.com",
"family_name" : "Smith",
"given_name" : "John",
"telephone" : "+12091111111",
"user_id" : "1111111111111111111"
}
}
คำตอบ
{
"booking" : {
"booking_id" : "890",
"payment_information" : {
"prepayment_status" : "PREPAYMENT_NOT_PROVIDED"
},
"slot" : {
"confirmation_mode" : "CONFIRMATION_MODE_SYNCHRONOUS",
"duration_sec" : "1800",
"merchant_id" : "1234",
"resources" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606467600"
},
"status" : "CONFIRMED",
"user_information" : {
"email" : "john.smith@gmail.com",
"family_name" : "Smith",
"given_name" : "John",
"telephone" : "+12091111111",
"user_id" : "1111111111111111111"
}
}
}
UpdateBooking
ส่งคำขอ
{
"booking" : {
"booking_id" : "890",
"slot" : {
"duration_sec" : "1800",
"start_sec" : "1606473000"
}
}
}
คำตอบ
{
"booking" : {
"booking_id" : "890",
"payment_information" : {
"prepayment_status" : "PREPAYMENT_NOT_PROVIDED"
},
"slot" : {
"duration_sec" : 1800,
"merchant_id" : "1234",
"resources" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : 1606473000
},
"status" : "CONFIRMED",
"user_information" : {
"email" : "john.smith@gmail.com",
"family_name" : "Smith",
"given_name" : "John",
"telephone" : "+12091111111",
"user_id" : "1111111111111111111"
}
}
}
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-13 UTC
[null,null,["อัปเดตล่าสุด 2024-09-13 UTC"],[[["`BatchAvailabilityLookup` allows checking the availability of multiple time slots for a given service, resource, and merchant."],["`CreateBooking` enables creating a new booking with user and payment details for a selected time slot."],["`UpdateBooking` facilitates updating an existing booking, primarily the scheduled time slot."]]],[]]