# FHIR R4 API

Canonical URL: https://docs.chartvoyant.com/fhir-r4/
Endpoint: `Base URL https://fhir.chartvoyant.com/r4/{practice}`

A standards-based FHIR R4 server for each practice, conforming to US Core 6.1. Apps authorized with SMART on FHIR read and search a patient's record, or a practice's records with a backend token.

## At a glance

| Status | Read and search are live in production. Create and update for seven types are deployed and turned on per practice and app; see [SMART write](https://docs.chartvoyant.com/smart-write/). Patch, delete, history, batch, and transaction are not supported. |
| --- | --- |
| Base URL | `https://fhir.chartvoyant.com/r4/{practice}`, one base per practice. Find each practice's exact base in the [practice endpoint directory](https://docs.chartvoyant.com/endpoint-directory/). |
| Standards | FHIR R4 (4.0.1), US Core 6.1.0, SMART App Launch 2, Bulk Data 2.0. |
| Authentication | A SMART access token: [patient or clinician apps](https://docs.chartvoyant.com/smart-app-launch/), or [backend services](https://docs.chartvoyant.com/smart-backend-services/). Discovery documents are public. |
| Format | `application/fhir+json`. Errors are FHIR `OperationOutcome` resources. |
| Cost | No fee to patients, practices, or developers, and no revenue share. |

### Live, with certification in progress

The FHIR and authorization hosts are live in production. ONC certification is in progress and ChartVoyant is not yet CHPL-listed. An internal security assessment has been completed with follow-up remediation ongoing; an independent external security review has not been completed. Access requires an enabled practice, a registered app, and the right patient or practice authorization. See the [November 10, 2026 ONC Inferno results](https://docs.chartvoyant.com/fhir/#inferno-results) (626/641 observed coverage, 0 failures) — pre-certification results, not certification.

## Endpoints

Relative to a practice's FHIR base:

| Path | What it does | Auth |
| --- | --- | --- |
| `GET /metadata` | The CapabilityStatement: supported resources, interactions, search parameters, and profiles. Authoritative. | None |
| `GET /.well-known/smart-configuration` | SMART discovery: authorization endpoints, scopes, and capabilities. | None |
| `GET /{Type}?…` | Search a supported type. Returns a `searchset` Bundle; follow `link[next]` until absent. | Token |
| `POST /{Type}/_search` | The same search with parameters form-encoded in the body. | Token |
| `GET /{Type}/{id}` | Read one resource. | Token |
| `GET /Patient/{id}/$everything` | A Bundle of the patient's core resources. Requires a complete-chart grant. | Token |
| `GET /DocumentReference/$docref` | US Core document operation: existing documents, or the current on-demand CCD (LOINC 34133-9, [beta](https://docs.chartvoyant.com/c-cda/)). | Token |
| `GET /DocumentReference/{id}/$attachment` | The original bytes of a stored document, under that document's grant. | Token |
| `GET /Group`, `/Group/{id}/$export` | Bulk export of the practice's population. See [Bulk Data](https://docs.chartvoyant.com/bulk-data/). | Backend token |
| `POST /{Type}`, `PUT /{Type}/{id}` | Submit or update information for a clinician to review, for seven types, where the practice and app allow it. See [SMART write](https://docs.chartvoyant.com/smart-write/). | Write token |

## Supported resources and operations

Every type below supports **read** and **search-type**, each with its US Core 6.1 profile declared in the CapabilityStatement. Searches require a patient context: a patient token supplies it, and a clinician or backend token names the patient with `patient` (or `_id` for Patient).

`AllergyIntolerance``CarePlan``CareTeam``Condition``Coverage``Device``DiagnosticReport``DocumentReference``Encounter``Endpoint``Goal``Immunization``Location``Medication``MedicationDispense``MedicationRequest``Observation``Organization``Patient``Practitioner``PractitionerRole``Procedure``Provenance``QuestionnaireResponse``RelatedPerson``ServiceRequest``Specimen`

- **Common search parameters.** `_id` and `_lastUpdated`, plus type-specific parameters such as `category`, `code`, `date`, and `status`. Dates take FHIR prefixes such as `ge`, `gt`, `le`, and `lt`. The [SMART on FHIR-4 developer guide](https://docs.chartvoyant.com/fhir/#resources) lists every parameter.

- **Includes.** `_include=MedicationRequest:medication`, and `_revinclude=Provenance:target` on every type except Provenance. Included resources need their own granted scope.

- **Finer-grained scopes are enforced.** A grant such as `patient/Observation.rs?category=…|laboratory` returns the labs and not the vitals, on search and on read.

- **Group** is available to backend tokens only, for [Bulk Data](https://docs.chartvoyant.com/bulk-data/).

- **Not supported:** patch, delete, batch and transaction, `_history`, subscriptions, and document profile filters on `$docref`. Create and update are on [SMART write](https://docs.chartvoyant.com/smart-write/).

## Example

    cURLTypeScript
    Copy

```
# 1. Discovery (no token)
curl -H "Accept: application/fhir+json" \
  "https://fhir.chartvoyant.com/r4/your-practice/metadata"

# 2. Search laboratory Observations
curl -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Accept: application/fhir+json" \
  "https://fhir.chartvoyant.com/r4/your-practice/Observation?patient=PATIENT_ID&category=laboratory&date=ge2026-01-01&_count=50"
```

```
const res = await fetch(
  "https://fhir.chartvoyant.com/r4/your-practice/Observation?patient=PATIENT_ID&category=laboratory&date=ge2026-01-01&_count=50",
  {
    headers: {
      Authorization: `Bearer ${accessToken}`,
      Accept: "application/fhir+json"
    }
  }
);
const bundle = await res.json();
```

Response (abridged, synthetic)

```
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "entry": [{
    "resource": {
      "resourceType": "Observation",
      "id": "EXAMPLE_ID",
      "meta": { "profile": ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab"] },
      "status": "final",
      "category": [{ "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory" }] }],
      "code": { "coding": [{ "system": "http://loinc.org", "code": "2345-7", "display": "Glucose" }] },
      "subject": { "reference": "Patient/PATIENT_ID" },
      "valueQuantity": { "value": 95, "unit": "mg/dL" }
    },
    "search": { "mode": "match" }
  }]
}
```

## Limits and errors

| Scope | Burst | Sustained |
| --- | --- | --- |
| Per principal (token) | 300 requests / second | 9,000 requests / minute |
| Per practice | 600 requests / second | 18,000 requests / minute |

An IP budget also applies. When writing is turned on, each app may make 30 writes a minute at each practice. A `429` carries `Retry-After`. Use paging and [Bulk Data](https://docs.chartvoyant.com/bulk-data/) for large authorized reads. Higher limits are free on request at [info@chartvoyant.com](mailto:info@chartvoyant.com?subject=FHIR%20rate%20limit%20request).

## How to get access

- **Read the guide** The [SMART on FHIR-4 developer guide](https://docs.chartvoyant.com/fhir/) and the public [practice directory](https://chartvoyant.com/fhir/service-base-urls.json) need no account, payment, or agreement.

- **Request registration** Email [info@chartvoyant.com](mailto:info@chartvoyant.com?subject=SMART%20app%20registration%20request) or use [Support](https://chartvoyant.com/support/) with your app details. Send no patient records, private keys, or client secrets.

- **We register and enable it** We apply the same identity and configuration checks to every developer, and register and enable a complete eligible request within five business days.

- **Authorize and connect** A patient or clinician authorizes your app at sign-in. Call the practice's FHIR base with the returned access token.
