List Cities
List Cities
GET
https://api.ocamba.com/v2/ocamba/cities
Returns a list of CitiesQuery parameters
parametersResponse schemas
›
200
application/json
curl -X GET \
"https://api.ocamba.com/v2/ocamba/cities" \
-H "Authorization: Bearer {TOKEN}"const url = 'https://api.ocamba.com/v2/ocamba/cities';
const options = {
method: 'GET',
headers: {
Authorization: `Bearer {TOKEN}`
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v2/ocamba/cities");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
200 OK
{
"total": 168596,
"items": [
{
"id": "5881639",
"name": "100 Mile House",
"region": "British Columbia",
"country_code": "CA",
"full_name": "100 Mile House, British Columbia, CA"
},
{
"id": "3504833",
"name": "12 de Haina",
"region": "Nacional",
"country_code": "DO",
"full_name": "12 de Haina, Nacional, DO"
},
{
"id": "8556282",
"name": "150 Mile House",
"region": "British Columbia",
"country_code": "CA",
"full_name": "150 Mile House, British Columbia, CA"
}
]
}
Responses
Tip
Searchable fields are: name, region and full_name.
Sortable fields are: id, region, country_code name and full_name.
Filterable fields are: id, region, country_code name and full_name.