Booking specification

  • A Booking represents a finalized appointment and is created from a Lease, transferring client information during this conversion.

  • Lease objects are retired after generating one Booking, preventing their reuse for further appointment scheduling.

  • Booking includes details like booking ID, merchant and service IDs, appointment time, duration, client information, booking status, payment details, and optional virtual session data.

To finalize an appointment, a Lease is converted into a Booking. Information about the client (user) making the booking is only transferred at this stage. After a Lease has been used once to create a Booking, it is retired and cannot be used to create any further bookings.

// A booking for an inventory slot
message Booking {
  // ID of this booking
  string booking_id = 1;

  // ID of the merchant for the slot
  string merchant_id = 2;

  // ID of the merchant service
  string service_id = 3;

  // Start time of the appointment slot
  google.protobuf.Timestamp start_time = 4;

  // Duration of the appointment slot
  google.protobuf.Duration duration = 5;

  // Personal information of the client making the appointment
  ClientInformation client_information = 6;

  // Status of the booking
  BookingStatus status = 7;

  // Information about payment transactions that relate to the booking.
  PaymentInformation payment_information = 8;

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