The Context Engine Studio is now open source.  View on GitHub →
Clinia
API ReferenceREST API

Ingest CDA R2

POST
/v1/patients/{patientId}/ingestions/cda/r2

Submits CDA R2 documents as XML. Post one document as the request body with Content-Type: application/cda+xml, or several as multipart/form-data with one documents part per document.

The response is a receipt: ingestion continues after it is returned, so poll the ingestion to follow it. intake comes back index-aligned with the documents you sent, so it stays clear which document held what — and if any document cannot be parsed the whole request is rejected and nothing is stored.

Authorization

Bearer write
AuthorizationBearer <token>

Each operation lists the OAuth scope (read or write) it requires.

In: header

Scope: write

Path Parameters

patientId*string

ID of the patient

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

Request Body

One CDA document, or several as multipart parts.

TypeScript Definitions

Use the request body type in TypeScript.

body*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/patients/string/ingestions/cda/r2" \  -H "Content-Type: application/cda+xml" \  -d 'string'
{  "ingestionId": "string",  "source": "fhir/r4",  "mimeType": "string",  "receivedAt": "string",  "status": "pending",  "staged": {    "facts": 0,    "events": 0,    "narratives": 0  },  "intake": [    {      "unit": "resource",      "received": 0,      "entries": [        {          "kind": "string",          "label": "string",          "count": 1,          "outcome": "structured",          "reason": "unsupported"        }      ]    }  ],  "startedAt": "string",  "completedAt": "string",  "failure": {    "code": "string",    "message": "string"  }}