Skip to main content

Get Area Listing

Request

GET:/{accountBookId}/area/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 areas will be excluded from the query.boolean

Example Request URL:

Example: Get area listing excluding parent areas.

Parameters:
accountBookId = 1
page = 1
leafOnly = true

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

Response

Success Response

Status Code: 200

Response Body

FieldDescriptionType
dataResponse data.array[Area Listing View Model]
totalCountNumber of records retrieved.number
Example Success Response Body
{
"data": [
{
"areaCode": "ALS",
"description": "Alor Setar",
"desc2": "",
"parentAreaCode": "KDH"
},
{
"areaCode": "KTN",
"description": "Kuantan",
"desc2": "",
"parentAreaCode": "PHG"
},
{
"areaCode": "KUL",
"description": "Kuala Lumpur",
"desc2": "",
"parentAreaCode": null
},
{
"areaCode": "MLK",
"description": "Melaka",
"desc2": "",
"parentAreaCode": null
},
{
"areaCode": "NBT",
"description": "Nibong Tebal",
"desc2": "",
"parentAreaCode": "PNG"
}
],
"totalCount": 5
}

Error Response

Response Body

object: Error Response Model

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