Skip to main content
GuidesExamples

Update Optimization

Estimated reading time: 4 minutes

Overview

This example demonstrates how to update an existing optimization by making changes to its configuration, vehicles, constraints, and other fields. The updated optimization can also be reoptimized to generate a new solution. If the optimization is not reoptimized, the changes will not be applied to the optimization's routes.

For updating orders, refer to the following examples:

How to Use the Sample

When you run the example application:

  1. The existing optimization is updated with new configurations, vehicles, and constraints.
  2. A new solution is generated and returned (if reoptimization is enabled).

Step-by-Step Guide

Step 1: Retrieve the Existing Optimization

To update an optimization, you first need to retrieve the existing optimization using its ID.

  • Method: GET
  • Endpoint: /optimizations/{id}
  • Headers:
    • Authorization: YOUR_API_KEY
    • Content-Type: application/json
  • Path Parameter:
    • id (integer, *required) - The unique optimization ID.

Example:

  • Response Body: (error code 200)
[
{
"id": 12345,
"orders": [
{
"id": 879888,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791105,
"alias": "Customer 1",
"firstName": "Customer1",
"lastName": "Customer1",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer1@example.com",
"phoneNumber": "+12025550180",
"location": [
48.897163,
2.292865
],
"customData": ""
},
"location": [
48.897163,
2.292865
],
"alias": "Customer 1",
"firstName": "Customer1",
"lastName": "Customer1",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550180",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 0,
"weight": 0,
"cube": 0,
"revenue": 0,
"timeWindow": [
420,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879887,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791104,
"alias": "Customer 2",
"firstName": "Customer2",
"lastName": "Customer2",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer2@example.com",
"phoneNumber": "+12025550181",
"location": [
48.90092,
2.400039
],
"customData": ""
},
"location": [
48.90092,
2.400039
],
"alias": "Customer 2",
"firstName": "Customer2",
"lastName": "Customer2",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550181",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 0,
"weight": 0,
"cube": 0,
"revenue": 0,
"timeWindow": [
420,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879886,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791103,
"alias": "Customer 3",
"firstName": "Customer3",
"lastName": "Customer3",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer3@example.com",
"phoneNumber": "+12025550182",
"location": [
48.860914,
2.310625
],
"customData": ""
},
"location": [
48.860914,
2.310625
],
"alias": "Customer 3",
"firstName": "Customer3",
"lastName": "Customer3",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550182",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 3,
"weight": 5.1,
"cube": 2.5,
"revenue": 12,
"timeWindow": [
770,
1020
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879885,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791102,
"alias": "Customer 4",
"firstName": "Customer4",
"lastName": "Customer4",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer4@example.com",
"phoneNumber": "+12025550183",
"location": [
48.827865,
2.379216
],
"customData": ""
},
"location": [
48.827865,
2.379216
],
"alias": "Customer 4",
"firstName": "Customer4",
"lastName": "Customer4",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550183",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 8,
"weight": 15.4,
"cube": 5.8,
"revenue": 2.7,
"timeWindow": [
753,
1036
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879884,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791101,
"alias": "Customer 5",
"firstName": "Customer5",
"lastName": "Customer5",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer5@example.com",
"phoneNumber": "+12025550184",
"location": [
48.887096,
2.283513
],
"customData": ""
},
"location": [
48.887096,
2.283513
],
"alias": "Customer 5",
"firstName": "Customer5",
"lastName": "Customer5",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550184",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 9,
"weight": 16.2,
"cube": 8.4,
"revenue": 7.5,
"timeWindow": [
736,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879883,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791100,
"alias": "Customer 6",
"firstName": "Customer6",
"lastName": "Customer6",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer6@example.com",
"phoneNumber": "+12025550185",
"location": [
48.896894,
2.321586
],
"customData": ""
},
"location": [
48.896894,
2.321586
],
"alias": "Customer 6",
"firstName": "Customer6",
"lastName": "Customer6",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550185",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 9,
"weight": 16.5,
"cube": 9.7,
"revenue": 10,
"timeWindow": [
786,
1053
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879882,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791099,
"alias": "Customer 7",
"firstName": "Customer7",
"lastName": "Customer7",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer7@example.com",
"phoneNumber": "+12025550186",
"location": [
48.870449,
2.342204
],
"customData": ""
},
"location": [
48.870449,
2.342204
],
"alias": "Customer 7",
"firstName": "Customer7",
"lastName": "Customer7",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550186",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 5,
"weight": 7.5,
"cube": 2.6,
"revenue": 13.4,
"timeWindow": [
820,
1020
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879881,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791098,
"alias": "Customer 8",
"firstName": "Customer8",
"lastName": "Customer8",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer8@example.com",
"phoneNumber": "+12025550187",
"location": [
48.895658,
2.344043
],
"customData": ""
},
"location": [
48.895658,
2.344043
],
"alias": "Customer 8",
"firstName": "Customer8",
"lastName": "Customer8",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550187",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 11,
"weight": 12.1,
"cube": 4.6,
"revenue": 14.7,
"timeWindow": [
753,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879880,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791097,
"alias": "Customer 9",
"firstName": "Customer9",
"lastName": "Customer9",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer9@example.com",
"phoneNumber": "+12025550188",
"location": [
48.458357,
-0.054451
],
"customData": ""
},
"location": [
48.458357,
-0.054451
],
"alias": "Customer 9",
"firstName": "Customer9",
"lastName": "Customer9",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550188",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 6,
"weight": 5.2,
"cube": 1.5,
"revenue": 2.9,
"timeWindow": [
770,
1070
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879879,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791096,
"alias": "Customer 10",
"firstName": "Customer10",
"lastName": "Customer10",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer10@example.com",
"phoneNumber": "+12025550189",
"location": [
45.049782,
2.475759
],
"customData": ""
},
"location": [
45.049782,
2.475759
],
"alias": "Customer 10",
"firstName": "Customer10",
"lastName": "Customer10",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550189",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 13,
"weight": 6.3,
"cube": 7.5,
"revenue": 8.1,
"timeWindow": [
836,
1053
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879878,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791095,
"alias": "Customer 11",
"firstName": "Customer11",
"lastName": "Customer11",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer11@example.com",
"phoneNumber": "+120255501810",
"location": [
46.199373,
0.069986
],
"customData": ""
},
"location": [
46.199373,
0.069986
],
"alias": "Customer 11",
"firstName": "Customer11",
"lastName": "Customer11",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+120255501810",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 10,
"weight": 8,
"cube": 4.1,
"revenue": 6.2,
"timeWindow": [
903,
1020
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879877,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791094,
"alias": "Customer 12",
"firstName": "Customer12",
"lastName": "Customer12",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer12@example.com",
"phoneNumber": "+120255501811",
"location": [
47.602138,
2.330583
],
"customData": ""
},
"location": [
47.602138,
2.330583
],
"alias": "Customer 12",
"firstName": "Customer12",
"lastName": "Customer12",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+120255501811",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 6,
"weight": 4.8,
"cube": 11.5,
"revenue": 2.3,
"timeWindow": [
870,
1020
],
"serviceTime": 0,
"depotId": 0
}
],
"departures": [
{
"depotId": 0,
"alias": "Depot 1",
"location": [
48.870569,
2.356448
],
"address": {
"country": "France",
"state": "Ile-de-France",
"county": "Paris",
"city": "Paris",
"postalCode": "75001",
"streetName": "Rue de Rivoli",
"streetNumber": "1"
},
"matchedLocation": [
0,
0
]
},
{
"depotId": 0,
"alias": "Depot 2",
"location": [
48.82674,
2.342116
],
"address": {
"country": "France",
"state": "Ile-de-France",
"county": "Paris",
"city": "Paris",
"postalCode": "75002",
"streetName": "Rue de Richelieu",
"streetNumber": "2"
},
"matchedLocation": [
0,
0
]
}
],
"destinations": [],
"vehicles": [
{
"id": 135933,
"type": 0,
"status": 0,
"name": "Car vehicle 1",
"manufacturer": "Renault",
"model": "Master",
"fuelType": 2,
"lastPosition": [
48.870569,
2.356448
],
"consumption": 6.5,
"plate": "AA-123-AA",
"maxLoadWeight": 60,
"maxLoadCube": 50,
"height": 0,
"width": 0,
"weight": 0,
"length": 0,
"axleLoad": 0,
"fixedCost": 0,
"costPerHour": 0,
"startTime": 420,
"endTime": 1439
},
{
"id": 135932,
"type": 0,
"status": 0,
"name": "Car vehicle 2",
"manufacturer": "Renault",
"model": "Master",
"fuelType": 2,
"lastPosition": [
48.82674,
2.342116
],
"consumption": 6.5,
"plate": "AA-124-AA",
"maxLoadWeight": 60,
"maxLoadCube": 50,
"height": 0,
"width": 0,
"weight": 0,
"length": 0,
"axleLoad": 0,
"fixedCost": 0,
"costPerHour": 0,
"startTime": 420,
"endTime": 1439
}
],
"vehiclesConstraints": [
{
"fuelPrice": 1.09,
"startDate": 1596758400000,
"maxNumberOfPackages": 53,
"minNumberOfOrders": 0,
"maxNumberOfOrders": 9007199254740991,
"minDistance": 0,
"maxDistance": 9007199254740991,
"maxRevenue": 85
}
],
"configurationParameters": {
"name": "Paris - test optimization",
"ignoreTimeWindow": false,
"allowDroppingOrders": false,
"groupingOrders": false,
"balancedRoutes": 0,
"optimizationCriterion": 0,
"arrangeCriterion": 0,
"optimizationQuality": 2,
"maxTimeToOptimize": 300,
"maxWaitTime": 18000,
"routeType": 0,
"restrictions": 0,
"distanceUnit": 0,
"orderSequenceOptions": []
},
"creationTimestamp": 1751445531339,
"matrixBuildType": 1,
"request": {
"id": 1234,
"optimizationId": 12345,
"status": 1,
"message": "Operation done successfully!",
"creationTimestamp": 1751445531339
}
}
]

Step 2: Update the Optimization

Once the optimization is retrieved, you can update its fields, such as configuration parameters, vehicles, and constraints.

Update Configuration Parameters

  1. Retrieve the existing configuration parameters from the optimization.
  2. Modify the desired fields, such as the name, route type, and distance unit.
{
"name": "Paris - test optimization updated",
"ignoreTimeWindow": true,
"allowDroppingOrders": false,
"groupingOrders": false,
"balancedRoutes": 0,
"optimizationCriterion": 0,
"arrangeCriterion": 0,
"optimizationQuality": 2,
"maxTimeToOptimize": 300,
"maxWaitTime": 18000,
"routeType": 1,
"restrictions": 1,
"distanceUnit": 0,
"orderSequenceOptions": []
}

Update Vehicle Constraints

  1. Retrieve the existing vehicle constraints from the optimization.
  2. Modify the desired fields, such as the maximum number of packages and maximum distance.
[
{
"fuelPrice": 1.09,
"startDate": 1596758400000,
"maxNumberOfPackages": 60,
"minNumberOfOrders": 0,
"maxNumberOfOrders": 9007199254740991,
"minDistance": 0,
"maxDistance": 1000,
"maxRevenue": 85
}
]

Update Departures

  1. Create a new Departure object and set the updated fields.
[
{
"depotId": 0,
"alias": "Depot 1 Updated",
"location": [
48.870569,
2.356448
],
"address": {
"country": "France",
"state": "Ile-de-France",
"county": "Paris",
"city": "Paris",
"postalCode": "75001",
"streetName": "Rue de Rivoli",
"streetNumber": "1"
},
"matchedLocation": [
0,
0
]
},
{
"depotId": 0,
"alias": "Depot 2 Updated",
"location": [
48.82674,
2.342116
],
"address": {
"country": "France",
"state": "Ile-de-France",
"county": "Paris",
"city": "Paris",
"postalCode": "75002",
"streetName": "Rue de Richelieu",
"streetNumber": "2"
},
"matchedLocation": [
0,
0
]
}
]

Step 3: Update the Optimization

Note

When an optimization is updated a new solution is computed.

  1. Set the updated configuration parameters, vehicles constraints, and departures to the optimization.
  2. Once the optimization is updated, call the updateOptimization reuqest following the steps below.
  • Method: PUT
  • Endpoint: /optimizations/{id}
  • Headers:
    • Authorization: YOUR_API_KEY
    • Content-Type: application/json
  • Path Parameter:
    • id (integer, *required) - The unique optimization ID.
  • Query Parameter:
    • encodeShape (integer, optional)
      • 0: The route's shape will not be encoded.
      • 1 (default): The route's shape will be encoded.
Note

Orders within an optimization cannot be updated directly using UpdateOptimization request. However, all other fields in the optimization can be modified using this method.

Once the optimization is updated, it will be reoptimized. The reoptimized solution can be retrieved using Get Optimization's Solution request once the request status is Finished.

Example:

  • Request Body:
[
{
"id": 12345,
"orders": [
{
"id": 879888,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791105,
"alias": "Customer 1",
"firstName": "Customer1",
"lastName": "Customer1",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer1@example.com",
"phoneNumber": "+12025550180",
"location": [
48.897163,
2.292865
],
"customData": ""
},
"location": [
48.897163,
2.292865
],
"alias": "Customer 1",
"firstName": "Customer1",
"lastName": "Customer1",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550180",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 0,
"weight": 0,
"cube": 0,
"revenue": 0,
"timeWindow": [
420,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879887,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791104,
"alias": "Customer 2",
"firstName": "Customer2",
"lastName": "Customer2",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer2@example.com",
"phoneNumber": "+12025550181",
"location": [
48.90092,
2.400039
],
"customData": ""
},
"location": [
48.90092,
2.400039
],
"alias": "Customer 2",
"firstName": "Customer2",
"lastName": "Customer2",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550181",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 0,
"weight": 0,
"cube": 0,
"revenue": 0,
"timeWindow": [
420,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879886,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791103,
"alias": "Customer 3",
"firstName": "Customer3",
"lastName": "Customer3",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer3@example.com",
"phoneNumber": "+12025550182",
"location": [
48.860914,
2.310625
],
"customData": ""
},
"location": [
48.860914,
2.310625
],
"alias": "Customer 3",
"firstName": "Customer3",
"lastName": "Customer3",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550182",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 3,
"weight": 5.1,
"cube": 2.5,
"revenue": 12,
"timeWindow": [
770,
1020
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879885,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791102,
"alias": "Customer 4",
"firstName": "Customer4",
"lastName": "Customer4",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer4@example.com",
"phoneNumber": "+12025550183",
"location": [
48.827865,
2.379216
],
"customData": ""
},
"location": [
48.827865,
2.379216
],
"alias": "Customer 4",
"firstName": "Customer4",
"lastName": "Customer4",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550183",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 8,
"weight": 15.4,
"cube": 5.8,
"revenue": 2.7,
"timeWindow": [
753,
1036
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879884,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791101,
"alias": "Customer 5",
"firstName": "Customer5",
"lastName": "Customer5",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer5@example.com",
"phoneNumber": "+12025550184",
"location": [
48.887096,
2.283513
],
"customData": ""
},
"location": [
48.887096,
2.283513
],
"alias": "Customer 5",
"firstName": "Customer5",
"lastName": "Customer5",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550184",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 9,
"weight": 16.2,
"cube": 8.4,
"revenue": 7.5,
"timeWindow": [
736,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879883,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791100,
"alias": "Customer 6",
"firstName": "Customer6",
"lastName": "Customer6",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer6@example.com",
"phoneNumber": "+12025550185",
"location": [
48.896894,
2.321586
],
"customData": ""
},
"location": [
48.896894,
2.321586
],
"alias": "Customer 6",
"firstName": "Customer6",
"lastName": "Customer6",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550185",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 9,
"weight": 16.5,
"cube": 9.7,
"revenue": 10,
"timeWindow": [
786,
1053
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879882,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791099,
"alias": "Customer 7",
"firstName": "Customer7",
"lastName": "Customer7",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer7@example.com",
"phoneNumber": "+12025550186",
"location": [
48.870449,
2.342204
],
"customData": ""
},
"location": [
48.870449,
2.342204
],
"alias": "Customer 7",
"firstName": "Customer7",
"lastName": "Customer7",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550186",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 5,
"weight": 7.5,
"cube": 2.6,
"revenue": 13.4,
"timeWindow": [
820,
1020
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879881,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791098,
"alias": "Customer 8",
"firstName": "Customer8",
"lastName": "Customer8",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer8@example.com",
"phoneNumber": "+12025550187",
"location": [
48.895658,
2.344043
],
"customData": ""
},
"location": [
48.895658,
2.344043
],
"alias": "Customer 8",
"firstName": "Customer8",
"lastName": "Customer8",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550187",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 11,
"weight": 12.1,
"cube": 4.6,
"revenue": 14.7,
"timeWindow": [
753,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879880,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791097,
"alias": "Customer 9",
"firstName": "Customer9",
"lastName": "Customer9",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer9@example.com",
"phoneNumber": "+12025550188",
"location": [
48.458357,
-0.054451
],
"customData": ""
},
"location": [
48.458357,
-0.054451
],
"alias": "Customer 9",
"firstName": "Customer9",
"lastName": "Customer9",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550188",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 6,
"weight": 5.2,
"cube": 1.5,
"revenue": 2.9,
"timeWindow": [
770,
1070
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879879,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791096,
"alias": "Customer 10",
"firstName": "Customer10",
"lastName": "Customer10",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer10@example.com",
"phoneNumber": "+12025550189",
"location": [
45.049782,
2.475759
],
"customData": ""
},
"location": [
45.049782,
2.475759
],
"alias": "Customer 10",
"firstName": "Customer10",
"lastName": "Customer10",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550189",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 13,
"weight": 6.3,
"cube": 7.5,
"revenue": 8.1,
"timeWindow": [
836,
1053
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879878,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791095,
"alias": "Customer 11",
"firstName": "Customer11",
"lastName": "Customer11",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer11@example.com",
"phoneNumber": "+120255501810",
"location": [
46.199373,
0.069986
],
"customData": ""
},
"location": [
46.199373,
0.069986
],
"alias": "Customer 11",
"firstName": "Customer11",
"lastName": "Customer11",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+120255501810",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 10,
"weight": 8,
"cube": 4.1,
"revenue": 6.2,
"timeWindow": [
903,
1020
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879877,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791094,
"alias": "Customer 12",
"firstName": "Customer12",
"lastName": "Customer12",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer12@example.com",
"phoneNumber": "+120255501811",
"location": [
47.602138,
2.330583
],
"customData": ""
},
"location": [
47.602138,
2.330583
],
"alias": "Customer 12",
"firstName": "Customer12",
"lastName": "Customer12",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+120255501811",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 6,
"weight": 4.8,
"cube": 11.5,
"revenue": 2.3,
"timeWindow": [
870,
1020
],
"serviceTime": 0,
"depotId": 0
}
],
"departures": [
{
"depotId": 0,
"alias": "Depot 1 Updated",
"location": [
48.870569,
2.356448
],
"address": {
"country": "France",
"state": "Ile-de-France",
"county": "Paris",
"city": "Paris",
"postalCode": "75001",
"streetName": "Rue de Rivoli",
"streetNumber": "1"
},
"matchedLocation": [
0,
0
]
},
{
"depotId": 0,
"alias": "Depot 2 Updated",
"location": [
48.82674,
2.342116
],
"address": {
"country": "France",
"state": "Ile-de-France",
"county": "Paris",
"city": "Paris",
"postalCode": "75002",
"streetName": "Rue de Richelieu",
"streetNumber": "2"
},
"matchedLocation": [
0,
0
]
}
],
"destinations": [],
"vehicles": [
{
"id": 135933,
"type": 0,
"status": 0,
"name": "Car vehicle 1",
"manufacturer": "Renault",
"model": "Master",
"fuelType": 2,
"lastPosition": [
48.870569,
2.356448
],
"consumption": 6.5,
"plate": "AA-123-AA",
"maxLoadWeight": 60,
"maxLoadCube": 50,
"height": 0,
"width": 0,
"weight": 0,
"length": 0,
"axleLoad": 0,
"fixedCost": 0,
"costPerHour": 0,
"startTime": 420,
"endTime": 1439
},
{
"id": 135932,
"type": 0,
"status": 0,
"name": "Car vehicle 2",
"manufacturer": "Renault",
"model": "Master",
"fuelType": 2,
"lastPosition": [
48.82674,
2.342116
],
"consumption": 6.5,
"plate": "AA-124-AA",
"maxLoadWeight": 60,
"maxLoadCube": 50,
"height": 0,
"width": 0,
"weight": 0,
"length": 0,
"axleLoad": 0,
"fixedCost": 0,
"costPerHour": 0,
"startTime": 420,
"endTime": 1439
}
],
"vehiclesConstraints": [
{
"fuelPrice": 1.09,
"startDate": 1596758400000,
"maxNumberOfPackages": 60,
"minNumberOfOrders": 0,
"maxNumberOfOrders": 9007199254740991,
"minDistance": 0,
"maxDistance": 1000,
"maxRevenue": 85
}
],
"configurationParameters": {
"name": "Paris - test optimization",
"ignoreTimeWindow": false,
"allowDroppingOrders": false,
"groupingOrders": false,
"balancedRoutes": 0,
"optimizationCriterion": 0,
"arrangeCriterion": 0,
"optimizationQuality": 2,
"maxTimeToOptimize": 300,
"maxWaitTime": 18000,
"routeType": 0,
"restrictions": 0,
"distanceUnit": 0,
"orderSequenceOptions": []
},
"creationTimestamp": 1751445531339,
"matrixBuildType": 1,
"request": {
"id": 1234,
"optimizationId": 12345,
"status": 1,
"message": "Operation done successfully!",
"creationTimestamp": 1751445531339
}
}
]

Step 4: Retrieve the Updated Optimization

If the optimization update was successful then the request will end with code 200. A new optimization will be returned: Updated optimization response:

Example:

  • Response Body: (error code 200)
[
{
"id": 12345,
"orders": [
{
"id": 879888,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791105,
"alias": "Customer 1",
"firstName": "Customer1",
"lastName": "Customer1",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer1@example.com",
"phoneNumber": "+12025550180",
"location": [
48.897163,
2.292865
],
"customData": ""
},
"location": [
48.897163,
2.292865
],
"alias": "Customer 1",
"firstName": "Customer1",
"lastName": "Customer1",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550180",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 0,
"weight": 0,
"cube": 0,
"revenue": 0,
"timeWindow": [
420,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879887,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791104,
"alias": "Customer 2",
"firstName": "Customer2",
"lastName": "Customer2",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer2@example.com",
"phoneNumber": "+12025550181",
"location": [
48.90092,
2.400039
],
"customData": ""
},
"location": [
48.90092,
2.400039
],
"alias": "Customer 2",
"firstName": "Customer2",
"lastName": "Customer2",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550181",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 0,
"weight": 0,
"cube": 0,
"revenue": 0,
"timeWindow": [
420,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879886,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791103,
"alias": "Customer 3",
"firstName": "Customer3",
"lastName": "Customer3",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer3@example.com",
"phoneNumber": "+12025550182",
"location": [
48.860914,
2.310625
],
"customData": ""
},
"location": [
48.860914,
2.310625
],
"alias": "Customer 3",
"firstName": "Customer3",
"lastName": "Customer3",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550182",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 3,
"weight": 5.1,
"cube": 2.5,
"revenue": 12,
"timeWindow": [
770,
1020
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879885,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791102,
"alias": "Customer 4",
"firstName": "Customer4",
"lastName": "Customer4",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer4@example.com",
"phoneNumber": "+12025550183",
"location": [
48.827865,
2.379216
],
"customData": ""
},
"location": [
48.827865,
2.379216
],
"alias": "Customer 4",
"firstName": "Customer4",
"lastName": "Customer4",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550183",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 8,
"weight": 15.4,
"cube": 5.8,
"revenue": 2.7,
"timeWindow": [
753,
1036
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879884,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791101,
"alias": "Customer 5",
"firstName": "Customer5",
"lastName": "Customer5",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer5@example.com",
"phoneNumber": "+12025550184",
"location": [
48.887096,
2.283513
],
"customData": ""
},
"location": [
48.887096,
2.283513
],
"alias": "Customer 5",
"firstName": "Customer5",
"lastName": "Customer5",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550184",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 9,
"weight": 16.2,
"cube": 8.4,
"revenue": 7.5,
"timeWindow": [
736,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879883,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791100,
"alias": "Customer 6",
"firstName": "Customer6",
"lastName": "Customer6",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer6@example.com",
"phoneNumber": "+12025550185",
"location": [
48.896894,
2.321586
],
"customData": ""
},
"location": [
48.896894,
2.321586
],
"alias": "Customer 6",
"firstName": "Customer6",
"lastName": "Customer6",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550185",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 9,
"weight": 16.5,
"cube": 9.7,
"revenue": 10,
"timeWindow": [
786,
1053
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879882,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791099,
"alias": "Customer 7",
"firstName": "Customer7",
"lastName": "Customer7",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer7@example.com",
"phoneNumber": "+12025550186",
"location": [
48.870449,
2.342204
],
"customData": ""
},
"location": [
48.870449,
2.342204
],
"alias": "Customer 7",
"firstName": "Customer7",
"lastName": "Customer7",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550186",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 5,
"weight": 7.5,
"cube": 2.6,
"revenue": 13.4,
"timeWindow": [
820,
1020
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879881,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791098,
"alias": "Customer 8",
"firstName": "Customer8",
"lastName": "Customer8",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer8@example.com",
"phoneNumber": "+12025550187",
"location": [
48.895658,
2.344043
],
"customData": ""
},
"location": [
48.895658,
2.344043
],
"alias": "Customer 8",
"firstName": "Customer8",
"lastName": "Customer8",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550187",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 11,
"weight": 12.1,
"cube": 4.6,
"revenue": 14.7,
"timeWindow": [
753,
1086
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879880,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791097,
"alias": "Customer 9",
"firstName": "Customer9",
"lastName": "Customer9",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer9@example.com",
"phoneNumber": "+12025550188",
"location": [
48.458357,
-0.054451
],
"customData": ""
},
"location": [
48.458357,
-0.054451
],
"alias": "Customer 9",
"firstName": "Customer9",
"lastName": "Customer9",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550188",
"customData": "",
"type": 1,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 6,
"weight": 5.2,
"cube": 1.5,
"revenue": 2.9,
"timeWindow": [
770,
1070
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879879,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791096,
"alias": "Customer 10",
"firstName": "Customer10",
"lastName": "Customer10",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer10@example.com",
"phoneNumber": "+12025550189",
"location": [
45.049782,
2.475759
],
"customData": ""
},
"location": [
45.049782,
2.475759
],
"alias": "Customer 10",
"firstName": "Customer10",
"lastName": "Customer10",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+12025550189",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 13,
"weight": 6.3,
"cube": 7.5,
"revenue": 8.1,
"timeWindow": [
836,
1053
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879878,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791095,
"alias": "Customer 11",
"firstName": "Customer11",
"lastName": "Customer11",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer11@example.com",
"phoneNumber": "+120255501810",
"location": [
46.199373,
0.069986
],
"customData": ""
},
"location": [
46.199373,
0.069986
],
"alias": "Customer 11",
"firstName": "Customer11",
"lastName": "Customer11",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+120255501810",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 10,
"weight": 8,
"cube": 4.1,
"revenue": 6.2,
"timeWindow": [
903,
1020
],
"serviceTime": 0,
"depotId": 0
},
{
"id": 879877,
"creationTimestamp": 1751445531339,
"customerInfo": {
"id": 1791094,
"alias": "Customer 12",
"firstName": "Customer12",
"lastName": "Customer12",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"email": "customer12@example.com",
"phoneNumber": "+120255501811",
"location": [
47.602138,
2.330583
],
"customData": ""
},
"location": [
47.602138,
2.330583
],
"alias": "Customer 12",
"firstName": "Customer12",
"lastName": "Customer12",
"address": {
"country": "",
"state": "",
"county": "",
"city": "",
"postalCode": "",
"streetName": "",
"streetNumber": ""
},
"phoneNumber": "+120255501811",
"customData": "",
"type": 0,
"status": 0,
"state": 1,
"priority": 0,
"numberOfPackages": 6,
"weight": 4.8,
"cube": 11.5,
"revenue": 2.3,
"timeWindow": [
870,
1020
],
"serviceTime": 0,
"depotId": 0
}
],
"departures": [
{
"depotId": 0,
"alias": "Depot 1 Updated",
"location": [
48.870569,
2.356448
],
"address": {
"country": "France",
"state": "Ile-de-France",
"county": "Paris",
"city": "Paris",
"postalCode": "75001",
"streetName": "Rue de Rivoli",
"streetNumber": "1"
},
"matchedLocation": [
0,
0
]
},
{
"depotId": 0,
"alias": "Depot 2 Updated",
"location": [
48.82674,
2.342116
],
"address": {
"country": "France",
"state": "Ile-de-France",
"county": "Paris",
"city": "Paris",
"postalCode": "75002",
"streetName": "Rue de Richelieu",
"streetNumber": "2"
},
"matchedLocation": [
0,
0
]
}
],
"destinations": [],
"vehicles": [
{
"id": 135933,
"type": 0,
"status": 0,
"name": "Car vehicle 1",
"manufacturer": "Renault",
"model": "Master",
"fuelType": 2,
"lastPosition": [
48.870569,
2.356448
],
"consumption": 6.5,
"plate": "AA-123-AA",
"maxLoadWeight": 60,
"maxLoadCube": 50,
"height": 0,
"width": 0,
"weight": 0,
"length": 0,
"axleLoad": 0,
"fixedCost": 0,
"costPerHour": 0,
"startTime": 420,
"endTime": 1439
},
{
"id": 135932,
"type": 0,
"status": 0,
"name": "Car vehicle 2",
"manufacturer": "Renault",
"model": "Master",
"fuelType": 2,
"lastPosition": [
48.82674,
2.342116
],
"consumption": 6.5,
"plate": "AA-124-AA",
"maxLoadWeight": 60,
"maxLoadCube": 50,
"height": 0,
"width": 0,
"weight": 0,
"length": 0,
"axleLoad": 0,
"fixedCost": 0,
"costPerHour": 0,
"startTime": 420,
"endTime": 1439
}
],
"vehiclesConstraints": [
{
"fuelPrice": 1.09,
"startDate": 1596758400000,
"maxNumberOfPackages": 60,
"minNumberOfOrders": 0,
"maxNumberOfOrders": 9007199254740991,
"minDistance": 0,
"maxDistance": 1000,
"maxRevenue": 85
}
],
"configurationParameters": {
"name": "Paris - test optimization",
"ignoreTimeWindow": false,
"allowDroppingOrders": false,
"groupingOrders": false,
"balancedRoutes": 0,
"optimizationCriterion": 0,
"arrangeCriterion": 0,
"optimizationQuality": 2,
"maxTimeToOptimize": 300,
"maxWaitTime": 18000,
"routeType": 0,
"restrictions": 0,
"distanceUnit": 0,
"orderSequenceOptions": []
},
"creationTimestamp": 1751445531339,
"matrixBuildType": 1,
"request": {
"id": 1234,
"optimizationId": 12345,
"status": 1,
"message": "Operation done successfully!",
"creationTimestamp": 1751445531339
}
}
]

This optimization also has a new solution. This solution can be displayed using the get solution request. See Get optimization solution

Conclusion

This example demonstrates how to update an existing optimization by modifying its configuration, vehicles, constraints, and other fields. By following the steps above, you can adapt this example to your specific use case and integrate it into your fleet management workflow.

For more details, refer to the RestAPI documentation .