Skip to main content

About ETags in data versioning

Passfort uses ETags to ensure the latest information in Passfort is never overwritten.

One Etag corresponds to a version of the data. It looks something like this: W/"1579973191.798".

When you GET profile data, the ETag corresponding to the latest version of the data is returned in the header. The field in the header is called Etag.

When you make a POST request, you should include the latest ETag in the header of the request. The field you need to include in the header is called If-Match.

If the ETag you send in the POST request matches the latest ETag, the profile data will be updated with the data from your request body. The response from the POST request has a new ETag in its header because the data has been updated.

If the ETag doesn't match, the response returns a 412 Precondition Failed status and the response body contains the latest profile data, without the changes from your request. Get the latest ETag from the 412 response and try the POST request again.

Caution

Passfort strongly recommends using ETags whenever possible to ensure data is not overwritten. However, to ensure Passfort is backward compatible, if you do not send an ETag in the header, the request will be processed and a 200 status will be returned.

If you want to find out what the latest ETag is, you can always make a GET request to the collected_endpoint described in Get the existing collected data.

Additional information