Update a person
Updates an existing person, identified by an internal ID or an external reference.
Tip
Check the Swagger page for more technical information on the endpoints.
Endpoint details
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/people/{personReference}
Headers: Authorization: Bearer {token}, User-Agent: {agent}
Scope: connector-protimeapi-people.write
URL parameters
| Parameter | Description |
|---|---|
{personReference} |
The internal ID or external reference of the person. |
Body properties
| Field | Type | Required | Writable | Description |
|---|---|---|---|---|
firstName |
string | Yes | Yes | First name of the person. Maximum 100 characters. |
lastName |
string | Yes | Yes | Last name of the person. Maximum 100 characters. |
email |
string | No | Yes | Email address. Maximum 254 characters, validated as an email address when supplied. |
telephone |
string | No | Yes | Telephone number. Maximum 30 characters, validated as a phone number when supplied. |
mobile |
string | No | Yes | Mobile phone number. Maximum 30 characters, validated as a phone number when supplied. |
address |
string | No | Yes | Street address with the number. Maximum 200 characters. |
postalCode |
string | No | Yes | Postal code. Maximum 20 characters. |
town |
string | No | Yes | Town or city. Maximum 100 characters. |
countryISOCode |
string | No | Yes | ISO code of the country. Maximum 10 characters, validated as a country code. |
nationalityISOCode |
string | No | Yes | ISO code of the nationality. Maximum 10 characters, validated as a country code. |
sex |
string | No | Yes | Sex of the person (Unknown, Male, Female, Other). |
birthDate |
string | No | Yes | Birth date of the person (YYYY-MM-DD). |
badgeNumber |
string | No | Yes | Badge number of the person. Maximum 50 characters. |
employeeNumber |
string | No | Yes | Employee number of the person. Maximum 50 characters. |
payGroup |
string | No | Yes | Pay group of the person. Maximum 50 characters. |
inServiceDate |
string | Yes | Yes | Date when the person enters service (YYYY-MM-DD). Must be on or after 1900-01-01. |
outOfServiceDate |
string | No | Yes | Date when the person stops service (YYYY-MM-DD). Must be on or after inServiceDate. |
externalReferenceIdentifier |
object | No | Yes | Present in the schema but ignored by this endpoint. See External references. |
External references
The endpoint resolves {personReference} through the externalReferences query parameter. See the external references page for details.
| Collection | Predefined | Custom |
|---|---|---|
people |
@badge-number, @employee-number |
Supported |
Note
Here the reference only selects which person to update — it never changes the person’s references. The externalReferenceIdentifier body property is ignored on this endpoint; it is only honoured when creating a person. To add, change or remove a reference on an existing person, use the external references endpoints.
Caution
There are some restrictions on the characters allowed in URL requests. See the fetching resources page for more information.
Error responses
| Status | Condition |
|---|---|
400 |
Invalid external reference specification, or validation failed (missing firstName, lastName or inServiceDate, invalid ISO code, invalid email or phone, value too long, outOfServiceDate before inServiceDate) |
400 |
The predefined reference in the query parameter matches more than one person |
401 |
Missing or invalid access token, or insufficient scope |
404 |
Person with the given ID or external reference does not exist |
Success response
200 OK. The response body is empty.
Examples
Update a person by internal ID
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/people/8526
{
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@protime.com",
"town": "Brussels",
"countryISOCode": "BE",
"inServiceDate": "2021-01-15",
"outOfServiceDate": "2026-12-31"
}Update a person by badge number
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/people/123456?externalReferences=(people,@badge-number)
{
"firstName": "John",
"lastName": "Doe",
"badgeNumber": "123456",
"inServiceDate": "2021-01-15"
}