Skip to content

Administrative Divisions

POST location/divisions

Returns the administrative divisions which enclose the point specified by the given coordinates or by the given address.

The levels are based on the OSM administrative divisions. The following tables show the level designations for each country.

Supported Countries and administrative division levels#

Each country might have different semantic for each administrative Division at different level. Some levels might not be available in a specific country. The following table represent a typical example for each level you should expect in a country.

Austria#

Level Level Designation Example
(Local) Name Official ID
4 Bundesland Burgenland 1
6 Politischer Bezirk Eisenstadt(Stadt) 101
8 Gemeinde Eisenstadt 10101
100 Postleitzahl 7000 7000

Switzerland#

Level Level Designation Example
English German French Italian (Local) Name Official ID
4 Canton Kanton Canton Cantone Zürich 1
6 District Bezirk District Distretto Zürich 112
8 Municipality Gemeinde Commune Comune Zürich 261
100 Postal code Postleitzahl Code postal Codice postale Zürich 8001

Czechia#

Level Level Designation Name Official Id
4 Region soudržnosti Severozápad VC.43
6 Kraj Plzeňský kraj VC.86
7 Okres České Budějovice OK.3301
8 Obec Zabrušany OB.567868
10 Katastrální území Pohoří u Malečova KU.690716

Germany#

Level Level Designation Example
(Local) Name Official ID
4 Bundesland Hamburg 02
6 Landkreis / Kreis / Kreisfreie Stadt / Stadtkreis Hamburg 02000
8 Stadt / Gemeinde Hamburg 020000000000
11 Stadtviertel HafenCity 02000000034
100 Postleitzahl 20354 20354

France#

Level Level Designation Example
(Local) Name Official ID
4 Region Île-de-France 11
6 Département Paris 75
8 Commune Paris 75056
9 Arrondissement Paris 7e Arrondissement 75107
11 IRIS Champ de Mars 751072812
100 Code postal 75013 75013

Netherlands#

Level Level Designation Example
(Local) Name Official ID
4 Provincie Noord-Holland Noord-Holland
8 Gemeente Amsterdam Amsterdam
100 Postcode 1012 1012

Japan#

Level Level Designation Example
(Local) Name Official ID
4 都道府県 (Prefecture) 東京都 13000
7 市 (City) 千代田区 13101
8 政令指定都市 / 地域自治区 (Suburb) 中原区 14133

Request#

Example Request#

curl -X POST 'https://api.pricehubble.com/api/v1/location/divisions?access_token=74126eab0a9048d993bda4b1b55ae074' \
  -H 'Content-Type: application/json' \
  -d '{
    "location": {
      "coordinates": {
        "latitude": 47.3968601,
        "longitude": 8.5153549
      },
      "address": {
        "postCode": "8037",
        "city": "Zurich",
        "street": "Nordstrasse",
        "houseNumber": "391"
      }
    },
    "target": "socio-economics",
    "countryCode": "CH"
}'

Request Fields#

Field Description Type Remarks
location Location for which information should be retrieved Location
countryCode ISO country code string AT, BE, CH, CZ, DE, FR JP and NL are currently supported
target Service being the target for those divisions string Possible values are: offer, transaction or socio-economics. Details.
divisionLevels Which division levels to return array of integers Supported levels for each country
returnGeometries Whether to return the geometries of each division level boolean default: true

Response#

Example response#

{
  "coordinates": {
    "latitude": 47.3968601,
    "longitude": 8.5153549
  },
  "divisionLevel4": {
    "officialId": "1",
    "name": "Zürich",
    "levelDesignation": "Kanton",
    "geometry": {
      "coordinates": [
        [8.41007342863389, 47.2483758360245],
        ...
      ],
      "type": "Polygon"
    }
  },
  "divisionLevel6": {
    "officialId": "112",
    "name": "Zürich",
    "levelDesignation": "Bezirk",
    "geometry": {
      "coordinates": [
        [8.59715430748838, 47.4060055090607],
        ...
      ],
      "type": "Polygon"
    }
  },
  "divisionLevel8": {
    "officialId": "261",
    "name": "Zürich",
    "levelDesignation": "Stadt",
    "geometry": {
      "coordinates": [
        [8.5736748773714, 47.4200362257283],
        ...
      ],
      "type": "Polygon"
    }
  },
  "divisionLevel100": {
    "officialId": "8037",
    "name": "8037",
    "levelDesignation": "Postleitzahl",
    "geometry": {
      "coordinates": [
        [8.51312630529578, 47.3944516312076],
        ...
      ],
      "type": "Polygon"
    }
  }
}

Response Fields#

Field Description Type Remarks
coordinates Coordinates resolved from the address specified in the request (or coordinates from the request if they have been provided) Coordinates
divisionLevel4 The level 4 division Division
divisionLevel6 The level 6 division Division Not supported in NL nor JP
divisionLevel7 The level 7 division Division Only available in JP
divisionLevel8 The level 8 division Division
divisionLevel9 The level 9 division Division Only available in FR
divisionLevel11 The level 11 division Division Only available in FR and DE
divisionLevel100 The level 100 division Division Not available in JP

Division#

Field Description Type Remarks
officialId The official ID of the administrative division as defined by the administration/government string
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)
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)
geometry The geometry of the administrative division GeoJSON Polygon or GeoJSON MultiPolygon.