Skip to main content
Version: 2.3.0

Get list of users

Updated date: 17/03/2025
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.
KeyTypeDescription
searchstringSearch information by user code, user name, or phone number
statusintUser status
1: Enabled
-1: Disabled
signMethodintSign method
1: (Only old version) Sign draw
2: VNPT Smart CA
3: Sign token
userGroupIdintId of user group
departmentIdintId of department
certStatusintStatus of Self-signed cert
0: Not exist
1: Exist
2: Expired
pageintPage number (default is 1)
pageSizeintPage 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",
"validFrom": "2022-08-22T12:01:00",
"validTo": "2023-08-22T12:01:00",
"isValid": true,
"signConfirmationEnabled": true,
"isAccountLocked": false,
"signMethod": {
"value": 2,
"description": "VNPT Smart CA"
},
"status": {
"value": 1,
"description": "Enabled"
},
"receiveOtpMethod": {
"value": 1,
"description": "Email"
},
"receiveNotificationMethod": {
"value": 0,
"description": "Email"
},
"personalCertificateId": 2028,
"smartCaId": 2012
}
],
"totalCount": 1,
"pageCount": 1,
"page": 1,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false
},
"success": true,
"code": 0,
"messages": []
}