Update user
Updated date: 17/03/2025
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:
Key | Type | Desciption |
---|---|---|
code | string | [Required] Code of user |
name | string | Full Name of user |
email | string | Email of user |
phone | string | Phone number |
groupIds | Array[int] | Array of group user Ids |
departmentIds | Array[int] | Array of department Ids |
roleIds | Array[Guild] | Array of role Ids |
taxcode | string | Tax code of user |
address | string | Address of user |
fax | string | Fax number of user |
description | string | Description |
signatureText | string | Default signature text |
signConfirmationEnabled | boolean | Sign, approve using two-factor authentication |
generateSelfSignedCertEnabled | boolean | Generate Self-signed certificate |
status | int | Status of user 1: Enabled -1: Disabled |
receiveOtpMethod | int | Receive OTP method 1: Email 2: SMS -1: None |
receiveNotificationMethod | int | Receive document notification method 0: Email 1: SMS -1: None |
signMethod | int | Sign method 1: (Only old version) Sign draw 2: VNPT Smart CA 3: Sign Token |
Sample request
{
"id": 4401,
"name": "Nguyen Van A",
"email": "email_address",
"phone": "0919XXXXXX",
"taxcode": "1234567890",
"address": "District 3, Ho Chi Minh City",
"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": "USER01",
"name": "Nguyen Van A",
"phone": "0919XXXXXX",
"email": "email_address",
"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"
]
}