Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Запрос
Создать запрос на аренду
Возвращаемое значение
CreateLeaseResponse
Требования:
Lease_id должен быть создан серверной частью партнера и установлен в CreateLeaseResponse.
Lease_expiration_time должно быть установлено в CreateLeaseResponse.
Если поле ресурсов указано в CreateLeaseRequest, оно должно быть установлено в CreateLeaseResponse и соответствовать CreateLeaseRequest.
Все остальные поля в CreateLeaseResponse должны быть установлены и соответствовать CreateLeaseRequest.
Канонические коды ошибок 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{// 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{// 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"]],["Последнее обновление: 2025-07-24 UTC."],[[["Partners must create and set `lease_id` and `lease_expiration_time` in the `CreateLeaseResponse`."],["`CreateLeaseResponse` must mirror the `CreateLeaseRequest`, including the `resources` field if provided, and all other fields."],["Potential errors include `INVALID_ARGUMENT`, `ALREADY_EXISTS`, and `RESOURCE_EXHAUSTED` for various invalid input or booking conflicts."],["The `CreateLeaseRequest` initiates a lease creation for a specific appointment slot, while the `CreateLeaseResponse` returns the created lease details."],["The backend may adjust the lease expiration time in the response."]]],["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"]]