Skip to content
API Optim, return to homepage
API Optim, return to homepage
API Optim, return to homepage
Industries

Milk collection

Animal feed

Flour milling

Live animals

Multi-temperature

Fuel

Features

Compartmentalised vehicles

Schedules and regulations

Fleet and site access

Route reoptimisation

Priorities and assignments

Pricing

Documentation

Resources

Quick start ↗

Use cases ↗

API updates Coming soon

Blog Coming soon

Request a demo
  • Documentation
  • Six heavy goods vehicle industries, already modelled

    Milk collection

    Compartment management and product downgrading

    Animal feed

    Bulk feed delivered to farms

    Flour milling

    Bulk and bagged flour, one flour type per compartment

    Live animals

    Multi-deck livestock trailers

    Multi-temperature

    Movable bulkheads, chilled and frozen goods in the same vehicle

    Fuel

    Diesel, petrol and heating oil in the same tanker

    Your customers’ industry isn’t listed? Let’s talk about their vehicles and their constraints.

    Discuss your project →

  • What the engine does

    Compartmentalised vehicles

    Compartments, configurations and loading rules

    Schedules and regulations

    Time windows, service times, driving and breaks

    Fleet and site access

    Equipment, size, weight, trailers and depots

    Route reoptimisation

    Modify an already optimised plan

    Priorities and assignments

    Required vehicles, priorities, unscheduled operations

    For your developers

    Each feature has its own page in the technical documentation.

    Parameters, example requests and results in JSON.

    Read the documentation
  • Pricing
  • Get started

    Quick start ↗

    Tutorial: calculate your first route in minutes

    Use cases ↗

    Add, move, reoptimise: what the API can do

    Coming soon

    API updates Coming soon

    API developments and new features

    Blog Coming soon

    Articles and guides on route optimisation.

    Start your trial

    Test the API using data from one of your customers.

    Tell us about your software and we’ll provide your trial key.

    Request a demo
  • en-gb
    • fr
Request a demo

Features › Route modification and reoptimisation

Route modification and reoptimisation

Add or remove operations on a route that is already scheduled, move or swap routes between vehicles, or reoptimise an existing plan. API Optim recalculates the times and flags any constraints that are no longer met.

Read the documentation
Request a demo

What the API handles

Change the plan without starting from scratch.

Each change is an action sent with the routes concerned. Your software describes the current plan, states the action to perform and receives the recalculated routes. The extract opposite shows what an action looks like; each card below links to its page in the technical documentation.

JSON structure of an API Optim action applied to an existing plan: action type SCHEDULE_OPERATIONS_ON_EXISTING_ROUTES, operation to insert, target route and position, then reference plan with routes by vehicle and by period

01 Operations on a route

Add an operation at a given position

Insert an operation where the planner chooses, for example just before a delivery that is already planned. The rest of the route is recalculated.

SCHEDULE_OPERATIONS_ON_EXISTING_ROUTES position

View the technical page

Add operations at the best position

Add one or more operations to an existing route: the API chooses where they go on the route.

SCHEDULE_OPERATIONS_ON_EXISTING_ROUTES operations

View the technical page

Remove operations

Unschedule some of the operations on a route. The remaining operations are kept and their times recalculated.

UNSCHEDULE_OPERATIONS_FROM_EXISTING_ROUTES

View the technical page

02 Recalculating a route

Reoptimise a route

Submit an existing route to recalculate its order. It can be described simply, by the ordered list of its operations, or by the result of a previous calculation.

OPTIMIZE_EXISTING_ROUTES referencePlanning

View the technical page

Evaluate a route

Check that a route is still feasible after a change in constraints, such as a change to the vehicle’s availability. The order of operations stays the same; the times may change.

EVALUATE_EXISTING_ROUTES

View the technical page

Reverse a route

Reverse the order of operations on a route that is already scheduled.

REVERSE_ROUTES

View the technical page

Impose a time

Set the departure time of an existing route, or a time window for one of its operations, then evaluate the route: the times are recalculated taking this constraint into account.

additionnalTemporalConstraints

View the technical page

03 Routes and vehicles

Move a route to another vehicle

Transfer a route to another vehicle’s availability period.

MOVE_EXISTING_ROUTES

View the technical page

Swap two routes

Swap two routes scheduled on two different vehicles.

SWAP_EXISTING_ROUTES

View the technical page

Swap the activity of two vehicles

Swap all the routes in one availability period with those of another vehicle.

SWAP_TRUCK_PERIODS

View the technical page

Merge routes

Combine several routes into one, even if they come from different vehicles or periods.

MERGE_EXISTING_ROUTES

View the technical page

Chain routes

Put several routes end to end in the order given. Operations keep their order, even if the result is not optimised.

CONCATENATE_EXISTING_ROUTES

View the technical page

Delete routes

Unschedule a list of routes. The vehicle’s other routes in the period are kept.

UNSCHEDULE_EXISTING_ROUTES

View the technical page

04 Global reoptimisation

Complete an existing plan

Run a global optimisation that takes routes already scheduled into account and adds the operations still to be scheduled.

COMPUTE_ROUTES

View the technical page

Protect existing routes

Give each route a status: free by default, open, with a list of removable operations, or closed: its operations stay on the same vehicle and none are added.

status FREE OPEN CLOSED removableOperations

View the technical page

Annotated example

A delivery added at the chosen position.

JSON request: SCHEDULE_OPERATIONS_ON_EXISTING_ROUTES action inserting delivery OPERATION_07 into route 000ZYX1DH01, before delivery OPERATION_05
API JSON response: deliveries on the recalculated route, with OPERATION_07 at site _MOULINS placed between CJM and XYRIC

The existing route has five deliveries from the same depot. It is sent as is with the new operation and its site.

The action specifies the target route and the position: before delivery OPERATION_05.

The API inserts the Moulins delivery between CJM and XYRIC, and recalculates the journeys and times for the whole route.

What the API returns

A recalculated route, with its alerts.

After each action, the solution returns the routes concerned, recalculated. If a route no longer meets all the constraints, it comes with the list of constraints not met: your software can display it to the planner.

FieldContent
vehicleRoutesThe recalculated routes, grouped by vehicle and by availability period.
routesEach route with its identifier, which your software reuses for subsequent actions.
activitiesThe route’s new sequence of activities, in visiting order.
timeWindowThe recalculated times of each activity, from departure to return.
violationConstraintsThe list of constraints the route no longer meets, for example a route ending after the vehicle’s availability ends.
code · messageViolationFor each constraint, a code and a readable message, for example DEP0042 “End of time window exceeded”.

Good to know

A few rules to know before integrating.

RuleWhat you need to knowParameters involved
An evaluation does not change the orderEvaluation keeps the order of operations. It can change the times and add or remove alerts on constraints not met.EVALUATE_EXISTING_ROUTES
A route to be reoptimised covers a single vehicleBy design, the route submitted is linked to a single vehicle and a single availability period.OPTIMIZE_EXISTING_ROUTES
Send all the activity for the periodTo move or swap a route, also send the vehicle’s other routes for the same period, for each vehicle involved.referencePlanning MOVE_EXISTING_ROUTES SWAP_EXISTING_ROUTES
Chaining keeps the order givenRoutes are put end to end in the order given, without optimising the whole.CONCATENATE_EXISTING_ROUTES
A closed route can still be reorderedThe open and closed statuses fix the operations on the vehicle, but the order and times can change if the solution improves. To keep a route identical, combine the status with fixed times.status CLOSED additionnalTemporalConstraints
The dock limit requires the full planThe constraint on the number of docks is not intended for actions that only cover part of the routes.dockConstraints

FAQ

Your questions about reoptimisation.

Discuss my project
Do I need to send the full details of a route to reoptimise it?

No. The ordered list of operation identifiers, linked to the route identifier, is enough. You can also send back the full result of a previous calculation.

Can a last-minute order be added without recalculating the whole plan?

Yes. The operation is added to an existing route, at the chosen position or the best position. The action only affects the target route.

What happens if the modified route no longer meets the constraints?

The route is still returned, with the list of constraints not met: a code and a message for each.

Can certain routes be kept intact during a global reoptimisation?

Yes. The operations of a closed route stay scheduled on the same vehicle, and no new operations are added to it. To keep the order and times as well, combine this status with fixed times.

Can the departure time of an existing route be imposed?

Yes. The departure time or the time of an operation is set on the existing route, and evaluating the route recalculates the times taking this constraint into account. Full details are on the Schedules, service times and regulations page.

Take the next step

Test route changes on your customers’ routes.

Our experts help you translate your customers’ planning adjustments into API actions.

Read the documentation

API Optim

The route and load optimisation API for heavy goods vehicles.

Request a demo

API

Documentation

Pricing

Industries

Milk collection

Animal feed

Flour milling

Live animals

Multi-temperature

Fuel

Features

Compartmentalised vehicles

Schedules and regulations

Fleet and site access

Route reoptimisation

Priorities and assignments

Company

About

Contact

AntsRoute


© 2026 API Optim. All rights reserved.

Legal notice

|

Privacy

|

Cookies

|

Your cookie preferences

We use audience measurement cookies to understand how the site is used and to improve it. They are only set with your consent, and you can change your mind at any time.

Functional Always active
Essential for the site to work: security, display language and remembering your choices. They cannot be disabled.
Preferences
Technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
Audience measurement with Google Analytics: pages viewed, length of visits and site performance. Technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your internet service provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
Technical storage or access is required to create user profiles in order to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Customise
  • {title}
  • {title}
  • {title}
  • English
  • Français (French)