In this example, we'll use the PATCH method to update an employee's name in our Person model.
Procedure
-
Use the GET method to request the details of the employee you would like to update.
-
From the GET request, copy the "Id" and paste it into an application such as notepad for now.
-
Select the PATCH method, for example, PATCH /custom/people. Then, applaud prepares an example value for you to use as a basis to update an entry.
-
From the Example Value box, copy the text and under the Parameters section, in the Data Value box, paste the example value. Delete any information that's not relevant to you. In this example, we want to change the name Rupert summer to Rupert Summon, so we're only interested in the lines that contain the name, and we also need the "Id."
Note
If there's a comma remaining on the last line of the value after removing lines, delete this. Otherwise, the request won't work.
-
Copy and paste the "Id" from your GET request into the "Id" line. Then, update the "name" lines with your changes.
-
Select Try it out. The API returns the object to you in the Response body with a Response code 200, which means your request was successful.