⌘K
All guides
FHIR· 12 min

Bulk FHIR Export ($export)

Initiate SMART Backend Services bulk export, poll async jobs, and download NDJSON resource files.

  1. 1

    Obtain system scopes

    Bulk export requires SMART Backend Services scopes: system/*.read or system/Patient.read. Register an OAuth client with these scopes from the tokens page.

    bash
    https://developers.parkerapex.com/scopes
  2. 2

    Request an export job

    GET /fhir/R4/$export returns HTTP 202 with a Content-Location header for polling. Use _type to filter resource types and _since for incremental exports.

    bash
    "text">-amber-300 font">-semibold">curl "text-cyan-300">-s "text-cyan-300">-D - "https://api.parkerapex.com/fhir/R4/\$export?_type=Patient,Observation&_since=2026-01-01T00:00:00Z" \
      "text-cyan-300">-H "Authorization: Bearer YOUR_TOKEN" \
      "text-cyan-300">-H "Accept: application/fhir+json"
  3. 3

    Poll export status

    Poll the Content-Location URL until the job completes. Status transitions: in-progress → complete.

    bash
    "text">-amber-300 font">-semibold">curl "text-cyan-300">-s "https://api.parkerapex.com/fhir/R4/\$export">-poll-status?_jobId=YOUR_JOB_ID" \
      "text-cyan-300">-H "Authorization: Bearer YOUR_TOKEN"
  4. 4

    Download NDJSON files

    When complete, the status response includes output URLs for each resource type as NDJSON files. Download and parse line-by-line.

  5. 5

    Lake bulk export

    The FHIR Data Lake also supports HAPI bulk export for longitudinal analytics workloads.

    bash
    "text">-amber-300 font">-semibold">curl "text-cyan-300">-s "text-cyan-300">-D - "https://lake.parkerapex.com/fhir/R4/\$export?_type=Patient" \
      "text-cyan-300">-H "Authorization: Bearer YOUR_TOKEN"

Related