General - Update User profile

API Url

Used for changing a user's password and user culture.

PUT
http://localhost:16010/ProMarkREST/rest/General/user_info

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.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    confirmPasswordString

New password confirmed.

    cultureString

User culture.

    newPasswordString

New password.

    passwordString

Current password.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    cultureoptionalString

User culture.

    rolesObject[]

Collection of allowed ProMark roles.

      descriptionString

Role description.

      idNumber[1-2]

Role identifier (1: Employee, 2: User).

      isAdministratoroptionalBoolean

true = User is administrator

  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": {
"data": {
"culture": "da-dk",
"roles": [
{
"id": 1,
"description": "Medarbejder"
},
{
"id": 2,
"description": "Bruger",
"isAdministrator": false,
}
]
},
"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"
}
}