API Structure: Area and Sub Area
This endpoint provides a list of areas within an Organization Unit.
URL : api/v2/area
Method: GET / POST
Authorization: Managed via Spring Framework Security (See Spring Framework Security Documentation)
Note:
For PSI implementation, authorization is handled by OpenHIM, and Spring Boot security is disabled by default.
Mandatory Parameters
Parameter | Option Value | Default Value | Description |
---|---|---|---|
ancestor.uid | Text | N/A | Core | Defines the UID / code of the parent Organization unit |
ancestor.code | Text | N/A |
Optional Parameters
Parameter | Option Value | Default Value | Description |
---|---|---|---|
paging | Boolean | true | Specifies whether pagination is required. |
pageSize | Number | 10 | Determines the number of elements to return on each page. |
page | Number | 1 | Specifies the page number of results to be returned. |
type | Text | N/A | Defines the types of locations included in the response. |
tags | Text (csv) | N/A | Filters locations based on associated tags. |
URL (for GET request):
https://{{host}}/api/v2/area?page=1&pageSize=5&ancestor.code=GT&type=Public
Payload (for POST request):
{
"ancestor.code": "KE",
"page": 1,
"pageSize": 5,
"type": "Public",
"tags": "KEUNV"
}
Response:
{
"response": {
"status": 200,
"areas": [
{
"area": "Baringo",
"country": "Kenya"
},
{
"area": "Bomet",
"country": "Kenya"
},
{
"area": "Bungoma",
"country": "Kenya"
},
{
"area": "Busia",
"country": "Kenya"
},
{
"area": "Elgeyo Marakwet",
"country": "Kenya"
}
],
"pager": {...}
}
}
You can also find the POSTMAN examples here.
SubAreas in the country
Provides list of areas in the country.
URL : api/v2/subArea
Method: GET / POST
Authorization: Managed via Spring Framework Security (See Spring Framework Security Documentation)
Note:
For PSI implementation, authorization is handled by OpenHIM, and Spring Boot security is disabled by default.
Mandatory Parameters
Parameter | Option Value | Default Value | Description |
---|---|---|---|
ancestor.uid | Text | N/A | Core | Defines the UID / code of the parent Organization unit |
ancestor.code | Text | N/A | |
area | Text | N/A | Defines area where the subArea exists |
Optional Parameters
Parameter | Option Value | Default Value | Description |
---|---|---|---|
paging | Boolean | true | Specifies whether pagination is required. |
pageSize | Number | 10 | Defines the number of elements to return for each page. |
page | Number | 1 | Defines which page number to return |
type | Text | N/A | Defines the types of location |
tags | Text (csv) | N/A | Defines the tags the location are associated with |
URL (for GET request):
https://{{host}}/api/v1/subArea?page=2&pageSize=5&ancestor.code=GT&area=Interior del país
Payload (for POST request):
{
"country": "GT",
"area": "Guatemala",
"page": 1,
"pageSize": 5,
"type": "Public",
"tags": "KEUNV"
}
Response:
You can also find the POSTMAN examples here.