Optimoroute

Learn how to use Optimoroute with Composio

Overview

SLUG: OPTIMOROUTE

Description

OptimoRoute is an online route optimization and planning solution for delivery, logistics, and field service companies.

Authentication Details

generic_api_key
stringRequired

Connecting to Optimoroute

Create an auth config

Use the dashboard to create an auth config for the Optimoroute toolkit. This allows you to connect multiple Optimoroute accounts to Composio for agents to use.

1

Select App

Navigate to Optimoroute.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Optimoroute Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4optimoroute_auth_config_id = "ac_YOUR_OPTIMOROUTE_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": {"generic_api_key": user_api_key}}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Optimoroute for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, optimoroute_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Optimoroute toolkit’s playground

For code examples, see the Tool calling guide and Provider examples.

Tool List

Tool Name: Create Order

Description

Tool to create a new order or update an existing order in OptimoRoute. Use when you need to add delivery, pickup, or task orders to the system with location, time windows, and other constraints.

Action Parameters

acceptDuplicateOrderNo
boolean
customField1
string
customField2
string
customField3
string
customField4
string
customField5
string
customFields
object
date
stringRequired
duration
number
id
string
load1
number
load2
number
load3
number
load4
number
location
objectRequired
notes
string
operation
stringRequired
orderNo
string
order_type
stringRequired
priority
string
skills
array
timeWindows
array
vehicleFeatures
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create or Update Orders

Description

Tool to bulk create, update, or replace multiple orders at once without geocoding. Use when you need to add new orders or modify existing ones efficiently. Supports up to 500 orders per request.

Action Parameters

orders
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete All Orders

Description

Tool to remove all orders and planned routes for a specified date. Use when you need to clear orders for a specific date or delete all orders system-wide if no date is provided.

Action Parameters

date
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Order

Description

Tool to remove a single order from the OptimoRoute system. Use when you need to delete a specific order by its orderNo.

Action Parameters

forceDelete
boolean
orderNo
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Orders

Description

Tool to delete one or more orders from the system in bulk (max 500 per request). Use when you need to remove orders, either individually or in batch operations.

Action Parameters

deleteMultiple
boolean
forceDelete
boolean
orders
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Order Completion Details

Description

Tool to retrieve completion details for one or more orders including proof of delivery data. Use when you need to check order completion status, timing details, and form data.

Action Parameters

orders
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Drivers

Description

Tool to retrieve all drivers in the system. Use when you need up-to-date driver data including status and contact information.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Mobile Events

Description

Tool to retrieve mobile events from drivers' field operations. Use when you need to track order completions, status changes (success, failed, on_duty, off_duty), and other field events for the currently active plan.

Action Parameters

after_tag
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Orders

Description

Tool to retrieve one or more orders from OptimoRoute. Use when you need detailed order information including location, time windows, and assignment details.

Action Parameters

orders
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Planning Status

Description

Tool to retrieve the status of an active planning/optimization process. Use when you need to check the progress of a planning job by providing its ID.

Action Parameters

planning_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Planned Routes

Description

Tool to retrieve all planned routes for a given date. Use when you need a detailed view of routes including optional stops, route parameters, and unassigned orders.

Action Parameters

include_route_params
boolean
include_stops
boolean
include_unassigned
boolean
route_date
stringRequired
route_ids
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Order Scheduling Info

Description

Tool to retrieve scheduling information for a specific order. Use when you need to check if an order is scheduled and get details like driver assignment, timing, and position.

Action Parameters

id
string
orderNo
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Search Orders

Description

Tool to search for orders in OptimoRoute based on criteria. Use when you need to find orders by date range, order identifiers, or order status. At least one of 'orders' or 'date_range' must be provided.

Action Parameters

dateRange
object
includeOrderData
boolean
includeScheduleInformation
boolean
orderStatus
array
orders
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Start Planning

Description

Tool to start the planning/optimization process for a specified date or date range. Use when you need to generate optimized routes for orders and drivers. Requires orders to be created before planning can begin.

Action Parameters

balanceBy
string
balancing
string
balancingFactor
number
clustering
boolean
date
string
dateRange
object
depotTrips
boolean
depotVisitDuration
integer
includeScheduledOrders
boolean
lockType
string
startWith
string
useDrivers
array
useOrderObjects
array
useOrders
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Stop Planning

Description

Tool to stop an active planning/optimization process. Use when you need to halt a running planning job by providing its ID.

Action Parameters

planning_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Driver Parameters

Description

Tool to update driver parameters for a specific date including work times, vehicle assignment, and start/end locations. Use when you need to modify driver availability or routing constraints. Note that this unschedules existing routes for the driver on the specified date.

Action Parameters

assignedVehicle
string
date
stringRequired
enabled
boolean
endAddress
string
endLatitude
number
endLongitude
number
externalId
stringRequired
startAddress
string
startLatitude
number
startLongitude
number
vehicleCapacity1
integer
vehicleCapacity2
integer
vehicleCapacity3
integer
vehicleCapacity4
integer
workTimeFrom
string
workTimeTo
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Drivers Parameters

Description

Tool to update parameters of multiple drivers for specified dates in bulk (max 500 per request). Use when you need to modify driver configuration including work hours, vehicle assignments, and location settings. Note: Existing routes for the specified drivers and dates will be unscheduled.

Action Parameters

updates
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired