Administrative Division CSV Download
POST
location/csv_download
Returns an extended list of locations for Switzerland. The endpoint is in use for download locations data. It's possible to filter locations by UUIDs, slugs and Divisions.
Only available in CH
.
Request#
Example Request#
The example request contains three parameters: "locations": ["73e7c2e1-0f20-40d2-9f5b-95a298bf76a3"] - it is the UUID of the canton Zürich, "slugs": ["city-bern"] - the slug for the city Bern, and "divisionLevels": [{"divisionLevel": 8,"officialId": 261}] - divisionLevel:officialId for the city Zürich. So the example result contains data for the both geolocations.
curl -X POST 'https://api.pricehubble.com/api/v1/location/csv_download' \
-H "Authorization: Bearer LWkU3VwcJojIw7O8v8o39IQJPC2ptSdd" \
-d '{
"locations": [
"73e7c2e1-0f20-40d2-9f5b-95a298bf76a3"
],
"slugs": [
"city-bern"
],
"divisionLevels": [
{
"divisionLevel": 8,
"officialId": 261
}
]
}'
Request Fields#
Field | Description | Type | Remarks |
---|---|---|---|
locations | Comma-separated list of the locations UUIDs | array of strings | Value example 7dd259ca-d97f-4980-9986-89568596010b . An empty list [] is allowed. |
slugs | Comma-separated list of the URL slugs | array of strings | Value examples city-zurich , canton-bern . An empty list [] is allowed. |
divisionLevels | Comma-separated list of {"divisionLevel": divisionLevel , "officialId": officialId } |
array of strings | Value examples {"divisionLevel": 4, "officialId": 3}, {"divisionLevel": 8, "officialId": 261}. An empty list [] is allowed. |
*Maximum total ammount of the locations, slugs and divisionLevels is 10
Response#
.csv file
Column | Description | Type | Remarks |
---|---|---|---|
type | Location's type | String | |
official_id | The official_id of the administrative division | Division | |
level | The level of the administrative division | Administrative Divisions | |
name | Location's name | Division | |
uuid | Location's UUID | String | |
division_level_name | The name of the administrative division | Division |