Upload document
Uploads a clinical PDF or image for OCR and emits an unstructured_report or clinical_note event log.
POST
sdk:event-log
The SDK requests a presigned URL, PUTs the binary (with matching Content-Type), commits, and returns a DocumentHandle — call wait() or poll() until log_emitted or ocr_failed. You choose log_type and labels; the platform does not infer them from the file. See the resource ingestion guide for supported formats and the textize/OCR pipeline.
Parameters
str
required
Olira patient id that owns the document.
str | Path
required
Local filesystem path to a PDF or supported image (max 100 MB).
DocumentLogType | str
required
“unstructured_report” (requires document_type) or “clinical_note” (requires note_type + source).
datetime
required
Clinical timestamp for the emitted event log (timezone-aware preferred).
str
required
Stable key for this document; reusing after leaving pending_upload returns 409.
str | None
Required for unstructured_report. Catalog enum (e.g. clinical_note, lab_report, discharge_summary).
str | None
Required for clinical_note. Catalog enum (e.g. progress_note, history_and_physical).
Any | None
Required for clinical_note (e.g. ehr_integration, manual_entry, or structured Source).
str | None
MIME type override; defaults from filename (application/pdf, image/png, …).
bool
default:"False"
When True, block until a terminal status before returning the handle.
float
default:"600.0"
Timeout for wait=True / handle.wait().
Returns
DocumentHandle — Poll/wait handle; .document is the current DocumentResource snapshot.
str
Document resource id.
DocumentStatus
pending_upload | uploaded | ocr_running | ocr_complete | log_emitted | ocr_failed.
str | None
Emitted event log id when status is log_emitted.
int | None
Pages processed by OCR when available.
str | None
Failure detail when status is ocr_failed.
Guide: /send-data/resource-ingestion.
On the presigned PUT, send Content-Type matching the upload-url request; omit the SDK Authorization header.
There is no human confirmation on this path — commit starts OCR immediately.

