PUT api/v1/employee/{id}?domain={domain}&key={key}&provider_unit={provider_unit}&roles={roles}

Updates an existing employee to the new employee. Mandatory data on the employee input is: Employee Name value that differs from null, empty, or consists only of white-space characters. Unique (domain) UserName, named "Brukernavn" in Gerica. Unique (domain) Initials. If the employeeID is used to update, the social security number needs to be set as an unique valid number on the employee. NB! THIS FUNCTION WILL DELETE (OR SET TO DEFAULT) ALL DATA THAT IS NOT REPRESENTED ON THE NEW EMPLOYEE.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The social security 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

EmployeeUpdate
NameDescriptionTypeAdditional 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

Sample:
{
  "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

Sample:
<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 to the new employee. Mandatory data on the employee input is: Employee Name value that differs from null, empty, or consists only of white-space characters. Unique (domain) UserName, named "Brukernavn" in Gerica. Unique (domain) Initials. If the employeeID is used to update, the social security number needs to be set as an unique valid number on the employee. NB! THIS FUNCTION WILL DELETE (OR SET TO DEFAULT) ALL DATA THAT IS NOT REPRESENTED ON THE NEW EMPLOYEE.

string

Response Formats

application/json, text/json

Sample:
"sample string 1"

application/xml, text/xml

Sample:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>