OptiRoad API Documentation

Introduction

The OptiRoad API gives access to the app's features: optimise routes (one or several), geocode addresses, manage the address book and vehicles, read the history. Access requires a Business plan and an API key.

Base URL:

https://www.optiroad.io/api/v1

All requests must include the Authorization header. Responses are JSON. Dates are ISO 8601 strings. Distances are in kilometers, durations in minutes.

Authentication

Authenticate using your API key in the Authorization :

curl https://www.optiroad.io/api/v1/usage \
  -H "Authorization: Bearer or_live_YOUR_KEY"

API keys are created in Settings → API Keys. Each key is shown only once at creation. Maximum 5 keys per account.

JavaScript example

const BASE = "https://www.optiroad.io/api/v1";
const KEY  = process.env.OPTIROAD_API_KEY;

const res = await fetch(`${BASE}/usage`, {
  headers: { Authorization: `Bearer ${KEY}` },
});
const data = await res.json();

Python example

import os, requests

BASE = "https://www.optiroad.io/api/v1"
KEY  = os.environ["OPTIROAD_API_KEY"]

resp = requests.get(
    f"{BASE}/usage",
    headers={"Authorization": f"Bearer {KEY}"}
)
data = resp.json()

Optimize a route

POST/api/v1/optimizeComputes the optimal visiting order with the same engine as the app: account settings, address book records, time windows, traffic and several vehicles.

Request body

{
  "addresses": [
    { "id": "order-1041", "lat": 48.8737, "lng": 2.2950, "serviceDuration": 10 },
    { "id": "order-1042", "address": "12 rue de Rivoli, 75004 Paris",
      "timeWindow": { "start": "09:00", "end": "11:00", "strict": false } },
    { "id": "order-1043", "contactId": "clx..." }
  ],
  "options": {
    "startAddress": { "address": "ZI Nord, 93200 Saint-Denis" },
    "roundTrip": true,
    "mode": "driving",
    "departureTime": "08:00",
    "useTimeWindows": true,
    "trafficAware": false
  }
}

Parameters

FieldTypeDescription
addressesarrayRequired. 1 to 150 stops, each with a unique id and a location: lat and lng, or address (geocoded), or contactId (address book record).
addresses[].timeWindowobjectTime window { start, end, strict } in HH:MM, honoured with options.useTimeWindows.
addresses[].serviceDurationnumberTime on site in minutes. Otherwise: the address book record's, then the account setting.
addresses[].loadnumberSeats or parcels taken by the stop (1 by default). Used when a vehicle has a capacity.
addresses[].requiresSignature, deliveryNotes, prioritySignature required, delivery instructions, priority. Otherwise taken from the address book record and the account settings.
options.startAddress, options.endAddressobjectStart and end, in the same form as a stop (lat/lng, address or contactId). Without a start, the first stop is the start. With an end, no return to the start.
options.roundTripbooleanReturn to the start after the last stop (default: true).
options.modestringRouting profile: driving (default), truck, cycling, walking.
options.criterionstringWhat the order minimises: duration (default) or distance (single route).
options.departureTime, options.useTimeWindowsdepartureTime (HH:MM) gives arrival times; with useTimeWindows the order also honours time windows.
options.trafficAwarebooleanDurations with traffic (Google Routes). trafficApplied tells whether it could be applied.
options.vehiclesarray2 to 10 vehicles to split stops across: vehicleId (saved vehicle, its depot and capacity are reused) or id, label, start, end, capacity (seats or parcels). Up to the number of drivers in the subscription (1 included, then €9 per month per driver, excl. VAT), otherwise 402 DRIVER_LIMIT.

Response

{
  "optimizedOrder": [0, 2, 1],
  "stops": [
    { "id": "order-1041", "label": "order-1041", "lat": 48.8737, "lng": 2.295,
      "serviceDurationMin": 10, "requiresSignature": false },
    { "id": "order-1043", "label": "Fleurs Rose", "address": "8 rue Oberkampf, 75011 Paris",
      "serviceDurationMin": 5, "requiresSignature": true, "deliveryNotes": "Code 1234" },
    { "id": "order-1042", "label": "12 rue de Rivoli, 75004 Paris", "serviceDurationMin": 5,
      "timeWindow": { "start": "09:00", "end": "11:00", "strict": false } }
  ],
  "legs": [
    { "from": "__v1_start__", "to": "order-1041", "distanceKm": 9.4, "durationMin": 21,
      "estimatedArrival": "08:21", "estimatedDeparture": "08:31", "windowStatus": "no-window" }
  ],
  "totalDistanceKm": 31.2,
  "totalDurationMin": 74,
  "googleMapsUrl": "https://www.google.com/maps/dir/...",
  "encodedPolyline": "u{~vHuqmM...",
  "providerUsed": "ors",
  "trafficApplied": false,
  "approximate": false,
  "partial": false,
  "usageRemaining": null
}

stops describes each stop as computed, with time on site and instructions taken from the address book and the account. approximate is true when the road routing service didn't respond: the order is still valid but distances and times are straight-line estimates (providerUsed is then straight_line). partial is true when the time limit was reached before the improvement finished.

Several vehicles

With options.vehicles, the response contains vehicles (one route per vehicle, with its stops, legs and Google Maps link) instead of optimizedOrder, stops and legs. When a capacity is given, each route includes load and capacity, and stops that fit in no vehicle are listed in unassignedStopIds.

// Request (options)
"vehicles": [
  { "vehicleId": "clx..." },
  { "id": "bike-2", "label": "Vélo 2", "start": { "lat": 48.86, "lng": 2.35 }, "capacity": 8 }
]

// Response
{
  "vehicles": [
    { "vehicleId": "clx...", "label": "Camion 1", "stopIds": ["order-1041", "order-1043"],
      "stops": [ ... ], "legs": [ ... ], "totalDistanceKm": 18.1, "totalDurationMin": 41,
      "googleMapsUrl": "...", "encodedPolyline": "...", "roundTrip": true,
      "load": 6, "capacity": 8 }
  ],
  "unassignedStopIds": [],
  "totalDistanceKm": 29.8, "totalDurationMin": 66, "approximate": false
}

Geocode an address

POST/api/v1/geocodeConvert a free-text address to lat/lng coordinates.
// Request
{ "address": "10 Downing Street, London" }

// Response
{
  "lat": 51.5034,
  "lng": -0.1276,
  "label": "10 Downing Street, Westminster, London, UK"
}
POST/api/v1/geocode/batchGeocode several addresses in one call (importing a file into a route), the same service as the app's File tab.
// Request
{ "addresses": ["10 Downing Street, London", "221B Baker Street, London"] }

// Response
{
  "results": [
    { "original": "10 Downing Street, London", "label": "10 Downing St, London SW1A 2AA, UK",
      "coordinates": { "lat": 51.5034, "lng": -0.1276 }, "status": "found" },
    { "original": "221B Baker Street, London", "label": "221B Baker Street, London",
      "coordinates": null, "status": "not_found" }
  ],
  "total": 2,
  "found": 1,
  "cached": 1
}

At most your plan's number of stops per call (150 on Business), otherwise 402 QUOTA_EXCEEDED. Each address returns found or not_found. An address already found in the last 30 days comes from the cache (cached counter). The country in the Accept-Language header is used as a preference, never as a filter. "heavy" rate limit per key.

Contacts

Manage your saved address book. All operations are scoped to your account.

GET/api/v1/contactsList contacts (paginated).
GET /api/v1/contacts?page=1&limit=20&search=Paris
{
  "data": [
    {
      "id": "clx...",
      "name": "EntrepĂ´t Paris",
      "address": "12 rue de Rivoli, 75001 Paris",
      "lat": 48.856,
      "lng": 2.352,
      "phone": "+33 1 23 45 67 89",
      "createdAt": "2026-03-01T10:00:00.000Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 20
}
GET/api/v1/contacts/:idGet a contact and its on-site contacts.
POST/api/v1/contactsCreate a contact.
// Request
{
  "name": "EntrepĂ´t Paris",
  "address": "12 rue de Rivoli, 75001 Paris",
  "lat": 48.856,
  "lng": 2.352,
  "phone": "+33 1 23 45 67 89"
}

// Response: 201 Created
{ "id": "clx...", "name": "...", ... }
POST/api/v1/contacts/importImport up to 100 contacts in one call.

Same fields as create; name is optional (the address is then used as the name). Without lat and lng the address is geocoded, and a contact that can't be found is not created. Duplicates (same name and address, or same name at the same location, in your address book or in the request) are skipped, so the same batch can safely be sent again. Each item gets a status in results, in the order sent. At most 2000 contacts created per account per 24 hours (429 IMPORT_LIMIT, with remaining).

curl -X POST https://www.optiroad.io/api/v1/contacts/import \
  -H "Authorization: Bearer or_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      { "name": "Atlas Logistics", "address": "221B Baker Street, London NW1 6XE",
        "phone": "+44 20 7946 0000", "email": "ops@example.com",
        "deliveryNotes": "Goods entrance", "timeWindowStart": "08:30", "timeWindowEnd": "12:00" },
      { "name": "Fleurs Rose", "address": "12 rue de Rivoli, 75004 Paris", "lat": 48.8556, "lng": 2.3601 },
      { "name": "Unknown", "address": "nowhere 00000" }
    ]
  }'
// Response: 201 Created (200 if nothing was created)
{
  "created": 2,
  "skipped": 1,
  "results": [
    { "index": 0, "status": "created", "id": "clx...", "address": "221B Baker St, London NW1 6XE, UK" },
    { "index": 1, "status": "created", "id": "clx...", "address": "12 rue de Rivoli, 75004 Paris" },
    { "index": 2, "status": "skipped", "reason": "NOT_FOUND" }
  ],
  "data": [ { "id": "clx...", "name": "Atlas Logistics", "lat": 51.5237, "lng": -0.1585, ... } ]
}

Reasons an item is skipped: MISSING_ADDRESS, INVALID_EMAIL, INVALID_TIME, INVALID_DURATION, INVALID_COORDINATES, TOO_LONG, DUPLICATE, NOT_FOUND

PUT/api/v1/contacts/:idUpdate a contact.
DELETE/api/v1/contacts/:idDelete a contact.
// Response: 204 No Content

Vehicles

GET/api/v1/vehiclesList vehicles. Filters status (AVAILABLE, ON_ROUTE, MAINTENANCE, OUT_OF_SERVICE) and type (TRUCK, VAN, CAR, BIKE, MOTORCYCLE, CARGO_BIKE).
GET /api/v1/vehicles?status=AVAILABLE&type=VAN
{
  "data": [
    {
      "id": "clx...",
      "label": "Camion 1",
      "type": "TRUCK",
      "status": "AVAILABLE",
      "depotAddress": "ZI Nord, 59000 Lille",
      "depotLat": 50.651,
      "depotLng": 3.074
    }
  ],
  "total": 1
}
GET/api/v1/vehicles/:idGet a vehicle.
POST/api/v1/vehiclesCreate a vehicle. A depot given by its address only is geocoded.
{
  "label": "Camion 1",
  "type": "TRUCK",
  "licensePlate": "AB-123-CD",
  "fuelType": "DIESEL",
  "fuelConsumption": 11.5,
  "depotAddress": "ZI Nord, 59000 Lille"
}
PUT/api/v1/vehicles/:idUpdate a vehicle: only the fields sent change.
PATCH/api/v1/vehicles/:id/statusChange a vehicle's status.
{ "status": "MAINTENANCE" }
DELETE/api/v1/vehicles/:idDelete a vehicle.

Optimization history

GET/api/v1/historyList past optimizations (paginated).
GET /api/v1/history?page=1&limit=20&from=2026-01-01&to=2026-04-01
{
  "data": [
    {
      "id": "clx...",
      "addressCount": 8,
      "totalDistanceKm": 34.2,
      "totalDurationMin": 61,
      "createdAt": "2026-03-15T08:30:00.000Z"
    }
  ],
  "total": 42,
  "page": 1
}
GET/api/v1/history/:idGet a route: stops in order, or one route per vehicle.
{
  "id": "clx...",
  "createdAt": "2026-03-15T08:30:00.000Z",
  "addressCount": 8,
  "totalDistanceKm": 34.2,
  "totalDurationMin": 61,
  "stops": [ { "id": "order-1041", "label": "...", "lat": 48.87, "lng": 2.29 } ],
  "googleMapsUrl": "https://www.google.com/maps/dir/..."
}

Driver link and delivery tracking

Send a route to the driver as a link (no account or app needed), then track each stop: delivered or failed with its reason, name of the person who received it, photo and signature. Same links and data as the app's Deliveries page.

POST/api/v1/driver-linksCreate a route's link (valid 14 days, 60 links per 24 hours).
// Request
{
  "title": "Tournée du 12/11",
  "vehicleLabel": "Camion 1",
  "timeZone": "Europe/Paris",
  "stops": [
    { "kind": "start", "label": "Dépôt", "lat": 48.9362, "lng": 2.3574 },
    { "kind": "stop", "label": "Fleurs Rose", "address": "8 rue Oberkampf, 75011 Paris",
      "lat": 48.8641, "lng": 2.3707, "eta": "08:40", "notes": "Code 1234",
      "requiresSignature": true, "contactName": "Rose Martin", "contactPhone": "+33 6 12 34 56 78",
      "email": "rose@example.com", "contactId": "clx..." },
    { "kind": "end", "label": "Dépôt", "lat": 48.9362, "lng": 2.3574 }
  ]
}

// Response: 201 Created
{ "id": "clx...", "url": "https://www.optiroad.io/d/Xb3...", "expiresAt": "2026-11-26T08:00:00.000Z",
  "customerEmails": false, "stopsWithEmail": 1 }

stops lists the route in visiting order: one kind start item, the kind stop stops, then one kind end item (the return to the start if the route comes back). The stop fields of a POST /optimize response map onto it directly. The URL is only returned on creation: keep it or use renew to get a new one. email is used for emails to your customers and is never shown to the driver.

GET/api/v1/driver-linksList the last 50 links with their stops and statuses.
GET/api/v1/driver-links/:idGet a link: stops and the status of each one.
{
  "link": {
    "id": "clx...", "title": "Tournée du 12/11", "active": true, "stopCount": 1,
    "stops": [ ... ],
    "events": [
      { "stopIndex": 1, "status": "FAILED", "failureReason": "ABSENT", "note": null,
        "recipientName": null, "hasPhoto": true, "hasSignature": false, "updatedAt": "2026-11-12T08:43:10.000Z" }
    ],
    "expiresAt": "...", "revokedAt": null, "lastOpenedAt": "...", "createdAt": "..."
  }
}

status is DELIVERED or FAILED; failureReason is ABSENT, REFUSED, ADDRESS, ACCESS, DAMAGED or OTHER. A stop with no item in events has not been handled yet. stopIndex is the position in stops (the start is 0).

GET/api/v1/driver-links/:id/stops/:index/photoDelivery photo (JPEG, Pro and Business plans).
GET/api/v1/driver-links/:id/stops/:index/signatureSignature (PNG, Pro and Business plans).
POST/api/v1/driver-links/:id/renewNew link for the same route: the old one stops working, statuses are kept.
DELETE/api/v1/driver-links/:idDeactivate the link (statuses and proofs remain available).

PDF and CSV export

POST/api/v1/export/pdfPDF route sheet (Pro and Business plans).
POST/api/v1/export/csvCSV table of a route.
{ "optimizationId": "clx...", "vehicleId": "veh-1", "title": "Tournée du 12/11" }

optimizationId is returned by POST /optimize and listed by GET /history. For a multi-vehicle optimization, vehicleId selects the vehicle to export. The document's texts follow the account language.

AI text reading

POST/api/v1/addresses/parseExtract and geocode the addresses in free text (up to 10,000 characters).
POST/api/v1/contacts/parseSuggest customer records from an email, a list or notes (30 readings per 24 hours).
// Request
{ "text": "Livrer demain : Fleurs Rose, 8 rue Oberkampf Paris 11e, 06 12 34 56 78, avant 10h" }

Nothing is saved: check the suggestions, then send the addresses to POST /optimize or the records to POST /contacts/import. Heavy calls, counted in the same limit as optimisation.

Saved tours

A saved tour keeps the start, the stops (with their settings) and the end under a name, so you can run it again whenever you want.

GET/api/v1/saved-toursList the account's saved tours (without stop details), with the plan limit.
POST/api/v1/saved-toursSave a tour: name, start, stops (150 max), optional end (null = back to start) and optional settings.
{
  "name": "Tuesday morning",
  "start": { "id": "depot", "label": "Depot", "coordinates": { "lat": 51.5308, "lng": -0.1238 } },
  "steps": [
    { "id": "s1", "label": "Atlas Flowers", "address": "12 Upper St, London",
      "coordinates": { "lat": 51.5362, "lng": -0.1033 },
      "constraints": { "serviceTime": 300, "deliveryNotes": "Back door", "timeWindow": { "open": "09:00", "close": "11:00", "strict": false } } }
  ],
  "end": null,
  "settings": { "vehicleProfile": "car", "timeWindows": true, "departureTime": "08:30" }
}
GET/api/v1/saved-tours/:idRead a full saved tour.
PATCH/api/v1/saved-tours/:idRename a tour or replace its content (only the fields you send change).
DELETE/api/v1/saved-tours/:idDelete a saved tour.

To recalculate it, send its start, stops and end to POST /api/v1/optimize. Past the plan limit, creation returns 403 SAVED_TOUR_LIMIT.

Webhooks

OptiRoad sends a signed JSON POST to your endpoints when a driver starts a route, delivers or fails a stop, or completes the route. Business plan, up to 5 endpoints, https required. The same settings exist in the app (Settings > Webhooks).

Events

  • tour.started : the driver tapped "Start the route" on their link (once per link).
  • stop.delivered : a stop is marked delivered (with the name of the person who received it, if entered).
  • stop.failed : a stop is marked failed, with the reason (ABSENT, REFUSED, ADDRESS, ACCESS, DAMAGED, OTHER).
  • tour.completed : every stop of the link has a status (once per link), with the number delivered and failed.
  • ping : sent only by the test call, to check your server.
GET/api/v1/webhook-endpointsList the account's endpoints (without secrets), with the list of events and the limit.
POST/api/v1/webhook-endpointsAdd an endpoint: url (https), events (at least one), optional description. The response contains the signing secret, shown only once.
// Request
{ "url": "https://example.com/optiroad/webhook", "events": ["stop.delivered", "stop.failed", "tour.completed"], "description": "ERP" }

// 201 Response (the secret is shown only once)
{ "id": "cm3x...", "url": "https://example.com/optiroad/webhook", "events": ["stop.delivered", "stop.failed", "tour.completed"],
  "enabled": true, "consecutiveFailures": 0, "secret": "whsec_..." }
GET/api/v1/webhook-endpoints/:idRead an endpoint.
PATCH/api/v1/webhook-endpoints/:idChange url, events, description or enabled. Enabling again (enabled: true) resets the failure counter; pausing cancels pending deliveries.
DELETE/api/v1/webhook-endpoints/:idDelete an endpoint and its delivery history.
POST/api/v1/webhook-endpoints/:id/rotate-secretCreate a new secret (returned only once); the old one stops working immediately.
POST/api/v1/webhook-endpoints/:id/testSend a ping event right away and return the result (ok, statusCode, error, durationMs). 20 tests per hour.
GET/api/v1/webhook-endpoints/:id/deliveriesLatest deliveries of the endpoint (limit, 50 by default, 100 max): type, status, attempts, last HTTP code, payload sent.
POST/api/v1/webhook-endpoints/:id/deliveries/:deliveryId/retryResend a failed or cancelled delivery (202 response).

Payload

Each delivery is a POST with the event type, its id (the same for all your endpoints), the delivery id and the signature in the headers.

POST https://example.com/optiroad/webhook
OptiRoad-Event: stop.delivered
OptiRoad-Event-Id: evt_4f0c2a9d1e7b3c5a6f8e9d0c
OptiRoad-Delivery: cm3y...
OptiRoad-Signature: t=1763028000,v1=5d41402abc4b2a76b9719d911017c592...

{
  "id": "evt_4f0c2a9d1e7b3c5a6f8e9d0c",
  "type": "stop.delivered",
  "createdAt": "2026-11-13T10:00:00.000Z",
  "data": {
    "driverLink": { "id": "cm3a...", "title": "Tuesday morning", "vehicleLabel": "Van 1" },
    "stop": { "index": 2, "label": "Atlas Flowers", "address": "12 Upper St, London",
              "lat": 51.5362, "lng": -0.1033, "eta": "09:40", "timeWindow": { "open": "09:00", "close": "11:00" },
              "contactId": "cm2c..." },
    "status": "DELIVERED",
    "failureReason": null,
    "note": null,
    "recipientName": "Sarah",
    "recordedAt": "2026-11-13T09:58:41.000Z"
  }
}

The delivered customer's email is never sent. A stop corrected by the driver produces a new event: keep the latest per driverLink.id and stop.index. Deduplicate on id: the same event may arrive twice.

Verifying the signature

The OptiRoad-Signature header reads t=<timestamp>,v1=<signature>. Compute an HMAC-SHA256 of "t.raw body" with your secret, compare it with v1 in constant time, and reject a timestamp older than 5 minutes.

// Node.js (Express): read the RAW body, not the parsed JSON
import crypto from "node:crypto";

app.post("/optiroad/webhook", express.raw({ type: "application/json" }), (req, res) => {
  const header = req.get("OptiRoad-Signature") ?? "";
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const expected = crypto.createHmac("sha256", process.env.OPTIROAD_WEBHOOK_SECRET)
    .update(`${parts.t}.${req.body}`).digest("hex");
  const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
  const valid = parts.v1 && expected.length === parts.v1.length &&
    crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
  if (!fresh || !valid) return res.status(400).end();
  const event = JSON.parse(req.body);
  // ... handle event.type, deduplicate on event.id
  res.status(200).end();
});
# Python (Flask)
import hmac, hashlib, time, os
from flask import request, abort

@app.post("/optiroad/webhook")
def optiroad_webhook():
    parts = dict(p.split("=", 1) for p in request.headers.get("OptiRoad-Signature", "").split(","))
    payload = f"{parts.get('t')}.".encode() + request.get_data()
    expected = hmac.new(os.environ["OPTIROAD_WEBHOOK_SECRET"].encode(), payload, hashlib.sha256).hexdigest()
    if not hmac.compare_digest(expected, parts.get("v1", "")) or abs(time.time() - int(parts.get("t", 0))) > 300:
        abort(400)
    event = request.get_json()
    return "", 200

Responses and retries

Answer with a 2xx code within 10 seconds; any other response, a redirect or a timeout counts as a failure. OptiRoad retries 7 times over about 28 hours (1 min, 5 min, 30 min, 2 h, 5 h, 10 h, 10 h), then the delivery is marked failed. After 25 failures in a row, the endpoint is disabled (disabledReason: TOO_MANY_FAILURES): enable it again with PATCH enabled: true.

Refused URLs (400): http (HTTPS_REQUIRED), local or private network address (PRIVATE_ADDRESS), credentials in the URL (CREDENTIALS_IN_URL). Beyond 5 endpoints: 409 WEBHOOK_LIMIT. Deliveries are kept for 30 days.

Settings

GET/api/v1/settingsGet the account's route and notification settings.
PATCH/api/v1/settingsChange one or more settings (only the fields sent change). Customer emails require the Pro or Business plan.
{
  "defaultServiceDurationMin": 5,
  "defaultRequiresSignature": false,
  "requireRecipientName": false,
  "notifyFailures": true,
  "notifyTourDone": false,
  "notifyDailySummary": true,
  "notifyEmail": "dispatch@example.com",
  "customerNotifyOnTheWay": true,
  "customerNotifyDelivered": true,
  "customerNotifyFailed": true,
  "senderName": "Atlas Logistics"
}

A notifyEmail other than the account email stays pending (notifyEmailVerified: false) until the link sent to that address is opened; until then, alerts go to the account email. emailVerified (read-only) tells whether the account email is confirmed: without it, no alert is sent.

POST/api/v1/settings/notify-email/resendSend the notifyEmail confirmation link again (at most once every 2 minutes).

API usage

GET/api/v1/usageRequest counts for the current key.
{
  "plan": "BUSINESS",
  "optimize": {
    "daily":   { "used": 3,  "limit": 500,  "resetsAt": "2026-11-13T00:00:00.000Z" },
    "hourly":  { "used": 1,  "limit": 100,  "resetsAt": "2026-11-12T10:00:00.000Z" },
    "monthly": { "used": 47, "limit": null, "resetsAt": "2026-12-01T00:00:00.000Z" }
  },
  "geocode": { "hourly": { "used": 12, "limit": 1000, "resetsAt": "2026-11-12T10:00:00.000Z" } },
  "heavy": {
    "endpoints": ["/api/v1/optimize", "/api/v1/contacts/import"],
    "minute": { "used": 2, "limit": 10 },
    "hourly": { "used": 9, "limit": 100 },
    "daily":  { "used": 31, "limit": 500 }
  }
}

heavy counts heavy calls (optimize and contacts/import) over the last minute, hour and day: they share the same limit.

Rate limits

Limits apply per API key. Response headers always include the current window state.

Endpoint typePer minutePer hourPer day
Light (geocode, contacts, vehicles)1001 000-
Heavy (optimize, contacts/import, contacts/parse, addresses/parse)10100500

When a limit is hit the API returns 429 Too Many Requests with a Retry-After header (seconds).

Rate-limit headers

X-RateLimit-Limit: 10
X-RateLimit-Remaining: 7
X-RateLimit-Reset: 1744012800   # Unix timestamp (UTC)
Retry-After: 38                 # Only present on 429

Error codes

HTTPerrorMeaning
401UNAUTHORIZEDMissing or malformed Authorization header.
401INVALID_API_KEYKey not found or revoked.
402QUOTA_EXCEEDEDMonthly optimization quota reached. Upgrade your plan.
402DRIVER_LIMITMore vehicles than drivers in the subscription (1 included in Business, then €9 per month per driver excl. VAT, up to 10). The limit and requested fields give the allowed and requested counts.
403PLAN_REQUIREDThis endpoint requires a Business plan.
400INVALID_REQUESTInvalid parameter (the message says which).
400INVALID_JSONRequest body could not be read: send valid JSON with Content-Type: application/json.
400START_REQUIREDSeveral vehicles: give options.startAddress, or a start for every vehicle.
404NOT_FOUNDResource not found in your account.
404VEHICLE_NOT_FOUNDvehicleId not found in your account.
404LINK_NOT_FOUNDDriver link not found in your account.
400VEHICLE_REQUIREDMulti-vehicle optimization: give vehicleId.
422ADDRESS_NOT_FOUNDLocation not found: give lat/lng, a more precise address or a record with coordinates (notFound lists them).
422VALIDATION_ERRORRequest body failed validation (details in message).
422MAX_KEYS_REACHEDYou already have 5 API keys. Revoke one first.
413PAYLOAD_TOO_LARGERequest body too large (256 KB maximum).
429RATE_LIMIT_EXCEEDEDToo many requests. Check Retry-After.
429IMPORT_LIMITMore than 2000 contacts created in 24 hours (remaining gives what is left).
429PARSE_LIMITDaily text reading limit reached (per 24 hours: 30 for contacts/parse, 100 for addresses/parse).
429DRIVER_LINK_LIMITMore than 60 driver links created in 24 hours.
500INTERNAL_ERRORUnexpected server error. Please retry.

Error response shape

{
  "error": "QUOTA_EXCEEDED",
  "message": "Monthly quota reached (5/5). Upgrade to Pro for unlimited optimizations.",
  "statusCode": 402
}

Questions? Contact support@optiroad.io

OptiRoad API v1 · 2026