Get City Detail
- cURL
- JavaScript
curl -X GET \
'https://apistg.ahamove.com/v1/order/city_detail?city_id=SGN' \
-H 'cache-control: no-cache'
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://apistg.ahamove.com/v1/order/city_detail?city_id=SGN", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
This API is used to get detail information about a city
HTTP Request
GET https://apistg.ahamove.com/v1/order/city_detail?city_id=<city_id>
or
GET https://apistg.ahamove.com/v1/order/city_detail?lat=<lat>&lng=<lng>
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
city_id | String | Yes | City ID |
lat | Number | No | Latitude |
lng | Number | No | Longitude |
Response
JSON response example:
{
"_id": "SGN",
"name": "Ho Chi Minh City",
"name_vi_vn": "TP Hồ Chí Minh",
"country_id": "VN",
"location": {
"type": "Point",
"coordinates": [106.6943626, 10.768451]
}
}
Status-Code: 200 OK
Errors
Code | Text | Description |
---|---|---|
404 | Not Found | City not found |
500 | Internal Server Error | We had a problem with our server. Try again later. |
503 | Service Unavailable | We're temporarily offline for maintenance. Please try again later. |