Skip to content

Vehicle Specifications

Vehicle specifications are used in route calculation for trucks and commercial vehicles. Plan accurate routes using vehicle dimensions, weight, and hazardous material information.


What are Vehicle Specifications?

Vehicle Specifications customizes route calculation based on vehicle dimensions, weight, and properties. Bridge height restrictions, weight limits, and hazardous material prohibitions are taken into account.


Basic Usage

Vehicle in the Request Body

{
  "origin": {"latitude": 41.0082, "longitude": 28.9784},
  "destination": {"latitude": 41.0150, "longitude": 28.9850},
  "vehicle": {
    "vehicleType": "truck",
    "length": 1200,
    "width": 255,
    "height": 400,
    "axle_count": 3,
    "hazardousGoods": ["flammable"]
  }
}

Vehicle Profile Fields

Field Type Required Description
vehicleType String enum Optional "car", "van", "truck", "motorcycle", "trailer"
fuelType String enum Optional "diesel", "gasoline", "electric", "hybrid", "lpg"
capacity Number Optional Vehicle capacity
capacityType CapacityType Optional Capacity unit
length Integer 0-30000 Optional Vehicle length (cm)
width Integer 0-5000 Optional Vehicle width (cm)
height Integer 0-5000 Optional Vehicle height (cm)
axle_count Integer 2-255 Optional Total number of axles
trailer_axle_count Integer ≥ 1 Optional Number of trailer axles
trailer_count Integer 0-255 Optional Number of trailers
tires_count Integer 0-255 Optional Total number of tires
hazardousGoods [HazardousGoods] Optional Types of hazardous materials being transported
manufactureYear Integer Optional Vehicle manufacture year
brand String Optional Vehicle brand
model String Optional Vehicle model

Use Cases

1. Truck Route

{
  "origin": {"latitude": 41.0082, "longitude": 28.9784},
  "destination": {"latitude": 41.0150, "longitude": 28.9850},
  "vehicle": {
    "vehicleType": "truck",
    "length": 1200,
    "height": 400,
    "axle_count": 3
  }
}

2. Hazardous Material Transport

{
  "origin": {"latitude": 41.0082, "longitude": 28.9784},
  "destination": {"latitude": 41.0150, "longitude": 28.9850},
  "vehicle": {
    "vehicleType": "truck",
    "hazardousGoods": ["flammable", "gas"]
  },
  "avoidFeatures": ["tunnel"]
}

3. Vehicle with Trailer

{
  "origin": {"latitude": 41.0082, "longitude": 28.9784},
  "destination": {"latitude": 41.0150, "longitude": 28.9850},
  "vehicle": {
    "vehicleType": "trailer",
    "trailer_count": 1,
    "trailer_axle_count": 2,
    "length": 1650
  }
}

Hazardous Goods Enum

Value Description
explosive Explosive materials
gas Gaseous materials
flammable Flammable materials
combustible Combustible materials
organic Organic materials
poison Poisonous materials
radioactive Radioactive materials
corrosive Corrosive materials
poisonous_inhalation Materials toxic when inhaled
harmful_to_water Materials harmful to water
other Other hazardous materials

Python Example

import requests

API_BASE_URL = "https://api.flio.ai"
API_KEY = "YOUR-API-KEY"

payload = {
    "origin": {"latitude": 41.0082, "longitude": 28.9784},
    "destination": {"latitude": 41.0150, "longitude": 28.9850},
    "vehicle": {
        "vehicleType": "truck",
        "length": 1200,
        "width": 255,
        "height": 400,
        "axle_count": 3,
        "hazardousGoods": ["flammable"]
    },
    "avoidFeatures": ["tunnel", "ferry"]
}

url = f"{API_BASE_URL}/solver/route?apiKey={API_KEY}"
response = requests.post(url, json=payload)
result = response.json()

Vehicle Specifications — Flio.ai

Next Steps