Flexpa
Developer PortalFeedbackContact usOnboard

Guides

  • Home
  • Quickstart
  • Financial Data

Network

  • Network guide
  • Directory
  • Updates

Consent

  • Link SDK
  • Patient access

Records

  • FHIR API
  • Node SDK
  • FHIR Introduction
  • Usage
  • Terminology
    • AllergyIntolerance
    • Bundle
    • CarePlan
    • CareTeam
    • Condition
    • Coverage
    • Device
    • DiagnosticReport
    • DocumentReference
    • Encounter
    • ExplanationOfBenefit
    • Goal
    • Immunization
    • Location
    • Medication
    • MedicationDispense
    • MedicationRequest
    • Observation
    • OperationOutcome
    • Organization
    • Patient
    • Practitioner
    • PractitionerRole
    • Procedure
    • Provenance

Misc

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

Bundle

  • Bundle is a base FHIR Resource ( JSON example)
  • It is a container for a collection of resources.

Bundle is a supporting FHIR resource that groups together multiple resources. You can think of Bundle as a helper resource in FHIR that contains one or more resources inside of it. Bundle is convenient for developers when working with Flexpa API because it can be used to return a set of resources that meet some criteria as part of a server operation (see RESTful Search)

More specifically, Bundles that are returned by Flexpa API have the following BundleType.

CodeDisplayDefinition
searchsetSearch ResultsThe bundle is a list of resources returned as a result of a search/query interaction, operation, or message.

The list of BundleTypes supported by Flexpa API is forecasted to expand. See the official FHIR reference docs for a comprehensive list of all BundleTypes in FHIR.

#Sample request

The way to use a Bundle when developing with Flexpa's FHIR API is via a search operation. This is because a searchset Bundle is returned in a successful API response, when the request is a search operation.

While some servers may support a resource-level search without any parameters, not all do. We recommend using the format below with the patient ID via the $PATIENT_ID wildcard as a search parameter.

This is a sample request using curl to search for Coverage resources.

ACCESS_TOKEN=flexpa-link-access-token

curl "https://api.flexpa.com/fhir/Coverage?patient=$PATIENT_ID" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

#Sample response

This is a sample response from Humana using Flexpa API in test mode. The response is a Bundle that contains multiple Coverage resources.

#Notable fields

A Bundle response contains many fields. You can get an exhaustive list and explanation of each field here. Some notable fields:

  • id - The unique identifier of the Bundle.
  • type - The BundleType. Will be a searchset as a result of a search operation.
  • link - Contains pagination routing URLs. For example, making a GET request to the next URL will return a Bundle containing the next page of results. Read more about pagination.
  • entry - A collection of resources (see response type on best practice of checking resourceType)
  • entry[i].resource - One of the resources contained in the Bundle.
  • entry[i].fullUrl - The location of the resource on the server. The resource itself can be retrieved in isolation with a read operation to this URL.
Status TwitterGitHub

© 2025 Flexpa. All rights reserved.

On this page
  • Sample request
  • Sample response
  • Notable fields