Clinia
API ReferenceREST API

Register unstructured document

POST
/v1/patients/{patientId}/ingest/document

Registers an unstructured document by name and MIME type. Used for documents that cannot be parsed as FHIR or CDA (e.g., PDFs). The document is tracked as an ingest source but does not contribute extracted clinical entities.

Path Parameters

patientId*string

Registry key of the patient, as assigned by the caller when the first ingest was submitted.

Match^[A-Za-z0-9._-]{1,128}$

Query Parameters

wait?|

Block up to this many ms for the execution to reach terminal status. 0 or omitted = return immediately with current status.

Range0 <= value <= 30000

Request Body

application/json

Document registration payload containing the file name and optional MIME type.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/patients/patient-123/ingest/document" \  -H "Content-Type: application/json" \  -d '{    "name": "discharge-summary.pdf"  }'
{
  "executionId": "string",
  "status": "pending",
  "sourceLabel": "fhir",
  "deltas": {
    "entitiesAdded": 0,
    "eventsAdded": 0,
    "relsAdded": 0
  },
  "warningsCount": 0,
  "error": {
    "code": "string",
    "message": "string"
  },
  "skippedReason": "string",
  "patient": {
    "id": "string",
    "name": "string"
  },
  "links": {
    "self": "string",
    "patient": "string",
    "blob": "string"
  }
}