View City
View City
GET
https://api.ocamba.com/v2/ocamba/cities/{id}
Retrieves the details of a City if a valid identifier was providedPath parameters
parametersQuery parameters
parametersResponse schemas
›
200
application/json
curl -X GET \
 "https://api.ocamba.com/v2/ocamba/cities/{id}" \
  -H "Authorization: Bearer {TOKEN}"const url = 'https://api.ocamba.com/v2/ocamba/cities/{id}';
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/{id}");
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": 1,
  "items": [
    {
      "id": "5881639",
      "name": "100 Mile House",
      "region": "British Columbia",
      "country_code": "CA",
      "full_name": "100 Mile House, British Columbia, CA"
    }
  ]
}
Responses
Tip
If you don’t know the city id, list the cities to find it.