Tross
Demo dataBook a demo
ECLINICALWORKS

Download patient document

Download a document from a patient folder.

POSThttps://preview.ontross.com/api/integrations/ecw/download-patient-document
Request Fields
input.patient_id
string
required
eCW PatientId
Example
"407069"
input.folder_name
string
required
Patient Documents folder name
Example
"Progress Notes"
input.document_name
string
required
Document display name from list-patient-document-folders
Example
"Progress Note 03-14-2026"
auth_id
string
required
Saved connection to run this operation through, from the Authentication page. It decides which practice and login the call uses.
Example
"00000000-0000-4000-8000-000000000000"
Output Fields
documents
array
Documents in the folder, or the PDFs this call saved.
documents[].doc_id
string
Position in the download batch, not an eCW document id.
Example
"1"
documents[].custom_name
string
Document display name you asked to download.
Example
"Progress Note 03-14-2026"
documents[].file_name
string
Source filename from eCW, or the saved PDF's name.
Example
"Progress_Note_03-14-2026.pdf"
documents[].pdf_path
string
Saved PDF path in the run archive, or an attachment reference.
Example
"archive/Progress_Note_03-14-2026.pdf"
documents[].method
string
Always ui_print_download, meaning the browser print flow produced it.
Example
"ui_print_download"
documents[].has_text
boolean
Whether the saved PDF holds selectable text, but always null today.
Example
true
failures
array
Documents that could not be downloaded, each with a reason.
failures[].doc_id
string
Position in the download batch, not an eCW document id.
Example
"1"
failures[].custom_name
string
Document display name you asked to download.
Example
"Progress Note 03-14-2026"
failures[].file_name
string
Source filename from eCW, or the saved PDF's name.
Example
"Progress_Note_03-14-2026.pdf"
failures[].error
string
Why this document could not be downloaded.
Example
"Document not found in the selected folder."
Code
curl --request POST \
  --url https://preview.ontross.com/api/integrations/ecw/download-patient-document \
  --header 'X-API-Key: REPLACE_KEY_VALUE' \
  --header 'content-type: application/json' \
  --data '{"input":{"patient_id":"407069","folder_name":"Progress Notes","document_name":"Progress Note 03-14-2026"},"auth_id":"auth_uuid_here"}'
Request BODY
{
  "input": {
    "patient_id": "407069",
    "folder_name": "Progress Notes",
    "document_name": "Progress Note 03-14-2026"
  },
  "auth_id": "auth_uuid_here"
}
Response BODY
{
  "id": "string",
  "workflow_id": "string",
  "auth_id": "string",
  "status": "string",
  "input": {},
  "output": {
    "documents": [
      {
        "doc_id": "1",
        "custom_name": "Progress Note 03-14-2026",
        "file_name": "Progress_Note_03-14-2026.pdf",
        "pdf_path": "archive/Progress_Note_03-14-2026.pdf",
        "method": "ui_print_download",
        "has_text": true
      }
    ],
    "failures": [
      {
        "doc_id": "1",
        "custom_name": "Progress Note 03-14-2026",
        "file_name": "Progress_Note_03-14-2026.pdf",
        "error": "Document not found in the selected folder."
      }
    ]
  },
  "files": null,
  "created_at": "2019-08-24T14:15:22Z",
  "started_at": "2019-08-24T14:15:22Z",
  "completed_at": "2019-08-24T14:15:22Z"
}