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
  1. Ecommerce

Search

Simply retrieving inventory, availability, and pricing information separately is often insufficient. Users typically need a unified search results page that combines these elements, allowing them to search, sort, and filter to find their perfect place to stay.

This suite of APIs is designed to support these use cases, providing the necessary tools to create a cohesive and user-friendly search experience.

enum AccommodationType # See information from Unit

enum CancellationPolicyType {
  Flexible,
  NonFlexible
}

input SearchQueryInput = {
  filters: {
    geo: {
      country: [ISO3166_1],
    },
    amenitities: [string],
    unitType: {
      accommodationType: [AccommodationType],
      bedrooms: {
        min: number,
        max: number
      },
      bathrooms: {
        min: number,
        max: number,
      },
      accommodates: {
        min: number,
        max: number,
      }
    }
    
    ratePlans: {
      policies: {
       cancellation: [CancellationPolicyType]
      }
      
      # As days
      lengthOfStay: {
        min: number,
        max: number,
      }
    }
  },
  
  sort: {
    attribute: 'price' | 'name',
    order: 'asc' | 'desc'
  }
}

query {
  ecommerce {
      # This query supports our pagination system
      searchByUnitType($q: SearchQueryInput) {
        edges {
            node {
              unitType {
                # See 
              }
              ratePlans {
                # See rate plan information
              }
            }
        }
      }
  }
}
PreviousFlowNextCheckout

Last updated 10 months ago