When you first PUT a document, you can add an ‘If-None-Match:*’ header to make sure you don’t overwrite anything existing.
You will get an ETag header in the response, which you can use in the ‘If-Match’ header of any subsequent PUT requests, so that you avoid overwriting changes made from other devices.
When you GET a document, you can add an ‘If-None-Match’ header to avoid unnecessarily retrieving the version you already have. Or you can retrieve any of its parent directories to see if anything changed in them, because any change in a document will change the ETag of all of its ancestors.
Also, in a directory listing you can see the latest version of each contained item, so if you retrieve the root folder, you can see exactly where there is fresh data you don’t have yet.
When you DELETE a document, you can also do this conditionally (‘If-Match’), and this will also update the version of each ancestor folder.
Hope this explains it a bit.