List the cities of a department
curl --request GET \
--url https://api.gabin.ai/v1/zones/departments/{code}/cities \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gabin.ai/v1/zones/departments/{code}/cities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gabin.ai/v1/zones/departments/{code}/cities"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"insee": "<string>",
"name": "<string>",
"postal_code": "<string>",
"population": 0,
"arrondissement": true
}
],
"meta": {
"page": {
"next_cursor": "<string>",
"limit": 0
},
"total": 0,
"total_kind": "exact"
}
}
Zones
List the cities of a department
All cities of a department by name, with the arrondissements of Paris, Lyon and Marseille listed next to their city. Not paginated.
GET
/
v1
/
zones
/
departments
/
{code}
/
cities
List the cities of a department
curl --request GET \
--url https://api.gabin.ai/v1/zones/departments/{code}/cities \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gabin.ai/v1/zones/departments/{code}/cities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gabin.ai/v1/zones/departments/{code}/cities"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"insee": "<string>",
"name": "<string>",
"postal_code": "<string>",
"population": 0,
"arrondissement": true
}
],
"meta": {
"page": {
"next_cursor": "<string>",
"limit": 0
},
"total": 0,
"total_kind": "exact"
}
}
Authorizations
API key gab_live_… or OAuth access token gat_….
Path Parameters
Department code. Example: "69", "2A", "974".
Pattern:
^(\d{2,3}|2[AB])$⌘I