# Implement the booking server: API v0 (legacy)

> [!NOTE]
> **Note:** This page describes how to implement the booking server with API v0. See [Implement the booking server](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=guides/end-to-end-integration/implement-booking-server) for instructions to use with the latest version.

Setting up a Booking server on your end will allow the Actions Center 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](https://developers.google.com/static/actions-center/download/apitemplate.v0.booking_service.proto)

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

- [Lease](https://developers.google.com/actions-center/reference/grpc-api/lease-specification): temporary hold on a slot in the schedule, required before making a booking
- [Booking](https://developers.google.com/actions-center/reference/grpc-api/booking-specification): final reservation of a slot in the schedule

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

- [CreateLease](https://developers.google.com/actions-center/reference/grpc-api/createlease-method)
- [CreateBooking](https://developers.google.com/actions-center/reference/grpc-api/createbooking-method)
- [UpdateBooking](https://developers.google.com/actions-center/reference/grpc-api/updatebooking-method)

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](https://developers.google.com/actions-center/reference/grpc-api/status_codes).

## Have questions?

Be sure to check out our [FAQs](https://developers.google.com/actions-center/support/faqs).

## Other versions

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

- [API v3](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=guides/end-to-end-integration/implement-booking-server)
- [API v2](https://developers.google.com/actions-center/legacy/archived-guides/implement-booking-server-v0)