Address Migration Documentation
Convert current address to new format¶
Updating the convert address API is a crucial step for developers who need to migrate old address formats to the new standardized format used by VIETMAP. This API allows users to input an old address and receive a structured response that includes the new address format, along with additional details such as boundaries and display names.
URL¶
Method¶
GET
Parameters¶
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
apikey | string | yes | API provided by VIETMAP for customer's account | |
focus | number | no | Specify the center of the search context expressed as coordinates. | 10.758867,106.675566 |
text | string | yes | Old address format input | 197 tran phu p4 q5 |
Example¶
Input
https://maps.vietmap.vn/api/migrate-address/v3?apikey={your-apikey}&text=197 tran phu p4 q5&focus=10.75887508,106.67538868
Response format¶
{
"address": "Phường Chợ Quán,Thành Phố Hồ Chí Minh",
"name": "197 tran phu ",
"display": "197 tran phu Phường Chợ Quán,Thành Phố Hồ Chí Minh",
"boundaries": [
{
"type": 2,
"id": 18700,
"name": "Chợ Quán",
"prefix": "Phường",
"full_name": "Phường Chợ Quán"
},
{
"type": 0,
"id": 12,
"name": "Hồ Chí Minh",
"prefix": "Thành Phố",
"full_name": "Thành Phố Hồ Chí Minh"
}
]
}
Response description¶
Autocomplete API will respond to a list
that contains up to 10 places
.
Parameter | Type | Description |
---|---|---|
address | string | Full address including street , ward , and city . |
name | string | Name of the POI/Address |
display | string | Display name containing detailed information of the POI address |
boundaries | array | Array containing boundary information (ward, district, city) |
For the boundaries
array:
Sub-Parameter | Type | Description |
---|---|---|
type | int | Type of boundary (0 for city , 1 for district , 2 for ward ) |
id | int | Unique identifier for the boundary |
name | string | Name of the boundary |
prefix | string | Prefix of the boundary (e.g., "Phường" for ward) |
full_name | string | Full name of the boundary (e.g., "Phường 9" for ward) |