version number vs ETag for optimistic concurrency

Solution 1:

To me "Conflict 409" is the right response for a concurrency error, but the RFC states that a "Precondition Fails 412" needs to be send, which is not clear enough. Of course an error description in the body can clarify the cause of the error, but I would rather send 409.

Use the HTTP status codes as they are defined, not what you think they should mean based on the name.

When a collection (e.g. all due orders) is returned from the server there is no possibility to send multiple ETags. Each single resource can be individually modified. Therefore the only option is to send the ETag in the body as a property of each representation in the JSON response. It is confusing that collections are treated differently than single resources. Also the client needs to include a property for the ETag in its object model in any case.

HTTP doesn't really have a concept of collections, but you can give the collection itself its own ETag as well.

I don't understand all the implications of the specific wording. What does "has no defined semantics" mean? What is the reasons a body should not be generated?

A delete request should only delete the resource located at the URI. If it's successful, we can assume that the URI that was used in the DELETE request will return a 404 or 410 after the request was successful.

If you want to conditionally parameterize deletions, delete multiple resources at once or delete something other than the resource specified in the URI, the DELETE request is simply not appropriate for that use-case.

If you want to use ETags, just use an If-Match header.