Calculators
Freight cost calculator API
Compute total freight cost = max(billableWeight·rate·(1+fuel%) + accessorials, minimumCharge) with a line-item breakdown — the standard weight-based freight rating model. Answers 'how much will this shipment cost','freight cost with fuel surcharge','does the minimum charge apply'.
Price$0.01per request
MethodPOST
Route/v1/calc/logi-freight-cost
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calclogisticsfreightcostfuel-surchargeratingtransportshipping
API URL
Integration docshttps://x402.hexl.dev/v1/calc/logi-freight-costExample request
{
"billableWeightKg": 250,
"ratePerKg": 1.2,
"fuelSurchargePercent": 18,
"accessorials": 45
}Example response
{
"formula": "total = max(billableWeight·rate·(1+fuel%) + accessorials, minimumCharge)",
"baseLinehaul": 300,
"fuelSurcharge": 54,
"accessorials": 45,
"totalCost": 399,
"minimumChargeApplied": false,
"breakdown": [
{
"factor": "baseLinehaul",
"value": 300
},
{
"factor": "fuelSurcharge",
"value": 54
},
{
"factor": "accessorials",
"value": 45
}
],
"inputs": {
"billableWeightKg": 250,
"ratePerKg": 1.2,
"fuelSurchargePercent": 18,
"accessorials": 45,
"minimumCharge": 0
}
}Input schema
{
"type": "object",
"required": [
"billableWeightKg",
"ratePerKg"
],
"properties": {
"billableWeightKg": {
"type": "number",
"examples": [
250
]
},
"ratePerKg": {
"type": "number",
"examples": [
1.2
]
},
"fuelSurchargePercent": {
"type": "number",
"description": "fuel surcharge as % of linehaul",
"examples": [
18
]
},
"accessorials": {
"type": "number",
"description": "flat accessorial charges",
"examples": [
45
]
},
"minimumCharge": {
"type": "number",
"examples": [
50
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}