Page Summary
-
CreateLeaseRequestis used to initiate the creation of a lease for an appointment slot, with the response beingCreateLeaseResponse. -
The
CreateLeaseResponsemust include a partner-generatedlease_idandlease_expiration_time. -
If
resourcesare specified in the request, they must match and be set in the response, and all other fields in the response must match the request. -
Canonical gRPC error codes like
INVALID_ARGUMENT,ALREADY_EXISTS, andRESOURCE_EXHAUSTEDcan indicate issues such as invalid IDs, existing leases, or slot unavailability.
Request
CreateLeaseRequest
Return value
CreateLeaseResponse
Requirements:
- lease_id must be created by the partner backend and set in the CreateLeaseResponse.
- lease_expiration_time must be set in the CreateLeaseResponse.
- If the resources field is specified in the CreateLeaseRequest, then it must be set in the CreateLeaseResponse, and match the CreateLeaseRequest.
- All other fields in the CreateLeaseResponse must be set and match the CreateLeaseRequest.
Canonical gRPC error codes
INVALID_ARGUMENT(invalid merchant ID, service ID, client reference or slot time specification)ALREADY_EXISTS(if the client already has a lease on the slot)RESOURCE_EXHAUSTED(if the slot is not available)
// 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. message CreateLeaseRequest { // The lease to be created with information about the appointment slot Lease lease = 1; } // Response for the [ext.maps.booking.partner.v0.CreateLease] RPC with the // created [ext.maps.booking.partner.v0.Lease] message CreateLeaseResponse { // The created [ext.maps.booking.partner.v0.Lease] Lease lease = 1; }