অনুরোধ কাঠামো
একই মার্চেন্টের জন্য BatchAvailabilityLookup অনুরোধগুলো একাধিক পরিষেবা জুড়ে বিস্তৃত হতে পারে, এবং অনুরোধ করা স্লটগুলো একাধিক রিসোর্স ও দিন জুড়ে থাকতে পারে। আপনার ইন্টিগ্রেশন সহজ করার জন্য আমরা মার্চেন্ট জুড়ে একটি একক সার্ভিস আইডি ব্যবহার করার পরামর্শ দিই।
প্রতিক্রিয়ার সময়
BatchAvailabilityLookup অনুরোধগুলির একটি ১.৫ সেকেন্ডের লেটেন্সি থ্রেশহোল্ড রয়েছে, যার পরে প্রতিক্রিয়াটি ব্যর্থ বলে বিবেচিত হয়। আপনার পরিকাঠামোতে পৌঁছানো অনুরোধের বিলম্ব কমাতে আপনার অভ্যন্তরীণ নেটওয়ার্কিং এবং ডিএনএস রাউটিং সিঙ্ক করা আছে কিনা তা নিশ্চিত করুন। যদি উল্লেখযোগ্য টাইমআউট ত্রুটি থাকে, তবে সেগুলি সমাধান না করা পর্যন্ত আপনার ইন্টিগ্রেশনটি অফলাইনে নিয়ে যাওয়া হতে পারে।
প্রতিটি অনুরোধের উত্তরে অবশ্যই সেই মুহূর্তের আপনার ইনভেন্টরির প্রকৃত অবস্থা জানাতে হবে, বুকিং প্রক্রিয়াটি শুরু করার সময়ের অবস্থা নয়। যদি কোনো স্লট বুক হয়ে যায়, তবে বর্তমান উত্তরগুলোতে তা উল্লেখ করুন।
সংজ্ঞা
BatchAvailabilityLookup মেথডটি যাচাই করে যে রিজার্ভেশন প্রক্রিয়া চলাকালীন ব্যবহারকারীদের কাছে শুধুমাত্র বর্তমান স্লটগুলোই উপস্থাপন করা হয়।
ব্যাচঅ্যাভেইলেবিলিটিলুকআপ অনুরোধ
message BatchAvailabilityLookupRequest {
// ID of the merchant.
string merchant_id = 1;
// Multiple slot times to be checked for availability. All queried times apply
// to the same merchant_id and service_id.
repeated SlotTime slot_time = 3;
reserved 2;
}
ব্যাচ উপলভ্যতা লুকআপ প্রতিক্রিয়া
// Response for the [ext.maps.booking.partner.v3.BatchAvailabilityLookupRequest]
// RPC with the availabilities of the appointment slots.
message BatchAvailabilityLookupResponse {
// The availabilities for the requested SlotTime entries. There must be
// exactly one slot_time_availability for each SlotTime entry in the
// [ext.maps.booking.partner.v3.BatchAvailabilityLookupRequest].
repeated SlotTimeAvailability slot_time_availability = 1;
}
স্লটটাইম
// Identifies a Slot service_id and start time and optionally, the Slot duration
// and resources, for a specific merchant. Note that this differs from the
// definition of Slot, as it does not include merchant_id identifier.
message SlotTime {
// ID of the service. (required)
string service_id = 5;
// Start time of the appointment slot in seconds of UTC time since Unix epoch
// (required)
int64 start_sec = 1;
// Duration of the appointment slot in seconds (optional)
int64 duration_sec = 2;
// Opaque tag that identifies the availability slot and matches the value
// provided in the Availability Feed (optional)
string availability_tag = 3;
// The set of resources that specifies the appointment slot, e.g. by
// indicating the staff member and room selected by the user, or party size
// for dining slots (optional)
ResourceIds resource_ids = 4;
// Indicates whether bookings of this slot will be confirmed
// synchronously or asynchronously. (optional)
// An UNSPECIFIED value will be interpreted as synchronous.
ConfirmationMode confirmation_mode = 6;
}
স্লট সময় প্রাপ্যতা
যদি কোনো স্লট খুঁজে না পাওয়া যায়, তাহলে একটি খালি প্রতিক্রিয়া ফেরত দিন। 400 ত্রুটি ফেরত দেবেন না, পরিবর্তে আপনি 204 বা অন্য কোনো 2xx কোড ফেরত দিতে পারেন। এটি যাচাই করে যে প্রতিক্রিয়াটি সঠিকভাবে গৃহীত হয়েছে।
message SlotTimeAvailability {
// The SlotTime for which availability was checked.
SlotTime slot_time = 1;
// Whether the requested SlotTime is available
bool available = 2;
}
ব্যাচ উপলভ্যতা লুকআপ নমুনা
পৃষ্ঠা লোড
When a user clicks Book Online to initiate the booking flow, a BatchAvailabilityLookup request is sent with known availability slots for the merchant. For each slot sent in the request, your Booking Server returns a response with the actual, current availability of the slot. Only available slots are presented to the user on the frontend.
যদি কোনো ব্যবহারকারী তার দলের সদস্য সংখ্যা পরিবর্তন করেন বা অন্য কোনো তারিখ নির্বাচন করেন, তাহলে পৃষ্ঠাটি পুনরায় লোড করার অনুরোধ পাঠানো যেতে পারে।
পৃষ্ঠা লোড অনুরোধ
{
"merchant_id" : "1234",
"slot_time" : [
{
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "1000",
"start_sec" : "1606467600"
},
{
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "1000",
"start_sec" : "1606469400"
},
{
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "1000",
"start_sec" : "1606471200"
}
]
}
পৃষ্ঠা লোড প্রতিক্রিয়া
{ "slot_time_availability" :
[
{
"available" : true,
"slot_time" : {
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2 },
"service_id" : "1000",
"start_sec" : "1606467600" }
},
{
"available" : true,
"slot_time" : {
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2 },
"service_id" : "1000",
"start_sec" : "1606469400" }
},
{
"available" : false,
"slot_time" : {
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2 },
"service_id" : "1000",
"start_sec" : "1606471200" }
}
]
}
স্লট ক্লিক
যখন কোনো ব্যবহারকারী একটি বুকিংযোগ্য স্লট নির্বাচন করেন, তখন সেই নির্দিষ্ট স্লটটির জন্য একটি BatchAvailabilityLookup অনুরোধ পাঠানো হয়। আপনার বুকিং সার্ভার স্লটটির প্রকৃত ও বর্তমান প্রাপ্যতা সহ একটি প্রতিক্রিয়া ফেরত দেয়। যদি সেই স্লটটি অন্য কোনো গুগল ব্যবহারকারী দ্বারা, আপনার সিস্টেমের অভ্যন্তরে অথবা পেজ লোড এবং স্লট ক্লিক অনুরোধের মধ্যবর্তী সময়ে বুক করা হয়ে থাকে, তাহলে প্রাপ্যতার জন্য প্রত্যাশিত প্রতিক্রিয়াটি 'False' হবে।
স্লট ক্লিক অনুরোধ
{
"merchant_id" : "1234",
"slot_time" : [
{
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "1000",
"start_sec" : "1606467600"
}
]
}
স্লট ক্লিক প্রতিক্রিয়া
{
"slot_time_availability" : [
{
"available" : true,
"slot_time" : {
"duration_sec" : "1800",
"resource_ids" : {
"party_size" : 2
},
"service_id" : "1000",
"start_sec" : "1606467600"
}
}
]
}
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2026-05-13 UTC-তে শেষবার আপডেট করা হয়েছে।