Put Operation

Make updates to individuals in your org, one at a time or in groups.

The PUT method allows partial updates, so if some updates fail but others succeed, the successful updates aren’t rolled back. This behavior is different than POST, which is to roll back all changes if there is any error. The individual’s ID value, individualid__c, uniquely identifies the record, so you must always include it in the request body. If you omit the ID value, the update request is ignored for that individual.

In the POST example, we created two records. Now let’s modify those individuals to change their email addresses, again using an org with the namespace clinic01. The PUT method is /services/apexrest/clinic01/v1/individual/.

Here’s the request body that identifies the individuals and lists the values to update.

Use the GET method with a duration of one day to retrieve the individualid__c values.

Tip

Here’s the complete response.
The status code of 4 tells us that the update operation was successful. Looking at the individualUpdated values in the response body tells us that all the updates were successful.