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 contacts
  • Get contact
  • Edit contact
  • Delete contact
  1. CRM

Contacts

Types

type ContactEmail {
    email: string # Email
    tier: string # "primary" | "secondary"
}

type PhoneNumber {
    phoneNumber: string
    tier: string # "primary" | "secondary"
}

type CrmContact {
    id: ID
    dateOfBirth: Date
    firstName: string
    lastName: string
    languageCode: string
    notes: string
    email: string # Proxy for primary email in emails list
    emails: ContactEmail[]
    phoneNumber: string # Proxy for primary phone number in phone numbers list
    phoneNumbers: PhoneNumber[]
    source: string
    consent {
        marketing {
            email: boolean
            phone: boolean   
        }
        privacyPolicy: boolean
    }
    address: Address # See building type
    companies: CrmCompany[] # See crm company
    nationality: string
    pronoun: string
    title: string
    contactType: string
    identification {
        idNumber: string
        countryOfIssue: string
        validFrom: Date
        expires: Date
    }
}

Search / List contacts

input CrmContactsSearchQueryInput {
   workspaceIds: ID[]
}

query {
    crm {
       contacts {
          search(
             q: CrmContactsSearchQueryInput
          ) {
             edges {
                node {
                   # CrmContact
                }
             }
          }   
       }
    }
}

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

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

Get contact

query {
    crm {
       contact(contactId: ID) {
          # CrmContact
       }
    }
}

Edit contact

mutation {
    crm {
       contacts {
          update(
             contactId: ID
             data: CrmContact
          ) {
             # CrmContact
          }   
       }
    }
}

Delete contact

mutation {
    crm {
       contacts {
          delete(
             contactId: ID
          ) 
       }
    }
}
PreviousLeadsNextCompanies

Last updated 1 year ago