HTTP specifications

HTTP requests originating from ZorgDomein will always include a certain set of HTTP request headers. ZorgDomein will expect a set of HTTP response headers in return to each request. This applies to both GET and POST requests. The exact set of request and response headers in each case is defined below.

Besides the specifications listed below, ZorgDomein will follow the specification of the RESTful FHIR API as described on hl7.org/fhir/http.html

POST requests from ZorgDomein

ZorgDomein will only perform POST requests for Bundle resources to send HL7 FHIR documents to a receiving XIS. These requests will always be performed on the /Bundle endpoint, for example https://domain/path/Bundle

Request headers

The table below displays the HTTP headers that are to be expected in HTTP POST requests that originate from ZorgDomein. 

Header Value
Accept-Charset utf-8
Authorization Bearer <token>
Accept application/fhir+json;q=<version>, application/json+fhir;q=<version>
User-Agent HAPI-FHIR/<version> (FHIR Client; FHIR <version>/DSTU<version>; apache)
Prefer return=minimal
Accept-Encoding gzip
Content-Type application/fhir+json; charset=UTF-8

Example

Accept-Charset: utf-8;
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.
TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ;
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9;
User-Agent: HAPI-FHIR/3.2.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache);
Prefer: return=minimal;
Accept-Encoding: gzip;
Content-Type: application/fhir+json; charset=UTF-8   

Required response headers

The table below describes the minimum set of HTTP headers that ZorgDomein expects in a reponse to an HTTP POST request. 

Header Value
Content-Type application/fhir+json;charset=utf-8
Location <url of the created resource> (does not have to be resolvable)

Example:

date: Tue, 22 May 2018 08:21:34 GMT;
last-modified: Tue, 22 May 2018 08:21:34 GMT;
content-type: application/fhir+json;charset=utf-8;
etag: W/"1";
location: https://tio.zorgdomein.nl/fhir-test-server/baseDstu3/Bundle/
1226/_history/1
;

Response status codes

Upon succesful reception of the Bundle ZorgDomein expects an HTTP 201 response. When reception or processing of the Bundle failed ZorgDomein expects an HTTP 4xx or HTTP5xx status code. To determine the right status code and response body in case of errors please follow the specifications as described on hl7.org/fhir/http.html. When you receive an HL7 FHIR Document that contains an unprocessable document type you must return an HTTP 422 status code. 

GET requests from ZorgDomein

ZorgDomein will ony perform HTTP GET requests on the endpoints that correspond to the resources that we're interested in (see HL7 FHIR specifications), for example http://domain/path/Patient/6

Request headers

The table below displays the HTTP headers that are to be expected in HTTP GET requests that originate from ZorgDomein. 

Header Value
Accept-Charset utf-8
Authorization Bearer <token>
Accept application/fhir+json;q=<version> application/json+fhir;q=<version>
User-Agent HAPI-FHIR/<version> (FHIR Client; FHIR <version>/DSTU<version>; apache);
Accept-Encoding gzip

Example

Accept-Charset: utf-8;
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.
TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ;
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9;
User-Agent: HAPI-FHIR/3.2.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache);
Accept-Encoding: gzip   

Required response headers

The table below describes the minimum set of HTTP headers that ZorgDomein expects in a reponse to an HTTP POST request. 

Header Value
Content-Type application/fhir+json;charset=utf-8

Example:

content-length: 2069;
content-type: application/fhir+json;charset=utf-8;

GET requests from a XIS (SSO)

The Single sign-on GET request originating from a XIS in order to log in to ZorgDomein does not require specific HTTP request headers.