< Back

Versioning

Health Gorilla APIs let you verify token context and control the FHIR version used in requests. This helps ensure consistent behavior across environments and simplifies debugging in multi-tenant or delegated-access workflows.

Token Context

Use the userinfo endpoint to inspect the active access token. This confirms key authentication metadata and helps validate access settings.

  • sub is the unique user or system identifier
  • scope lists the authorized scopes
  • organization_id identifies the tenant associated with the token
  • fhir_version shows the default FHIR version assigned to the session
  • user_role reflects the role assigned to the authenticated entity

FHIR Version Header

The FHIR version defaults to the value set in the token. To override it on a per-request basis, include the X-FHIR-Version header.

  • R4 is the recommended version for all new implementations
  • 3.0.1 is the legacy version used in workflows such as $p360-retrieve

Do not mix versions within the same implementation.

Example Usage

To inspect token context:

GET /oauth/userinfo
Authorization: Bearer {access_token}

To override the version in an API call:

X-FHIR-Version: R4