Get Cities
Get a list of cities and their city_id
codes where Ahamove operates in Vietnam
HTTP Request
- cURL
- JavaScript
curl --location 'https://partner-apistg.ahamove.com/v3/cities?country_id=VN' \
--header 'Authorization: Bearer <token>'
const myHeaders = new Headers();
myHeaders.append('Authorization', 'Bearer <token>');
const requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow',
};
fetch(
'https://partner-apistg.ahamove.com/v3/cities?country_id=VN',
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
HTTP Request
GET https://partner-apistg.ahamove.com/v3/cities?country_id=VN
Headers
Parameter | Value | Required | Description |
---|---|---|---|
Authorization | Bearer <token> | Yes | Token of the user account |
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
country_id | String | Yes | Country ID |
Response
JSON response example:
[
{
"_id": "HAN",
"name": "Ha Noi",
"name_vi_vn": "Hà Nội",
"country_id": "VN",
...
},
{
"_id": "SGN",
"name": "Ho Chi Minh City",
"name_vi_vn": "TP Hồ Chí Minh",
"country_id": "VN",
...
}
]
Status-Code: 200 OK