API Overview
This API is designed to calculate the shortest / most efficient route based on given location points. During calculation, both the OR-Tools algorithm and AI-based optimization are executed, and the results are returned comparatively. The best result is indicated in the winner field.
Çoklu Araç (VRP) Desteği: Sistemimiz, birden fazla araç kullanıldığında noktaları coğrafi olarak en mantıklı kümelere (Clustering) ayırır ve her bir kümeyi paralel iş parçacıkları (multithreading) ile optimize eder. Bu sayede karmaşık lojistik operasyonları saniyeler içinde AI tarafından çözülür.
Authentication
You must use a Bearer token under the Authorization header for all requests. You can obtain your API key from the dashboard.
HTTP Request Info
- Method:
POST - Content-Type:
application/json - Response-Type:
application/json - Timeout Recommendation:
60 seconds(minimum)
Client-side timeout duration should be set to 60 seconds due to potentially long-running multi-vehicle calculations.
Route Solver
Finds the best route using the Hybrid Engine (AI + OR-Tools). Supports multiple vehicles with automatic clustering.
Çoklu Araç (VRP) Kullanımı
Birden fazla araç için num_vehicles parametresini isteğe eklemeniz yeterlidir. Sistem, noktaları otomatik olarak en verimli kümelere ayırır ve her bir araç için ayrı rota hesaplar.
Request Body (JSON)
Code Examples
Python Request Example
PHP Request Example
Successful Response (200 OK)
Field Descriptions
- best_distance: Total distance found (meters)
- best_route: Visit order of points (index-based). In multi-vehicle scenarios, routes are separated by 0 (e.g., [0,1,2,0,0,3,4,0]). (Çoklu araç durumunda rotalar
0durakları ile birbirinden ayrılır). - winner: The algorithm that gave the best result (AI or OR-Tools)
- num_vehicles: Araç sayısı (Varsayılan: 1). Sistem, noktaları bu sayıya göre kümelere bölerek paralel optimize eder.
- results.ai / results.ortools: Detailed metrics for the algorithms
- route_geometry: GeoJSON compatible route for map plotting
Error & Debug Notes
- Do not parse JSON if you receive a status code other than HTTP 200.
- If an empty response or HTML is returned,
response.textshould be logged. - JSON parse errors are usually caused by timeouts or upstream errors.