--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft.
For more options, visit https://groups.google.com/d/optout.
I’d only use 409 and 412 in combination with eTags.
In this case I’d probably go with a 400 Bad Request and add a reference to the invalid property in the body.
If a client is POST-ing a resource representation that contains some value which must be unique across all such resources, but which conflicts with another existing resource, then I think a 409 is appropriate. Likewise if the client is PUT-ing a resource representation which conflicts with a different resource.For example, say there you have Book resources (e.g. /books/12345, /books/67890, etc), each with ISBN values. If a client tries to POST a book representation to the /books collection resource and that provided representation specifies an ISBN associated with an existing book resource, then a 409 would be appropriate, IMHO. Similarly if a client tries to PUT a book representation to an existing book resource, and the ISBN in the provided representation conflicts with a different book resource, then 409 makes sense.