Get list of users
Updated date: 30/04/2023
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 1: (Only old version) Sign draw 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=baoth
Sample response body
{
"data": {
"items": [
{
"id": 1163,
"createdDate": "2021-08-12T14:46:22.7857729",
"comId": 164,
"code": "baoth",
"name": "Tô Hoài Bảo",
"phone": "0942503973",
"email": "baothzz@email.com",
"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": []
}