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

    Interface PartnerEventResource

    A stored webhook event, as returned by GET /v1/events — the durable replay log behind webhook delivery. Every event is written here BEFORE any delivery attempt, so polling this endpoint is a complete, ordered substitute for (or reconciliation against) receiving webhooks.

    type/data carry exactly the discriminated payloads documented in ./webhooks (WebhookEvent); data is typed unknown here to keep this module dependency-free — narrow it via the type field using the webhook union.

    interface PartnerEventResource {
        id: string;
        type: string;
        partnerId: string;
        consultId?: string;
        data: unknown;
        createdAt: string;
        deliveredAt?: string;
        attempts: number;
        lastStatus?: number;
    }
    Index
    id: string

    Event id — same id the webhook envelope carried (deduplication key).

    type: string

    Event name, e.g. async_consult.assigned. See ./webhooks.

    partnerId: string

    Your partner id.

    consultId?: string

    The consult the event concerns, when applicable.

    data: unknown

    Event payload — the data member of the webhook envelope.

    createdAt: string

    When the event occurred (webhook createdAt).

    deliveredAt?: string

    When a webhook delivery last succeeded (2xx). Absent if not yet delivered.

    attempts: number

    Number of delivery attempts so far (0 when no webhookUrl is configured).

    lastStatus?: number

    HTTP status of the most recent delivery attempt, if any.