Natzar Partner API Reference - v1.0.0
    Preparing search index...

    Interface GetPhysicianScheduleResponse

    GET/PUT/PATCH /v1/physicians/{id}/schedule response: the stored document plus its reading over the requested range.

    rules are always the physician's WHOLE rota. exceptions and days are only those touching from..to (the query's range, clamped to MAX_SCHEDULE_RANGE_DAYS; default today → requiredThrough) — page by range to look further ahead. days is the engine's resolution of rules + exceptions for every date of the range (resolveDays in ./schedule), so a surface can draw the calendar without running the engine itself.

    interface GetPhysicianScheduleResponse {
        physicianId: string;
        rules: PhysicianScheduleRule[];
        exceptions: PhysicianScheduleException[];
        days: ResolvedDay[];
        from: string;
        to: string;
        today: string;
        timezone: string;
        clinicTimezone: string;
        schedulingTimezone: string | null;
        upcomingAppointments: number;
        slotMinutes: number;
        scheduleHorizonDays: number;
        requiredThrough: string;
        coveredThrough: string | null;
    }
    Index
    physicianId: string
    days: ResolvedDay[]

    Resolved availability for each date of from..to.

    from: string

    The range exceptions and days describe, inclusive local dates in timezone.

    to: string
    today: string

    Today's local date in timezone — what "today" means on this calendar.

    timezone: string

    The physician's EFFECTIVE calendar zone — schedulingTimezone when set, else clinicTimezone. Every rule, exception, day, from/to and today here is read in it; draw the calendar in it and label it.

    clinicTimezone: string

    The clinic's zone — what timezone falls back to.

    schedulingTimezone: string | null

    The zone this physician chose for their calendar, or null when they follow the clinic (timezone === clinicTimezone). Set or clear it with timezone on PATCH /schedule (null clears).

    upcomingAppointments: number

    How many booked appointments this physician has ahead of them. For the confirmation before a zone change: their rules keep their clock times, these keep their instants and move to the new zone's clock on the calendar — say so with the number.

    slotMinutes: number

    Consultation length, so a calendar can show how many appointments a window holds.

    scheduleHorizonDays: number

    How far ahead the tenant asks its physicians to publish.

    requiredThrough: string

    The date that horizon lands on.

    coveredThrough: string | null

    The last date this physician actually covers without a gap, or null when nothing is published. Compare with requiredThrough to tell a physician their rota is short — the one number that matters to them.