OptimoRoute MCP by usefulapi

v1.41.1
io.usefulapi/optimoroute Checked 1 day ago Published 7 hours ago

Check OptimoRoute routes, orders and driver events, and create orders or start route planning.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

optimoroute_get_routes Get routes for a date

Get the planned routes for one date: per driver/vehicle the duration, distance, loads and the ordered list of stops with scheduled times. Optionally filter to one driver or vehicle and include the encoded polyline, start/end locations and dispatch status. OptimoRoute: GET /get_routes.

ParameterTypeDescription
date *stringDate in YYYY-MM-DD format, e.g. 2026-09-30.
driverExternalIdstringOnly this driver's route (external id).
driverSerialstringOnly this driver's route (serial number).
includeDispatchStatusbooleanInclude whether each route was sent to its driver, and changed since.
includeRoutePolylinebooleanInclude the encoded route polyline (large).
includeRouteStartEndbooleanInclude each route's start and end locations.
vehicleRegistrationstringOnly this vehicle's route.

optimoroute_get_orders Get orders

Fetch full order data (location, time windows, assignment, loads, skills, contact) for up to 500 orders by orderNo or id. Each result has its own success flag; missing orders come back with ERR_ORD_NOT_FOUND rather than failing the call. Read-only despite using POST. OptimoRoute: POST /get_orders.

ParameterTypeDescription
orders *arrayOrders to target, each {"orderNo": "..."} or {"id": "..."}. At most 500.

optimoroute_search_orders Search orders

Find orders in a date range (at most 35 days) or by a list of orderNo/id, optionally filtered by status (e.g. failed, rejected, unscheduled), with order data and/or scheduling info. Up to 500 per page; pass the returned after_tag with the SAME other parameters to get the next page. Read-only despite using POST. OptimoRoute: POST /search_orders.

ParameterTypeDescription
after_tagstringCursor from the previous page's after_tag.
dateRangeobjectA date range, e.g. {"from": "2026-09-28", "to": "2026-10-02"}.
includeOrderDatabooleanInclude each order's full data.
includeScheduleInformationbooleanInclude each order's driver, stop number and scheduled time.
orderStatusarrayOnly orders in these statuses.
ordersarrayOrders to target, each {"orderNo": "..."} or {"id": "..."}. At most 500.

optimoroute_get_scheduling_info Get an order's scheduling info

Is this order scheduled, and if so on which driver/vehicle, at which stop number and time, plus the live ETA from the routes sent to drivers. Give orderNo or id. OptimoRoute: GET /get_scheduling_info.

ParameterTypeDescription
idstringOptimoRoute's unique order id.
orderNostringThe user-specified order number.

optimoroute_get_completion_details Get order completion details

Get the completion status of up to 500 orders (unscheduled, scheduled, on_route, servicing, success, failed, rejected, cancelled) with service start/end times and positions, proof-of-delivery form data (notes, signature and photo URLs, barcodes), the tracking URL and optionally customer feedback. Read-only despite using POST. OptimoRoute: POST /get_completion_details.

ParameterTypeDescription
orders *arrayOrders to target, each {"orderNo": "..."} or {"id": "..."}. At most 500.
includeCustomerFeedbackbooleanInclude the customer's rating and comment, if customer feedback is configured.

optimoroute_get_events Get mobile events

Read driver-app events for the live routes — on_duty, off_duty, start_route, end_route, start_service, success, failed, rejected, start_time_changed — up to 500 per call. Pass the returned tag as after_tag next time to get only newer events; remainingEvents says whether more are waiting. Events can arrive out of order when devices were offline. OptimoRoute: GET /get_events.

ParameterTypeDescription
after_tagstringThe tag from a previous call; omit to read from the start.

optimoroute_get_planning_status Get planning status

Check a planning (route optimization) run started with optimoroute_start_planning: status N new, R running, C cancelled, F finished, E error, plus percentageComplete. OptimoRoute: GET /get_planning_status.

ParameterTypeDescription
planningId *integerThe planningId returned by optimoroute_start_planning.

optimoroute_get_dispatch_status Get dispatch status

Have the routes (and customer notifications) for a date been sent to drivers, when, and are they the live routes? Optionally counts routes added, modified or removed since sending. Omit date for the currently live date. OptimoRoute: GET /get_dispatch_status.

ParameterTypeDescription
datestringDate to check, YYYY-MM-DD. Omit for the live routes' date.
includeRouteChangesbooleanInclude counts of routes changed since sending.

optimoroute_create_order Create or update an order

Create one order, or update an existing one, with address geocoding. operation: CREATE (new; errors if orderNo exists), UPDATE (existing only), MERGE (create or update only the fields you send — safest for edits), SYNC (create or REPLACE all fields with what you send). CREATE/SYNC/MERGE of a new order need date, type, location and orderNo or id. A location is either an existing locationNo alone, an address to geocode, or latitude+longitude+locationName. OptimoRoute: POST /create_order.

ParameterTypeDescription
operation *stringHow to apply the order (see description).
acceptDuplicateOrderNobooleanAllow CREATE of an order whose orderNo already exists.
allowedDateTimesarrayDatetime windows in which the service may begin.
allowedDatesobjectRestrict the dates the order may be scheduled, e.g. {"from": "2026-10-01", "to": "2026-10-07"}.
allowedWeekdaysarrayWeekdays the order may be scheduled on. Default: all.
assignedToForce the order onto one driver, e.g. {"serial": "102"} or {"externalId": "444"}. null clears it.
customField1stringLegacy custom field #1.
customField2stringLegacy custom field #2.
customField3stringLegacy custom field #3.
customField4stringLegacy custom field #4.
customField5stringLegacy custom field #5.
customFieldsobjectNew-style custom fields keyed by the field key configured in OptimoRoute.
datestringOrder date, YYYY-MM-DD.
durationnumberService time at the location, in minutes.
emailstringCustomer email for notifications.
idstringOptimoRoute's order id. Takes priority over orderNo when matching.
load1numberLoad units #1 (boxes, kg, ...) per your capacity setup.
load2numberLoad units #2.
load3numberLoad units #3.
load4numberLoad units #4.
locationobjectWhere the order is serviced.
notesstringNotes for the driver's instructions.
notificationPreferencestringHow order-tracking notifications are delivered for this order.
orderNostringYour order number, shown in the web app. Used to match existing orders.
phonestringCustomer phone number.
prioritystringL low, M medium (default), H high, C critical.
relatedIdstring | nullid of a related pickup/delivery.
relatedOrderNostring | nullorderNo of a related pickup/delivery (set on the second order of the pair).
skillsarrayRequired driver skill codes.
timeWindowsarrayWhen the order can be serviced, e.g. [{"twFrom": "10:00", "twTo": "14:00"}].
typestringD = delivery, P = pickup, T = task.
vehicleFeaturesarrayRequired vehicle feature codes.

optimoroute_create_or_update_orders Create or update orders in bulk

Create, update or replace up to 500 orders in one call. No geocoding here: each location must be an existing locationNo or carry latitude+longitude (+ locationNo, address or locationName). Per order, operation MERGE/SYNC/CREATE/UPDATE works as in optimoroute_create_order; by default an order matched by id or orderNo is updated with only the fields sent, otherwise created. Returns a per-order success list. OptimoRoute: POST /create_or_update_orders.

ParameterTypeDescription
orders *arrayThe orders, at most 500.

optimoroute_start_planning Start route planning

Start OptimoRoute's route optimization for a date (or a dateRange for weekly planning, if the plan allows). With the default startWith EMPTY, existing routes for that date are REPLACED; use startWith CURRENT (+ lockType) to keep them. Returns a planningId — poll it with optimoroute_get_planning_status, then read the result with optimoroute_get_routes. Can be cancelled with optimoroute_stop_planning. OptimoRoute: POST /start_planning.

ParameterTypeDescription
balanceBystringBalance by WT working time or NUM order count.
balancingstringOFF best routes; ON balance workload; ON_FORCE balance and use every driver.
balancingFactornumber0.0-1.0, how much balancing outweighs route cost (ON_FORCE only).
clusteringbooleanMinimize overlap between drivers' routes.
datestringDate to plan, YYYY-MM-DD. Ignored if dateRange is set.
dateRangeobjectPlan several days at once (weekly planning).
depotTripsbooleanLet drivers return to the depot to reload.
depotVisitDurationintegerMinutes spent at a depot visit.
includeScheduledOrdersbooleanWhen planning a subset, keep other orders already scheduled on those drivers (default true).
lockTypestringWith CURRENT: NONE allow changes; ROUTES keep planned routes; RESOURCES keep driver per order.
midRouteDepotVisitsstringAllow mid-route depot visits (needs Dynamic Mid-Route Depots on the account).
startWithstringEMPTY (default) plans from scratch; CURRENT starts from existing routes.
useDriversarrayOnly plan with these drivers. Default: all available drivers.
useOrderObjectsarrayOnly plan these orders. Default: all valid orders on the date.

optimoroute_stop_planning Stop route planning

Stop a running planning (optimization) process by its planningId. OptimoRoute: POST /stop_planning.

ParameterTypeDescription
planningId *integerThe planningId returned by optimoroute_start_planning.

optimoroute_update_driver_parameters Update a driver's parameters for a date

Change one driver's setup for one date: enable/disable, work hours, assigned vehicle, vehicle capacities, start/end location. WARNING: any existing route for that driver on that date is UNSCHEDULED; re-run planning afterwards. Start/end locations also apply to future optimizations. OptimoRoute: POST /update_driver_parameters.

ParameterTypeDescription
date *stringDate in YYYY-MM-DD format, e.g. 2026-09-30.
externalId *stringThe driver's external id from driver administration.
assignedVehiclestringExternal id of the vehicle to assign for this date.
enabledbooleanEnable or disable the driver for this date.
endAddressstringEnd address shown on reports (needs end coordinates).
endLatitudenumberEnd location latitude (needs endLongitude).
endLongitudenumberEnd location longitude (needs endLatitude).
startAddressstringStart address shown on reports (needs start coordinates).
startLatitudenumberStart location latitude (needs startLongitude).
startLongitudenumberStart location longitude (needs startLatitude).
vehicleCapacity1integerVehicle load capacity #1 for this date.
vehicleCapacity2integerVehicle load capacity #2.
vehicleCapacity3integerVehicle load capacity #3.
vehicleCapacity4integerVehicle load capacity #4.
workTimeFromstringWork start, 24-hour HH:MM.
workTimeTostringWork end, 24-hour HH:MM.

optimoroute_update_completion_details Update order completion status

Set the completion status of up to 500 orders (e.g. mark success, failed or cancelled from an external system), optionally with service start/end times. Each time takes unixTimestamp, utcTime or localTime. Reversible by setting the status again. Returns a per-order success list. OptimoRoute: POST /update_completion_details.

ParameterTypeDescription
updates *arrayThe status updates, at most 500.

optimoroute_send_routes Send routes to drivers

Dispatch the routes for a date to the drivers' mobile app (the web app's Send Routes). This makes that date the live routes and CANNOT be unsent. sendNotifications defaults to FALSE here (OptimoRoute's own default is true); set it true only when you mean to email/SMS customers per the account's Order Tracking settings. Returns ERR_NOTHING_TO_SEND if nothing changed since the last send. Confirm with optimoroute_get_dispatch_status. OptimoRoute: POST /send_routes.

ParameterTypeDescription
date *stringDate in YYYY-MM-DD format, e.g. 2026-09-30.
sendNotificationsbooleanAlso send customer notifications. Default false in this tool.