Typically, you will use one or both depending on whether you want the client (and therefore the user) to determine the URI or not. If the client sends a resources/ message, then the server receives a URI definition for the resource. If the PUT client is on resources/{id}/ , then the client determines the URI for the resource.
The only exception is that if the creation includes links, states, and other elements that are then not considered part of the resource, you usually cannot use these additional “construction arguments” if you want, because they are not part of the state resource. Instead, you should do a POST in this case.
Even if you use POST to create, you might still want to open PUT for updates. It depends on the resource.
If you do not allow PUT to be created, then yes, you must return 404 in this situation.
source share