Bulk Export

Provider Access API

Bulk export lets a provider organization pull every attributed patient's data in one operation, instead of paging through each resource type per patient. It follows the FHIR Async Bulk Data Access asynchronous request pattern: kick off a job, poll for status, then download the resulting NDJSON files.

1 Kick Off an Export

Group/{npi} is a FHIR Group resource whose member list is your organization's attributed patients. The {npi} in the URL must match the NPI on file for the provider organization your access token was issued to — requesting another organization's group returns a 403.

GET https://cms-api.wasatch.org/provider/fhir/r4/Group/YOUR_NPI/$export
Authorization: Bearer ACCESS_TOKEN
Accept: application/fhir+json
Prefer: respond-async

A successful request returns immediately with no body:

HTTP/1.1 202 Accepted
Content-Location: https://cms-api.wasatch.org/provider/fhir/r4/$export-status/3fa85f64-5717-4562-b3fc-2c963f66afa6

The Content-Location header is the status endpoint for this specific job — save it. There is no separate job ID to construct manually; it's whatever follows $export-status/ in that URL.

2 Poll for Status

Poll the Content-Location URL from step 1. Three outcomes are possible:

Status Meaning
202 Accepted Still running. Respect the Retry-After header before polling again.
200 OK Complete. The response body is the export manifest (below).
500 Internal Server Error The job failed. The response body is a FHIR OperationOutcome describing the failure.
GET https://cms-api.wasatch.org/provider/fhir/r4/$export-status/3fa85f64-5717-4562-b3fc-2c963f66afa6
Authorization: Bearer ACCESS_TOKEN

Completed job manifest (200 OK):

{
  "transactionTime": "2026-07-29T14:32:10Z",
  "request": "https://cms-api.wasatch.org/provider/fhir/r4/Group/YOUR_NPI/$export",
  "requiresAccessToken": true,
  "output": [
    { "type": "Patient", "url": "https://cms-api.wasatch.org/provider/fhir/r4/bulkdata/3fa85f64.../Patient.ndjson", "count": 42 },
    { "type": "Condition", "url": "https://cms-api.wasatch.org/provider/fhir/r4/bulkdata/3fa85f64.../Condition.ndjson", "count": 118 }
  ],
  "error": []
}
3 Download the Output Files

Each URL in output is an NDJSON file — one FHIR resource per line, all of the same type. Since requiresAccessToken is true, include the same Bearer token on the download request as you used for the export and status calls.

4 Cancel a Job (Optional)

To abandon a job before it completes, send a DELETE to the same status URL:

DELETE https://cms-api.wasatch.org/provider/fhir/r4/$export-status/3fa85f64-5717-4562-b3fc-2c963f66afa6
Authorization: Bearer ACCESS_TOKEN

A 202 Accepted confirms the cancellation request was accepted. Polling the same status URL afterward returns 404.