Skip to main content

clinik.schedules

Schedules define a container for time slots that may be available for booking appointments. They link practitioners, locations, or services to their availability windows.

create

const { data, meta } = await clinik.schedules.create(request): Promise<ApiResponse<Schedule>>
FieldTypeRequiredDescription
activebooleanNoWhether the schedule is active (default: true)
serviceCategorystring[]NoBroad categorization of services
serviceTypestring[]NoSpecific service types available
specialtystring[]NoPractitioner specialties
actorIdsstring[]YesReferences to Practitioner, Location, etc.
planningHorizonobjectNoPeriod the schedule covers ()
commentstringNoAdditional comments

Example

const { data } = await clinik.schedules.create({
  active: true,
  serviceCategory: ['General Practice'],
  serviceType: ['Consultation', 'Follow-up'],
  specialty: ['Family Medicine'],
  actorIds: ['Practitioner/dr_smith', 'Location/room_101'],
  planningHorizon: {
    start: '2025-03-01T00:00:00Z',
    end: '2025-06-30T23:59:59Z',
  },
  comment: 'Dr. Smith Monday-Friday schedule for Q2 2025',
});
Same pattern as other resources. Search supports actorId, serviceType, specialty, active, dateFrom, dateTo filters.