General - Update employee pincode

API Url

Used for updating the employee's pincode. User needs to have access to the employee to change pin.

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

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 identifier

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    confirmPasswordString

New password confirmed.

    newPasswordString

New password.

Request example:

{
"request": {
"data": {
"newPassword": "123456",
"confirmPassword": "123456"
}
}
}

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  errorCodeNumber

Error Code

  errorMessageString

Message description of the error.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  errorCodeNumber

Error code.

  errorMessageString

Error description.

Error example:

HTTP/1.1 422 Unprocessable Entity
{
"response": {
"errorCode": 22,
"errorMessage": "Incorrect password"
}
}