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 units
  • Get unit
  • Edit unit
  • Delete unit
  1. Spaces & Inventory

Units

See Structure & Terms for information on what a unit is.

Types

type Unit {
    accessDescription: string
    additionalInformation: string
    approximateAnnualAvailableNights: number
    cadastral: string
    code: string
    currencyCode: string
    dedicatedRental: boolean
    editable: boolean
    locationDescription: string
    manualPricingEnabled: boolean
    marketingTitle: string
    marketingDescription: string
    maxOccupants: number
    numberOfBathrooms: number
    numberOfBedrooms: number
    sizeInSqm: number
    spaceDescription: string

    transitDescription: string
    vat: number
    editable: boolean
    editableAddress: boolean
    residential: boolean
    belongsToMultiUnitGroup: boolean
    coverImage: string
    translations: Translation[] # See the building type
    address: Address # See the building type
}

Search / List units

input UnitSearchQueryInput {
   workspaceIds: ID[]
   buildingIds: ID[]
   unitTypeIds: ID[]
}

query {
    spaces {
       units {
          search(
             q: UnitSearchQueryInput
          ) {
             edges {
                node {
                   # Unit
                }
             }
          }   
       }
    }
}

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

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

Get unit

query {
    spaces {
       unit(unitId: ID) {
          # Unit
       }
    }
}

In addition to the unit type data. You can also use the unitType subquery for accessing the list of unit type this unit belongs to. See Unit Types for more information.

Edit unit

mutation {
    spaces {
       units {
          update(
             unitId: ID
             data: Unit
          ) {
             # Unit
          }   
       }
    }
}

Delete unit

mutation {
    spaces {
       units {
          delete(
             unitId: ID
          ) 
       }
    }
}
PreviousUnit TypesNextAvailability

Last updated 1 year ago