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

    Interface ScheduleRule

    One recurring availability window.

    weekday is 0 = Sunday … 6 = Saturday (JS getDay()), read in the physician's calendar zone. startMinute/endMinute are minutes from local midnight; a window that would cross midnight is entered as two rules.

    interface ScheduleRule {
        id?: string;
        weekday: number;
        startMinute: number;
        endMinute: number;
        timezone?: string | null;
        effectiveFrom?: string | null;
        effectiveUntil?: string | null;
        intervalWeeks?: number | null;
        specialty?: ScheduleSpecialty;
        active?: boolean | null;
    }
    Index
    id?: string

    Server id. Absent on a rule that has not been stored yet.

    weekday: number
    startMinute: number
    endMinute: number
    timezone?: string | null

    Legacy. Every rule of a physician is read in ONE zone — the physician's calendar zone (schedulingTimezone, else the clinic's), set with timezone on the schedule itself — so leave this absent. A value equal to that zone is accepted and stored as null; any other value is refused (rule_zone_mismatch).

    effectiveFrom?: string | null

    Inclusive local-date validity range. Absent = open-ended. Ending a pattern with effectiveUntil rather than deleting it keeps the rule the past appointments were booked against.

    effectiveUntil?: string | null
    intervalWeeks?: number | null

    Repeat every N weeks (default 1 = every week). For N > 1 the rule needs effectiveFrom: the first occurrence is the first weekday on or after it, and the pattern repeats every N × 7 days from there — a fortnightly Tuesday clinic is {weekday: 2, intervalWeeks: 2, effectiveFrom: <its first date>}.

    specialty?: ScheduleSpecialty

    Restrict this window to ONE specialty slug (a dedicated clinic).

    active?: boolean | null

    Soft off-switch: an inactive rule publishes nothing but is kept.