Skip to main content
Use this endpoint to fetch a single FHIR R4 resource by its type and ID. The response is the raw FHIR resource structure — not the simplified envelope format used by other ClinikAPI endpoints. Tenant ownership is verified before the resource is returned; requests for resources belonging to a different tenant receive 404 Not Found.

Request

GET https://api.clinikapi.com/v1/fhir/:resourceType/:id

Headers

x-api-key
string
required
Your ClinikAPI secret key (clk_live_* or clk_test_*).

Path parameters

resourceType
string
required
The FHIR resource type (e.g. Patient, Observation, Encounter, Condition).
id
string
required
The FHIR resource ID (e.g. pt_abc123).

Response

Returns 200 OK with the raw FHIR R4 resource. The exact fields depend on the resource type.
resourceType
string
FHIR resource type (e.g. "Patient").
id
string
Resource ID.
meta
object
FHIR resource metadata including versionId, lastUpdated, and tag (contains your tenant identifier).

Examples

curl

curl https://api.clinikapi.com/v1/fhir/Patient/pt_abc123 \
  -H "x-api-key: clk_live_abc123"

TypeScript SDK

import { Clinik } from '@clinikapi/sdk';

const clinik = new Clinik(process.env.CLINIKAPI_SECRET_KEY!);

// Read a Patient resource
const { data: patient } = await clinik.fhir.request('GET', '/Patient/pt_abc123');

// Read an Observation
const { data: obs } = await clinik.fhir.request('GET', '/Observation/obs_xyz789');

// Run a FHIR operation on a resource
const { data: everything } = await clinik.fhir.request('GET', '/Patient/pt_abc123/$everything');