Skip to main content
Version: 1.0.0

Update user

Updated date: 30/04/2023
Updated by: VNPT eContract's team


Purpose

Function to update the information of a user already in the system.

  • Request URL: /api/users/update
  • HTTP method: POST
  • HTTP content-type: application/json
  • Authorize: Bearer token
  • Parameter:
KeyTypeDesciption
codestring[Required] Code of user
namestringFull Name of user
emailstringEmail of user
phonestringPhone number
groupIdsArray[int]Array of group user Ids
departmentIdsArray[int]Array of department Ids
roleIdsArray[Guild]Array of role Ids
taxcodestringTax code of user
addressstringAddress of user
faxstringFax number of user
descriptionstringDescription
signatureTextstringDefault signature text
signConfirmationEnabledbooleanSign, approve using two-factor authentication
generateSelfSignedCertEnabledbooleanGenerate Self-signed certificate
statusintStatus of user
1: Enabled
-1: Disabled
receiveOtpMethodintReceive OTP method
1: Email
2: SMS
-1: None
receiveNotificationMethodintReceive document notification method
1: Email
2: SMS
-1: None
signMethodintSign method
1: (Only old version) Sign draw
2: VNPT Smart CA
3: Sign Token

Sample request

{
"id": 4401,
"name": "Phan Nhan",
"email": "phannhan@email.com",
"phone": "0938475932",
"taxcode": "MST00005",
"address": "42 Truong Quyen, Quan 3, TP.Ho Chi Minh",
"fax": "123",
"description": "",
"signatureText": "",
"signConfirmationEnabled": true,
"generateSelfSignedCertEnabled": true,
"status": 1,
"receiveOtpMethod": 1,
"receiveNotificationMethod": 0,
"signMethod": 2,
"groupIds": [2],
"departmentIds": [23],
"roleIds": ["2b999cd0-32ec-4e4a-16b8-08da6df5fc5a"]
}

Sample response body

{
"data": {
"id": 4401,
"createdDate": "2022-12-13T14:55:32.2867265",
"comId": 164,
"code": "44319714",
"name": "Ho Van Thong",
"phone": "0941304678",
"email": "thonghv@email.com",
"isValid": false,
"signConfirmationEnabled": true,
"isAccountLocked": false,
"accountId": "75d5d881-9a88-40ea-9eca-5e370a087e3a",
"signatureText": "",
"signMethod": {
"value": 2,
"description": "VNPT Smart CA"
},
"status": {
"value": 1,
"description": "Enabled"
},
"receiveOtpMethod": {
"value": 1,
"description": "Email"
},
"receiveNotificationMethod": {
"value": 0,
"description": "Email"
},
"personalCertificateId": 3061
},
"success": true,
"code": 0,
"messages": [
"Update user success"
]
}