// Manages slot leases and bookings for an inventory of appointmentsserviceBookingService{// Creates a new leaserpcCreateLease(CreateLeaseRequest)returns(CreateLeaseResponse){}// Creates a booking for which a lease existsrpcCreateBooking(CreateBookingRequest)returns(CreateBookingResponse){}// Updates an existing bookingrpcUpdateBooking(UpdateBookingRequest)returns(UpdateBookingResponse){}}
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThis page outlines the implementation of a booking server using API v0, which enables the Actions Center to create appointments, bookings, or reservations.\u003c/p\u003e\n"],["\u003cp\u003eThe API interface, based on gRPC, requires the implementation of three core methods: CreateLease, CreateBooking, and UpdateBooking.\u003c/p\u003e\n"],["\u003cp\u003eThe implementation involves utilizing resource types like Lease and Booking, which are defined within the provided specifications, to manage slots and reservations.\u003c/p\u003e\n"],["\u003cp\u003eAPI v0 is intended for existing integrations only and new integrations should refer to the instructions for the latest version.\u003c/p\u003e\n"],["\u003cp\u003eYou can download the service definition in proto format and implement the provided methods, which should return a gRPC status code.\u003c/p\u003e\n"]]],["To integrate with Actions Center for bookings, implement a gRPC-based API server. This involves using API v0 service definition (not for new integrations) and familiarizing yourself with `Lease` and `Booking` resource types. Implement the `CreateLease`, `CreateBooking`, and `UpdateBooking` methods within the `BookingService` to manage slot holds and reservations. Each method should return gRPC status codes. Download the service definition in proto format to start. Utilize API V3 for new integrations.\n"],null,["# Implement the booking server: API v0 (legacy)\n\n| **Note:** This page describes how to implement the booking server with API v0. See [Implement the booking server](/actions-center/verticals?vertical_redirect_fragment=guides/end-to-end-integration/implement-booking-server) for instructions to use with the latest version.\n\nSetting up a Booking server on your end will allow the Actions Center to\ncreate appointments / bookings / reservations with you on behalf of the user.\n\nImplement an API interface based on gRPC\n----------------------------------------\n\nAPI v0 is not to be used for new integrations.\n\nDownload the service definition in proto format below to get started with the\nAPI implementation.\n\n[Download the service\ndefinition](/static/actions-center/download/apitemplate.v0.booking_service.proto)\n\nPlease familiarize yourself with the following resource types that will be\nutilized in this implementation:\n\n- [Lease](/actions-center/reference/grpc-api/lease-specification): temporary hold on a slot in the schedule, required before making a booking\n- [Booking](/actions-center/reference/grpc-api/booking-specification): final reservation of a slot in the schedule\n\nAdditionally, the following API methods have to be implemented on your end for\nthe gRPC server:\n\n- [CreateLease](/actions-center/reference/grpc-api/createlease-method)\n- [CreateBooking](/actions-center/reference/grpc-api/createbooking-method)\n- [UpdateBooking](/actions-center/reference/grpc-api/updatebooking-method)\n\nThe following provides a complete BookingService definition using the 3 methods\nabove: \n\n // Manages slot leases and bookings for an inventory of appointments\n service BookingService {\n // Creates a new lease\n rpc CreateLease(CreateLeaseRequest) returns (CreateLeaseResponse) {}\n\n // Creates a booking for which a lease exists\n rpc CreateBooking(CreateBookingRequest) returns (CreateBookingResponse) {}\n\n // Updates an existing booking\n rpc UpdateBooking(UpdateBookingRequest) returns (UpdateBookingResponse) {}\n }\n\nThe methods should return on of the\n[gRPC status codes](/actions-center/reference/grpc-api/status_codes).\n\nHave questions?\n---------------\n\nBe sure to check out our [FAQs](/actions-center/support/faqs).\n\nOther versions\n--------------\n\nFor documentation for other versions of the API, see the following pages:\n\n- [API v3](/actions-center/verticals?vertical_redirect_fragment=guides/end-to-end-integration/implement-booking-server)\n- [API v2](/actions-center/legacy/archived-guides/implement-booking-server-v0)"]]