# Webhooks ## Domain Types ### Report Delivered Event - `class ReportDeliveredEvent:` Webhook event sent when a report is completed. This is an asynchronous notification - respond with a simple acknowledgment. - `String id` Unique webhook event ID. Format: whe_{32-hex-chars} - `Data data` Event payload containing report and study information - `String presignedUrl` Presigned URL for PDF download. Time-limited, typically valid for 1 hour. - `String reportId` Avara report ID. Format: rep_{32-hex-chars} - `String studyId` Avara study ID. Format: stu_{32-hex-chars} - `Optional plainText` Report plain text content (optional). Contains the full report text. - `JsonValue; type "report.delivered"constant` Event type identifier - `REPORT_DELIVERED("report.delivered")` ### Report Delivered Response - `class ReportDeliveredResponse:` Response expected by Avara for report delivery webhook. Simple acknowledgment. - `boolean success` Acknowledgment of receipt. Return true to confirm delivery. ### Study Access Requested Event - `class StudyAccessRequestedEvent:` Webhook event sent when Avara needs presigned URLs for DICOM images. This is a synchronous webhook - you must respond with the URLs within the request timeout. - `String id` Unique webhook event ID. Format: whe_{32-hex-chars} - `Data data` Event payload containing study information - `String studyId` Avara study ID. Format: stu_{32-hex-chars} - `String studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') - `JsonValue; type "study.access_requested"constant` Event type identifier - `STUDY_ACCESS_REQUESTED("study.access_requested")` ### Study Access Requested Response - `class StudyAccessRequestedResponse:` Response expected by Avara for study access webhook. Provide presigned URLs for DICOM images. - `boolean authorized` Whether access is authorized for this study - `List urls` Flat list of presigned URLs for DICOM images. Include all image URLs for the study. - `Optional error` Error message if authorization failed or URLs cannot be provided ### Webhook Event - `class WebhookEvent: A class that can be one of several variants.union` Union of all Avara webhook event types. Use the 'type' field to discriminate between event types. Events: study.access_requested (synchronous), report.delivered (asynchronous). - `class StudyAccessRequestedEvent:` Webhook event sent when Avara needs presigned URLs for DICOM images. This is a synchronous webhook - you must respond with the URLs within the request timeout. - `String id` Unique webhook event ID. Format: whe_{32-hex-chars} - `Data data` Event payload containing study information - `String studyId` Avara study ID. Format: stu_{32-hex-chars} - `String studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') - `JsonValue; type "study.access_requested"constant` Event type identifier - `STUDY_ACCESS_REQUESTED("study.access_requested")` - `class ReportDeliveredEvent:` Webhook event sent when a report is completed. This is an asynchronous notification - respond with a simple acknowledgment. - `String id` Unique webhook event ID. Format: whe_{32-hex-chars} - `Data data` Event payload containing report and study information - `String presignedUrl` Presigned URL for PDF download. Time-limited, typically valid for 1 hour. - `String reportId` Avara report ID. Format: rep_{32-hex-chars} - `String studyId` Avara study ID. Format: stu_{32-hex-chars} - `Optional plainText` Report plain text content (optional). Contains the full report text. - `JsonValue; type "report.delivered"constant` Event type identifier - `REPORT_DELIVERED("report.delivered")` ### Unsafe Unwrap Webhook Event - `class UnsafeUnwrapWebhookEvent: A class that can be one of several variants.union` Webhook event sent when Avara needs presigned URLs for DICOM images. This is a synchronous webhook - you must respond with the URLs within the request timeout. - `class StudyAccessRequestedEvent:` Webhook event sent when Avara needs presigned URLs for DICOM images. This is a synchronous webhook - you must respond with the URLs within the request timeout. - `String id` Unique webhook event ID. Format: whe_{32-hex-chars} - `Data data` Event payload containing study information - `String studyId` Avara study ID. Format: stu_{32-hex-chars} - `String studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') - `JsonValue; type "study.access_requested"constant` Event type identifier - `STUDY_ACCESS_REQUESTED("study.access_requested")` - `class ReportDeliveredEvent:` Webhook event sent when a report is completed. This is an asynchronous notification - respond with a simple acknowledgment. - `String id` Unique webhook event ID. Format: whe_{32-hex-chars} - `Data data` Event payload containing report and study information - `String presignedUrl` Presigned URL for PDF download. Time-limited, typically valid for 1 hour. - `String reportId` Avara report ID. Format: rep_{32-hex-chars} - `String studyId` Avara study ID. Format: stu_{32-hex-chars} - `Optional plainText` Report plain text content (optional). Contains the full report text. - `JsonValue; type "report.delivered"constant` Event type identifier - `REPORT_DELIVERED("report.delivered")` ### Unwrap Webhook Event - `class UnwrapWebhookEvent: A class that can be one of several variants.union` Webhook event sent when Avara needs presigned URLs for DICOM images. This is a synchronous webhook - you must respond with the URLs within the request timeout. - `class StudyAccessRequestedEvent:` Webhook event sent when Avara needs presigned URLs for DICOM images. This is a synchronous webhook - you must respond with the URLs within the request timeout. - `String id` Unique webhook event ID. Format: whe_{32-hex-chars} - `Data data` Event payload containing study information - `String studyId` Avara study ID. Format: stu_{32-hex-chars} - `String studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') - `JsonValue; type "study.access_requested"constant` Event type identifier - `STUDY_ACCESS_REQUESTED("study.access_requested")` - `class ReportDeliveredEvent:` Webhook event sent when a report is completed. This is an asynchronous notification - respond with a simple acknowledgment. - `String id` Unique webhook event ID. Format: whe_{32-hex-chars} - `Data data` Event payload containing report and study information - `String presignedUrl` Presigned URL for PDF download. Time-limited, typically valid for 1 hour. - `String reportId` Avara report ID. Format: rep_{32-hex-chars} - `String studyId` Avara study ID. Format: stu_{32-hex-chars} - `Optional plainText` Report plain text content (optional). Contains the full report text. - `JsonValue; type "report.delivered"constant` Event type identifier - `REPORT_DELIVERED("report.delivered")`