Webhook Notification Events

This section details the webhook event notifications a partner will receive during Prism API operations

During processing, the Prism pipeline will send webhook notifications to the partner endpoint registered during onboarding. All notifications will go to a single endpoint, where the consumer can decide how to respond based on the type of event and its payload.

There are three event types for each job of the Prism pipeline: started, succeeded, and failed. The first is sent when a job starts and one of the latter two is sent when the job finishes. Each event notification is a JSON POST request that includes an event type and a payload that is associated with that event type (see below for specifics).

Capture Data Events

The first type of event notification is for capture data validation, which runs automatically after a partner registers a scan and then uploads capture data to Prism:

Capture Data Event
Webhook event type

Capture Data validation started (after a partner uploads capture data to Prism)

capture_data.validation.started

Capture data validated successfully

capture_data.validation.succeeded

Capture data validation failed

capture_data.validation.failed

Capture data event payloads look like the following:

{
  eventType: `capture_data.validation.started` | `capture_data.validation.succeeded` | `capture_data.validation.failed`;
  payload: {
    scanId: string;
    state: `SCAN_WAITING_FOR_CAPTURE_DATA` | `SCAN_VALIDATING_CAPTURE_DATA` | `SCAN_CAPTURE_DATA_VALID` | `SCAN_CAPTURE_DATA_INVALID`
    notificationError?: {
      id: number;
      code: string;
      message?: string;
    }
  }
}

Asset Events

After capture data has successfully validated, a partner may request various asset jobs to run in Prism's pipeline. The webhook event types are classified by asset type, job type, and the state of the job, separated by a period.

The asset types are as follows:

Asset Type
Notification event name

Body

body

Fitted Body

fitted_body

Measurements

measurements

Asset request jobs are all classified under the job type creation. The following are the possibilities of the webhook event types for asset creation:

Asset Event
Webhook event type

Asset creation job started

<asset type>.creation.started

Asset creation job succeeded

<asset type>.creation.succeeded

Asset creation job failed

<asset type>.creation.failed

The asset event payloads are as follows:

{
  eventType: `<asset type>.creation.started` | `<asset type>.creation.succeeded` | `<asset type>.creation.failed`;
  payload: {
    scanId: string;
    state: `ASSET_REQUESTED` | `ASSET_REQUEST_FAILED` | `ASSET_PROCESSING` | `ASSET_SUCCEEDED` | `ASSET_FAILED`
    error?: {
      id: number;
      code: string;
      message?: string;
    }
  }
}

Last updated