Skip to main content

clinik.slots

Slots represent available time periods on a schedule that can be booked as appointments. They define when a practitioner, location, or service is available.

create

const { data, meta } = await clinik.slots.create(request): Promise<ApiResponse<Slot>>
FieldTypeRequiredDescription
scheduleIdstringYesThe schedule this slot belongs to
statusstringYesbusy, free, busy-unavailable, busy-tentative
startstringYesStart time (ISO 8601)
endstringYesEnd time (ISO 8601)
serviceCategorystringNoService category
serviceTypestringNoService type
specialtystringNoRequired specialty
appointmentTypestringNoType of appointment that can be booked
overbookedbooleanNoWhether the slot is overbooked
commentstringNoAdditional comments

Example

// Create available slots for a practitioner's schedule
const { data: slot } = await clinik.slots.create({
  scheduleId: 'sched_dr_smith_mon',
  status: 'free',
  start: '2025-02-03T09:00:00Z',
  end: '2025-02-03T09:30:00Z',
  serviceType: 'General consultation',
  specialty: 'Family Medicine',
  appointmentType: 'routine',
  comment: 'Available for new patients',
});

// Mark a slot as busy
await clinik.slots.update('slot_abc123', {
  status: 'busy',
});
Same pattern as other resources. Search supports scheduleId, status, serviceType, specialty, dateFrom, dateTo filters.