Get list of users
Updated date: 18/09/2026
Updated by: VNPT eContract's team
Purpose
The function retrieves the list of company users
- Request URL:
/api/users - HTTP method:
GET - Authorize:
Bearer token - Parameter: Not required, but additional options can be added below to filter or search the list of users.
| Key | Type | Description |
|---|---|---|
search | string | Search information by user code, user name, or phone number |
status | int | User status 1: Enabled -1: Disabled |
signMethod | int | Sign method 2: VNPT Smart CA 3: Sign token |
userGroupId | int | Id of user group |
departmentId | int | Id of department |
certStatus | int | Status of Self-signed cert 0: Not exist 1: Exist 2: Expired |
page | int | Page number (default is 1) |
pageSize | int | Page size (default is 10 records) |
Sample request
Query param:
page: 1
pageSize: 10
search: baoth
Request: /api/users?page=1&pageSize=10&search=user01
Sample response body
{
"data": {
"items": [
{
"id": 1163,
"createdDate": "2021-08-12T14:46:22.7857729",
"comId": 164,
"code": "USER01",
"name": "Nguyen Van 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,
"roles": [
{
"id": "30933485-7f71-46af-71a3-08def1dc25d3",
"code": "Default",
"name": "Default",
"description": "Default Role with Document Processing Permissions",
"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": []
}
Response Body Description
| Key | Type | Description |
|---|---|---|
success | boolean | Response status (true: Success, false: Failure) |
code | int | Response code from the system |
messages | array | List of messages returned by the system |
data | object | Object containing the list of users and pagination data (see details below) |
Details of data:
| Key | Type | Description |
|---|---|---|
items | array | List of detailed user information (see user details) |
totalCount | int | Total number of users matching the filter criteria |
pageCount | int | Total number of pages |
page | int | Current page |
pageSize | int | Number of records per page |
hasNextPage | boolean | Whether there is a next page (true: Yes, false: No) |
hasPreviousPage | boolean | Whether there is a previous page (true: Yes, false: No) |