Upload document
Upload document in Athena
Upload a file
Send multipart/form-data with auth_id, input serialized as JSON text, and exactly one original file in files. Let your HTTP client set the Content-Type boundary. In Try it, select a connection, fill in the input fields and choose the file.
Before uploading to Athena
Supply the patient ID, expected DOB and expected current department. Athena patient context and file limits are checked internally during upload. Use fetch-document-options when you need to look up labels, providers, assignees or current file limits; it is optional for upload.
Set expected_file_sha256 to the SHA-256 of the exact file bytes (64 lowercase hex characters). Use shasum -a 256 document.pdf on macOS or sha256sum document.pdf on Linux. Accepted types are PDF, PNG, JPEG, TIFF, BMP and GIF, subject to the limits returned by fetch-document-options and a 50 MiB API cap.
11"2026-01-01"1"CLINICALDOCUMENT"CLINICALDOCUMENT1"string"curl 'https://preview.ontross.com/api/integrations/athena/upload-document' \
-H 'X-API-Key: YOUR_API_KEY' \
--form-string 'auth_id=YOUR_AUTH_ID' \
--form-string 'input={"org_id":1,"patient_id":1,"expected_dob":"2026-01-01","expected_department_id":1,"document_class":"CLINICALDOCUMENT","external_document_reference":"string","expected_file_sha256":"string","department_id":1}' \
-F 'files=@document.pdf;type=application/pdf'{
"org_id": 1,
"patient_id": 1,
"expected_dob": "2026-01-01",
"expected_department_id": 1,
"document_class": "CLINICALDOCUMENT",
"external_document_reference": "string",
"expected_file_sha256": "string",
"department_id": 1
}{
"id": "string",
"workflow_id": "string",
"auth_id": "string",
"status": "string",
"input": {},
"output": {
"outcome": "created",
"phase": "validated",
"document": {
"document_id": "string",
"patient_id": "string",
"chart_id": "string",
"department_id": "string",
"document_class": "string",
"label_id": "string",
"label_name": "string",
"provider_username": "string",
"source_status": "string",
"actual_assignee_username": "string",
"document_date": "2019-08-24",
"pin_action_note_to_top": true,
"version_token": "string",
"action_note_id": "string",
"allowed_actions": [
"string"
],
"pin_semantics": "action_note",
"chart_top_visibility_verified": true
},
"file_sha256": "string",
"file_verified": true,
"warnings": [
"string"
]
},
"files": null,
"created_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
}