Skip to main content

Content Negotiation

The FHIR API supports multiple content formats through HTTP content negotiation.

Supported Formats

Ferrum supports JSON and XML. The FHIR spec also defines RDF (turtle); Ferrum does not support RDF.
  • application/fhir+json - FHIR JSON (recommended)
  • application/fhir+xml - FHIR XML
  • application/json - Plain JSON
  • application/xml - Plain XML
Examples in this documentation use JSON.

Request Format

Specify the content type when sending data using the Content-Type header:

Response Format

Request your preferred response format using the Accept header:

Default Behavior

If no Accept header is provided, the server defaults to application/fhir+json.

Format Priority

You can specify multiple formats with quality values:
The server will return the highest quality format it supports.