Skip to content

Apply Optimization

Apply optimization results to create delivery routes in Last Mile Intelligence.

applyOptimization

optimization

ParameterTypeRequiredDefaultDescription
Optimization IDstringYes-The ID of the optimization
Route OptionsJSONNo-Options for route creation
FieldTypeRequiredDescription
createRoutesbooleanNoWhether to create route records
assignResourcesbooleanNoWhether to assign resources
notifyDriversbooleanNoWhether to notify drivers
{
"success": true,
"optimizationId": "opt_abc123",
"routesCreated": 8,
"ordersAssigned": 45,
"resourcesAssigned": 8
}
{
"success": false,
"error": "Optimization not completed",
"status": "running"
}
  • Missing API Token: LMI credential is missing API token
  • Optimization Not Found: Optimization with specified ID does not exist
  • Not Completed: Optimization has not finished running
  • Already Applied: Optimization has already been applied
  • Permission Denied: API token lacks permission for this operation