با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
اجاره به طور موقت مالکیت یک اسلات درخواستی را در اختیار دارد.
پشتیبان شریک تأیید می کند که جایگاه قرار درخواست شده معتبر است و همچنان در دسترس است. در داخل، شریک یک توقف موقت برای اسلات درخواستی ایجاد می کند، که تنظیم شده است تا به طور خودکار در lease_expiration_time منقضی شود. باطن مجاز است lease_expiration_time تغییر دهد، به عنوان مثال اگر زمان اجاره درخواستی بیش از حد طولانی باشد. اجاره ایجاد شده به مشتری بازگردانده می شود.
API رزرو ما از Lease پشتیبانی اختیاری می کند. با پشتیبانی اجاره، ایجاد اجاره نامه برای اسلات درخواستی اولین گام هنگام ایجاد رزرو است.
// Temporary lease for an inventory slotmessageLease{// ID of the lease.// Not populated in CreateLeaseRequest. The value is chosen by the partner and// has to be returned in the response of CreateLease. (required)stringlease_id=1;// The appointment slot that the lease is created for. (required)Slotslot=2;// Unique identifier for this lease, chosen by Reserve with Google. Serves as// an idempotency token for [ext.maps.booking.partner.v2.CreateLease]// requests. (required)stringuser_reference=3;// Expiration time of the lease in UTC Timestamp (required)google.protobuf.Timestamplease_expiration_time=4;}// Reference to a [ext.maps.booking.partner.v2.Lease] that has been created via// [ext.maps.booking.partner.v2.CreateLease]messageLeaseReference{// Lease ID (required)stringlease_id=1;}
اطلاعات اضافی در مورد اجاره نامه
پشتیبانی برای اجاره اختیاری است. برای شرکایی که علاقه مند به اجرای پشتیبانی هستند اعمال می شود. لطفاً قبل از شروع برای تعیین صلاحیت با مرکز اقدامات تماس بگیرید.
برای پشتیبانی از اجاره، مجموعه توصیه شده API v2 باید پیاده سازی شود. علاوه بر این،
CreateBooking باید اجرا شود و انتظار می رود از مرجع اجاره استفاده شود. باطن شریک با مرجع اجاره ارائه شده رزرو می کند.
الزامات API v2 همچنین برای پشتیبانی از اجاره اعمال می شود. علاوه بر این،
انتظار می رود CreateBooking از مرجع اجاره استفاده کند. هنگام رزرو با مرجع اجاره ارائه شده، شریک اجاره نامه را مصرف می کند و آن را برای رزروهای بعدی بی اعتبار می کند. شریک همچنین مسئول تأیید رزرو ایجاد شده با استفاده از اسلات در پیام درخواست است.
به عنوان یک کد خطای اضافی gRPC، در صورتی که کد اجاره نامه ارائه شده باشد و شناسه اجاره برای شریک ناشناخته باشد، از NOT_FOUND استفاده می شود.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eA Lease is a temporary hold on a requested appointment slot, allowing users to secure it before booking.\u003c/p\u003e\n"],["\u003cp\u003eLease support is optional for partners using the booking API v2 and requires implementing CreateLease and CreateBooking methods.\u003c/p\u003e\n"],["\u003cp\u003eCreateBooking with a Lease reference consumes the Lease, making it invalid for other bookings; partners must verify the booking against the requested slot.\u003c/p\u003e\n"],["\u003cp\u003ePartners must obtain eligibility for Lease support through the Actions Center before implementation.\u003c/p\u003e\n"],["\u003cp\u003eLease functionality includes a unique Lease ID, user reference for idempotency, an associated Slot, and an expiration time.\u003c/p\u003e\n"]]],["A Lease temporarily holds a requested Slot's ownership. The partner's backend validates the slot, creates a temporary lease with an expiration time (`lease_expiration_time`), and returns the lease to the client. The `lease_expiration_time` can be modified by the backend. The booking API has optional lease support. `CreateLease` and `CreateBooking` methods are necessary when implementing it, with `CreateBooking` expected to use a lease reference that consumes the lease, rendering it invalid for further bookings.\n"],null,["# Lease specification\n\nA Lease temporarily holds the ownership of a requested Slot.\n\nThe partner's backend verifies that the requested appointment slot is valid and\nstill available. Internally, the partner creates a temporary hold for the\nrequested Slot, which is set up to expire automatically at\n`lease_expiration_time`. The backend is allowed to modify\n`lease_expiration_time`, e.g. if the requested lease time is excessively long.\nThe created lease is returned to the client.\n\nOur booking API provides optional support for Lease. With lease support,\ncreating a Lease for the requested Slot is the first step when creating a\nBooking. \n\n```scilab\n// Temporary lease for an inventory slot\nmessage Lease {\n // ID of the lease.\n // Not populated in CreateLeaseRequest. The value is chosen by the partner and\n // has to be returned in the response of CreateLease. (required)\n string lease_id = 1;\n\n // The appointment slot that the lease is created for. (required)\n Slot slot = 2;\n\n // Unique identifier for this lease, chosen by Reserve with Google. Serves as\n // an idempotency token for [ext.maps.booking.partner.v2.CreateLease]\n // requests. (required)\n string user_reference = 3;\n\n // Expiration time of the lease in UTC Timestamp (required)\n google.protobuf.Timestamp lease_expiration_time = 4;\n}\n\n// Reference to a [ext.maps.booking.partner.v2.Lease] that has been created via\n// [ext.maps.booking.partner.v2.CreateLease]\nmessage LeaseReference {\n // Lease ID (required)\n string lease_id = 1;\n}\n```\n\nAdditional information about leases\n-----------------------------------\n\nSupport for lease is **optional**. It applies to partners that are interested in\nimplementing the support. Please contact the Actions Center to determine\neligibility before you start.\n\nTo support lease, the recommended set of API v2 must be implemented; in\naddition,\n\n- [CreateLease](/actions-center/reference/grpc-api-v2/createlease-method) is required to be implemented.\n- [CreateBooking](/actions-center/reference/grpc-api-v2/createbooking-method) is required to be implemented and expected to use lease reference. Partner backend makes a booking with the provided lease reference.\n\nRequirements of API v2 also apply to support for lease; in addition,\n\n- [CreateBooking](/actions-center/reference/grpc-api-v2/createbooking-method) is expected to use lease reference. When making a booking with the provided lease reference, partner consumes the lease and renders it invalid for any further bookings. Partner is also responsible for verfiying the created booking using slot in the request message.\n- As an additional gRPC error code, NOT_FOUND is used if lease ref is provided and the lease ID is unknown to the partner.\n\nFigure: Create a Booking for a Lease"]]