Skip to content

Route API

The Flio.ai Route API provides powerful point-to-point navigation and routing capabilities. Whether you need simple directions or complex multi-stop routes with specific constraints, the Route API delivers optimized paths for your vehicles.

🎯 What is the Route API?

The Route API calculates optimal routes between origin and destination points, considering various factors like:

  • Transport modes (car, truck)
  • Route optimization (distance vs duration)
  • Waypoints (intermediate stops)
  • Alternative routes (multiple options)
  • Vehicle specifications (dimensions, hazardous goods)
  • Feature avoidance (tunnels, ferries, tolls)
  • Real-time factors (departure/arrival times)

🚗 Key Features

Transport Modes

Mode Description Best For
Car Standard passenger vehicle routing Deliveries, services, personal navigation
Truck Commercial vehicle routing with restrictions Freight, logistics, large vehicle routing

Route Optimization

Optimization Focus Use Case
Distance Minimize kilometers traveled Fuel efficiency, cost savings
Duration Minimize travel time Time-sensitive deliveries, emergency services

Advanced Capabilities

Feature Description Benefit
Waypoints Add intermediate stops Multi-stop routing
Alternatives Get multiple route options Flexibility, comparison
Vehicle Specs Define vehicle dimensions Accurate truck routing
Avoid Features Skip tunnels, ferries, tolls Customized routing
Toll Costs Calculate toll expenses Budget planning

📊 Route vs Optimize API

Understanding when to use each API:

Aspect Route API Optimize API
Purpose Point-to-point navigation Multi-vehicle job assignment
Input Origin, destination, waypoints Vehicles, jobs, constraints
Output Route geometry, turn-by-turn Optimized vehicle schedules
Use Case "How do I get from A to B?" "Which vehicle should do which jobs?"
Complexity Single route calculation Fleet optimization problem

🔧 Basic Usage

Simple Route Request

{
  "tasks": [
    {
      "mode": "car",
      "origin": [41.0082, 28.9784],
      "destination": [41.0150, 28.9850],
      "minimize": "duration"
    }
  ]
}

Multi-Stop Route with Waypoints

{
  "tasks": [
    {
      "mode": "car",
      "origin": [41.0082, 28.9784],
      "waypoints": [
        [41.0100, 28.9800],
        [41.0122, 28.9820]
      ],
      "destination": [41.0150, 28.9850],
      "alternatives": 2,
      "minimize": "distance"
    }
  ]
}

Truck Route with Specifications

{
  "tasks": [
    {
      "mode": "truck",
      "origin": [41.0082, 28.9784],
      "destination": [41.0030, 28.9720],
      "vehicle": {
        "length": 1200,
        "width": 250,
        "height": 350,
        "axle_count": 4
      },
      "avoid_features": ["tunnel", "ferry"],
      "tolls": true,
      "currency": "EUR"
    }
  ]
}

💡 Common Use Cases

1. Navigation & Directions

Get turn-by-turn directions for drivers with real-time considerations.

2. Delivery Route Planning

Plan multi-stop delivery routes with specific waypoints and time constraints.

3. Truck Routing

Calculate routes considering vehicle dimensions, weight restrictions, and hazardous materials.

4. Cost Estimation

Calculate distance, duration, and toll costs for route planning and budgeting.

5. Route Comparison

Generate alternative routes to compare options and choose the best path.

🎯 Features Deep Dive

Explore specific routing features in detail:

Waypoints & Multi-Stop Routing

Add intermediate stops along your route for complex delivery scenarios.

Alternative Routes

Generate multiple route options for comparison and flexibility.

Route Optimization Criteria

Choose between distance and duration optimization based on your needs.

Vehicle Specifications

Define vehicle dimensions and characteristics for accurate truck routing.

Feature Avoidance

Avoid specific road features like tunnels, ferries, and toll roads.

Toll Cost Calculations

Calculate toll costs in different currencies for accurate budgeting.

🚀 Getting Started

  1. Understand your needs: Navigation, delivery planning, or cost estimation?
  2. Choose transport mode: Car for general routing, truck for commercial vehicles
  3. Add waypoints: Include all required stops in your route
  4. Set optimization: Minimize distance or duration based on priority
  5. Configure constraints: Vehicle specs, feature avoidance, toll preferences
  6. Test and iterate: Start simple, add complexity as needed

📚 Next Steps

  • Review the Route API Reference for complete parameter details
  • Check out Route Examples for practical implementations
  • Learn about specific features in the sections above

The Route API provides flexible, efficient routing for all your navigation and delivery needs. Start with basic routes and expand with advanced features as your requirements grow.