⌘K
All guides
FHIR· 8 min

Your First FHIR Read

Retrieve FHIR R4 metadata and read a Patient resource with OAuth bearer auth.

  1. 1

    Discover the FHIR base URL

    Production FHIR R4 is served from the api.parkerapex.com gateway. Fetch CapabilityStatement metadata to confirm supported resources.

    bash
    "text">-amber-300 font">-semibold">curl "text-cyan-300">-s https://api.parkerapex.com/fhir/R4/metadata \
      "text-cyan-300">-H "Accept: application/fhir+json" | "text">-amber-300 font">-semibold">jq '.resourceType,.fhirVersion'
  2. 2

    Obtain an access token

    Use a partner API key or OAuth client credentials with scope cms.fhir.r4.read. Tokens are issued from the developer portal.

    bash
    "text">-amber-300 font">-semibold">curl "text-cyan-300">-s "text-cyan-300">-X "text">-amber-300 font">-semibold">POST https://api.parkerapex.com/oauth/token \
      "text-cyan-300">-H "Content">-Type: application/x">-www-form-urlencoded" \
      "text-cyan-300">-d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_SECRET&scope=cms.fhir.r4.read"
  3. 3

    Read a Patient

    Pass the bearer token on FHIR requests. Use application/fhir+json for request and response bodies.

    bash
    "text">-amber-300 font">-semibold">curl "text-cyan-300">-s "https://api.parkerapex.com/fhir/R4/Patient?identifier=GPID|example">-gpid" \
      "text-cyan-300">-H "Authorization: Bearer YOUR_TOKEN" \
      "text-cyan-300">-H "Accept: application/fhir+json"
  4. 4

    Review SMART configuration

    For user-delegated apps, inspect SMART on FHIR discovery before launching an authorization code flow.

    bash
    "text">-amber-300 font">-semibold">curl "text-cyan-300">-s https://api.parkerapex.com/fhir/R4/.well"text-cyan-300">-known/smart"text-cyan-300">-configuration | "text">-amber-300 font">-semibold">jq

Related