Метод CreateLease
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Запрос
Создать запрос на аренду
Возвращаемое значение
CreateLeaseResponse
Требования:
Параметр lease_id должен быть создан в бэкэнде партнера и указан в объекте CreateLeaseResponse.
Параметр lease_expiration_time необходимо задать в методе CreateLeaseResponse.
Если поле resources указано в запросе CreateLeaseRequest, то оно должно быть установлено в ответе CreateLeaseResponse и соответствовать полю CreateLeaseRequest.
Все остальные поля в CreateLeaseResponse должны быть заданы и соответствовать полю CreateLeaseRequest.
Коды ошибок Canonical gRPC
INVALID_ARGUMENT (недопустимый идентификатор продавца, идентификатор услуги, ссылка на клиента или указание времени слота)
ALREADY_EXISTS (если у клиента уже есть аренда слота)
RESOURCE_EXHAUSTED (если слот недоступен)
// Request to create a [ext.maps.booking.partner.v0.Lease] for a slot in the// inventory. The expiration time in the returned Lease may be modified by the// backend, e.g. if the requested lease period is too long.messageCreateLeaseRequest{optionfeatures.(pb.java).nest_in_file_class=YES;// The lease to be created with information about the appointment slotLeaselease=1;}// Response for the [ext.maps.booking.partner.v0.CreateLease] RPC with the// created [ext.maps.booking.partner.v0.Lease]messageCreateLeaseResponse{optionfeatures.(pb.java).nest_in_file_class=YES;// The created [ext.maps.booking.partner.v0.Lease]Leaselease=1;}
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2026-02-18 UTC."],[],["The `CreateLeaseRequest` initiates a lease creation, and `CreateLeaseResponse` returns the created lease. The partner backend must generate the `lease_id` and `lease_expiration_time` in the response. If `resources` is in the request, it must be mirrored in the response. All other response fields should mirror the request. Potential gRPC errors include `INVALID_ARGUMENT`, `ALREADY_EXISTS` if a lease exists, or `RESOURCE_EXHAUSTED` if the slot is unavailable. The response might adjust the expiration time.\n"]]