Patch Person
Partially Update Person by ID
Endpoint:
/api/v2/persons/{personId}
Methods:
PATCH
Tag: Persons
Auth: Basic Authentication (required)
Overview
The PATCH
method accepts a PersonPartialUpdateRequest payload and returns the updated PersonalData.
Base URL example:
https://localhost:7105
Authentication
This API uses Basic Authentication. Include the Authorization: Basic <base64(username:password)>
header on every request.
Example
Authorization: Basic YmVxYTRhcGk6YmVxYTRhcGk=
Path Parameters
Name |
In |
Type |
Required |
Description |
---|---|---|---|---|
personId |
path | integer (int32) | Yes | Unique ID of the person to fetch or update. |
PATCH /api/v2/persons/{personId}
Summary: Partially update person by ID.
Use this to update one or more fields without sending the entire record. Only the fields supplied in the request body will be updated.
Request
- Content-Types:
application/json
,text/json
,application/*+json
- Body Schema:
PersonPartialUpdateRequest
[Placeholder — Insert formal PersonPartialUpdateRequest schema here once available. The table below lists fields demonstrated in the sample payload.]
Request Body Fields (from sample)
Field |
Type |
Notes |
---|---|---|
FirstName |
string | |
LastName |
string | |
NameOnID |
string | Legal/ID name if different. |
Prefix |
string | e.g., “Mr”, “Ms”. |
Suffix |
string | e.g., “Jr”, “III”. |
Gender |
string | Example shows "Unspecified" . |
JobTitle |
string | |
DateOfBirth |
date (ISO 8601) | e.g., 1997-12-16 . |
Phone1 |
string | |
Phone2 |
string | |
Address |
string | Street address. |
City |
string | |
StateProvince |
string | State/province/region. |
PostalCode |
string | |
Country |
string | Example shows "USA222" . |
CompanyName |
string | |
CorporateID |
string | External corporate identifier. |
HomeSiteID |
string/integer | Example shows "5" or 5 . |
UserRole |
string | Example shows "Acct Team lead " . |
Biography |
string | The field is a string, but it can contain HTML |
IsActive |
string | 'true', 'false', 't', or 'f' |
IsUser |
string | 'true', 'false', 't', or 'f' |
IsSpeaker |
string | 'true', 'false', 't', or 'f' |
Notes
- Field list above is based on the provided example and may not be exhaustive.
Responses
- 200 OK — Returns the updated PersonalData object.
- 400 Bad Request — Invalid request body (e.g., wrong types or validation errors).
- 401 Unauthorized — Missing/invalid authentication.
- 404 Not Found — Person with the given ID does not exist.
- 500 Internal Server Error — An unexpected error occurred.
Examples
cURL (PATCH)
curl --location --request PATCH 'https://localhost:7105/api/v2/persons/16' \ --header 'accept: text/plain' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic YmVxYTRhcGk6YmVxYTRhcGk=' \ --data '{ "FirstName": "2", "LastName": "2", "NameOnID": "2", "Prefix": "", "Suffix": "2", "Gender": "Unspecified", "JobTitle": "2", "DateOfBirth": "1997-12-16", "Phone1": "2", "Phone2": "2", "Address": "2", "City": "2", "StateProvince": "2", "PostalCode": "2", "Country": "USA222", "CompanyName": "2", "CorporateID": "2", "HomeSiteID": "5", "UserRole": "Acct Team lead ", "Biography": "<html></html> ", "IsActive": "f", "IsUser": "t", "IsSpeaker": "t" }'
Error Formats
Errors may be returned as plain text or JSON depending.
Idempotency & Partial Updates
PATCH
is partial: only provided fields are updated; omitted fields remain unchanged. To clear an optional string field, send it as an empty string (""
) if supported by your environment.