Get list of departments
Updated date: 17/03/2025
Updated by: VNPT eContract's team
Purpose
The function performs retrieving a list of company departments.
- Request URL:
/api/departments
- HTTP method:
GET
- Authorize:
Bearer token
- Parameter: Not required, but additional options can be added below to filter or search the list of departments.
Key | Type | Description |
---|---|---|
search | string | Search information by department name |
page | int | Page number (default is 1) |
pagesize | int | Page size (default is 10 records) |
Sample request
Query param:
page: 1
pageSize: 10
search: dochub
Request: /api/departments?page=1&pageSize=10&search=dochub
Sample response body
{
"data": {
"items": [
{
"id": 33,
"name": "DocHub",
"code": "DHB",
"userCount": 2,
"users": [
{
"id": 6,
"createdDate": "2021-01-06T17:06:07.2893325",
"comId": 164,
"code": "USER01",
"name": "Nguyen Van A",
"phone": "",
"email": "email_address",
"validFrom": "2021-12-07T09:15:00",
"validTo": "2022-12-07T09:15: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": 1859,
"smartCaId": 2011
},
{
"id": 19,
"createdDate": "2021-01-08T16:09:39.9081934",
"comId": 164,
"code": "USER02",
"name": "Nguyen Van B",
"phone": "0919XXXXXX",
"email": "email_address",
"isValid": false,
"signConfirmationEnabled": false,
"isAccountLocked": false,
"signMethod": {
"value": 1,
"description": "(Only old version) Sign draw"
},
"status": {
"value": 1,
"description": "Enabled"
},
"receiveOtpMethod": {
"value": 1,
"description": "Email"
},
"receiveNotificationMethod": {
"value": 0,
"description": "Email"
},
"personalCertificateId": 1860
}
]
}
],
"totalCount": 1,
"pageCount": 1,
"page": 1,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false
},
"success": true,
"code": 0,
"messages": []
}