Send feedback
Reservations End-to-End examples
Stay organized with collections
Save and categorize content based on your preferences.
BatchAvailabilityLookup (page load)
Request
{
"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"
}
]
}
Response
{
"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 (slot click)
Request
{
"merchant_id" : "1234",
"slot_time" : [
{
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606467600"
}
]
}
Response
{
"slot_time_availability" : [
{
"available" : true,
"slot_time" : {
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "5678",
"start_sec" : "1606467600"
}
}
]
}
CreateBooking
Request
{
"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"
}
}
Response
{
"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
Request
{
"booking" : {
"booking_id" : "890",
"slot" : {
"duration_sec" : "1800",
"start_sec" : "1606473000"
}
}
}
Response
{
"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"
}
}
}
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`BatchAvailabilityLookup` allows checking the availability of multiple time slots for a given service and resource, either upon page load or when a user clicks on a specific time slot."],["`CreateBooking` enables creating a new booking with customer and booking details, including payment and confirmation preferences."],["`UpdateBooking` allows modifying an existing booking by updating its time slot, specifically the start time and duration, while retaining other booking information."]]],[]]