Developer Documentation
Everything you need to connect to our FHIR R4 API: conformance and discovery, SMART App Launch 2.0 (standalone, EHR and backend services), scopes, client registration, and FHIR Bulk Data. This documentation supports our ONC Health IT Certification §170.315(g)(10) readiness and the HL7 Inferno test kit.
Service base URLs
All endpoints are multi-tenant and prefixed with the sandbox (tenant) id. The public certification sandbox is cert.
https://fhirservices.ehiconnect.com/api/fhir/certhttps://fhirservices.ehiconnect.com/api/fhir/cert/metadatahttps://fhirservices.ehiconnect.com/api/fhir/cert/.well-known/smart-configurationhttps://fhirservices.ehiconnect.com/api/oauth/cert/.well-known/openid-configurationhttps://fhirservices.ehiconnect.com/api/oauth/cert/.well-known/jwks.jsonhttps://fhirservices.ehiconnect.com/api/oauth/cert/authorizehttps://fhirservices.ehiconnect.com/api/oauth/cert/tokenhttps://fhirservices.ehiconnect.com/api/oauth/cert/introspecthttps://fhirservices.ehiconnect.com/api/oauth/cert/revokeAvailable practice endpoints
Each practice on the platform is served from its own multi-tenant FHIR R4 service base URL. Browse the directory below, or download the full set as a FHIR Endpoint resource bundle.
Conformance & discovery
Start from the well-known SMART configuration and the FHIR capability statement.
curl https://fhirservices.ehiconnect.com/api/fhir/cert/.well-known/smart-configurationcurl https://fhirservices.ehiconnect.com/api/fhir/cert/metadata -H "Authorization: Bearer $TOKEN"The discovery document advertises authorize/token/introspect/revoke endpoints, code_challenge_methods_supported: ["S256"], token endpoint auth methods (client_secret_basic, client_secret_post, private_key_jwt), and capabilities including launch-standalone, launch-ehr, client-public, client-confidential-symmetric, client-confidential-asymmetric, context-ehr-patient, context-ehr-encounter, permission-v1, permission-v2, authorize-post and sso-openid-connect.
SMART App Launch 2.0
Standalone launch (patient or provider app)
- Fetch
.well-known/smart-configurationfor the authorize & token URLs. - Redirect the browser to
/authorizewithresponse_type=code, yourclient_id, a registeredredirect_uri,scope,state,aud=https://fhirservices.ehiconnect.com/api/fhir/cert, and PKCE (code_challenge+code_challenge_method=S256). - The user approves on the consent screen (where they can narrow the requested scopes).
- Exchange the returned
codeat/tokenwith yourcode_verifier.
https://fhirservices.ehiconnect.com/api/oauth/cert/authorize?response_type=code
&client_id=YOUR_CLIENT_ID
&redirect_uri=https://app.example/callback
&scope=launch/patient%20openid%20fhirUser%20offline_access%20patient/*.rs
&state=abc123
&aud=https://fhirservices.ehiconnect.com/api/fhir/cert
&code_challenge=BASE64URL_SHA256
&code_challenge_method=S256curl -X POST https://fhirservices.ehiconnect.com/api/oauth/cert/token \
-u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
-d grant_type=authorization_code \
-d code=AUTH_CODE \
-d redirect_uri=https://app.example/callback \
-d code_verifier=YOUR_VERIFIERThe token response includes access_token, patient (when a patient context was granted), id_token (with an absolute fhirUser URL), refresh_token (when offline_access is granted) and the granted scope.
EHR launch
For an EHR launch the EHR opens your registered launch URL with iss (the FHIR base) and a one-time launch token. Your app then runs the standalone steps above, adding launch to the authorize request and the launch scope. The resulting token carries the patient and encounter context.
Introspection & revocation
curl -X POST https://fhirservices.ehiconnect.com/api/oauth/cert/introspect -d token=ACCESS_TOKENcurl -X POST https://fhirservices.ehiconnect.com/api/oauth/cert/revoke -d token=ACCESS_OR_REFRESH_TOKENScopes
We support SMART v2 (.rs / .cruds) and v1 (.read / .write) scopes, plus granular resource scopes. The consent screen lets the user grant a subset (down-scoping).
launch, launch/patient, openid, fhirUser, offline_accesspatient/Patient.rs, patient/Observation.rs, patient/*.rsuser/Encounter.rs, user/*.rssystem/*.rspatient/Condition.read, user/*.readpatient/Observation.rs?category=laboratoryClient registration
Four client types are supported. To register, contact your platform administrator with your client type, redirect_uri(s), launch URL (EHR apps) and, for asymmetric/backend clients, your JWKS URL. Confidential symmetric clients receive a client secret.
Asymmetric and backend clients authenticate with a signed client_assertion (client_assertion_type= urn:ietf:params:oauth:client-assertion-type:jwt-bearer) whose audis the token endpoint. We resolve your public key from your JWKS URL by kid.
Bulk Data (Backend Services)
Group-level export is asynchronous and scoped to the group's patient members plus their referenced provider/facility resources. Authenticate as a backend-services client to get a system/*.rs token, then kick off the export.
curl -X POST https://fhirservices.ehiconnect.com/api/oauth/cert/token \
-d grant_type=client_credentials \
-d scope=system/*.rs \
-d client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer \
-d client_assertion=SIGNED_JWTcurl -i "https://fhirservices.ehiconnect.com/api/fhir/cert/Group/cert-group/\$export?_type=Patient,Observation&_outputFormat=application/fhir+ndjson" \
-H "Authorization: Bearer $TOKEN" \
-H "Prefer: respond-async"curl "$CONTENT_LOCATION" -H "Authorization: Bearer $TOKEN"
# -> manifest.output[].url, each an application/fhir+ndjson fileSupports _type, _since and _outputFormat. The manifest sets requiresAccessToken: true.
US Core data
Each sandbox is seeded with Must-Support–complete US Core 6.1.0 data. The public certification sandbox contains two golden patients and a population group:
Patient/usc-goldenPatient/usc2-goldenGroup/cert-groupRequired US Core search parameters and combinations are supported (e.g. patient+category+date), along with _revinclude=Provenance:target and reference _include.
curl "https://fhirservices.ehiconnect.com/api/fhir/cert/Observation?patient=usc-golden&category=laboratory&date=ge2015-01-01" \
-H "Authorization: Bearer $TOKEN"Supported US Core Choices & References
Per §170.315(g)(10)(viii)(A) and §170.404(a)(2), the following documents the US Core 6.1.0 "must support" elements that offer multiple Choices ([x] types) or References, and the choice/reference this certified module supports (at least one of each is supported).
Choice ([x]) data types
deceasedDateTime (dateTime)onsetDateTime (dateTime)effectiveDateTime (dateTime); effectivePeriod (Period) for Smoking StatusvalueQuantity, valueCodeableConcept, valueStringoccurrenceDateTime (dateTime)performedDateTime (dateTime)reportedBoolean (boolean)medicationReference → Reference(US Core Medication)Reference targets
Reference(US Core Patient)Reference(US Core Practitioner | US Core Organization)Reference(US Core Practitioner)Reference(US Core Medication)Reference(US Core Practitioner | US Core Patient | US Core Organization)Reference(US Core Encounter)The authoritative, machine-readable list of every supported profile, interaction, search parameter and data type is the server's CapabilityStatement.
API reference details
API syntax & function names (interactions)
RESTful FHIR R4 over HTTPS. Supported interactions: read (GET [base]/[Type]/[id]), search (GET [base]/[Type]?params and POST [base]/[Type]/_search), capabilities (GET [base]/metadata), and group-export (GET [base]/Group/[id]/$export). OAuth2: /authorize, /token, /introspect, /revoke. Read-only: no create/update/delete.
Required & optional parameters (and data types)
string, required — must be "code"string, requiredstring (URI), required — must match a registered valuestring, required — space-delimited SMART scopesstring, requiredstring (URI), required — must equal the FHIR basestring, required — S256string, optional — EHR launch tokenstring, required — authorization_code | refresh_token | client_credentialsstring, required for authorization_code (PKCE)string, required for private_key_jwt (RFC 7523)string, optional — e.g. Provenance:targetstring / instant / string — all optionalReturn variables & types/structures
- Token response (
application/json):access_token(string),token_type("Bearer"),expires_in(integer, seconds),scope(string), and when applicableid_token,refresh_token,patient,encounter. - FHIR read: a single US Core resource (
application/fhir+json). - FHIR search: a
Bundleoftype: searchsetwithentry[].resource. - Bulk kickoff:
202 Accepted+Content-Locationheader; status returns a JSON manifest withoutput[].url(each anapplication/fhir+ndjsonfile). - Introspection: JSON with
active(boolean) plusscope,client_id,exp,patient.
Exceptions & exception handling (returns)
- FHIR errors return an
OperationOutcomeresource withissue[].severityandissue[].code, using the standard HTTP status:400malformed request,401missing/invalid/expired or revoked token,403token lacks the required scope / out of compartment,404unknown resource,429throttled. - OAuth2 errors (per RFC 6749 / SMART) return JSON
{ "error": "..." }with codesinvalid_request,invalid_client(401),invalid_grant,invalid_scope,unsupported_grant_type. - Bulk errors return an
OperationOutcome; a cancelled job returns202on DELETE.
Mandatory software components
- An HTTP client capable of TLS 1.2+ and following redirects.
- A FHIR R4 (4.0.1) / US Core 6.1.0-aware JSON parser.
- An OAuth2 / SMART App Launch 2.0 client with PKCE (S256) support.
- For confidential-asymmetric & backend clients: a JWT signer (RS384 or ES384) and a publicly reachable JWKS URL.
- For OIDC: a JWT/JWKS verifier to validate the
id_token.
Mandatory software configurations
- Register at least one exact
redirect_uri(and launch URL for EHR apps) before first use. - Send
audequal to the tenant FHIR base on every authorize request. - Use
code_challenge_method=S256; plain PKCE and non-TLS endpoints are rejected. - Backend/asymmetric clients: host a TLS-protected JWKS URL with a
kid;client_assertion.audmust be the token endpoint. - Request
offline_accessto receive a refresh token (valid ≥ 3 months, rotated on use).
Technical requirements for registration
To register, supply: client type (public / confidential-symmetric / confidential-asymmetric / backend), one or more redirect_uris, launch URL (EHR apps), JWKS URL (asymmetric/backend), and the requested scopes. Confidential-symmetric clients are issued a client secret. See the sandbox request page.
Patient app authorization management (revocation)
Supports §170.315(g)(10)(vi). A patient can view the apps they've authorized and revoke any one; revoking kills the entire grant family so the access token AND refresh token stop working immediately. This platform's patient portal is the reference UI; a separate (e.g. EMR) patient portal can call the same two endpoints.
List authorized apps
GET {base}/api/bridge/{tenant}/patient/connected-apps
Authorization: Bearer {patient session token}
200 -> { "apps": [
{ "grant_id": "...", "client_id": "...", "app_name": "...",
"scope": "openid fhirUser patient/*.rs", "authorized_at": "2026-11-24T..." }
] }Revoke an app
POST {base}/api/bridge/{tenant}/patient/connected-apps/{grant_id}/revoke
Authorization: Bearer {patient session token}
200 -> { "grant_id": "...", "status": "revoked" }- Auth: both require an authenticated patient session for the tenant; a patient only sees/revokes their own grants.
- Effect of revoke: the grant is added to the revocation list and all its tokens are marked revoked. Subsequent FHIR reads with that access token return
401; a refresh with that grant's refresh token returns400 invalid_grant. - Integrating an external portal: call these endpoints with the patient's session (once patient identities are federated via OIDC), or surface a "Connected apps → Revoke" screen that proxies them.
Security & TLS
- Transport: all production traffic is served over TLS 1.2+ (HTTPS only); plaintext HTTP is not accepted.
- Authorization: every FHIR request requires a valid bearer token; requests are scoped to a single tenant and, for patient tokens, to that patient's compartment.
- Encryption at rest: PHI fields are protected with per-tenant envelope encryption backed by AWS KMS.
- Auditing: access and changes are recorded in a per-tenant audit log.
- PKCE (S256) is required for all authorization-code flows; access tokens are short-lived and refresh tokens rotate.
ONC §170.315(g)(10) certification
This platform is built to the ONC (g)(10) Standardized API criterion and is validated with the HL7 Inferno (g)(10) test kit. The capabilities below are exercised by the suite:
- Standard-based FHIR R4 API with US Core 6.1.0 (USCDI v3) profiles and Must-Support elements.
- SMART App Launch 2.0 — standalone, EHR and backend-services launch; OIDC; PKCE; public, confidential-symmetric and confidential-asymmetric clients.
- Token introspection (RFC 7662), revocation (RFC 7009), refresh tokens and granular/limited scopes.
- FHIR Bulk Data 2.0 group-level export for multi-patient access.
- Documentation (this page) published at a stable, public service URL as required by §170.315(g)(10) and §170.404.
For API access or client registration, start on the sandbox request page.