Input
Send a start point, 2-20 delivery stops, optional end point, vehicle metadata, and optimisation preference.
API and MCP access for AI agents, courier tools, and delivery workflows.
QuantaRoute turns delivery addresses into an ordered route, estimates distance and fuel savings, creates a Google Maps link, and prepares a WhatsApp-ready driver message.
Use the public API when your app, assistant, or business workflow needs to optimise a small UK multi-drop route.
POST /api/optimise-route
API keys: during public testing, API keys are optional. If you have a key, send it with X-API-Key. Invalid or inactive keys return 401; keys that exceed their monthly limit return 429. Paid/API access will require keys later.
Send a start point, 2-20 delivery stops, optional end point, vehicle metadata, and optimisation preference.
Receive ordered stops, distance estimates, estimated saving, Google Maps URL, WhatsApp driver message, route sheet URL, optional API-client usage metadata, and warnings.
Optional header: X-API-Key: qr_your_key_here
{
"start": "Plymouth Railway Station, North Road, Plymouth, PL4 6AB",
"stops": [
"Drake Circus Shopping Centre, 1 Charles Street, Plymouth, PL1 1EA",
"Royal William Yard, Plymouth, PL1 3RP",
"Plymouth Market, Cornwall Street, Plymouth, PL1 1PS",
"The Box, Tavistock Place, Plymouth, PL4 8AX"
],
"end": "Plymouth Railway Station, North Road, Plymouth, PL4 6AB",
"vehicle": "van",
"optimise_for": "distance"
}
If your start or end address is also included inside stops, it may appear more than once in the route. For clean results, do not duplicate the depot/start/end inside the stops list.
ordered_stops includes the start address, optimised delivery stops, and end address when provided.
{
"success": true,
"input_stop_count": 4,
"ordered_stops": [
"Plymouth Railway Station, North Road, Plymouth, PL4 6AB",
"Drake Circus Shopping Centre, 1 Charles Street, Plymouth, PL1 1EA",
"The Box, Tavistock Place, Plymouth, PL4 8AX",
"Royal William Yard, Plymouth, PL1 3RP",
"Plymouth Market, Cornwall Street, Plymouth, PL1 1PS",
"Plymouth Railway Station, North Road, Plymouth, PL4 6AB"
],
"original_distance_km": 9.82,
"optimised_distance_km": 9.24,
"distance_saved_km": 0.58,
"estimated_saving_percent": 5.91,
"google_maps_url": "https://www.google.com/maps/dir/...",
"whatsapp_message": "Hi Driver! Your optimised route is ready...",
"route_sheet_url": "https://quantaroute.co.uk/route-sheet/123",
"api_client": {
"label": "Courier Bot",
"usage_count_current_month": 12,
"monthly_limit": 1000
},
"warnings": [
"Distance estimates compare route candidates against the address order entered.",
"Estimated savings can vary due to traffic, road closures, driver behaviour, vehicle type, and delivery constraints."
]
}
Live
Local stdio server available
Not active yet
Live
Planned
Planned
Planned
QuantaRoute also ships with a local stdio MCP server for AI assistants and business agents.
optimise_delivery_route
cd C:\Users\rw718\Desktop\QuantaRoute\mcp
npm install
npm run build
$env:QUANTAROUTE_API_BASE_URL="https://quantaroute.co.uk"
npm start
{
"mcpServers": {
"quantaroute": {
"command": "node",
"args": [
"C:\\Users\\rw718\\Desktop\\QuantaRoute\\mcp\\dist\\server.js"
],
"env": {
"QUANTAROUTE_API_BASE_URL": "https://quantaroute.co.uk",
"QUANTAROUTE_API_KEY": "optional-during-public-testing"
}
}
}
}
The MCP tool calls the same POST /api/optimise-route endpoint as the public API. It does not duplicate route logic.
API keys are being prepared for paid access, rate limits, and partner integrations. They are optional while public testing remains open.
Keys are stored as one-way hashes. The raw key is only shown once when created.
Production warning: running scripts/create_api_key.py locally without DATABASE_URL creates the key in local SQLite, not live Render Postgres. That key will not work against production.
cd C:\Users\rw718\Desktop\QuantaRoute
$env:DATABASE_URL="postgresql://user:password@host:5432/database"
python scripts\create_api_key.py --label "Rana test key" --monthly-limit 100
$env:DATABASE_URL=$null
Use the Render Postgres connection string for DATABASE_URL. Never commit it or share it in screenshots.
# If the shell starts at the repository root:
python scripts/create_api_key.py --label "Rana test key" --monthly-limit 100
# If the shell starts in the backend rootDir:
python ../scripts/create_api_key.py --label "Rana test key" --monthly-limit 100
The Render web service shell should already have the production DATABASE_URL environment variable available. The script prints the raw key once, so store it securely immediately.
curl -X POST "https://quantaroute.co.uk/api/optimise-route" \
-H "Content-Type: application/json" \
-H "X-API-Key: qr_your_key_here" \
-d "{\"start\":\"Plymouth Railway Station, North Road, Plymouth, PL4 6AB\",\"stops\":[\"Drake Circus Shopping Centre, 1 Charles Street, Plymouth, PL1 1EA\",\"Royal William Yard, Plymouth, PL1 3RP\"],\"end\":\"Plymouth Railway Station, North Road, Plymouth, PL4 6AB\",\"vehicle\":\"van\",\"optimise_for\":\"distance\"}"
No-key API testing still works while QuantaRoute is in public testing. Keys prepare the product for monthly limits and future paid access.
QuantaRoute provides estimated route optimisation and fuel-saving calculations. It does not guarantee the mathematically shortest route in all cases. Drivers must follow road laws, live traffic, road closures, vehicle restrictions, and professional judgement.
Do not include depot/start/end inside stops unless it is a real delivery stop.
Stripe checkout is not active yet. QuantaRoute is currently free to test while payments are being prepared. API keys are optional for now and will become part of paid/API access later.