{"id":2754,"date":"2023-12-20T20:40:54","date_gmt":"2023-12-20T20:40:54","guid":{"rendered":"https:\/\/developers.maplink.global\/example-1-simple-freight-calculation\/"},"modified":"2024-03-04T13:27:13","modified_gmt":"2024-03-04T13:27:13","slug":"example-1-simple-freight-calculation","status":"publish","type":"post","link":"https:\/\/developers.maplink.global\/en\/example-1-simple-freight-calculation\/","title":{"rendered":"Example 1 &#8211; Simple freight calculation"},"content":{"rendered":"\n<p>In this example, we will calculate the minimum freight for a route of 481 km (one way) that will be carried out by a truck with 4 double axles, the cargo of which is solid bulk and the type of operation contracted was &#8220;Operation road haulage&#8221; (Table A).<\/p>\n\n<p>In addition to the freight, the carrier wants to include a 5% ICMS surcharge and $200.00 flat-rate tax on the calculated value.<\/p>\n\n<p><strong>Endpoint used:<\/strong> https:\/\/api.maplink.global\/freight\/v1\/calculations (Method: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\"><strong>POST<\/strong><\/mark>)<\/p>\n\n<p>The full request can be found below:<\/p>\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    \"operationType\": [\n        \"A\"\n    ],\n    \"goodsType\": [\n        \"GRANEL_SOLIDO\"\n    ],\n    \"axis\": [\n        4\n    ],\n    \"roundTrip\": false,\n    \"backEmpty\": false,\n    \"distance\": 481,\n    \"otherCosts\": [\n        {\n            \"name\": \"ICMS\",\n            \"type\": \"PERCENT\",\n            \"value\": 5\n        },\n        {\n            \"name\": \"Taxa Fixa\",\n            \"type\": \"FIXED\",\n            \"value\": 200\n        }\n    ],\n    \"date\": \"2021-12-02\"\n }<\/pre>\n\n<p>The full response can be found below:<\/p>\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    \"source\": \"RESOLU\u00c7\u00c3O N\u00ba 496, DE 19 DE OUTUBRO DE 2021\",\n    \"results\": {\n        \"A\": {\n            \"4\": {\n                \"GRANEL_SOLIDO\": {\n                    \"value\": 1956.60,\n                    \"otherCosts\": {\n                        \"ICMS\": 97.83,\n                        \"Taxa Fixa\": 200\n                    }\n                }\n            }\n        }\n    },\n    \"minimumFreight\": 1956.60,\n    \"minimumFreightWithCosts\": 2254.43\n}<\/pre>\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this example, we will calculate the minimum freight for a route of 481 km (one way) that will be carried out by a truck with 4 double axles, the cargo of which is solid bulk and the type of operation contracted was &#8220;Operation road haulage&#8221; (Table A). In addition to the freight, the carrier [&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":[167],"tags":[],"class_list":["post-2754","post","type-post","status-publish","format-standard","hentry","category-freight-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2754","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=2754"}],"version-history":[{"count":1,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2754\/revisions"}],"predecessor-version":[{"id":2755,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2754\/revisions\/2755"}],"wp:attachment":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/media?parent=2754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/categories?post=2754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/tags?post=2754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}