I’m wondering about the correct status code to return in a situation where a resource is modifiable through PUT requests while it is in ‘editable’ state but not otherwise. In particular, where a client attempts to PUT the resource whilst it’s not editable.
If the client was able to take some steps to make the resource editable then 409 Conflict might be appropriate, but that doesn’t apply in my situation; the editable status of the resource is under the server’s control.
405 Method not allowable seems the closest semantic fit, but it’s not the normal use.
What’s the right way to do this?
I don’t see any problem allowing the available methods to change over time. Consider another example where something cannot be deleted once it has reached a particular state.