Get list of user groups
Updated date: 18/08/2026
Updated by: VNPT eContract's team
Purpose
Function to get the list of user groups in the company
- Request URL:
/api/user-groups - HTTP method:
GET - Authorize:
Bearer token - Parameter: Not required, but additional options can be added below to filter or search the list of user group..
| Key | Type | Description |
|---|---|---|
search | string | Search information by Code of user group |
page | int | Page number (default is 1) |
pagesize | int | Page size (default is 10 records) |
Sample request
Query param:
page: 1
pageSize: 10
search: USER
Request: /api/user-groups?page=1&pageSize=10&search=USER
Sample response body
{
"data": {
"items": [
{
"id": 11,
"code": "USER",
"name": "Regular user group",
"users": [
{
"id": 123,
"comId": 164,
"isValid": false,
"signConfirmationEnabled": false,
"isAccountLocked": false,
"signMethod": {
"value": 0,
"description": "0"
},
"status": {
"value": 0,
"description": "0"
},
"receiveOtpMethod": {
"value": 0,
"description": "0"
},
"receiveNotificationMethod": {
"value": 0,
"description": "Email"
}
}
]
}
],
"totalCount": 1,
"pageCount": 1,
"page": 1,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false
},
"success": true,
"code": 0,
"messages": []
}
note
The user object has been simplified to show only the most important fields. To see detailed user information, please refer to API to get user information by ID
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 user groups and pagination data (see details below) |
Details of data:
| Key | Type | Description |
|---|---|---|
items | array | List of detailed user group information (see details below) |
totalCount | int | Total number of user groups 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) |
Details of objects in the items array:
| Key | Type | Description |
|---|---|---|
id | int | User group ID |
code | string | User group code (e.g., USER) |
name | string | User group name |
users | array | List of users belonging to the group (see user details) |