TrendRoute API Documentation Overview.
Meta description: Route Optimization & ETA REST APIs. Integrate route optimization, ETA calculation, and geospatial APIs into your logistics platform. REST/JSON APIs with API-key auth, explore endpoints and quick-start examples.
Integration at a glance
Your logistics platform remains the system of record. TrendRoute receives the planning problem, processes it through its optimisation and geospatial services, and returns structured operational results.
Your Logistics Platform
Orders, missions, vehicles, static routes and operational rules.
TrendRoute APIs
Optimisation, extension, ETA / recalculation and geospatial services.
Operational Output
Routes, assignments, ETAs, KPIs, geometry and unassigned orders.
X-API-Key header and standard validation
responses. Requests can use geographic coordinates
or addresses where supported.Core API service families
Use only the services your workflow needs — from single-route optimisation to ETA recalculation and geospatial infrastructure.
Route Optimisation
Optimise one route, allocate orders across multiple routes, or solve pickup-and-delivery shipment flows.
/api/v1/route-optimization/...Route Extension
Insert new candidate orders into existing or static routes with optional post-optimisation and extra-route creation.
/api/v1/route-extension/multiRoute Recalculation & ETA
Keep the supplied route sequence while calculating ETAs and route performance, including optional courier-performance tuning.
/api/v1/route-recalculation/...Geospatial Services
Distance and duration matrices, route directions, geocoding, reverse geocoding and snapped route geometry.
/api/v1/geospatial/...API service catalogue
A high-level compatibility view for solution architects and developers evaluating how TrendRoute fits into an existing operational platform.
Operational APIs
| Service | Endpoint | Best used for | Key data exchanged | Integration |
|---|---|---|---|---|
| Single route | POST /route-optimization/ | Optimising the stop sequence for one vehicle / route. | Orders, hub, optional vehicle, constraints, start time and objective. | Low |
| Multi-route | POST /route-optimization/multi | Allocating orders across vehicles and optimising all resulting routes. | Orders, hub, vehicles, capacities, route limits and objective. | Medium |
| Shipment | POST /route-optimization/shipment | Express, food and courier flows where pickup must precede delivery. | Pickup / delivery steps, vehicle, hub, capacity and route constraints. | Medium |
| Route extension | POST /route-extension/multi | Adding dynamic orders to existing or static routes. | Existing routes, vehicles, candidate orders, hub and limits. | Medium |
| Recalculation / ETA | POST /route-recalculation/ | Calculating ETAs and route KPIs without changing the supplied route sequence. | Ordered stops, hub, start time and optional courier context. | Low |
| Shipment recalculation | POST /route-recalculation/shipment | ETA and KPI recalculation for routes with pickup dependencies. | Ordered shipment stops, hub, start time and courier context. | Low–Medium |
Geospatial APIs
| Service | Endpoint | Purpose | Compatibility notes |
|---|---|---|---|
| Matrix | POST /geospatial/matrix | Generate pairwise travel distance and duration matrices. | Minimum 2 geolocations. |
| Directions | POST /geospatial/direction | Return route distance, duration, encoded geometry and ordered point groups. | 2–500 points, car / bike routing, snapped locations and walking groups. |
| Geocode | POST /geospatial/geocode | Convert addresses to latitude / longitude while preserving caller IDs. | 1–100 addresses per request. |
| Reverse geocode | POST /geospatial/reverse-geocode | Convert coordinates to addresses while preserving caller IDs. | 1–100 coordinates per request. |
Data model compatibility
TrendRoute exchanges the operational data your platform already works with while keeping your own IDs and business workflow in control.
IN Common inputs
- Order / mission ID and stop ID
- Latitude / longitude or address
- Service time and time windows
- Weight / volume and vehicle capacities
- Hub / depot and route start time
- Vehicle route limits and transport mode
- Distance, duration or custom cost objective
OUT Common outputs
- Ordered route steps and vehicle assignment
- ETA per step and cumulative travel metrics
- Total distance and travel time
- Service and waiting time
- Stops/hour and route duration
- Unassigned order IDs where applicable
- Route geometry and walking-group IDs
Optional feedback loop
Operational execution results can optionally be returned to TrendRoute for analytics, performance monitoring and — when enabled by the customer — further improvement of ETA models, clustering, map intelligence and optimisation behaviour.
Integration workflow
A straightforward five-step implementation path from authentication to live operations and optional feedback.
Authenticate
Store the TrendRoute API key securely and send it as X-API-Key.
Map data
Translate your orders, vehicles, routes and constraints into the request schema.
Call API
Choose optimisation, route extension, recalculation / ETA or geospatial services.
Consume result
Persist route IDs, stop order, ETAs, assignments and KPIs in your platform.
Operate & feedback
Publish routes and optionally return execution results for analytics and improvement.
Minimal single-route example
A compact example showing the basic structure of a single-route optimisation request.
POST /api/v1/route-optimization/
X-API-Key: <your-api-key>
Content-Type: application/json
{
"region_id": "stockholm",
"orders": [
{
"id": "o-101",
"stop_id": 1,
"latitude": 59.33,
"longitude": 18.08,
"service_time": 120
},
{
"id": "o-102",
"stop_id": 2,
"latitude": 59.31,
"longitude": 18.06,
"service_time": 120
}
],
"hub": {
"id": "hub-1",
"latitude": 59.31,
"longitude": 18.09
},
"vehicle": {
"id": "van-12",
"transport_mode": "car"
},
"optimization_criteria": "duration"
}A successful optimisation response returns the route, any unassigned order IDs, aggregate summary metrics and execution time. Route steps can include ETAs, cumulative time and distance, service or waiting time, vehicle load and walking-group metadata.
Integration complexity checklist
Validate the following areas before moving from technical evaluation into implementation.
Location data
Can you supply stable IDs plus coordinates or addresses?
Constraints
Which time windows, capacities, route limits and cost objectives must be preserved?
Existing route model
Do you already store ordered static routes and assigned vehicles?
ETA workflow
Do you need planning-time ETA without changing the route sequence?
Downstream mapping
Can your dispatch or driver app consume route steps, assignments and ETAs?
Optional feedback loop
Do you want to return execution outcomes after routes are operated?
Security & errors
How will credentials, retries and validation errors be handled?
Test your logistics scenarios before writing integration code.
Use the TrendRoute Sandbox to build scenarios, inspect routes visually and evaluate how the API fits into your existing logistics platform.