Lavanda Developer Docs
  • Welcome
  • Quickstart
    • Getting Started
    • Versioning
    • API Explorer
  • Concepts
    • Structure & Terms
    • Auth
    • Webhooks
    • API Paradigms
      • Connections
      • Pagination (Cursors)
      • Client Name Header
  • CRM
    • Leads
    • Contacts
    • Companies
    • Institutions
    • Offers
    • Subjects
  • Bookings
    • Bookings
  • Spaces & Inventory
    • Buildings
    • Unit Types
    • Units
  • Availability
    • Availability
  • Pricing
    • Pricing
    • Product
  • Ecommerce
    • Flow
    • Search
    • Checkout
  • Guest Messaging
    • General
  • Finance & Accounting
    • Invoices
    • Payments
  • Tickets
    • Tickets
    • Tasks
    • Charges
  • Users
    • Queries
      • whoami
    • Mutations
  • Legacy
    • README
    • Auth
    • Create Lead
    • Legacy Azure API
Powered by GitBook
On this page
  • Types
  • Search / List bookings
  • Get booking
  • Create booking
  • Edit booking
  • Delete booking
  1. Bookings

Bookings

Types

type Booking {
    id: ID
    arrivedAt: Date
    averageNightlyRate {
        amountCents: number
        currenyCode
    }
    bookingSource: string
    cancelable: boolean
    cancellationPolicyDescription: string
    checkIn: Date
    checkOut: Date
    confirmationCode: string
    confirmedAt: Date
    conversationId: ID
    departedAt: Date
    editable: boolean
    externalBookingId: string
    externalInquiryId: string
    guestsCount: number
    platform: string
    listingId: ID
    nightsCount: number
    notes: string
    status: string
    vetting {
        status: string
    }
}

Search / List bookings

input BookingsSearchQueryInput {
   workspaceIds: ID[]
}

query {
    bookings {
       search(
          q: BookingsSearchQueryInput
       ) {
          edges {
             node {
                # Booking
             }
          }
       }   
    }
}

* For brevity cursor types have been excluded - See Pagination (Cursors)

** For brevity most connection keys have been excluded - See Connections

Get booking

query {
    booking(bookingId: ID) {
       # Booking
    }
}

Create booking

mutation {
    bookings {
       create(
          data: {
            ...Booking,
            payments: [PaymentId]
          }
       ) {
          # Booking
       }   
    }
}

Edit booking

mutation {
    bookings {
       update(
          bookingId: ID
          data: Booking
       ) {
          # Booking
       }   
    }
}

Delete booking

mutation {
    bookings {
       delete(
          bookingId: ID
       ) 
    }
}
PreviousSubjectsNextBuildings

Last updated 10 months ago