Our API accepts PUT requests in order to change status of resources. Think of this as a state machine. Client can specify the target state of the resource via PUT request but it is possible that the resource is not in a state from where it can go into the target state specified by the client. What HTTP code should we return in this instance? I am thinking 409 Conflict
with more details in the response body using a structured error describing what went wrong.
Has anyone experienced this and modelled it differently?