Versioned Delete
Description of how to make versioned delete using our FHIR API.
Last updated
Description of how to make versioned delete using our FHIR API.
Last updated
DELETE
{base}/fhir/{type}
When performing a delete, there is a risk of unintentionally removing data. To avoid this, you can use versioned deletes. This involves sending an If-Match header with the versionId of the resource you intend to delete.
Include the If-Match Header: When you send an delete request, include the If-Match header along with the versionId of the resource you are deleting.
Version Matching: The server will compare the provided versionId with the current version of the resource.
Successful Deletion: If the versions match, the deletion will proceed successfully.
Conflict Handling: If the versions do not match, the server will respond with an OperationOutcome containing a conflict code. This indicates that the resource has been modified since you last retrieved it, and your deletion has no effect. This prevent unintentional data loss.
Using versioned deletion helps ensure data integrity and prevents the loss of recent changes made by other users or processes.
Below is an example of how to use a versioned DELETE
request to delete a resource. A complete list of resources can be found by visiting the resource specifications .
Request
DELETE
{base}/fhir/Patient/{id}
Headers
Content-Type
application/json
Authorization
Bearer <token>
If-Match
versionId
Response