TrendRoute.ai
API & Integration

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.

TrendRoute API
POST /api/v1/route-optimization/
X-API-Key: <your-api-key>
{
  "region_id": "stockholm",
  "orders": [...]
  "vehicle": "van-12",
  "optimization_criteria": "duration"
}
Optimised route returned successfully
REST JSON over HTTP
API Key X-API-Key authentication
4 Core API service families
Flexible Coordinates or addresses
Architecture

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.

01

Your Logistics Platform

Orders, missions, vehicles, static routes and operational rules.

03

Operational Output

Routes, assignments, ETAs, KPIs, geometry and unassigned orders.

i
Interface basics: JSON over HTTP, API-key authentication through the X-API-Key header and standard validation responses. Requests can use geographic coordinates or addresses where supported.
Capabilities

Core API service families

Use only the services your workflow needs — from single-route optimisation to ETA recalculation and geospatial infrastructure.

01

Route Optimisation

Optimise one route, allocate orders across multiple routes, or solve pickup-and-delivery shipment flows.

/api/v1/route-optimization/...
02

Route Extension

Insert new candidate orders into existing or static routes with optional post-optimisation and extra-route creation.

/api/v1/route-extension/multi
03

Route Recalculation & ETA

Keep the supplied route sequence while calculating ETAs and route performance, including optional courier-performance tuning.

/api/v1/route-recalculation/...
04

Geospatial Services

Distance and duration matrices, route directions, geocoding, reverse geocoding and snapped route geometry.

/api/v1/geospatial/...
What is available

API service catalogue

A high-level compatibility view for solution architects and developers evaluating how TrendRoute fits into an existing operational platform.

Operational APIs

ServiceEndpointBest used forKey data exchangedIntegration
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

ServiceEndpointPurposeCompatibility 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.
Inputs & Outputs

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.

Implementation

Integration workflow

A straightforward five-step implementation path from authentication to live operations and optional feedback.

1

Authenticate

Store the TrendRoute API key securely and send it as X-API-Key.

2

Map data

Translate your orders, vehicles, routes and constraints into the request schema.

3

Call API

Choose optimisation, route extension, recalculation / ETA or geospatial services.

4

Consume result

Persist route IDs, stop order, ETAs, assignments and KPIs in your platform.

5

Operate & feedback

Publish routes and optionally return execution results for analytics and improvement.

Quick start

Minimal single-route example

A compact example showing the basic structure of a single-route optimisation request.

POST request · JSON
TrendRoute API
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.

Technical evaluation

Integration complexity checklist

Validate the following areas before moving from technical evaluation into implementation.

01

Location data

Can you supply stable IDs plus coordinates or addresses?

Coordinate and address-based inputs are supported where applicable.
02

Constraints

Which time windows, capacities, route limits and cost objectives must be preserved?

Core schemas expose service time, capacities, route limits and custom cost.
03

Existing route model

Do you already store ordered static routes and assigned vehicles?

Route Extension accepts existing routes and candidate orders.
04

ETA workflow

Do you need planning-time ETA without changing the route sequence?

Route Recalculation preserves sequence while recalculating ETAs and KPIs.
05

Downstream mapping

Can your dispatch or driver app consume route steps, assignments and ETAs?

Responses use caller-visible IDs and structured route and step objects.
06

Optional feedback loop

Do you want to return execution outcomes after routes are operated?

Optional feedback APIs support analytics and continuous improvement.
07

Security & errors

How will credentials, retries and validation errors be handled?

Authentication uses X-API-Key and schema validation errors return HTTP 422.
Try before you integrate

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.