Nhảy tới nội dung
Phiên bản: 2.3.0

Cập nhật người dùng

Ngày cập nhật: 18 tháng 09, 2026
Người cập nhật: VNPT eContract's team


Mục đích​

Hàm thực hiện cập nhật các thông tin của người dùng đã có trong hệ thống.

  • Request URL: /api/users/update
  • HTTP method: POST
  • HTTP content-type: application/json
  • Authorize: Bearer token
  • Parameter:
KeyTypeDesciption
codestring[Bắt buộc] Mã người dùng
namestringHọ và Tên người dùng
emailstringEmail người dùng
phonestringSố điện thoại
groupIdsArray[int]Mảng Id nhóm người dùng
departmentIdsArray[int]Mảng Id bộ phận
roleIdsArray[Guild]Mảng Id vai trò
titleIdsArray[int]Mảng Id chức danh
taxcodestringMã số thuế
addressstringĐịa chỉ
faxstringSố fax
descriptionstringMô tả
signatureTextstringVăn bản ký mặc định
signConfirmationEnabledbooleanKý, phê duyệt sử dụng xác thực 2 lớp
generateSelfSignedCertEnabledbooleanTạo chữ ký số tự tạo
statusintTrạng thái người dùng
1: Hoạt động
-1: Ngưng hoạt động
receiveOtpMethodintPhương pháp nhận OTP
1: Email
2: SMS
-1: Không có
receiveNotificationMethodintPhương pháp nhận thông báo chứng từ
0: Email
1: SMS
-1: Không có
signMethodintPhương pháp ký
2: VNPT Smart CA
3: Ký số USB Token

Mẫu request​

{
"id": 4401,
"name": "Nguyễn Văn A",
"email": "email_address",
"phone": "0919XXXXXX",
"taxcode": "1234567890",
"address": "user_address",
"fax": "123",
"description": "",
"signatureText": "",
"signConfirmationEnabled": true,
"generateSelfSignedCertEnabled": true,
"status": 1,
"receiveOtpMethod": 1,
"receiveNotificationMethod": 0,
"signMethod": 2,
"groupIds": [2],
"departmentIds": [2],
"roleIds": ["30933485-7f71-46af-71a3-08def1dc25d3"]
}

Mẫu response body​

{
"data": {
"id": 4401,
"createdDate": "2022-12-13T14:55:32.2867265",
"comId": 164,
"code": "USER01",
"name": "Nguyễn Văn A",
"phone": "0919XXXXXX",
"email": "email_address",
"address": "user_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"
]
}

Mô tả Response Body​

KeyTypeDescription
successbooleanTrạng thái phản hồi của yêu cầu (true: Thành công, false: Thất bại)
codeintMã phản hồi từ hệ thống
messagesarrayDanh sách thông báo trả về từ hệ thống (ví dụ: ["Update user success"])
dataobjectĐối tượng chứa thông tin chi tiết người dùng sau khi cập nhật (xem chi tiết thông tin người dùng)