5. Implement Booking server: API v0 (you)

Setting up a Booking server on your end will allow Reserve with Google to create appointments / bookings / reservations with you on behalf of the user.

Implement an API interface based on gRPC

API v0 is not to be used for new integrations.

Download the service definition in proto format below to get started with the API implementation.

DOWNLOAD THE SERVICE DEFINITION

Please familiarize yourself with the following resource types that will be utilized in this implementation:

  • Lease: temporary hold on a slot in the schedule, required before making a booking
  • Booking: final reservation of a slot in the schedule

Additionally, the following API methods have to be implemented on your end for the gRPC server:

The following provides a complete BookingService definition using the 3 methods above:

// Manages slot leases and bookings for an inventory of appointments
service BookingService {
// Creates a new lease
rpc CreateLease(CreateLeaseRequest) returns (CreateLeaseResponse) {}

// Creates a booking for which a lease exists
rpc CreateBooking(CreateBookingRequest) returns (CreateBookingResponse) {}

// Updates an existing booking
rpc UpdateBooking(UpdateBookingRequest) returns (UpdateBookingResponse) {}
}

The methods should return on of the gRPC status codes.

Have questions?

Be sure to check out our FAQs.

Other versions

For documentation for other versions of the API, see the following pages:

Next step

NEXT STEP: Test implementation (both)