ETag and If-Match Headers

SAP Health Data Services for FHIR supports ETag and If-Match headers. These headers help to prevent the loss of updates.

For example, if two users update the same resource, the second user would overwrite the updates of the first one. To prevent this scenario, SAP Health Data Services for FHIR returns an ETag header with each resource:

ETag: W/"<Resource version ID>"

If the user requests for a version-dependent update, the user submits the request with an If-Match header that quotes the ETag from SAP Health Data Services for FHIR:

PUT [base]/Patient/[Resource ID]

If-Match: W/"<Resource version ID>"

If the version ID given in the If-Match header doesn't match with the latest active version of the resource, SAP Health Data Services for FHIR returns an HTTP status response code 412 precondition failed instead of updating the resource.

Path Parameters

base: Service endpoint to interact with FHIR resources. For more information, see Service Endpoint.