Example 3 – Round trip freight calculation
On a route between Rio de Janeiro and Belo Horizonte (441 km), a haulier wants to obtain the freight rate for a truck with 7 double axles that will carry soybeans and when it arrives at its destination, it will be loaded with corn that will be transported to the point of origin.
The type of operation contracted is “Cargo vehicle operation only” (Table B), where a flat rate of $250.00 will be added.
Endpoint used: https://api.maplink.global/freight/v1/calculations (Method: POST)
The full request can be seen below:
{ "operationType": [ "B" ], "goodsType": [ "GRANEL_SOLIDO" ], "axis": [ 7 ], "roundTrip": true, "backEmpty": false, "distance": 441, "otherCosts": [ { "name": "Taxa Fixa", "type": "FIXED", "value": 250 } ], "date": "2021-12-02" }
When you change the value of the roundTrip
parameter to true, the route distance is automatically multiplied by 2 to obtain the minimum freight calculated for the round trip.
The full response can be found below:
{ "source": "RESOLUÇÃO Nº 496, DE 19 DE OUTUBRO DE 2021", "results": { "B": { "7": { "GRANEL_SOLIDO": { "value": 4202.81, "otherCosts": { "Taxa Fixa": 250 } } } } }, "minimumFreight": 4202.81, "minimumFreightWithCosts": 4452.81 }