API supports 5 HTTP methods for interacting with resources:
GET– request used to retrieve data. Never used to delete, update or insert data.POST– request used to insert data. Posted data type – JSON.PATCH– request used to update data. Only passed data will be updated. You don’t need to provide all the data set.PUT– create or update (replace) a resource. Useful for syncing data.DELETE– remove data.
PATCH and PUT difference
HTTP PATCH requests are used to make partial updates on a resource.
PUT requests are used to modify/replace all resource entities.
PATCH method is the correct choice for partially updating an existing resource and PUT should only be used if you’re replacing a resource entirely.