General - Edit an employee's information

API Url

Used to edit information for a single employee.

PUT
http://localhost:16010/ProMarkREST/rest/General/employees/{empId}

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Path parameters

FieldTypeDescription
empIdString

Employee Id.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    employeesObject[]

Collection with employee data.

      address1optionalString

Address1

      address2optionalString

Address2

      address3optionalString

Address3

      cardNooptionalString

Card number.

      cityoptionalString

City

      countryCodeoptionalString

Country Code

      dateOfBirthoptionalDate

Employee birthday.

      emailoptionalString

Email address.

      email2optionalString

Email address 2

      empIdString

Employee Id.

      empNoString

Employee number.

      firstNameoptionalString

Employee first name.

      genderoptionalString

Gender

      homePhoneoptionalString

Home Phone.

      info1optionalString

Employee note1

      info2optionalString

Employee note2

      info3optionalString

Employee note3

      info4optionalString

Employee note4

      info5optionalString

Employee note5

      initialsoptionalString

Employee initials.

      localPhoneoptionalString

local Phone.

      lockStatusoptionalBoolean

Lock Status

      mobilePhoneoptionalString

Employee phone number.

      postalCodeoptionalString

Postal code

      provinceoptionalString

Province

      surnameoptionalString

Employee last name.

      workPhoneoptionalString

work Phone.

Request example:

{
"request": {
"data": {
"employees": [
{
"cardNo": "1",
"firstName": "John",
"surname": "Doe",
"initials": "DT",
"mobile": "99999",
"dateOfBirth": "1985-02-28",
"dateOfEmployment": "2006-10-01",
"email": "john@my-company.com"
}
]
}
}
}

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  errorCodeNumber

Error code.

  errorMessageString

Error description.

Error example:

HTTP/1.1 404 Not found
{
"response": {
"errorCode": 75,
"errorMessage": "Employee does not exist"
}
}