PATCH Request - Updating existing records
2 min
PATCH requests provide incremental updates to a record, without replacing the content of the entire record.
URL Format
Single record
The format to update a single record is:
Example:
Example: Deactivate User and change their last name
➜ ~ https -v PATCH https://sandbox.servicely.ai/v1/User/c0a8011645fb1a608145fb3102b10000 Active=false LastName="Employee (ex)"
PATCH /v1/User/c0a8011645fb1a608145fb3102b10000 HTTP/1.1
{
"Active": "false",
"LastName": "Employee (ex)"
}
HTTP/1.1 200 OK
Content-Length: 657
Content-Type: application/json
{
"data": {
"Active": false,
"CreatedBy": "4028818a3b214291013b21504a000000",
"CreatedOn": "2020-01-01T14:44:24.853Z",
"Email": "[email protected]",
"FirstName": "Erik",
"LastName": "Employee (ex)",
"LockedOut": false,
"Name": "Erik Employee (ex)",
"SID": "LBoawmmFanX4V",
"SelectableForAssignment": false,
"SelectableForRequests": false,
"TableClass": "User",
"UpdatedBy": "4028818a3b214291013b21504a000000",
"UpdatedOn": "2021-06-16T11:59:42.153Z",
"UserName": "erik.employee",
"VIP": false,
"Version": 20,
"id": "c0a8011645fb1a608145fb3102b10000"
}
}