Clinia
API ReferenceREST API

Ingest FHIR R4

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

Submits a FHIR R4 Bundle or single resource for ingestion. Returns an IngestExecutionEnvelope immediately with status pending or running. Pass ?wait=<ms> (max 30 000) to block until the execution reaches a terminal status. Multiple ingest calls for the same registry key accumulate sources; entity resolution re-runs after each call.

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}$

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

FHIR R4 Bundle or single resource to ingest.

TypeScript Definitions

Use the request body type in TypeScript.

FHIR R4 Bundle or single resource

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/patients/string/ingest/fhir" \  -H "Content-Type: application/json" \  -d '{    "property1": null,    "property2": null  }'
{  "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"  }}