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

    Interface PhysicianPresence

    A physician's LIVE-QUEUE presence — whether the telehealth matcher may hand them a waiting patient right now. Independent of asyncAvailable (the messaging inbox) and of the booked-appointment rota: a physician can be off the live queue and still receive async threads or keep appointments.

    Presence is a HEARTBEAT: ready holds only while heartbeats keep arriving. The TTL is PHYSICIAN_PRESENCE_TTL_SECONDS (45 s); beat every PHYSICIAN_HEARTBEAT_INTERVAL_SECONDS (15 s) via POST /v1/physicians/{id}/heartbeat, and a client that simply stops beating drops to offline on its own — a closed laptop never keeps a physician on the rota.

    interface PhysicianPresence {
        status: "ready" | "busy" | "offline";
        readyAt?: string;
        lastSeenAt?: string;
        activeConsultId?: string;
        stale?: boolean;
    }
    Index
    status: "ready" | "busy" | "offline"
    • ready — accepting live patients; the matcher may ring them. Requires a fresh heartbeat (within the TTL) on top of the stored flag.
    • busy — on a call, or explicitly paused; the matcher skips them.
    • offline — not on the live queue, OR ready whose heartbeat lapsed (then stale is true so a UI can say "you were signed off" rather than "you are off").
    readyAt?: string

    When they last went ready. Cleared on busy/offline.

    lastSeenAt?: string

    Their last heartbeat, whatever the status.

    activeConsultId?: string

    The telehealth consult they are currently on (or being rung for) — the id to feed POST /v1/telehealth-consults/{id}/room. Absent when idle.

    stale?: boolean

    True when the stored flag says ready but the heartbeat is older than the TTL, so the platform treats them as offline. Resume by posting presence {ready: true} again (a heartbeat alone does not revive a stale row).