Skip to content

Ingest a FHIR batch Bundle

A FHIR R4 `batch` Bundle only (each entry processed independently). A `transaction` Bundle is refused with `422 transaction_not_supported`; other Bundle types go to `$ingest`. `Accept: application/fhir+json` answers a `batch-response` Bundle.

POST
/v1/fhir

A FHIR R4 batch Bundle only (each entry processed independently). A transaction Bundle is refused with 422 transaction_not_supported; other Bundle types go to $ingest. Accept: application/fhir+json answers a batch-response Bundle.

Authorization

AuthorizationBearer <token>

OAuth 2.0 client credentials. private_key_jwt (SMART Backend Services asymmetric) is recommended; client secrets need an IP allowlist or mTLS outside the sandbox.

In: header

Scope: fhir:write

Query Parameters

site?string
Lengthlength <= 64

Header Parameters

Api-Version?enum

Overrides the app's pinned dated version for this request.

Idempotency-Key?string

1–255 characters of [A-Za-z0-9._:-] (a UUID v4 is recommended); never PHI. Stored 24 hours per app.

Request Body

application/fhir+json

TypeScript Definitions

Use the request body type in TypeScript.

A FHIR R4 Bundle (≤ 200 entries). In the sandbox it carries the HTEST test tag (api-platform §4.4).

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/v1/fhir" \  -H "Content-Type: application/fhir+json" \  -d '<meta>    <tag>      <code>HTEST</code>      <system>http://terminology.hl7.org/CodeSystem/v3-ActReason</system>    </tag>  </meta>  <resourceType>Bundle</resourceType>  <type>batch</type>'
{  "entries": [    {      "error": "string",      "eventIds": [        "string"      ],      "fullUrl": "string",      "status": "string"    }  ],  "results": [    {      "edflowEncounterId": "string",      "error": {        "code": "string",        "message": "string",        "path": "string",        "retryable": true      },      "id": "string",      "note": "string",      "status": "accepted",      "warnings": [        {          "code": "string",          "path": "string"        }      ]    }  ],  "summary": {    "accepted": -9007199254740991,    "buffered": -9007199254740991,    "duplicate": -9007199254740991,    "ignored": -9007199254740991,    "quarantined": -9007199254740991,    "rejected": -9007199254740991,    "superseded": -9007199254740991  }}

Was this page helpful?