طريقة CheckAvailability
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
التحقّق من مدى توفّر خانة الطلب تتحقّق الخلفية من الشريك من أنّ خانة الموعد المطلوبة
صالحة ومتاحة.
الطلب
CheckAvailabilityRequest
القيمة المعروضة
CheckAvailabilityResponse
// Request to check availability for a Slot.
message CheckAvailabilityRequest {
// The appointment slot that is being checked (required)
Slot slot = 1;
}
// Response for the CheckAvailability RPC with the availability of the
// appointment slot.
message CheckAvailabilityResponse {
// The requested slot. (required)
Slot slot = 1;
// Number of available spots.
// 0 indicates that the appointment slot is not available. (required)
int32 count_available = 2;
// If set, the last time (in seconds since the Unix epoch) that this specific
// appointment slot can be cancelled through Reserve with Google. This field
// will override any service-level cancellation rules. (optional)
//
// Deprecated: Use scheduling_rule_overrides.last_online_cancellable_sec
// in the Availability feed instead.
int64 last_online_cancellable_sec = 5 [deprecated = true];
// This enum indicates what requirements exist for the user to acknowledge or
// view the requested slots duration/end time.
enum DurationRequirement {
// The handling of the end time is not specified. This is the default.
DURATION_REQUIREMENT_UNSPECIFIED = 0;
// The end time is not shown to the user.
DO_NOT_SHOW_DURATION = 1;
// The end time has to be shown to the user before an appointment can be
// made.
MUST_SHOW_DURATION = 2;
}
// The requirement to show the slots duration and/or endtime. This field will
// be ignored if the slot is unavailable. (optional)
//
// Deprecated: Use duration_requirement in the Availability feed instead.
DurationRequirement duration_requirement = 3 [deprecated = true];
// Optionally, the partner can return additional updated information about the
// availability for this merchant if this information is present when
// responding to the CheckAvailabilityRequest and if there is no negative
// impact on the CheckAvailability request latency.
// For instance an entire day of merchant availability for a superset of
// resources can be returned here.
AvailabilityUpdate availability_update = 4;
}
// An update to one ore more slots indicating that the availability for the
// associated time has potentially changed.
message AvailabilityUpdate {
repeated SlotAvailability slot_availability = 1;
}
// An inventory slot and associated count of open spots.
message SlotAvailability {
Slot slot = 1;
// Number of available spots.
// 0 indicates that the appointment slot is not available. (required)
int32 count_available = 2;
}
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThis documentation details the \u003ccode\u003eCheckAvailability\u003c/code\u003e method, which is used to verify the availability of a specific appointment slot.\u003c/p\u003e\n"],["\u003cp\u003eThe method has been deprecated and new integrations should use \u003ccode\u003eBatchAvailabilityLookup\u003c/code\u003e instead.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCheckAvailabilityRequest\u003c/code\u003e requires a \u003ccode\u003eSlot\u003c/code\u003e to be provided, and the \u003ccode\u003eCheckAvailabilityResponse\u003c/code\u003e includes the requested \u003ccode\u003eSlot\u003c/code\u003e and the number of \u003ccode\u003ecount_available\u003c/code\u003e spots.\u003c/p\u003e\n"],["\u003cp\u003eThe response also can provide additional \u003ccode\u003eAvailabilityUpdate\u003c/code\u003e information and indicates if the duration is required to be shown to the user, through a deprecated \u003ccode\u003eduration_requirement\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSlotAvailability\u003c/code\u003e message shows how many spots are open for a specified \u003ccode\u003eSlot\u003c/code\u003e, and also has the ability to identify a slot as unavailable using a count of 0.\u003c/p\u003e\n"]]],["The `CheckAvailabilityRequest` verifies if a requested appointment `Slot` is valid and available. The `CheckAvailabilityResponse` returns the `Slot`, the number of `count_available` spots, and optionally, an `availability_update` with potentially changed availability for the merchant. `count_available` of 0 means the `slot` is unavailable. The response also includes `DurationRequirement`. The method `CheckAvailability` is deprecated, use `BatchAvailabilityLookup` for new integrations.\n"],null,["# CheckAvailability method\n\n| **Warning:** This method has been deprecated. For new intergation you should use [BatchAvailabilityLookup](/actions-center/verticals/legacy/reference/booking-server-api-rest/e2e-methods/batchavailabilitylookup-method) instead\n\nCheck availability for a requested slot. The partner backend verifies that the requested\nappointment slot is valid and available.\n\n**Request**\n\nCheckAvailabilityRequest\n\n**Return value**\n\nCheckAvailabilityResponse \n\n```gdscript\n// Request to check availability for a Slot.\nmessage CheckAvailabilityRequest {\n // The appointment slot that is being checked (required)\n Slot slot = 1;\n}\n\n// Response for the CheckAvailability RPC with the availability of the\n// appointment slot.\nmessage CheckAvailabilityResponse {\n // The requested slot. (required)\n Slot slot = 1;\n\n // Number of available spots.\n // 0 indicates that the appointment slot is not available. (required)\n int32 count_available = 2;\n\n // If set, the last time (in seconds since the Unix epoch) that this specific\n // appointment slot can be cancelled through Reserve with Google. This field\n // will override any service-level cancellation rules. (optional)\n //\n // Deprecated: Use scheduling_rule_overrides.last_online_cancellable_sec\n // in the Availability feed instead.\n int64 last_online_cancellable_sec = 5 [deprecated = true];\n\n // This enum indicates what requirements exist for the user to acknowledge or\n // view the requested slots duration/end time.\n enum DurationRequirement {\n // The handling of the end time is not specified. This is the default.\n DURATION_REQUIREMENT_UNSPECIFIED = 0;\n\n // The end time is not shown to the user.\n DO_NOT_SHOW_DURATION = 1;\n\n // The end time has to be shown to the user before an appointment can be\n // made.\n MUST_SHOW_DURATION = 2;\n }\n\n // The requirement to show the slots duration and/or endtime. This field will\n // be ignored if the slot is unavailable. (optional)\n //\n // Deprecated: Use duration_requirement in the Availability feed instead.\n DurationRequirement duration_requirement = 3 [deprecated = true];\n\n // Optionally, the partner can return additional updated information about the\n // availability for this merchant if this information is present when\n // responding to the CheckAvailabilityRequest and if there is no negative\n // impact on the CheckAvailability request latency.\n // For instance an entire day of merchant availability for a superset of\n // resources can be returned here.\n AvailabilityUpdate availability_update = 4;\n}\n``` \n\n```scilab\n// An update to one ore more slots indicating that the availability for the\n// associated time has potentially changed.\nmessage AvailabilityUpdate {\n repeated SlotAvailability slot_availability = 1;\n}\n``` \n\n```scilab\n// An inventory slot and associated count of open spots.\nmessage SlotAvailability {\n Slot slot = 1;\n\n // Number of available spots.\n // 0 indicates that the appointment slot is not available. (required)\n int32 count_available = 2;\n}\n```"]]