Tolls using a complete polyline from any mapping service
How to make a request using encoded polyline?
Source is something you get polyline from eg google, heremaps,
etc. (this does not affect toll calculations. ) this for us to
take into account if there are any discrepancies
{
"source": "here",
"polyline": "gib}FjbyeOa@?c@?c@@g@?_A@c@?gA?kAB_B???@aEAg@HKEiF?m@AsA?E?I@G@GBY??@ABA@A@A@C@A@C?A@C?C@C?A?C?C?CAC?CAEAEAAAAACAAAAAAAAAACQAIAI?I?C?KAqA?g@G]?M?wAA_BCiCAwACsB?cCAiB?sB?y@?i@?eCC_EAkB?_BAsB?u@CkFAwC?gA?qB?i@?"
}
How to make a request using the path of lat-lng?
{
"source": "here",
"path": "33.7178,-117.721|33.7177,-117.721|33.7173,-117.7213|33.7169,-117.7215|33.7164,-117.7218|33.7159,-117.722|33.7155,-117.7223|33.715,-117.7225|33.7146,-117.7227|33.7141,-117.723|33.7134,-117.7233|33.713,-117.7235|33.7128,-117.7236|33.7123,-117.7238|33.7119,-117.724|33.7118,-117.7241|33.7114,-117.7243|33.7109,-117.7245|33.7105,-117.7247|33.7101,-117.7249|33.7095,-117.7251|33.7089,-117.7254|33.7086,-117.7255|33.7084,-117.7256|33.7081,-117.7258|33.7077,-117.726|33.7076,-117.726|33.7075,-117.726|33.7074,-117.726|33.7074,-117.7261|33.7068,-117.7264|33.7066,-117.7265|33.7063,-117.7267|33.7061,-117.7268|33.7057,-117.7271|33.7054,-117.7273|33.7052,-117.7275|33.7052,-117.7275|33.7049,-117.7277|33.7048,-117.7278|33.7046,-117.728|33.7044,-117.7281|33.7042,-117.7284|33.7041,-117.7284|33.7038,-117.7288|33.7036,-117.729|33.7033,-117.7292|33.7026,-117.7301|33.7023,-117.7304|33.702,-117.7308|33.7015,-117.7313|33.7012,-117.7317|33.7011,-117.7319"
}
How to customize a vehicle?
1. The Tolls API
supports customization of tolls based on the vehicle type and
region of travel.
2. Different vehicle types have different parameters that affect toll calculations, and these parameters can vary by region.
3. In North America and Europe, tolls are particularly sensitive to vehicle customization.
4. By default, the Tolls API uses "2AxlesAuto" as the vehicle type for calculating tolls, unless a different type is specified in the request
2. Different vehicle types have different parameters that affect toll calculations, and these parameters can vary by region.
3. In North America and Europe, tolls are particularly sensitive to vehicle customization.
4. By default, the Tolls API uses "2AxlesAuto" as the vehicle type for calculating tolls, unless a different type is specified in the request
How to add vehicle type in the request body?
{
"source": "here",
"polyline": "w`ntFhmhgMa@AC?J[@a@A]G]E[KYISGQAS@UBMJQHMXa@tBDhA@z@Aj@Ef@Ed@Mn@Sp@_@`Ag@l@]\\M|@]z@UjASjAOnDe@lJuAp@KfDi@nCc@bFq@|ASZE~ASnAOpAQnMkBxTcDxB[xF{@xDg@rCc@jAMfBMfAEpBIrAG^CTCd@Ed@MVIzAq@xAm@v@[b@OHC^If@GlC[hAQfAOb@KPETIHEZUNQFKT_@J[H[Hc@Da@JeBHgADc@DYJk@Lg@Nc@Na@Ra@j@}@rAcBd@m@\\m@`@u@T]JOp@gAT_@R_@v@{ARa@L[d@eAb@sAj@gB`@uARy@Z_BV{A`@sCH{@LeBLsBBa@RuEZkITgGDaAPsDL_DFgBZcIXsHXcHBm@HiBnAe\\?e@@kABuE@sB?cACeBA_AEsAO}DKcBSwCMkB{@eMCc@MoBOwBg@eHSwCKiAo@aJi@qIc@{GAOC_@IkAM}BEaACw@CkAA{@?u@B}@HuAFy@TkCJkAJkADc@D_AD}@Bg@D}AAeBCeAEkAGaAQcBGe@EYQ{@]}Ag@aBi@{Ai@mAIQS_@]o@OYkCyEWc@[k@a@q@KSw@uAiBeD_AkBOYg@_ACEIOS]q@mAaAiBw@sAiDkGyByDmAsB[q@gCsFc@eA]_A_@cA[_Aq@sBc@wAc@_Bg@eBUiAI]SaAQ_AgBgKgB_KqEsWsA{HEWKk@o@uDu@eE}@kFmAcHQeAG[Kk@Ie@EWUqAoDqS{AyIQ_AEUWyAu@mEq@wDaAuFuBqLm@qDSiAQiAUwAMy@e@cEGi@I_ASiCIkAOmCG}ACiAEoBCqCAoCBwBD_CFcCDgA@W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wCiA{EU{@g@_Be@mAg@oAk@mAm@mA_@q@e@y@{@mAoAeBuA}AwAwA_A}@MMq@q@gDeDOOWWu@{@a@g@_AwAi@cAUi@Wk@}AkDe@cAa@}@]y@e@cA_AaB[u@Yk@k@sAc@eAe@iAc@iAYs@w@mB{@yB}@yBc@eAQ_@Q_@MWMUMUKQKOOSQUOQSSSSSQUQQMMIQKQKMGWMSIOGQGWIYIWGSESEMCWEQCUC]Cc@CYAiAAaAJy@NaAZ{An@_Ah@KFKFIDMFoB|@IDUJ}An@e@N_@Jo@J_@Di@FqADsAAcAEkBSkAQ}@QyA_@yA_@kCo@yDaAkCq@i@MUGc@Ka@KICYGoA[{Cw@uG_BcCm@o@QmEeAa@KyBk@m@Qc@MQGUIOGOGQIQIOIQKMIOKQMKIOMQQOQIKIMGKGMEKEMEMCIGWGYEUCQCSCWC[AOAWAa@?c@?c@@q@@o@@m@DqB^iIBo@DaAPcD@_@@g@Fy@HaB@YF}A@S@[FmABk@Bi@JwBBk@Di@Dm@Fq@B[BUFu@FuAJgC@]FuA@e@@aA@eC?SByAL{ALaAD_@F[PqANkALs@VkBL_APqAn@qELkAHaB@c@PkE`A}UJiBTeCdAcLNsAR{BTiCDg@JaAFo@VkCb@mEj@iGRoBNaBVqFf@eLRoDNoARaAXcALYTm@j@cAVc@bA{AzA_ChAgBj@}@|@gAX_@NSb@k@f@u@`@m@Xc@^i@V[JGVKRAb@@\\JNHJJDJFTDZ@N@n@@b@@NBPBJBJFJFHFFDBFBHBH@H?JAJCHEHGDEHKBEBGBIBMBO@I@M?OAQAKCOCICGCEEGGGKIEEGKEOAK?S|@Jl@F^D`CX|@HdAHJ@pAPf@FP@RAd@Zn@b@`@`@jBtAhBrArBxAbBjAzB{FhAiD",
"vehicle": {
"type": "4AxlesTruck"
}
}
North America - Here, tolls are dependent on following vehicle
parameters
height - For example, different rates may apply for
vehicles with a height between 1-7 feet versus those that
are 8 feet or taller.
{
"source": "google",
"polyline": "w`ntFh.......................................................................................................|@Jl@F^D`CX|@HdAHJ@pAPf@FP@RAd@Zn@b@`@`@jBtAhBrArBxAbBjAzB{FhAiD",
"vehicle": {
"type": "4AxlesAuto",
"height": {
"value": 10,
"unit": "feet"
}
}
}
weight - For example, specifying a different weight in the
request may result in a different toll rate being
calculated.
{
"source": "google",
"polyline": "w`ntFh.......................................................................................................|@Jl@F^D`CX|@HdAHJ@pAPf@FP@RAd@Zn@b@`@`@jBtAhBrArBxAbBjAzB{FhAiD",
"vehicle": {
"type": "2AxlesTruck",
"weight": {
"value": 20000,
"unit": "pound"
}
}
}
When making a request to the Tolls API, users have the
option to specify either the vehicle's height or weight,
or both. The tolls charged by the API will be calculated
based on the provided vehicle parameters.
Europe - Here, tolls are dependent on following vehicle parameters
height - For example, different rates may apply for
vehicles with different heights.
{
"source": "google",
"polyline": "w`ntFh.......................................................................................................|@Jl@F^D`CX|@HdAHJ@pAPf@FP@RAd@Zn@b@`@`@jBtAhBrArBxAbBjAzB{FhAiD",
"vehicle": {
"type": "4AxlesTruck",
"weight": {
"value": 14,
"unit": "ton"
},
"height": {
"value": 20,
"unit": "meter"
},
"axles": 4,
"emissionClass": "euro_6"
}
}
weight - For example, different rates may apply for
vehicles with a weight between 4-11 tonnes versus those
that are 12 tonnes or heavier.
{
"source": "google",
"polyline": "w`ntFh.......................................................................................................|@Jl@F^D`CX|@HdAHJ@pAPf@FP@RAd@Zn@b@`@`@jBtAhBrArBxAbBjAzB{FhAiD",
"vehicle": {
"type": "4AxlesTruck",
"weight": {
"value": 14,
"unit": "ton"
},
"height": {
"value": 20,
"unit": "meter"
},
"axles": 4,
"emissionClass": "euro_6"
}
}
axles -The toll rates in the Tolls API are subject to
change based on the number of axles on the vehicle.
Therefore, it is important to provide accurate axle
information in the request to ensure reliable toll
calculations.
{
"source": "google",
"polyline": "w`ntFh.......................................................................................................|@Jl@F^D`CX|@HdAHJ@pAPf@FP@RAd@Zn@b@`@`@jBtAhBrArBxAbBjAzB{FhAiD",
"vehicle": {
"type": "4AxlesTruck",
"weight": {
"value": 14,
"unit": "ton"
},
"height": {
"value": 20,
"unit": "meter"
},
"axles": 4,
"emissionClass": "euro_6"
}
}
emissionClass - For example, different rates may apply for
vehicles with an emissionClass between euro_0-2 and those
between euro_3-6. It is important to provide accurate
vehicle emission information in the request to ensure
reliable toll calculations.
{
"source": "google",
"polyline": "w`ntFh.......................................................................................................|@Jl@F^D`CX|@HdAHJ@pAPf@FP@RAd@Zn@b@`@`@jBtAhBrArBxAbBjAzB{FhAiD",
"vehicle": {
"type": "4AxlesTruck",
"weight": {
"value": 14,
"unit": "ton"
},
"height": {
"value": 20,
"unit": "meter"
},
"axles": 4,
"emissionClass": "euro_6"
}
}
How to get tolls on your route based on departure time?
1. The departure
time parameter is an important component in time-based toll
calculations in the Tolls API.
2. There are two formats available for specifying the departure time: Epoch and UTC.
3. The departure time parameter is an important component in time-based toll calculations in the Tolls API.
2. There are two formats available for specifying the departure time: Epoch and UTC.
3. The departure time parameter is an important component in time-based toll calculations in the Tolls API.
{
"source": "google",
"polyline": "ioxlEfkomULF`Bp@fAf@dBv@vAn@xAp@~An@vAl@zAj@tCfAdA^p@XxAj@xAh@THfA`@zAl@|Al@~@^vBt@`Cv@v@Vf@PdA\\dAf@XFT?HBFBlB~@r@\\p@\\n@^pAv@x@j@\\XNJn@d@\\V`@\\`@\\j@h@RPz@|@l@n@l@p@pCfDz@bA`AjAzAjB|@dA\\^",
"departure_time": "2023-05-10T05:00:00-07:00"
}
Parameters related to calculate fuel expenses are:
1. fuelCost
2. fuelEfficiency
1. fuelCost
2. fuelEfficiency
{
"source": "google",
"polyline": "w`ntFh.......................................................................................................|@Jl@F^D`CX|@HdAHJ@pAPf@FP@RAd@Zn@b@`@`@jBtAhBrArBxAbBjAzB{FhAiD",
"vehicle": {
"type": "2AxlesAuto"
},
"fuelOptions": {
"fuelCost": {
"value": 4,
"currency": "USD",
"units": "$/gallon"
},
"fuelEfficiency": {
"city": 24,
"hwy": 32,
"units": "mpg"
}
}
}
How to get state mileage information for North America?
{
"source": "google",
"polyline": "w`ntFh.......................................................................................................|@Jl@F^D`CX|@HdAHJ@pAPf@FP@RAd@Zn@b@`@`@jBtAhBrArBxAbBjAzB{FhAiD",
"state_mileage": true
}