Skip to main content
The ClinikAPI simplified SDK covers the most common clinical data operations, but some use cases require sending raw FHIR R4 requests directly — custom search parameters, FHIR operations like $everything or $validate, or resource types not yet simplified by ClinikAPI. The FHIR passthrough lets you do this without losing tenant isolation or authentication.

How it works

All requests to /v1/fhir/:resourceType and /v1/fhir/:resourceType/:id are proxied directly to the ClinikAPI FHIR R4 gateway. Your tenant context is automatically applied on every request:
  • Creates: your tenant tag is injected into meta.tag automatically.
  • Searches: a _tag filter scoped to your tenant is appended to every query.
  • Reads, updates, and deletes: resource ownership is verified against your tenant before the operation proceeds.
You cannot bypass tenant isolation through the passthrough — it is always enforced.

When to use passthrough

Use caseRecommended approach
Standard CRUD operationsUse the simplified SDK methods (e.g. clinik.notes, clinik.patients)
Custom FHIR search parametersUse GET /v1/fhir/:resourceType?...
FHIR operations ($everything, $validate)Use POST /v1/fhir/:resourceType/$operation
Resource types not in the simplified SDKUse the passthrough endpoints
Complex chained FHIR queriesUse GET /v1/fhir/:resourceType?...

Response format

The passthrough returns raw FHIR R4 resources, not the simplified envelope format used by other ClinikAPI endpoints. You work directly with FHIR resource structures — resourceType, id, meta, and resource-specific fields.

Capability statement

The /v1/metadata endpoint returns a FHIR R4 CapabilityStatement describing all supported resource types, search parameters, and operations. No authentication is required:
curl https://api.clinikapi.com/v1/metadata

Available passthrough operations

OperationEndpoint
Read a resourceGET /v1/fhir/:resourceType/:id
Create a resourcePOST /v1/fhir/:resourceType
Update a resourcePATCH /v1/fhir/:resourceType/:id
Delete a resourceDELETE /v1/fhir/:resourceType/:id
Search resourcesGET /v1/fhir/:resourceType?...