Skip to main content
The endpoints.ts module provides type-safe methods for all Zenoti REST API endpoints. Each function is a thin wrapper around zenotiRequest() that handles URL construction and parameter serialization.

Centers (Locations)

listCenters()

List all centers (locations) in the organization.
export async function listCenters(): Promise<ZenotiCenter[]>
return
ZenotiCenter[]
Array of center objects with full details (address, timezone, rooms, etc.)
Example:
import { listCenters } from '@/integrations/zenoti'

const centers = await listCenters()
console.log(`Found ${centers.length} locations`)

centers.forEach(c => {
  console.log(`${c.display_name} (${c.city}, ${c.state.code})`)
})

getCenter()

Get details for a single center.
export async function getCenter(centerId: string): Promise<ZenotiCenter>
centerId
string
required
Zenoti center ID
return
ZenotiCenter
Full center details
Example:
const center = await getCenter('abc123')
console.log(`${center.name} has ${center.rooms.length} rooms`)

Services

listServices()

List all services offered at a specific center.
export async function listServices(
  centerId: string,
): Promise<ZenotiService[]>
centerId
string
required
Zenoti center ID
return
ZenotiService[]
Array of services with pricing, duration, and category
Example:
const services = await listServices('abc123')

// Filter active services
const active = services.filter(s => s.is_active)

// Group by category
const byCategory = active.reduce((acc, s) => {
  const cat = s.category.name
  acc[cat] = [...(acc[cat] || []), s]
  return acc
}, {})

getService()

Get a single service’s details.
export async function getService(
  centerId: string,
  serviceId: string,
): Promise<ZenotiService>
centerId
string
required
Zenoti center ID
serviceId
string
required
Zenoti service ID
return
ZenotiService
Full service details

Guests (Clients)

searchGuests()

Search guests at a center with text query and pagination.
export async function searchGuests(
  params: GuestSearchParams,
): Promise<ZenotiGuest[]>
params
GuestSearchParams
required
Search parameters object
params.centerId
string
required
Center ID to search within
params.query
string
Text search on name, email, or phone
params.page
number
default:1
Page number (1-indexed)
params.size
number
default:100
Results per page (max 200)
return
ZenotiGuest[]
Array of guest profiles
Examples:
const results = await searchGuests({
  centerId: 'abc123',
  query: 'sarah johnson',
})

getGuest()

Get a single guest’s full profile.
export async function getGuest(guestId: string): Promise<ZenotiGuest>
guestId
string
required
Zenoti guest ID
return
ZenotiGuest
Complete guest profile with personal info, loyalty points, visit history

listGuestAppointments()

List past and upcoming appointments for a guest.
export async function listGuestAppointments(
  guestId: string,
  opts?: {
    startDate?: string
    endDate?: string
    page?: number
    size?: number
  },
): Promise<ZenotiAppointment[]>
guestId
string
required
Zenoti guest ID
opts.startDate
string
ISO date (YYYY-MM-DD) — filter appointments after this date
opts.endDate
string
ISO date (YYYY-MM-DD) — filter appointments before this date
opts.page
number
default:1
Page number
opts.size
number
default:100
Results per page
return
ZenotiAppointment[]
Array of appointments
Example:
// Get all appointments in March 2026
const appointments = await listGuestAppointments('guest123', {
  startDate: '2026-03-01',
  endDate: '2026-03-31',
})

console.log(`${appointments.length} appointments in March`)

Appointments

listAppointments()

List appointments for a center within a date range. Primary endpoint for the EIP scheduling dashboard.
export async function listAppointments(
  params: AppointmentListParams,
): Promise<ZenotiAppointment[]>
params
AppointmentListParams
required
Query parameters object
params.centerId
string
required
Center ID to fetch appointments for
params.startDate
string
required
ISO date (YYYY-MM-DD) — start of date range
params.endDate
string
required
ISO date (YYYY-MM-DD) — end of date range
params.status
number
Filter by status code:
  • 0 = Booked
  • 1 = Confirmed
  • 2 = Checked-in
  • 4 = Completed
  • 10 = No-show
  • -1 = Cancelled
params.page
number
default:1
Page number
params.size
number
default:200
Results per page (max 200)
return
ZenotiAppointment[]
Array of appointments with full details
Examples:
const appointments = await listAppointments({
  centerId: 'abc123',
  startDate: '2026-03-01',
  endDate: '2026-03-31',
})

getAppointment()

Get a single appointment’s full details.
export async function getAppointment(
  appointmentId: string,
): Promise<ZenotiAppointment>
appointmentId
string
required
Zenoti appointment ID
return
ZenotiAppointment
Full appointment details

listAppointmentsAllCenters()

Fetch appointments across all centers for a date range. Used by EIP dashboard when locationFilter === 'all'.
export async function listAppointmentsAllCenters(
  startDate: string,
  endDate: string,
): Promise<ZenotiAppointment[]>
startDate
string
required
ISO date (YYYY-MM-DD)
endDate
string
required
ISO date (YYYY-MM-DD)
return
ZenotiAppointment[]
Flattened array of appointments from all centers
Implementation (endpoints.ts:288-299):
export async function listAppointmentsAllCenters(
  startDate: string,
  endDate: string,
): Promise<ZenotiAppointment[]> {
  const centers = await listCenters()
  const results = await Promise.all(
    centers.map((c) =>
      listAppointments({ centerId: c.id, startDate, endDate }),
    ),
  )
  return results.flat()
}

Invoices & Revenue

getInvoice()

Retrieve full invoice details including line items, payments, and taxes.
export async function getInvoice(invoiceId: string): Promise<ZenotiInvoice>
invoiceId
string
required
Zenoti invoice ID
return
ZenotiInvoice
Complete invoice with items, payments, tax, and tips
Example:
const invoice = await getInvoice('inv123')

console.log('Total:', invoice.total.amount)
console.log('Tax:', invoice.tax.amount)
console.log('Tips:', invoice.tips.amount)

invoice.items.forEach(item => {
  console.log(`${item.name}: $${item.price.amount}`)
})

listCollections()

Revenue collections for a center over a date range.
export async function listCollections(
  params: CollectionsParams,
): Promise<ZenotiCollection[]>
params
CollectionsParams
required
Query parameters
params.centerId
string
required
Center ID
params.startDate
string
required
ISO date (YYYY-MM-DD)
params.endDate
string
required
ISO date (YYYY-MM-DD)
return
ZenotiCollection[]
Daily revenue summaries with breakdowns by service, product, membership, etc.
Example:
const collections = await listCollections({
  centerId: 'abc123',
  startDate: '2026-03-01',
  endDate: '2026-03-31',
})

const totalRevenue = collections.reduce((sum, c) => sum + c.net_revenue, 0)
console.log(`March revenue: $${totalRevenue.toFixed(2)}`)

Employees / Providers

listEmployees()

List employees at a center.
export async function listEmployees(
  centerId: string,
  opts?: { page?: number; size?: number },
): Promise<ZenotiEmployee[]>
centerId
string
required
Center ID
opts.page
number
default:1
Page number
opts.size
number
default:100
Results per page
return
ZenotiEmployee[]
Array of employee profiles

getEmployeePerformance()

Get employee performance metrics for a date range.
export async function getEmployeePerformance(
  centerId: string,
  startDate: string,
  endDate: string,
): Promise<ZenotiEmployeePerformance[]>
centerId
string
required
Center ID
startDate
string
required
ISO date (YYYY-MM-DD)
endDate
string
required
ISO date (YYYY-MM-DD)
return
ZenotiEmployeePerformance[]
Performance metrics including:
  • Total/completed/cancelled/no-show appointments
  • Total revenue and average ticket
  • Utilization rate
  • Rebooking rate
Example:
const performance = await getEmployeePerformance(
  'abc123',
  '2026-03-01',
  '2026-03-31',
)

performance.forEach(p => {
  console.log(`Employee ${p.employee_id}:`)
  console.log(`  Revenue: $${p.total_revenue}`)
  console.log(`  Avg Ticket: $${p.average_ticket}`)
  console.log(`  Utilization: ${(p.utilization_rate * 100).toFixed(1)}%`)
})

getEmployeeSales()

Get employee sales data (same interface as getEmployeePerformance()).
export async function getEmployeeSales(
  centerId: string,
  startDate: string,
  endDate: string,
): Promise<ZenotiEmployeePerformance[]>

Sales Reports

getSalesReport()

Aggregated sales report for a center. Powers the EIP Revenue Scorecard and DailyMetrics.
export async function getSalesReport(
  params: SalesReportParams,
): Promise<ZenotiSalesReport>
params
SalesReportParams
required
Query parameters
params.centerId
string
required
Center ID
params.startDate
string
required
ISO date (YYYY-MM-DD)
params.endDate
string
required
ISO date (YYYY-MM-DD)
return
ZenotiSalesReport
Sales report with:
  • Period summary (total revenue, bookings, avg ticket, etc.)
  • Daily breakdown (revenue, bookings, no-shows per day)
Example:
const report = await getSalesReport({
  centerId: 'abc123',
  startDate: '2026-03-01',
  endDate: '2026-03-31',
})

console.log('March Summary:')
console.log('  Revenue:', report.summary.total_revenue)
console.log('  Bookings:', report.summary.total_bookings)
console.log('  Avg Ticket:', report.summary.average_ticket)
console.log('  No-Shows:', report.summary.no_shows)

// Daily breakdown
report.daily_breakdown.forEach(day => {
  console.log(`${day.date}: $${day.revenue} (${day.bookings} bookings)`)
})

getSalesReportsAllCenters()

Fetch daily sales reports across all centers for a date range. Powers the “all locations” aggregate view in the dashboard.
export async function getSalesReportsAllCenters(
  startDate: string,
  endDate: string,
): Promise<ZenotiSalesReport[]>
startDate
string
required
ISO date (YYYY-MM-DD)
endDate
string
required
ISO date (YYYY-MM-DD)
return
ZenotiSalesReport[]
Array of sales reports (one per center)
Implementation (endpoints.ts:305-316):
export async function getSalesReportsAllCenters(
  startDate: string,
  endDate: string,
): Promise<ZenotiSalesReport[]> {
  const centers = await listCenters()
  const results = await Promise.all(
    centers.map((c) =>
      getSalesReport({ centerId: c.id, startDate, endDate }),
    ),
  )
  return results
}

Type Reference

All endpoint methods return Zenoti API response types. Type definitions are available in the source code at src/integrations/zenoti/types.ts:
  • ZenotiCenter
  • ZenotiService
  • ZenotiGuest
  • ZenotiAppointment
  • ZenotiInvoice
  • ZenotiCollection
  • ZenotiEmployee
  • ZenotiEmployeePerformance
  • ZenotiSalesReport

Data Mapping

To transform Zenoti types into EIP domain models, use the Data Mappers:
import { listAppointments, mapAppointments } from '@/integrations/zenoti'

const raw = await listAppointments({ centerId, startDate, endDate })
const eipAppointments = mapAppointments(raw) // Appointment[]

Data Mappers

Transform Zenoti responses to EIP types

React Hooks

Query hooks with automatic caching

HTTP Client

Low-level request function

Build docs developers (and LLMs) love