Locations
Get countries with regions, towns, and hubs
GET
/v1/return_countriesReturns all countries with their regions, towns, transportation hubs, and sights/attractions.
Hub Types:
- Airport: ID is IATA code (e.g., “DUB”, “LHR”)
- Cruise Port: ID is UNLOCODE (e.g., “IEDUB”, “GBSOU”)
- Train Station: ID is numeric identifier
Code Examples
curl -H "access-token: {{token}}" \ "https://apistage.projectexpedition.com/v1/return_countries"const response = await fetch('https://apistage.projectexpedition.com/v1/return_countries', { headers: { 'access-token': 'YOUR_TOKEN' }});
const data = await response.json();<?php$context = stream_context_create([ 'http' => [ 'method' => 'GET', 'header' => "access-token: YOUR_TOKEN" ]]);
$response = file_get_contents('https://apistage.projectexpedition.com/v1/return_countries', false, $context);$data = json_decode($response, true);Responses
200 List of countries with full geographic hierarchy
[ { "country_id": 105, "country_name": "Ireland", "country_slug": "ireland", "regions": [ { "region_id": 1, "name": "Leinster", "slug": "leinster" }, { "region_id": 2, "name": "Munster", "slug": "munster" }, { "region_id": 3, "name": "Connacht", "slug": "connacht" } ], "towns": [ { "id": 123, "name": "Dublin", "slug": "dublin", "hubs": [ { "id": "DUB", "iata": "DUB", "type": "airport", "name": "Dublin Airport" }, { "id": "IEDUB", "type": "cruise port", "name": "Dublin Cruise Port" } ] }, { "id": 124, "name": "Galway", "slug": "galway", "hubs": [] }, { "id": 125, "name": "Cork", "slug": "cork", "hubs": [ { "id": "ORK", "iata": "ORK", "type": "airport", "name": "Cork Airport" } ] } ], "sights_attractions": [ { "sa_id": 456, "name": "Cliffs of Moher", "region_id": "2", "town_id": "789", "slug": "cliffs-of-moher", "tags": [ "nature", "scenic", "unesco" ], "child_towns": [] }, { "sa_id": 457, "name": "Ring of Kerry", "region_id": "2", "town_id": "790", "slug": "ring-of-kerry", "tags": [ "nature", "scenic", "driving" ], "child_towns": [] } ] }]