PATCH api/v1/employee/{id}?domain={domain}&key={key}&provider_unit={provider_unit}&roles={roles}
Updates an existing employee with new employee data. This function will only change data that is set on the employee input, not delete any existing data. The function will add items to "Communication List" not update existing, this is because the list does not have any uniqe idetifyer as input. If a "communication list item" is passed inn as a parameter, where all the data is the same as in an existing item, it wil not be added once more to the list. If given, UserName and Initials should be unique across domain. If given, the national identity number (ssn), needs to be set as a unique valid fødselsnummer on the employee.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id |
The national identity number (DDMMYYXXXXX, e.g. 11118793456) or internal employee Id in EPJ. |
string |
Required |
domain |
The domain ID. This is the name of the municipality's meta domain that the API is reading writing data to. |
string |
Required |
key |
The API license key. |
string |
Required |
provider_unit |
Not in use |
string |
None. |
roles |
Not in use |
string |
None. |
Body Parameters
The employee to update.
EmployeeUpdateName | Description | Type | Additional information |
---|---|---|---|
Country |
Country code indicating the country. |
integer |
None. |
Nationality |
Country code indicating the nationality. |
integer |
None. |
Language |
Country code indicating the language. |
integer |
None. |
Inactive |
If the employee needs to be activated before it can be used. Cannot be unset from API. |
boolean |
None. |
Id |
Employee's ID in EJP |
integer |
None. |
Ssn |
Employee national identity number/fødselsnummer, 11 digits. |
string |
None. |
Name |
Employee Name (format: last, first) |
string |
None. |
UserName |
User name. This needs to be unique in the employee table (as domainusername in Gerica). Designed to match user name in federation system (e.g. Active directory). New in 9.1.12: Max 100 characters (increased from 20). |
string |
None. |
GeographicalLevel |
Geographical user level |
string |
None. |
Address |
Address |
Address |
None. |
CommunicationList |
List of communication info like: Email addresses, phone numbers etc. |
Collection of CommunicationEmployee |
None. |
Initials |
Employees initials. Maps to shortname in Gerica database. For historical reasons, all employees should have a unique value in the initials field. Max 20 characters. |
string |
None. |
Request Formats
application/json, text/json
{ "Country": 1, "Nationality": 2, "Language": 3, "Inactive": true, "Id": 4, "Ssn": "sample string 5", "Name": "sample string 6", "UserName": "sample string 7", "GeographicalLevel": "sample string 8", "Address": { "StreetAddress": "sample string 1", "ZipCode": "sample string 2", "City": "sample string 3" }, "CommunicationList": [ { "CommunicationType": "Telefon", "Value": "sample string 1", "Comment": "sample string 2", "Various": "sample string 3" }, { "CommunicationType": "Telefon", "Value": "sample string 1", "Comment": "sample string 2", "Various": "sample string 3" } ], "Initials": "sample string 9" }
application/xml, text/xml
<EmployeeUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://lifecare.tieto.com/ec/no/v1"> <Address> <City>sample string 3</City> <StreetAddress>sample string 1</StreetAddress> <ZipCode>sample string 2</ZipCode> </Address> <CommunicationList> <CommunicationEmployee> <Comment>sample string 2</Comment> <CommunicationType>Telefon</CommunicationType> <Value>sample string 1</Value> <Various>sample string 3</Various> </CommunicationEmployee> <CommunicationEmployee> <Comment>sample string 2</Comment> <CommunicationType>Telefon</CommunicationType> <Value>sample string 1</Value> <Various>sample string 3</Various> </CommunicationEmployee> </CommunicationList> <Country>1</Country> <GeographicalLevel>sample string 8</GeographicalLevel> <Id>4</Id> <Initials>sample string 9</Initials> <Language>3</Language> <Name>sample string 6</Name> <Nationality>2</Nationality> <Ssn>sample string 5</Ssn> <UserName>sample string 7</UserName> <Inactive>true</Inactive> </EmployeeUpdate>
Response Information
Resource Description
Updates an existing employee with new employee data. This function will only change data that is set on the employee input, not delete any existing data. The function will add items to "Communication List" not update existing, this is because the list does not have any uniqe idetifyer as input. If a "communication list item" is passed inn as a parameter, where all the data is the same as in an existing item, it wil not be added once more to the list. If given, UserName and Initials should be unique across domain. If given, the national identity number (ssn), needs to be set as a unique valid fødselsnummer on the employee.
stringResponse Formats
application/json, text/json
"sample string 1"
application/xml, text/xml
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>