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

Lấy danh sách 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 lấy danh sách người dùng của công ty

  • Request URL: /api/users
  • HTTP method: GET
  • Authorize: Bearer token
  • Parameter: Không yêu cầu, tuy nhiên có thể thêm các tùy chọn bên dưới để thực hiện lọc hoặc tìm kiếm danh sách người dùng.
KeyTypeDescription
searchstringThông tin tìm kiếm theo mã người dùng, tên người dùng và số điện thoại
statusintTrạng thái người dùng
1: Hoạt động
-1: Ngưng hoạt động
signMethodintPhương pháp ký
2: VNPT Smart CA
3: Ký số USB Token
userGroupIdintId nhóm người dùng
departmentIdintId bộ phận
certStatusintTrạng thái chứng thư số tự ký
0: Không có
1: Đã có
2: Hết hạn
pageintSố trang cần lấy dữ liệu (Mặc định hệ thống đang là 1)
pageSizeintSố record dữ liệu mà hệ thống sẽ trả về sau mỗi request (Mặc định hệ thống đang là 10 record)

Mẫu request​

Query param:
page: 1
pageSize: 10
search: user01
Request: /api/users?page=1&pageSize=10&search=user01

Mẫu response body​

{
"data": {
"items": [
{
"id": 1163,
"createdDate": "2021-08-12T14:46:22.7857729",
"comId": 164,
"code": "USER01",
"name": "Nguyễn Văn A",
"phone": "0919XXXXXX",
"email": "email_address",
"address": "user_address",
"identityVerificationStatus": {
"value": 0,
"description": "Not verified"
},
"identityVerifiedType": {
"value": 0,
"description": "Unknown"
},
"identityVerifiedSource": {
"value": 0,
"description": "Unknown"
},
"taxCode": "",
"isValid": true,
"signConfirmationEnabled": true,
"isAccountLocked": false,
"accountId": "1d2f70ad-3aec-41f1-82c4-8f5e5927c27c",
"roles": [
{
"id": "30933485-7f71-46af-71a3-08def1dc25d3",
"code": "Default",
"name": "Mặc định",
"description": "Vai trò mặc định với những quyền xử lý chứng từ",
"roleLevel": 0
}
],
"signMethod": {
"value": 2,
"description": "VNPT Smart CA"
},
"status": {
"value": 1,
"description": "Enabled"
},
"receiveOtpMethod": {
"value": 1,
"description": "Email"
},
"receiveNotificationMethod": {
"value": 0,
"description": "Email"
},
"personalCertificateId": 2028,
"extraValues": [],
"usedMemory": 0,
"userCertificates": [],
"smartCaGroups": [],
"waitingChangeRequest": false,
"twoFactorEnabled": true,
"titles": [],
"allowedCertificateUids": []
}
],
"totalCount": 1,
"pageCount": 1,
"page": 1,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false
},
"success": true,
"code": 0,
"messages": []
}

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
dataobjectĐối tượng chứa danh sách người dùng và dữ liệu phân trang (xem chi tiết bên dưới)

Chi tiết dữ liệu trong data:​

KeyTypeDescription
itemsarrayDanh sách thông tin chi tiết các người dùng (xem chi tiết thông tin người dùng)
totalCountintTổng số lượng người dùng thỏa mãn điều kiện lọc
pageCountintTổng số trang
pageintTrang hiện tại
pageSizeintSố lượng bản ghi trên một trang
hasNextPagebooleanCó trang kế tiếp hay không (true: Có, false: Không)
hasPreviousPagebooleanCó trang trước đó hay không (true: Có, false: Không)