Tross
Demo dataBook a demo
ATHENA

Upload document

Upload document in Athena

POSThttps://preview.ontross.com/api/integrations/athena/upload-document

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.

Request Fields
auth_id
string
required
Saved connection to run this operation through, from the Authentication page. It decides which practice and login the call uses.
input.org_id
integer
required
Org id
Example
1
input.patient_id
integer
required
Patient id
Example
1
input.expected_dob
string
required
Expected dob
Example
"2026-01-01"
input.expected_department_id
integer
required
Expected department id
Example
1
input.document_class
string
required
Document class
Example
"CLINICALDOCUMENT"
Accepted values
CLINICALDOCUMENT
input.expected_file_sha256
string
required
Expected file sha256
input.department_id
integer
required
Runtime Athena context department; distinct from the portal route number.
Example
1
input.external_document_reference
string
Optional caller reference for run history; no uniqueness check.
Example
"string"
files
file
required
Exactly one original document file; send its bytes, not a path or base64 string.
Output Fields
outcome
string
Outcome
phase
string
Phase
document
object
Output object.
document.document_id
string
Source identifiers remain strings.
document.patient_id
string
Source identifiers remain strings.
document.chart_id
string
Source identifiers remain strings.
document.department_id
string
Source identifiers remain strings.
document.document_class
string
Document class
document.label_id
string
Label id
document.label_name
string
Label name
document.provider_username
string
Provider username
document.source_status
string
Source status
document.actual_assignee_username
string
Actual assignee username
document.document_date
string
Document date
document.pin_action_note_to_top
boolean
Pin action note to top
document.version_token
string
Version token
document.action_note_id
string
Action note id
document.allowed_actions
array
Allowed actions
document.pin_semantics
string
Pin semantics
document.chart_top_visibility_verified
boolean
Chart top visibility verified
file_sha256
string
File sha256
file_verified
boolean
File verified
warnings
array
List of warnings.
Code
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'
input form field (JSON)
{
  "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
}
Response BODY
{
  "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"
}