Route Optimization API

The Route Optimization API is designed to identify the most efficient routes based on specific criteria, such as minimizing travel time, distance, cost, or environmental impact.

Key Features

With the Route Optimization API, you can:

  • Optimize Routes:
    Retrieve the best route(s) for multiple origins and destinations while considering factors such as traffic conditions, road restrictions, vehicle specifications, and user preferences.

  • Comprehensive Route Details:
    Access detailed information, including:

    • Order of Visits: The recommended sequence for your stops.
    • Total Travel Time and Distance: Clear insights into the duration and length of your journey.
    • Estimated Arrival and Departure Times: Get accurate time predictions for your trip.
    • Route Instructions: Step-by-step navigation to ensure a smooth journey.

Use Cases

🚗

Road Trip Planning

Plan your road trip by finding the best route to visit multiple destinations.

  • Specify your budget and time limit to get the optimal route.
  • Maximize enjoyment by incorporating preferred attractions.
  • Minimize expenses with efficient route suggestions.
🚚

Fleet Management

Manage your fleet effectively by optimizing routes for vehicles and drivers.

  • Assign tasks and priorities to each vehicle and driver.
  • Meet business goals with optimal routing solutions.
  • Enhance customer satisfaction with timely deliveries.
📦

Delivery Route Optimization

Find the best routes for delivery trucks and couriers.

  • Optimize routes based on delivery time windows and capacity.
  • Reduce fuel consumption for cost-effective deliveries.
  • Ensure timely deliveries while maximizing courier skills.
🚌

Commute Optimization

Find the best route for your daily commute based on your transportation mode.

  • Compare travel time, distance, cost, and environmental impact.
  • Choose the best option between driving, biking, or public transit.
  • Enhance daily commuting experience with informed choices.

Usage

curl https://mapapi.gebeta.app/api/route/tss/?json=[]&apiKey={yourapikey}

Parameters

ParameterTypeDescriptionRequired
jsonstring[]An array of semicolon-separated latitude and longitude pairs to specify which places to visit along the way.yes
apiKeystringYour API key for accessing Gebeta Maps.yes

Response Codes for Route Optimization API

Status CodeMessageDescription
200OKThe request was successful. The system found a valid route and returned the requested data.
404NoRouteNo route exists between the specified locations. Confirm that the locations are accessible by route.
401Not Authorized - No TokenAuthentication failed. No valid token was provided. Please include a valid authentication token.
401Not Authorized - Invalid TokenThe authentication token provided is either invalid or expired. Use a current, valid token.
422InvalidInputThe request parameters are incorrect. Review the input values and adjust as needed.

Route Optimization API - CURL Request

To get a route using the TSS API, you can use the following curl command:

curl "https://mapapi.gebeta.app/api/route/tss/?json=[{8.989022,38.79036},{9.03045,38.76530}]&apiKey={your-api-key}"

Example

fetch('https://mapapi.gebeta.app/api/route/tss/?json=[{8.989022,38.79036},{9.03045,38.76530}]&apiKey={your-api-key}')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

API Limits and Restrictions

The Route Optimization API has some restrictions and limits that you need to be aware of before using it:

  • Coordinates Waypoints: Should only be less than or equal to 10.
  • Rate Limit: 50 requests per second from a single API token. If you exceed this limit, you will receive an error message and your requests will be rejected. To avoid this, you can throttle your requests or use multiple tokens for different applications or users.
  • Inter-Country Requests: Not allowed. You can only request directions within the same country or region. If you try to request directions across different countries or regions, you will receive an error message, and your request will be invalid. For inter-country travel, consider using other map services or APIs that support this feature.

On this page