Updating data
There are two ways to support updates in web services: replacing data and patching data. An HTTP PUT request is sent when the client wants to completely replace data, and the request body contains all of the data the web service will need for the replacement. An HTTP PATCH
method is used when the client wants to modify data, and the request body contains a description of how that data should be modified.
Supporting updates with PUT requests is simpler to implement but requires the client to provide a complete replacement for the stored data. PATCH requests are more complex but offer more flexibility and can be more efficient because only the changes are sent to the web service.
Tip
It can be hard to know which approach to adopt at the start of a new project when the types of updates clients will send are unknown. My advice is to start by supporting complete updates because they are simpler to implement and move to partial updates only if you find...