{"id":2615,"date":"2023-12-18T14:31:34","date_gmt":"2023-12-18T14:31:34","guid":{"rendered":"https:\/\/developers.maplink.global\/list-of-parameters-2\/"},"modified":"2025-02-06T14:39:41","modified_gmt":"2025-02-06T14:39:41","slug":"list-of-parameters-toll","status":"publish","type":"post","link":"https:\/\/developers.maplink.global\/en\/list-of-parameters-toll\/","title":{"rendered":"List of parameters"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Mandatory parameters<\/strong><\/h2>\n\n\n\n<p>The following parameters are required:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>legs<\/code>  &#8211; Array with <code>points<\/code> and <code>vehicleType<\/code> to calculate tolls. Each  <em><code>leg<\/code> <\/em>represents a section of the route. If you want to calculate the toll for different vehicles on each part of the route, for example, you can divide it into several <code>legs<\/code>. <strong>(Only required for the independent endpoint)<\/strong>\n<ul class=\"wp-block-list\">\n<li><code>points<\/code> &#8211; Coordinates that make up the section of the route. The parameter <code>points<\/code> accepts coordinates as objects, arrays, encoded in <code>geohash<\/code> or encoded as <code>polyline<\/code>, as shown in the <a href=\"#coordeninates\" data-type=\"internal\" data-id=\"#coordenada\">examples below<\/a>.<strong><br><\/strong><\/li>\n\n\n\n<li><code>vehicleType<\/code>  &#8211; Text defining the type of vehicle to be considered when calculating the toll. The possible values are:\n<ul class=\"wp-block-list\">\n<li><code>MOTORCYCLE<\/code><\/li>\n\n\n\n<li><code>CAR<\/code><\/li>\n\n\n\n<li><code>CAR_WITH_THREE_SIMPLE_AXLES<\/code><\/li>\n\n\n\n<li><code>CAR_WITH_FOUR_SIMPLE_AXLES<\/code><\/li>\n\n\n\n<li><code>BUS_WITH_TWO_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>BUS_WITH_THREE_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>BUS_WITH_FOUR_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>BUS_WITH_FIVE_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>TRUCK_WITH_NINE_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>TRUCK_WITH_TWO_SINGLE_AXIS<\/code><\/li>\n\n\n\n<li><code>TRUCK_WITH_TWO_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>TRUCK_WITH_THREE_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>TRUCK_WITH_FOUR_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>TRUCK_WITH_FIVE_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>TRUCK_WITH_SIX_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>TRUCK_WITH_SEVEN_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>TRUCK_WITH_EIGHT_DOUBLE_AXLES<\/code><\/li>\n\n\n\n<li><code>TRUCK_WITH_TEN_DOUBLE_AXLES<\/code><br><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>calculationDate<\/code>&nbsp;\u2013 Date and time at which the route will be performed, in timestamp format in milliseconds. Example:&nbsp;<code>1583492400000<\/code><br><\/li>\n\n\n\n<li><code>condition<\/code>\u00a0\u2013\u00a0<strong>(Optional)\u00a0<\/strong>Object that indicates which values \u200b\u200bshould be considered for tolls where there are conditional values, such as a discounted value for tagged vehicles or a specific value for holidays. The object is composed of:\n<ul class=\"wp-block-list\">\n<li><code>billingType<\/code>&nbsp;\u2013 Indicates the type of charge that should be considered. Possible values \u200b\u200bare:&nbsp;<strong><code>[ TAG, NORMAL<\/code><\/strong>&nbsp;<strong><code>]<\/code><\/strong>;<\/li>\n\n\n\n<li><code>period<\/code>&nbsp;\u2013 Indicates the period that should be considered to return the exact toll value. Possible values \u200b\u200bare:&nbsp;<strong><code>[ NORMAL, HOLIDAY, LOW_SEASON, HIGH_SEASON ]<\/code><\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"coordeninates\">Accepted coordinate formats<\/h3>\n\n\n\n<p>The following formats are supported as input for the coordinates in the parameter <code>points<\/code>:<\/p>\n\n\n\n<p><strong>Object<\/strong> &#8211; Objects composed of the parameters <code>latitude<\/code> and <code>longitude<\/code>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\"points\": [\n\t{\n\t\t\"latitude\": -19.50489,\n\t\t\"longitude\": -57.43231 \n\t}\n]<\/pre>\n\n\n\n<p><strong>Array<\/strong> &#8211; Arrays containing latitude and longitude respectively:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\"points\": [\n\t[-19.50489,-57.43231],\n]<\/pre>\n\n\n\n<p><strong>Geohash<\/strong> &#8211; Strings with latitude and longitude encoded in <code>geohash<\/code>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\"points\": [\n\t\"6sx1j15pf\",\n]<\/pre>\n\n\n\n<p><strong>Polyline<\/strong> &#8211; String with all route coordinates coded as <code>polyline<\/code>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\"points\": \"pp`vB|fp}IlAFhCI\"<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example with mandatory parameters<\/strong><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"legs\": [\n        {\n            \"points\": [\n                {\n                    \"latitude\": -23.465395,\n                    \"longitude\": -46.375007\n                },\n                {\n                    \"latitude\": -23.465957,\n                    \"longitude\": -46.371015\n                },\n                {\n                    \"latitude\": -23.467154,\n                    \"longitude\": -46.36559\n                }\n            ],\n            \"vehicleType\": \"TRUCK_WITH_TWO_DOUBLE_AXLES\"\n        }\n    ]\n}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Optional parameters<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>source<\/code>&nbsp;\u2013 Indicates in which coordinate base the tolls should be consulted. Possible values \u200b\u200bare:\n<ul class=\"wp-block-list\">\n<li><code>MAPLINK<\/code>&nbsp;\u2013 Default value if the parameter is not provided;<\/li>\n\n\n\n<li><code>GMAPS<\/code>&nbsp;\u2013 It should be used if the route provided was generated by&nbsp;<a href=\"https:\/\/developers.google.com\/maps\/documentation\/routes\" target=\"_blank\" rel=\"noreferrer noopener\">Routes API<\/a>&nbsp;from Google.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>billing<\/code>&nbsp;\u2013 Text indicating the type of toll charge. Possible values \u200b\u200bare:\n<ul class=\"wp-block-list\">\n<li><code>DEFAULT<\/code>&nbsp;\u2013 This is the default value if the parameter is not informed and indicates that the conventional toll collection calculation will be used, that is, only conventional toll plazas and gantries will be returned;<\/li>\n\n\n\n<li><code>FREE_FLOW<\/code>&nbsp;\u2013 In addition to toll plazas and conventional gantries, gantries that are part of the PaP or Free Flow system, currently available on some highways, will also return.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>transponderOperators<\/code> &#8211; Only for routes in Brazil. Array that indicates which integration codes should be returned, in addition to the ANTT code that will always be returned. The possible values are:\n<ul class=\"wp-block-list\">\n<li><code>CONECTCAR<\/code> &#8211; The <a href=\"https:\/\/www.conectcar.com\/\" data-type=\"link\" data-id=\"https:\/\/www.conectcar.com\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Conectcar<\/a> service code will be returned;<\/li>\n\n\n\n<li><code>SEM_PARAR<\/code> &#8211; The Sem Parar service codes will be returned: <a href=\"https:\/\/app.viafacil.com.br\/vpnew\/login.do\" data-type=\"link\" data-id=\"https:\/\/app.viafacil.com.br\/vpnew\/login.do\">Via F\u00e1cil<\/a> and <a href=\"https:\/\/www.semparar.com.br\/sem-parar-pay\" data-type=\"link\" data-id=\"https:\/\/www.semparar.com.br\/sem-parar-pay\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Sem Parar Pay<\/a>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example with optional parameters<\/strong><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"legs\": [\n        {\n            \"points\": [\n                {\n                    \"latitude\": -23.465395,\n                    \"longitude\": -46.375007\n                },\n                {\n                    \"latitude\": -23.465957,\n                    \"longitude\": -46.371015\n                },\n                {\n                    \"latitude\": -23.467154,\n                    \"longitude\": -46.36559\n                }\n            ],\n            \"vehicleType\": \"TRUCK_WITH_TWO_DOUBLE_AXLES\",\n            \"calculationDate\": 1710769071000,\n            \"condition\":{\n                \"billingType\":\"TAG\",\n                \"period\":\"HOLIDAY\"\n            }\n        }\n    ],\n    \"billing\": \"DEFAULT\",\n    \"transponderOperators\": [\n        \"CONECTCAR\",\n        \"SEM_PARAR\"\n    ],\n    \"source\": \"MAPLINK\"\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Mandatory parameters The following parameters are required: Accepted coordinate formats The following formats are supported as input for the coordinates in the parameter points: Object &#8211; Objects composed of the parameters latitude and longitude: Array &#8211; Arrays containing latitude and longitude respectively: Geohash &#8211; Strings with latitude and longitude encoded in geohash: Polyline &#8211; String [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[163],"tags":[],"class_list":["post-2615","post","type-post","status-publish","format-standard","hentry","category-toll-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2615","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/comments?post=2615"}],"version-history":[{"count":9,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2615\/revisions"}],"predecessor-version":[{"id":3218,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2615\/revisions\/3218"}],"wp:attachment":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/media?parent=2615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/categories?post=2615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/tags?post=2615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}