Skip to main content
Version: 2.2.0

Get list of departments

Updated date: 30/04/2023
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.
KeyTypeDescription
searchstringSearch information by department name
pageintPage number (default is 1)
pagesizeintPage size (default is 10 records)

Sample request

Query param:
page: 1
pageSize:10
search: VNPT eContract
Request: /api/departments?page=1&pageSize=10&search=VNPTeContract

Sample response body

{
"data": {
"items": [
{
"id": 33,
"name": "VNPT eContract",
"code": "DHB",
"userCount": 2,
"users": [
{
"id": 6,
"createdDate": "2021-01-06T17:06:07.2893325",
"comId": 164,
"code": "phannhan",
"name": "Phan Nhan",
"phone": "0944041899",
"email": "phannhan@gmail.vn",
"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": "THONGHV",
"name": "Ho Van Thong",
"phone": "0388620299",
"email": "thonghv@gmail.vn",
"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": []
}