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

    Interface AsyncConsultResource

    An async (messaging-based) physician consult thread.

    The consult's MESSAGES are not embedded here — page them via GET /v1/async-consults/{id}/messages or receive them in real time via the async_consult.message webhook.

    interface AsyncConsultResource {
        id: string;
        patientId: string;
        externalPatientId?: string;
        patient?: PatientSummary;
        status: AsyncConsultStatus;
        closedReason?: AsyncClosedReason;
        context?: string;
        specialty?: string;
        patientState?: string;
        patientLang?: PatientLang;
        mode?: "scheduled" | "live";
        assignedPhysicianId?: string;
        assignedPhysicianExternalId?: string;
        assignedPhysicianName?: string;
        assignedAt?: string;
        previousPhysicianIds?: string[];
        createdAt: string;
        sentAt?: string;
        consentedAt?: string;
        lastActivityAt?: string;
        endedAt?: string;
        emergencyFlaggedAt?: string;
        awaitingPhysicianSince?: string;
        responseDueAt?: string;
        overdue: boolean;
        patientLastMessageAt?: string;
        physicianLastMessageAt?: string;
        resolveRequestedAt?: string;
        resolutionNote?: string;
        autoReassignments?: number;
        rateable: boolean;
        rating?: AsyncConsultRating;
        origin: ConsultOrigin;
    }
    Index
    id: string

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

    patientId: string

    Our id of the patient on the thread.

    externalPatientId?: string

    Your id of the patient, when the patient was API-provisioned.

    patient?: PatientSummary

    The patient's header card — see PatientSummary. Present on reads made with a physician credential (the inbox needs a name per row); absent on key-only reads, which already know their own patients.

    Current lifecycle state.

    closedReason?: AsyncClosedReason

    Why the consult closed. Present exactly when status === 'closed'.

    context?: string

    Clinical context you supplied at creation ("why they're here") — shown to the physician as the handoff summary.

    specialty?: string

    The tenant specialty slug the thread was routed to, if any. Governs who auto-assignment may hand it to; a physician outside it may still claim.

    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 — the value language routing ranked the physicians against (their base language first, then English, then anyone; see ./languages). FROZEN on the row, so it is the routing truth for this thread and can differ from patient.lang, which is the patient's CURRENT setting and moves with every PATCH /v1/patients/{id}. Absent on threads minted before the language was recorded.

    mode?: "scheduled" | "live"

    Which async modality this is (mirrors AsyncConsultMode): live — a thread picked up as soon as a clinician has capacity (the default, and every thread created before booking existed); scheduled — a thread booked for a chosen time. Absent means live.

    assignedPhysicianId?: string

    Our id of the currently assigned physician (or the last assignee on a closed thread). Absent before first assignment.

    assignedPhysicianExternalId?: string

    Your id of the assigned physician, when API-provisioned.

    assignedPhysicianName?: string

    Display name frozen at assignment (e.g. Dr. Sarah Chen, MD).

    assignedAt?: string

    When the current physician was assigned.

    previousPhysicianIds?: string[]

    Prior assignees, oldest first, when the thread was reassigned.

    createdAt: string

    When the consult was created.

    sentAt?: string

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

    consentedAt?: string

    When the patient consented. Absent while invited (or if declined).

    lastActivityAt?: string

    Bumped on every message and lifecycle transition — the natural sort key.

    endedAt?: string

    When the consult reached its terminal state.

    emergencyFlaggedAt?: string

    Set when the platform's safety layer detected a possible emergency in a patient message mid-thread. The patient already received a deterministic emergency response; this flags the thread for clinical attention.

    awaitingPhysicianSince?: string

    Since when the ball has been in the physician's court: set when a patient message lands (or the thread is assigned with one waiting), cleared by the physician's reply. Absent means nothing is waiting on the clinician. The inbox sorts on it — oldest waiting first.

    responseDueAt?: string

    awaitingPhysicianSince + the response SLA (4 hours). Present exactly when awaitingPhysicianSince is; the instant the thread becomes eligible for takeover by another physician, and what a "due in …" badge counts down to.

    overdue: boolean

    True when responseDueAt has passed and the thread is still awaiting the assignee — the takeover condition, evaluated server-side at read time so a client never has to compare clocks. Always present (false when nothing is waiting).

    patientLastMessageAt?: string

    When the patient last wrote on the thread.

    physicianLastMessageAt?: string

    When the assigned physician last replied.

    resolveRequestedAt?: string

    When the physician marked the thread resolved — the start of the patient's acceptance window. Present while resolve_requested and on threads that closed out of it.

    resolutionNote?: string

    The note the physician attached to the resolve, if any.

    autoReassignments?: number

    How many times the SLA sweep moved this thread to another physician without anyone asking. A thread that keeps bouncing is the signal to look at the rota, not the thread.

    rateable: boolean

    Whether the patient may (still) rate this consult. Server-owned: true only for closed threads whose close reason earns a rating prompt and that have not been rated yet.

    The rating, once submitted. Write-once.

    Who opened it — see ConsultOrigin.