# OptimoRoute

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

- **Category:** project management
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 17
- **Triggers:** 0
- **Slug:** `OPTIMOROUTE`
- **Version:** 20260225_00

## Tools

### Create Order

**Slug:** `OPTIMOROUTE_CREATE_ORDER`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | No | Unique OptimoRoute-assigned order identifier. Used for UPDATE operations |
| `date` | string | Yes | Order date in YYYY-MM-DD format |
| `load1` | number | No | Load requirement 1 |
| `load2` | number | No | Load requirement 2 |
| `load3` | number | No | Load requirement 3 |
| `load4` | number | No | Load requirement 4 |
| `notes` | string | No | Service notes |
| `skills` | array | No | Required driver skills |
| `orderNo` | string | No | User-specified order identifier. Required unless using 'id' parameter |
| `duration` | number | No | Service completion time in minutes |
| `location` | object | Yes | Delivery/service location information |
| `priority` | string | No | Priority level: L (low), M (medium), H (high), or C (critical). Default: M |
| `operation` | string | Yes | Specifies action - CREATE, UPDATE, SYNC, or MERGE |
| `order_type` | string | Yes | Order type - D (delivery), P (pickup), or T (task) |
| `timeWindows` | array | No | Array of time window objects |
| `customField1` | string | No | Legacy custom field value 1 |
| `customField2` | string | No | Legacy custom field value 2 |
| `customField3` | string | No | Legacy custom field value 3 |
| `customField4` | string | No | Legacy custom field value 4 |
| `customField5` | string | No | Legacy custom field value 5 |
| `customFields` | object | No | Custom fields object with flexible data types |
| `vehicleFeatures` | array | No | Required vehicle features |
| `acceptDuplicateOrderNo` | boolean | No | Allow duplicate orderNo if true |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create or Update Orders

**Slug:** `OPTIMOROUTE_CREATE_OR_UPDATE_ORDERS`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `orders` | array | Yes | Array of orders to create or update. Maximum 500 orders per request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete All Orders

**Slug:** `OPTIMOROUTE_DELETE_ALL_ORDERS`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | No | Optional date for which to remove orders and routes in YYYY-MM-DD format. If not provided, all orders system-wide will be deleted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Order

**Slug:** `OPTIMOROUTE_DELETE_ORDER`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `orderNo` | string | Yes | The user-specified identifier of the order to be deleted |
| `forceDelete` | boolean | No | If true, typical restrictions on removing orders from active plans are bypassed. Defaults to false |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Orders

**Slug:** `OPTIMOROUTE_DELETE_ORDERS`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `orders` | array | Yes | List of orders to delete (max 500 per request). Each order must have either orderNo or id. |
| `forceDelete` | boolean | No | If true, ignores restrictions on deleting orders from live plans. Default: false. |
| `deleteMultiple` | boolean | No | If true, deletes all matches when multiple orders share the same identifier. Default: false. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Order Completion Details

**Slug:** `OPTIMOROUTE_GET_COMPLETION_DETAILS`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `orders` | array | Yes | List of order identifiers to retrieve completion details for. Maximum 500 orders per request. Each order must contain either orderNo or id. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Drivers

**Slug:** `OPTIMOROUTE_GET_DRIVERS`

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

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Mobile Events

**Slug:** `OPTIMOROUTE_GET_EVENTS`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `after_tag` | string | No | Marker for a prior point in time. Submit this value to retrieve only events occurring after the previous call. Leave empty for initial requests to get all events. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Orders

**Slug:** `OPTIMOROUTE_GET_ORDERS`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `orders` | array | Yes | List of order identifier objects (max 500). Each object must contain either 'orderNo' or 'id' field. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Planning Status

**Slug:** `OPTIMOROUTE_GET_PLANNING_STATUS`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `planning_id` | integer | Yes | The ID of the planning process whose status you want to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Planned Routes

**Slug:** `OPTIMOROUTE_GET_ROUTES`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `route_date` | string | Yes | Date for which to retrieve routes in YYYY-MM-DD format |
| `driver_serial` | string | No | Filter results by driver's serial number |
| `driver_external_id` | string | No | Filter results by driver's external identifier |
| `vehicle_registration` | string | No | Filter results by vehicle registration |
| `include_route_polyline` | boolean | No | Include encoded route polyline for map display |
| `include_route_start_end` | boolean | No | Include route's start and end locations |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Order Scheduling Info

**Slug:** `OPTIMOROUTE_GET_SCHEDULING_INFO`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | No | The unique OptimoRoute-assigned order identifier. Either orderNo or id must be provided. |
| `orderNo` | string | No | The user-specified order identifier. Either orderNo or id must be provided. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search Orders

**Slug:** `OPTIMOROUTE_SEARCH_ORDERS`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `orders` | array | No | List of order identifier objects to search for. Each object can contain either 'orderNo' or 'id' field. |
| `dateRange` | object | No | Date range criteria for searching orders. |
| `orderStatus` | array | No | Filter by order status values (e.g., 'failed', 'rejected') |
| `includeOrderData` | boolean | No | When true, includes full order data in the response. Default: false. |
| `includeScheduleInformation` | boolean | No | When true, includes scheduling information in the response. Default: false. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Start Planning

**Slug:** `OPTIMOROUTE_START_PLANNING`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | No | Target date for planning in YYYY-MM-DD format. Required if dateRange is not specified |
| `lockType` | string ("NONE" | "ROUTES" | "RESOURCES") | No | Constrains route modifications - NONE (no constraints), ROUTES (lock routes), or RESOURCES (lock resources). Default: NONE. Only applicable when startWith is CURRENT |
| `balanceBy` | string ("WT" | "NUM") | No | Balancing criteria - WT (working time) or NUM (order count). Default: WT |
| `balancing` | string ("OFF" | "ON" | "ON_FORCE") | No | Route balancing mode - OFF (no balancing), ON (balanced routes), or ON_FORCE (force balancing). Default: OFF |
| `dateRange` | object | No | Date range for weekly planning. |
| `startWith` | string ("EMPTY" | "CURRENT") | No | EMPTY starts fresh planning, CURRENT uses existing routes. Default: EMPTY |
| `useOrders` | array | No | Deprecated - use useOrderObjects instead. List of order identifiers |
| `clustering` | boolean | No | Minimizes route overlap when enabled. Default: false |
| `depotTrips` | boolean | No | Enables warehouse reload scheduling. Default: false |
| `useDrivers` | array | No | Selected drivers to include in planning. Empty array uses all available drivers |
| `balancingFactor` | number | No | Weighting for balanced routes, range 0.0-1.0. Default: 0.3 |
| `useOrderObjects` | array | No | Orders to optimize (maximum 500 orders per request). Each object contains either orderNo or id. Empty includes all valid orders |
| `depotVisitDuration` | integer | No | Reload time at depot in minutes. Default: 0 |
| `includeScheduledOrders` | boolean | No | Determines handling of pre-scheduled orders. Default: true |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Stop Planning

**Slug:** `OPTIMOROUTE_STOP_PLANNING`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `planning_id` | integer | Yes | The ID of the planning process to be stopped |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Driver Parameters

**Slug:** `OPTIMOROUTE_UPDATE_DRIVER_PARAMETERS`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | Target date in YYYY-MM-DD format |
| `enabled` | boolean | No | Enable or disable driver for the specified date |
| `endAddress` | string | No | Ending location display address |
| `externalId` | string | Yes | Driver's external identifier from driver administration |
| `workTimeTo` | string | No | End of work shift in HH:MM 24-hour format |
| `endLatitude` | number | No | Ending location latitude coordinate |
| `endLongitude` | number | No | Ending location longitude coordinate |
| `startAddress` | string | No | Starting location display address |
| `workTimeFrom` | string | No | Start of work shift in HH:MM 24-hour format |
| `startLatitude` | number | No | Starting location latitude coordinate |
| `startLongitude` | number | No | Starting location longitude coordinate |
| `assignedVehicle` | string | No | Vehicle external identifier to assign |
| `vehicleCapacity1` | integer | No | Load capacity limit for dimension 1 |
| `vehicleCapacity2` | integer | No | Load capacity limit for dimension 2 |
| `vehicleCapacity3` | integer | No | Load capacity limit for dimension 3 |
| `vehicleCapacity4` | integer | No | Load capacity limit for dimension 4 |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Drivers Parameters

**Slug:** `OPTIMOROUTE_UPDATE_DRIVERS_PARAMETERS`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `updates` | array | Yes | Array of driver parameter update objects (max 500) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
