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

    Interface TelehealthConsultResource

    A live (video) telehealth consult.

    The patient joins through the <natzar-telehealth> embed (or the /join route of a headless integration); the physician takes the call in the Natzar portal, or in YOUR portal through the physician-side routes (/room hands them the LiveKit grant). Once the call completes, a composite recording and (for English calls) a transcript are produced asynchronously — the telehealth.recording_ready webhook fires when they are available.

    interface TelehealthConsultResource {
        id: string;
        patientId: string;
        externalPatientId?: string;
        patient?: PatientSummary;
        status: TelehealthStatus;
        context?: string;
        patientState?: string;
        patientLang?: PatientLang;
        practitioner?: { id: string; externalId?: string; name?: string };
        practitionerLastSeenAt?: string;
        enqueuedAt?: string;
        ringingAt?: string;
        position?: number;
        messagedDuringCall?: boolean;
        createdAt: string;
        sentAt?: string;
        joinableUntil?: string;
        mode?: "scheduled" | "queue";
        specialty?: string;
        scheduledAt?: string;
        scheduledEndAt?: string;
        patientTimezone?: string;
        startedAt?: string;
        endedAt?: string;
        recordingUrl?: string;
        transcript?: TelehealthTranscript;
        rating?: TelehealthRating;
        origin: ConsultOrigin;
    }
    Index
    id: string

    Consult id (also the webhook consultId and the embed token subject).

    patientId: string

    Our id of the patient.

    externalPatientId?: string

    Your id of the patient, when API-provisioned.

    patient?: PatientSummary

    The patient's header card — see PatientSummary. Present on reads made with a physician credential; absent on key-only reads.

    Current lifecycle state.

    context?: string

    Clinical context you supplied at creation — the physician's handoff summary.

    patientState?: string

    Where the patient is (ISO 3166-2 subdivision, no country prefix), as recorded for licensure routing. Absent when never captured.

    patientLang?: PatientLang

    The patient's locale as it was when this consult was minted — what the live-queue matcher and book rank the physicians against (see ./languages). FROZEN on the row, distinct from patient.lang (the patient's CURRENT setting): the routing truth for THIS consult. Absent on consults minted before the language was recorded.

    practitioner?: { id: string; externalId?: string; name?: string }

    The physician who took (or is on) the call. Absent until claimed.

    Type Declaration

    • id: string

      Our physician id.

    • OptionalexternalId?: string

      Your id of the physician, when API-provisioned.

    • Optionalname?: string

      Display name, if their profile has one.

    practitionerLastSeenAt?: string

    The physician's last heartbeat on THIS consult (booked appointments only — the live queue tracks presence on the physician, not the row). How a waiting room knows the clinician is on their way.

    enqueuedAt?: string

    When the patient entered the live queue (mode: 'queue'). Cleared once the consult leaves waiting, so it is the honest "waiting since" for a queue display and the source of TelehealthQueueEntry.waitedSeconds.

    ringingAt?: string

    When the current ring started — a physician was reserved and the patient's client is being asked to confirm. Present while ringing; cleared when the call starts or the ring times out back to waiting.

    position?: number

    1-based place in the live queue. Present only while status === 'waiting' on reads made with a physician credential (the same number the patient's /join reports to them).

    messagedDuringCall?: boolean

    True when the in-call chat was used — either side sent a message while the room was open. Set once, never cleared; end reads it to decide whether the patient needs telling what their conversation goes back to.

    createdAt: string

    When the consult was created.

    sentAt?: string

    When the invite went out (creation time for API-origin consults).

    joinableUntil?: string

    When this consult stops being joinable, for invites that carry a window.

    Consults our own conversation flow opens are reachable for 10 minutes — long enough to walk to a quiet room, short enough that a link in a message history is not a standing door. Absent means no window: partner-originated consults are governed by your own authentication instead, and never expire on their own.

    Render a join control only while this is in the future. join enforces the same rule server-side (answering status: 'expired'), so a button left on screen is a UI bug rather than a way in — but a button that silently stops working is exactly the thing that reads as broken.

    mode?: "scheduled" | "queue"

    Which live modality this consult is (docs/SCHEDULED-CONSULTS.md): queue — the on-demand waiting room, matched to the first eligible physician who is ready; scheduled — a booked appointment at a fixed time with a named physician. Absent means queue, which is every consult created before scheduled booking existed.

    specialty?: string

    The tenant specialty slug this consult was routed to, if any.

    scheduledAt?: string

    The booked start, for mode: 'scheduled' once a slot has been taken.

    scheduledEndAt?: string

    The booked end (the consultation, without the tenant's buffer).

    patientTimezone?: string

    The IANA zone the PATIENT booked from — patientTimezone on the booking call, or the device zone of the surface they booked on. Absent when the booking sent none (notices then use the clinic's zone). On an agenda, show the patient's clock from it when it differs from the physician's.

    startedAt?: string

    When the call went live (physician joined).

    endedAt?: string

    When the call ended.

    recordingUrl?: string

    Short-lived presigned URL of the composite call recording, minted fresh on every GET once the recording exists. Never persist the URL. Omitted in webhook payloads — re-read GET /v1/telehealth-consults/{id} after telehealth.recording_ready.

    Machine transcript, once produced (English calls only).

    The rating, once submitted. Write-once.

    Who opened it — see ConsultOrigin.