FlexpaFlexpa
Developer PortalGet SandboxTry it yourself

Guides

  • Home
  • Quickstart
  • Agent guide
  • Claims data guide
  • Financial data guide
  • Parsing FHIR data

Network

  • Network guide
  • Directory
  • Directory MCP server

Consent

  • OAuth
  • Patient linking
  • Usage patterns
  • Patient access

Records

  • FHIR API
  • Webhooks
  • Data Sheet
  • Node SDK
  • SMART Health Links API
  • Terminology
  • Claims to clinicalNew

Misc

  • ChangelogNew
  • Support
  • Flexpa OS
  • We're hiring

Intro to FHIR®

#What is FHIR®?

The HL7® FHIR® standard (Fast Healthcare Interoperability Resources) is used for exchanging healthcare information electronically. FHIR® defines a set of resources that represent different aspects of healthcare information, such as patients, medications, and clinical observations.

Each resource is defined using a set of standardized data elements, or "fields", that describe the information being represented.

Flexpa API offers access to healthcare data using the FHIR® standard in JSON format.

#How to pull patient data

This guide will walk through the steps required to pull all data on a patient that a payer has made available. We recommend starting here to gain a sense of the availability and formatting of patient FHIR® data.

#Prerequisites

Ensure you have completed the quickstart and obtained a patient access token. All interactions with the FHIR® API require authentication.

#1. Read Patient resource

To begin, make a GET request to the Patient resource. This request will pull basic data on a patient and will typically include a name, phone, email, member ID, address etc.

#Example request to Patient

ACCESS_TOKEN=flexpa-link-access-token

curl "https://api.flexpa.com/fhir/Patient/$PATIENT_ID" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

View a sample response.

#2. Patient $everything

The example request in Step 1 may have returned the referenced resource that you need.

However, you likely will want information beyond just core demographics, such as claims or clinical data.

FHIR® defines a useful Patient $everything operation that can enhance our requests by retrieving all of the resources that belong to a patient:

ACCESS_TOKEN=flexpa-link-access-token

curl "https://api.flexpa.com/fhir/Patient/$PATIENT_ID/$everything" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

#3. Search other resources

Steps 1 and 2 targeted the Patient resource. To pull as much data as possible on a patient, we can search for the resources that Patient $everything does not return:

  • Device
  • Location
  • Medication
  • Organization
  • Practitioner
  • PractitionerRole

#Example requests to other resources

ACCESS_TOKEN=flexpa-link-access-token

curl "https://api.flexpa.com/fhir/Device" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

curl "https://api.flexpa.com/fhir/Location" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

curl "https://api.flexpa.com/fhir/Medication" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

curl "https://api.flexpa.com/fhir/Organization" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

curl "https://api.flexpa.com/fhir/Practitioner" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

curl "https://api.flexpa.com/fhir/PractitionerRole" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

#Read vs. Search

In the guide above, we demonstrated examples of both Read and Search operations.

#Read

Reading a resource in FHIR® refers to retrieving the details of a single resource instance. For example, you might want to read the details of a patient, medication, or a specific clinical observation.

Reading requires knowledge of the resource ID ahead of time. See more about reading resources.

#Search

Searching in FHIR® allows you to find and retrieve multiple resources based on specific search criteria or filters. This operation is handy when you want to locate resources that match certain conditions or attributes, such as finding all patients with a specific condition, retrieving all medications prescribed by a particular practitioner, or searching for observations within a specific date range.

Searching does NOT require knowledge of any resource IDs ahead of time. All of Flexpa's supported FHIR® resources are searchable. See more about searching resources.

#Resources List

The following table lists all the FHIR® resources supported by Flexpa.

NameDescriptionJSON example
ConditionA clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern. JSON example
DocumentReferenceA reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. JSON example
EncounterAn interaction between a patient and healthcare provider(s) for the purpose of providing healthcare services or assessing the health status of a patient. JSON example
ExplanationOfBenefitClaim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. JSON example
GroupA collection of entities such as people. Automatically created by Flexpa during sync jobs to organize all patients retrieved. JSON example
PatientDemographics and other administrative information about an individual receiving care or other health-related services. JSON example
ProcedureAn action that is or was performed on or for a patient, including physical interventions, consultations, counseling, and other clinical services. JSON example
Status TwitterGitHub

© 2026 Flexpa. All rights reserved.

FHIR® is the registered trademark of Health Level Seven International and its use does not constitute endorsement by HL7.

On this page
  • What is FHIR®?
  • How to pull patient data
  • Prerequisites
  • 1. Read Patient resource
  • Example request to Patient
  • 2. Patient $everything
  • 3. Search other resources
  • Example requests to other resources
  • Read vs. Search
  • Read
  • Search
  • Resources List