Skip to content

Route-tolls


Input the list of GPS coordinates (lat, long). This GPS list is calculated by the Route-tolls API to give the route that best matches the actual route data and the list of toll stations, the amount corresponding to the type of vehicle in the input parameters.

URL

https://maps.vietmap.vn/api/route-tolls?api-version=1.1&apikey={your-apikey}&vehicle={vehicle}

Method

POST

Parameters

Parameter Type Required Default Description
apikey array string yes none API provided by VIETMAP for customer's account.
vehicle number no 1
  • = 1 (Applicable to passenger cars: seats < 12; trucks: gross tonnage <2 tons)
  • = 2 (Applicable to passenger cars: seats <= 30; trucks: gross tonnage < 4 tons)
  • = 3 (Applicable to passenger cars: seats > 31; trucks: total tonnage < 10 tons; tractors: not towing containers)
  • = 4 (Applicable to trucks: gross tonnage < 18 tons; tractor trucks: containers <= 20 feet);
  • = 5 (Applicable to trucks: gross tonnage >= 18 tons; tractors: containers > 20 feet)

Example

Input

URL:
https://maps.vietmap.vn/api/route-tolls?apikey=”YOUR APIKEY”&vehicle=5


body:
[
    [106.765137, 10.477009],[108.363304,11.398591]
]
JSON Output

{
    "path": [
        [
            106.765375,
            10.477203
        ],
        /// More LngLat to present the route here
        [
            106.76586,
            10.478109
        ]
    ],
    "tolls": [
        {
            "name": "Trạm Thu Phí Cầu Phú Mỹ",
            "address": "Đường Võ Chí Công",
            "type": "",
            "amount": 77000
        },
        {
            "name": "Trạm Thu Phí Long Phước",
            "address": "Cao Tốc Hồ Chí Minh Long Thành Dầu Giây",
            "type": "entry",
            "amount": 0
        },
        {
            "name": "Trạm Thu Phí Dầu Giây",
            "address": "Cao Tốc Hồ Chí Minh Long Thành Dầu Giây",
            "type": "exit",
            "amount": 373000
        },
        {
            "name": "Trạm Thu Phí Sông Phan",
            "address": "Km 1725+252 Quốc Lộ 1A",
            "type": "",
            "amount": 177000
        },
        {
            "name": "Trạm Thu Phí Km 1661+600",
            "address": "Km 1661+600 Quốc Lộ 1A",
            "type": "",
            "amount": 177000
        }
    ] 
}

Response description

Parameter Type Description
path array Array containing coordinate pairs along the route
tolls array Array containing toll booth information along the route

For the path array:

Sub-Parameter Type Description
[longitude, latitude] array of floats Coordinate pair representing a point on the route

For the tolls array:

Sub-Parameter Type Description
name string Name of the toll booth
address string Address of the toll booth
type string Type of toll booth (entry, exit, etc.)
amount int Toll amount in local currency