Skip to content

Administrative Division Children

POST location/division_children

Returns administrative divisions (children) of the specified child level intersecting with the specified administrative division (parent). Results are sorted by name.

Request#

curl -X POST 'https://api.pricehubble.com/api/v1/location/division_children?access_token=74126eab0a9048d993bda4b1b55ae074' \
  -H 'Content-Type: application/json' \
  -d '{
    "divisionLevel8": "261",
    "childLevel": 100,
    "countryCode": "CH"
}'

Exactly one divisionLevel* must be provided. If you only have an address or coordinates and don't know the official ID of the administrative division, you can use the Administrative Divisions endpoint to look up the administrative division and the respective ID.

Field Description Type Remarks
divisionLevel2 The official ID of the level 2 division string
divisionLevel4 The official ID of the level 4 division string
divisionLevel6 The official ID of the level 6 division string
divisionLevel8 The official ID of the level 8 division string
divisionLevel9 The official ID of the level 9 division string Only available in FR
divisionLevel11 The official ID of the level 11 division string Only available in FR and DE
childLevel The level of the division children to return integer 4, 6, 8, 9, 11 or 100
returnGeometries Whether to return the geometries of each division child boolean default: false
countryCode ISO country code string

Response#

{
  "items": [
    {
      "geometry": {
        "coordinates": [[
          [8.54210712309264, 47.3632042551477],
          ...
        ]],
        "type": "Polygon"
      },
      "levelDesignation": "Postleitzahl",
      "name": "8001",
      "officialId": "8001"
    },
    {
      "geometry": {
        "coordinates": [[
          [8.52343289124586, 47.3524742860765],
          ...
        ]],
        "type": "Polygon"
      },
      "levelDesignation": "Postleitzahl",
      "name": "8002",
      "officialId": "8002"
    },
    ...
  ]
}
Field Description Type Remarks
items List of administrative divisions of a given level array At most 200 items are returned.
items[i].officialId The official ID of the administrative division as defined by the administration/government string
items[i].name The name of the administrative division string The name is returned in the local language (e.g. "Genève" and not "Geneva" is returned)
items[i].levelDesignation The administrative division level designation string The designation is returned in the local language (e.g. "Stadt" and not "City" is returned for the city of Zürich)
items[i].geometry Geometry of the administrative division GeoJSON Polygon or GeoJSON MultiPolygon.
Returned only when returnGeometries is set to true.