Versioned Update
Description of how to make versioned update using our FHIR API.
Last updated
Description of how to make versioned update using our FHIR API.
Last updated
PUT
{base}/fhir/{type}
When performing updates, there is a risk of unintentionally overwriting recent changes made by another operation. To avoid this issue, you can use versioned updates. This involves sending an If-Match header with the versionId of the resource you intend to update.
Include the If-Match Header: When you send an update request, include the If-Match header along with the versionId of the resource you are updating.
Version Matching: The server will compare the provided versionId with the current version of the resource.
Successful Update: If the versions match, the update 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 update has not been applied to prevent data loss.
Using versioned updates 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 PUT
request to update a resource. A complete list of resources can be found by visiting the resource specifications .
Request
PUT
{base}/fhir/Patient/{id}
Headers
Content-Type
application/json
Authorization
Bearer <token>
If-Match
versionId
Body
Response