Skip to main content

Get Department Listing

Request

GET:/{accountBookId}/department/listing

Request Parameters

ParameterDescriptionType
pagePage index of returned records. Each page contains at most 100 records. Using a page index beyond the number of available pages will result in empty result.numberrequired
leafOnlyLeaf only flag. When field value is "true", parent departments will be excluded from the query.boolean
activeOnlyActive only flag. When field value is "true", only active departments will be included in the query.boolean

Example Request URL:

Example: Get listing of active departments excluding parent departments in listing records.

Parameters:
accountBookId = 1
page = 1
leafOnly = true
activeOnly = true

URL:
GET: https://accounting-api.autocountcloud.com/1/department/listing?leafOnly=true&activeOnly=true&page=1

Response

Success Response

Status Code: 200

Response Body

FieldDescriptionType
dataResponse data.array[Department Listing View Model]
totalCountNumber of records retrieved.number
Example Success Response Body
{
"data": [
{
"DeptNo": "D-0004",
"Description": "Finance department",
"Desc2": "",
"IsActive": true,
"ParentDeptNo": null
},
{
"DeptNo": "D-0001",
"Description": "Sales department",
"Desc2": "",
"IsActive": true,
"ParentDeptNo": null
},
{
"DeptNo": "D-0003",
"Description": "Product decisions department",
"Desc2": "",
"IsActive": true,
"ParentDeptNo": null
}
],
"totalCount": 3
}

Error Response

Response Body

object: Error Response Model

Example Error Response Body
{
"statusCode": 401,
"message": "401 Unauthorized."
}