# Booking specification

A Booking is an appointment for an inventory slot. It contains the information
needed to identify and make the appointment.

```protobuf
// A booking for an inventory slot
message Booking {
  option features.(pb.java).nest_in_file_class = YES;

  // ID of this booking (required)
  string booking_id = 1;

  // The appointment slot of this booking (required for CreateBooking and
  // UpdateBooking:modify, but not UpdateBooking:cancel)
  Slot slot = 2;

  // Personal information of the user making the appointment (required for
  // CreateBooking)
  UserInformation user_information = 3;

  // Status of the booking (required for CreateBooking and UpdateBooking:cancel,
  // but not UpdateBooking:modify)
  BookingStatus status = 4;

  // Information about payment transactions that relate to the booking.
  // (optional)
  PaymentInformation payment_information = 5;

  // Information about virtual session related to this booking. (optional)
  VirtualSessionInfo virtual_session_info = 6;
}
```

## Create a booking

There are two ways to create a Booking:

- A Booking can be created directly from a [Slot](https://developers.google.com/actions-center/reference/grpc-api-v2/slot-specification).
- With optional support of [Lease](https://developers.google.com/actions-center/reference/grpc-api-v2/lease-specification), a Lease is created for the Slot first and then finalized into a Booking.

See [CreateBooking](https://developers.google.com/actions-center/reference/grpc-api-v2/createbooking-method)
for details.

## Update a booking

A Booking can be updated, i.e., rescheduled or cancelled.  

See [UpdateBooking](https://developers.google.com/actions-center/reference/grpc-api-v2/updatebooking-method)
for details.

## Get status for a booking

Booking status (see
[BookingStatus](https://developers.google.com/actions-center/reference/grpc-api-v2/booking-status-specification))
and Prepayment status (see
[PrepaymentStatus](https://developers.google.com/actions-center/reference/grpc-api-v2/payment-specification))
of a Booking can be read via
[GetBookingStatus](https://developers.google.com/actions-center/reference/grpc-api-v2/getbookingstatus-method)
and [ListBookings](https://developers.google.com/actions-center/reference/grpc-api-v2/listbookings-method).