# Update Optimization

Last updated:

<!-- -->

October 18, 2026

<!-- -->

\| 4 minutes read

<br />

<br />

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:

* [Adding Orders to an Optimization](/docs/cloud-rest-api/guides/fleet-management/core-concepts/optimization.md#9-add-orders-to-an-optimization)
* [Updating an Order from an Optimization](/docs/cloud-rest-api/guides/fleet-management/core-concepts/optimization.md#10-update-order-from-an-optimization)
* [Deleting an Order from an Optimization](/docs/cloud-rest-api/guides/fleet-management/core-concepts/optimization.md#11-delete-order-from-an-optimization)

## How to Use the Sample[​](#how-to-use-the-sample "Direct link to 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-by-step-guide "Direct link to Step-by-Step Guide")

### Step 1: Retrieve the Existing Optimization[​](#step-1-retrieve-the-existing-optimization "Direct link to 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:[​](#example "Direct link to Example:")

* **Response Body:** (error code `200`)

```json
{
  "id": 12345,
  "orders": [
    {
      "id": 879888,
      "creationTimestamp": 1752745377776,
      "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.849151,
          2.266093
        ],
        "customData": ""
      },
      "location": [
        48.849151,
        2.266093
      ],
      "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": 1,
      "weight": 2,
      "cube": 0.1,
      "revenue": 31.2,
      "timeWindow": [
        420,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879887,
      "creationTimestamp": 1752745377776,
      "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.914831,
          2.168591
        ],
        "customData": ""
      },
      "location": [
        48.914831,
        2.168591
      ],
      "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": 1,
      "weight": 1.1,
      "cube": 0.1,
      "revenue": 24.5,
      "timeWindow": [
        420,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879886,
      "creationTimestamp": 1752745377776,
      "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.898456,
          2.359571
        ],
        "customData": ""
      },
      "location": [
        48.898456,
        2.359571
      ],
      "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": 0.5,
      "revenue": 12,
      "timeWindow": [
        500,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879885,
      "creationTimestamp": 1752745377776,
      "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.891034,
          2.376929
        ],
        "customData": ""
      },
      "location": [
        48.891034,
        2.376929
      ],
      "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": 0.8,
      "revenue": 2.7,
      "timeWindow": [
        430,
        1036
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879884,
      "creationTimestamp": 1752745377776,
      "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.928086,
          2.217675
        ],
        "customData": ""
      },
      "location": [
        48.928086,
        2.217675
      ],
      "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": 0.4,
      "revenue": 7.5,
      "timeWindow": [
        480,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879883,
      "creationTimestamp": 1752745377776,
      "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.89258,
          2.081645
        ],
        "customData": ""
      },
      "location": [
        48.89258,
        2.081645
      ],
      "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": 13.5,
      "cube": 1.7,
      "revenue": 10,
      "timeWindow": [
        350,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879882,
      "creationTimestamp": 1752745377776,
      "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.891779,
          2.149101
        ],
        "customData": ""
      },
      "location": [
        48.891779,
        2.149101
      ],
      "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": 1.2,
      "revenue": 13.4,
      "timeWindow": [
        540,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879881,
      "creationTimestamp": 1752745377776,
      "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.86921,
          2.283707
        ],
        "customData": ""
      },
      "location": [
        48.86921,
        2.283707
      ],
      "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": 0.6,
      "revenue": 14.7,
      "timeWindow": [
        500,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879880,
      "creationTimestamp": 1752745377776,
      "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.897715,
          2.324124
        ],
        "customData": ""
      },
      "location": [
        48.897715,
        2.324124
      ],
      "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": [
        380,
        1070
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879879,
      "creationTimestamp": 1752745377776,
      "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": [
          48.802124,
          2.157246
        ],
        "customData": ""
      },
      "location": [
        48.802124,
        2.157246
      ],
      "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": 0.5,
      "revenue": 8.1,
      "timeWindow": [
        400,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879878,
      "creationTimestamp": 1752745377776,
      "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": [
          48.772667,
          2.150946
        ],
        "customData": ""
      },
      "location": [
        48.772667,
        2.150946
      ],
      "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": 0.1,
      "revenue": 6.2,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879877,
      "creationTimestamp": 1752745377776,
      "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": [
          48.761058,
          2.077915
        ],
        "customData": ""
      },
      "location": [
        48.761058,
        2.077915
      ],
      "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": 1.5,
      "revenue": 2.3,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 13",
        "firstName": "Customer13",
        "lastName": "Customer13",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer13@example.com",
        "phoneNumber": "+120255501812",
        "location": [
          48.900701,
          1.999858
        ],
        "customData": ""
      },
      "location": [
        48.900701,
        1.999858
      ],
      "alias": "Customer 13",
      "firstName": "Customer13",
      "lastName": "Customer13",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501812",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 2,
      "weight": 1.2,
      "cube": 0.5,
      "revenue": 12.1,
      "timeWindow": [
        350,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 14",
        "firstName": "Customer14",
        "lastName": "Customer14",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer14@example.com",
        "phoneNumber": "+120255501813",
        "location": [
          48.868801,
          2.035137
        ],
        "customData": ""
      },
      "location": [
        48.868801,
        2.035137
      ],
      "alias": "Customer 14",
      "firstName": "Customer14",
      "lastName": "Customer14",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501813",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 5,
      "weight": 2.3,
      "cube": 0.2,
      "revenue": 5.2,
      "timeWindow": [
        540,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 15",
        "firstName": "Customer15",
        "lastName": "Customer15",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer15@example.com",
        "phoneNumber": "+120255501814",
        "location": [
          48.873694,
          2.358232
        ],
        "customData": ""
      },
      "location": [
        48.873694,
        2.358232
      ],
      "alias": "Customer 15",
      "firstName": "Customer15",
      "lastName": "Customer15",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501814",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 3,
      "weight": 2.1,
      "cube": 0.3,
      "revenue": 6.3,
      "timeWindow": [
        500,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 16",
        "firstName": "Customer16",
        "lastName": "Customer16",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer16@example.com",
        "phoneNumber": "+120255501815",
        "location": [
          48.800876,
          2.047703
        ],
        "customData": ""
      },
      "location": [
        48.800876,
        2.047703
      ],
      "alias": "Customer 16",
      "firstName": "Customer16",
      "lastName": "Customer16",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501815",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 1,
      "weight": 3.3,
      "cube": 0.1,
      "revenue": 8,
      "timeWindow": [
        380,
        1070
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 17",
        "firstName": "Customer17",
        "lastName": "Customer17",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer17@example.com",
        "phoneNumber": "+120255501816",
        "location": [
          48.828673,
          1.954428
        ],
        "customData": ""
      },
      "location": [
        48.828673,
        1.954428
      ],
      "alias": "Customer 17",
      "firstName": "Customer17",
      "lastName": "Customer17",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501816",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 4,
      "weight": 1.4,
      "cube": 0.4,
      "revenue": 4.8,
      "timeWindow": [
        400,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 18",
        "firstName": "Customer18",
        "lastName": "Customer18",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer18@example.com",
        "phoneNumber": "+120255501817",
        "location": [
          48.870529,
          1.966413
        ],
        "customData": ""
      },
      "location": [
        48.870529,
        1.966413
      ],
      "alias": "Customer 18",
      "firstName": "Customer18",
      "lastName": "Customer18",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501817",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 8,
      "weight": 1.8,
      "cube": 1.7,
      "revenue": 15.4,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 19",
        "firstName": "Customer19",
        "lastName": "Customer19",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer19@example.com",
        "phoneNumber": "+120255501818",
        "location": [
          48.885094,
          2.298155
        ],
        "customData": ""
      },
      "location": [
        48.885094,
        2.298155
      ],
      "alias": "Customer 19",
      "firstName": "Customer19",
      "lastName": "Customer19",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501818",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 5,
      "weight": 1.3,
      "cube": 1.2,
      "revenue": 16.2,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 20",
        "firstName": "Customer20",
        "lastName": "Customer20",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer20@example.com",
        "phoneNumber": "+120255501819",
        "location": [
          48.970061,
          2.199346
        ],
        "customData": ""
      },
      "location": [
        48.970061,
        2.199346
      ],
      "alias": "Customer 20",
      "firstName": "Customer20",
      "lastName": "Customer20",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501819",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 3,
      "weight": 3.5,
      "cube": 0.6,
      "revenue": 29.1,
      "timeWindow": [
        435,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    }
  ],
  "departures": [
    {
      "depotId": 0,
      "alias": "Depot 1",
      "location": [
        48.850315,
        2.326157
      ],
      "address": {
        "country": "France",
        "state": "Ile-de-France",
        "county": "Paris",
        "city": "Paris",
        "postalCode": "75001",
        "streetName": "Rue de Rivoli",
        "streetNumber": "1"
      }
    },
    {
      "depotId": 0,
      "alias": "Depot 2",
      "location": [
        8.826995,
        2.13394
      ],
      "address": {
        "country": "France",
        "state": "Ile-de-France",
        "county": "Paris",
        "city": "Paris",
        "postalCode": "75002",
        "streetName": "Rue de Richelieu",
        "streetNumber": "2"
      }
    }
  ],
  "destinations": [
    {
      "alias": "Destination 1",
      "location": [
        48.85453,
        2.385119
      ],
      "address": {
        "country": "France",
        "state": "Ile-de-France",
        "county": "Paris",
        "city": "Paris",
        "postalCode": "75001",
        "streetName": "Rue de Rivoli",
        "streetNumber": "1"
      }
    },
    {
      "alias": "Destination 2",
      "location": [
        48.949147,
        2.254177
      ],
      "address": {
        "country": "France",
        "state": "Ile-de-France",
        "county": "Paris",
        "city": "Paris",
        "postalCode": "75002",
        "streetName": "Rue de Richelieu",
        "streetNumber": "2"
      }
    }
  ],
  "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": 99999999,
      "minDistance": 0,
      "maxDistance": 99999999,
      "maxRevenue": 85
    }
  ],
  "configurationParameters": {
    "name": "Paris - test optimization",
    "ignoreTimeWindow": false,
    "allowDroppingOrders": false,
    "groupingOrders": false,
    "balancedRoutes": 0,
    "optimizationCriterion": 0,
    "arrangeCriterion": 0,
    "optimizationQuality": 2,
    "maxTimeToOptimize": 300,
    "maxWaitTime": 8000,
    "routeType": 0,
    "restrictions": 0,
    "distanceUnit": 0,
    "orderSequenceOptions": []
  },
  "creationTimestamp": 1752745377776,
  "matrixBuildType": 1,
  "request": {
    "id": 1234,
    "optimizationId": 12345,
    "status": 1,
    "message": "Operation done successfully!",
    "creationTimestamp": 1752745377776
  }
}

```

### Step 2: Update the Optimization[​](#step-2-update-the-optimization "Direct link to 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[​](#update-configuration-parameters "Direct link to 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.

```json
{
  "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[​](#update-vehicle-constraints "Direct link to 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.

```json
[
  {
    "fuelPrice": 1.09,
    "startDate": 1596758400000,
    "maxNumberOfPackages": 60,
    "minNumberOfOrders": 0,
    "maxNumberOfOrders": 99999999,
    "minDistance": 0,
    "maxDistance": 1000,
    "maxRevenue": 85
  }
]

```

#### Update Departures[​](#update-departures "Direct link to Update Departures")

1. Create a new `Departure` object and set the updated fields.

```json
[
  {
    "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"
    }
  },
  {
    "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"
    }
  }
]

```

### Step 3: Update the Optimization[​](#step-3-update-the-optimization "Direct link to 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](/docs/cloud-rest-api/guides/fleet-management/core-concepts/optimization.md#7-get-optimizations-solution) request once the request status is `Finished`.

#### Example:[​](#example-1 "Direct link to Example:")

* **Request Body:**

```json
{
  "id": 12345,
  "orders": [
    {
      "id": 879888,
      "creationTimestamp": 1752745377776,
      "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.849151,
          2.266093
        ],
        "customData": ""
      },
      "location": [
        48.849151,
        2.266093
      ],
      "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": 1,
      "weight": 2,
      "cube": 0.1,
      "revenue": 31.2,
      "timeWindow": [
        420,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879887,
      "creationTimestamp": 1752745377776,
      "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.914831,
          2.168591
        ],
        "customData": ""
      },
      "location": [
        48.914831,
        2.168591
      ],
      "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": 1,
      "weight": 1.1,
      "cube": 0.1,
      "revenue": 24.5,
      "timeWindow": [
        420,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879886,
      "creationTimestamp": 1752745377776,
      "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.898456,
          2.359571
        ],
        "customData": ""
      },
      "location": [
        48.898456,
        2.359571
      ],
      "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": 0.5,
      "revenue": 12,
      "timeWindow": [
        500,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879885,
      "creationTimestamp": 1752745377776,
      "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.891034,
          2.376929
        ],
        "customData": ""
      },
      "location": [
        48.891034,
        2.376929
      ],
      "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": 0.8,
      "revenue": 2.7,
      "timeWindow": [
        430,
        1036
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879884,
      "creationTimestamp": 1752745377776,
      "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.928086,
          2.217675
        ],
        "customData": ""
      },
      "location": [
        48.928086,
        2.217675
      ],
      "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": 0.4,
      "revenue": 7.5,
      "timeWindow": [
        480,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879883,
      "creationTimestamp": 1752745377776,
      "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.89258,
          2.081645
        ],
        "customData": ""
      },
      "location": [
        48.89258,
        2.081645
      ],
      "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": 13.5,
      "cube": 1.7,
      "revenue": 10,
      "timeWindow": [
        350,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879882,
      "creationTimestamp": 1752745377776,
      "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.891779,
          2.149101
        ],
        "customData": ""
      },
      "location": [
        48.891779,
        2.149101
      ],
      "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": 1.2,
      "revenue": 13.4,
      "timeWindow": [
        540,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879881,
      "creationTimestamp": 1752745377776,
      "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.86921,
          2.283707
        ],
        "customData": ""
      },
      "location": [
        48.86921,
        2.283707
      ],
      "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": 0.6,
      "revenue": 14.7,
      "timeWindow": [
        500,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879880,
      "creationTimestamp": 1752745377776,
      "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.897715,
          2.324124
        ],
        "customData": ""
      },
      "location": [
        48.897715,
        2.324124
      ],
      "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": [
        380,
        1070
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879879,
      "creationTimestamp": 1752745377776,
      "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": [
          48.802124,
          2.157246
        ],
        "customData": ""
      },
      "location": [
        48.802124,
        2.157246
      ],
      "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": 0.5,
      "revenue": 8.1,
      "timeWindow": [
        400,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879878,
      "creationTimestamp": 1752745377776,
      "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": [
          48.772667,
          2.150946
        ],
        "customData": ""
      },
      "location": [
        48.772667,
        2.150946
      ],
      "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": 0.1,
      "revenue": 6.2,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879877,
      "creationTimestamp": 1752745377776,
      "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": [
          48.761058,
          2.077915
        ],
        "customData": ""
      },
      "location": [
        48.761058,
        2.077915
      ],
      "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": 1.5,
      "revenue": 2.3,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 13",
        "firstName": "Customer13",
        "lastName": "Customer13",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer13@example.com",
        "phoneNumber": "+120255501812",
        "location": [
          48.900701,
          1.999858
        ],
        "customData": ""
      },
      "location": [
        48.900701,
        1.999858
      ],
      "alias": "Customer 13",
      "firstName": "Customer13",
      "lastName": "Customer13",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501812",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 2,
      "weight": 1.2,
      "cube": 0.5,
      "revenue": 12.1,
      "timeWindow": [
        350,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 14",
        "firstName": "Customer14",
        "lastName": "Customer14",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer14@example.com",
        "phoneNumber": "+120255501813",
        "location": [
          48.868801,
          2.035137
        ],
        "customData": ""
      },
      "location": [
        48.868801,
        2.035137
      ],
      "alias": "Customer 14",
      "firstName": "Customer14",
      "lastName": "Customer14",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501813",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 5,
      "weight": 2.3,
      "cube": 0.2,
      "revenue": 5.2,
      "timeWindow": [
        540,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 15",
        "firstName": "Customer15",
        "lastName": "Customer15",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer15@example.com",
        "phoneNumber": "+120255501814",
        "location": [
          48.873694,
          2.358232
        ],
        "customData": ""
      },
      "location": [
        48.873694,
        2.358232
      ],
      "alias": "Customer 15",
      "firstName": "Customer15",
      "lastName": "Customer15",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501814",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 3,
      "weight": 2.1,
      "cube": 0.3,
      "revenue": 6.3,
      "timeWindow": [
        500,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 16",
        "firstName": "Customer16",
        "lastName": "Customer16",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer16@example.com",
        "phoneNumber": "+120255501815",
        "location": [
          48.800876,
          2.047703
        ],
        "customData": ""
      },
      "location": [
        48.800876,
        2.047703
      ],
      "alias": "Customer 16",
      "firstName": "Customer16",
      "lastName": "Customer16",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501815",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 1,
      "weight": 3.3,
      "cube": 0.1,
      "revenue": 8,
      "timeWindow": [
        380,
        1070
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 17",
        "firstName": "Customer17",
        "lastName": "Customer17",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer17@example.com",
        "phoneNumber": "+120255501816",
        "location": [
          48.828673,
          1.954428
        ],
        "customData": ""
      },
      "location": [
        48.828673,
        1.954428
      ],
      "alias": "Customer 17",
      "firstName": "Customer17",
      "lastName": "Customer17",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501816",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 4,
      "weight": 1.4,
      "cube": 0.4,
      "revenue": 4.8,
      "timeWindow": [
        400,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 18",
        "firstName": "Customer18",
        "lastName": "Customer18",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer18@example.com",
        "phoneNumber": "+120255501817",
        "location": [
          48.870529,
          1.966413
        ],
        "customData": ""
      },
      "location": [
        48.870529,
        1.966413
      ],
      "alias": "Customer 18",
      "firstName": "Customer18",
      "lastName": "Customer18",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501817",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 8,
      "weight": 1.8,
      "cube": 1.7,
      "revenue": 15.4,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 19",
        "firstName": "Customer19",
        "lastName": "Customer19",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer19@example.com",
        "phoneNumber": "+120255501818",
        "location": [
          48.885094,
          2.298155
        ],
        "customData": ""
      },
      "location": [
        48.885094,
        2.298155
      ],
      "alias": "Customer 19",
      "firstName": "Customer19",
      "lastName": "Customer19",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501818",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 5,
      "weight": 1.3,
      "cube": 1.2,
      "revenue": 16.2,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 20",
        "firstName": "Customer20",
        "lastName": "Customer20",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer20@example.com",
        "phoneNumber": "+120255501819",
        "location": [
          48.970061,
          2.199346
        ],
        "customData": ""
      },
      "location": [
        48.970061,
        2.199346
      ],
      "alias": "Customer 20",
      "firstName": "Customer20",
      "lastName": "Customer20",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501819",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 3,
      "weight": 3.5,
      "cube": 0.6,
      "revenue": 29.1,
      "timeWindow": [
        435,
        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"
      }
    },
    {
      "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"
      }
    }
  ],
  "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": 99999999,
      "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": 8000,
    "routeType": 0,
    "restrictions": 0,
    "distanceUnit": 0,
    "orderSequenceOptions": []
  },
  "creationTimestamp": 1752745377776,
  "matrixBuildType": 1,
  "request": {
    "id": 1234,
    "optimizationId": 12345,
    "status": 1,
    "message": "Operation done successfully!",
    "creationTimestamp": 1752745377776
  }
}

```

### Step 4: Retrieve the Updated Optimization[​](#step-4-retrieve-the-updated-optimization "Direct link to 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:[​](#example-2 "Direct link to Example:")

* **Response Body:** (error code `200`)

```json
{
  "id": 12345,
  "orders": [
    {
      "id": 879888,
      "creationTimestamp": 1752745377776,
      "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.849151,
          2.266093
        ],
        "customData": ""
      },
      "location": [
        48.849151,
        2.266093
      ],
      "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": 1,
      "weight": 2,
      "cube": 0.1,
      "revenue": 31.2,
      "timeWindow": [
        420,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879887,
      "creationTimestamp": 1752745377776,
      "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.914831,
          2.168591
        ],
        "customData": ""
      },
      "location": [
        48.914831,
        2.168591
      ],
      "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": 1,
      "weight": 1.1,
      "cube": 0.1,
      "revenue": 24.5,
      "timeWindow": [
        420,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879886,
      "creationTimestamp": 1752745377776,
      "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.898456,
          2.359571
        ],
        "customData": ""
      },
      "location": [
        48.898456,
        2.359571
      ],
      "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": 0.5,
      "revenue": 12,
      "timeWindow": [
        500,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879885,
      "creationTimestamp": 1752745377776,
      "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.891034,
          2.376929
        ],
        "customData": ""
      },
      "location": [
        48.891034,
        2.376929
      ],
      "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": 0.8,
      "revenue": 2.7,
      "timeWindow": [
        430,
        1036
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879884,
      "creationTimestamp": 1752745377776,
      "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.928086,
          2.217675
        ],
        "customData": ""
      },
      "location": [
        48.928086,
        2.217675
      ],
      "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": 0.4,
      "revenue": 7.5,
      "timeWindow": [
        480,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879883,
      "creationTimestamp": 1752745377776,
      "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.89258,
          2.081645
        ],
        "customData": ""
      },
      "location": [
        48.89258,
        2.081645
      ],
      "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": 13.5,
      "cube": 1.7,
      "revenue": 10,
      "timeWindow": [
        350,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879882,
      "creationTimestamp": 1752745377776,
      "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.891779,
          2.149101
        ],
        "customData": ""
      },
      "location": [
        48.891779,
        2.149101
      ],
      "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": 1.2,
      "revenue": 13.4,
      "timeWindow": [
        540,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879881,
      "creationTimestamp": 1752745377776,
      "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.86921,
          2.283707
        ],
        "customData": ""
      },
      "location": [
        48.86921,
        2.283707
      ],
      "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": 0.6,
      "revenue": 14.7,
      "timeWindow": [
        500,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879880,
      "creationTimestamp": 1752745377776,
      "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.897715,
          2.324124
        ],
        "customData": ""
      },
      "location": [
        48.897715,
        2.324124
      ],
      "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": [
        380,
        1070
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879879,
      "creationTimestamp": 1752745377776,
      "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": [
          48.802124,
          2.157246
        ],
        "customData": ""
      },
      "location": [
        48.802124,
        2.157246
      ],
      "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": 0.5,
      "revenue": 8.1,
      "timeWindow": [
        400,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879878,
      "creationTimestamp": 1752745377776,
      "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": [
          48.772667,
          2.150946
        ],
        "customData": ""
      },
      "location": [
        48.772667,
        2.150946
      ],
      "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": 0.1,
      "revenue": 6.2,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "id": 879877,
      "creationTimestamp": 1752745377776,
      "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": [
          48.761058,
          2.077915
        ],
        "customData": ""
      },
      "location": [
        48.761058,
        2.077915
      ],
      "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": 1.5,
      "revenue": 2.3,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 13",
        "firstName": "Customer13",
        "lastName": "Customer13",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer13@example.com",
        "phoneNumber": "+120255501812",
        "location": [
          48.900701,
          1.999858
        ],
        "customData": ""
      },
      "location": [
        48.900701,
        1.999858
      ],
      "alias": "Customer 13",
      "firstName": "Customer13",
      "lastName": "Customer13",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501812",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 2,
      "weight": 1.2,
      "cube": 0.5,
      "revenue": 12.1,
      "timeWindow": [
        350,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 14",
        "firstName": "Customer14",
        "lastName": "Customer14",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer14@example.com",
        "phoneNumber": "+120255501813",
        "location": [
          48.868801,
          2.035137
        ],
        "customData": ""
      },
      "location": [
        48.868801,
        2.035137
      ],
      "alias": "Customer 14",
      "firstName": "Customer14",
      "lastName": "Customer14",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501813",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 5,
      "weight": 2.3,
      "cube": 0.2,
      "revenue": 5.2,
      "timeWindow": [
        540,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 15",
        "firstName": "Customer15",
        "lastName": "Customer15",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer15@example.com",
        "phoneNumber": "+120255501814",
        "location": [
          48.873694,
          2.358232
        ],
        "customData": ""
      },
      "location": [
        48.873694,
        2.358232
      ],
      "alias": "Customer 15",
      "firstName": "Customer15",
      "lastName": "Customer15",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501814",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 3,
      "weight": 2.1,
      "cube": 0.3,
      "revenue": 6.3,
      "timeWindow": [
        500,
        1086
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 16",
        "firstName": "Customer16",
        "lastName": "Customer16",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer16@example.com",
        "phoneNumber": "+120255501815",
        "location": [
          48.800876,
          2.047703
        ],
        "customData": ""
      },
      "location": [
        48.800876,
        2.047703
      ],
      "alias": "Customer 16",
      "firstName": "Customer16",
      "lastName": "Customer16",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501815",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 1,
      "weight": 3.3,
      "cube": 0.1,
      "revenue": 8,
      "timeWindow": [
        380,
        1070
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 17",
        "firstName": "Customer17",
        "lastName": "Customer17",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer17@example.com",
        "phoneNumber": "+120255501816",
        "location": [
          48.828673,
          1.954428
        ],
        "customData": ""
      },
      "location": [
        48.828673,
        1.954428
      ],
      "alias": "Customer 17",
      "firstName": "Customer17",
      "lastName": "Customer17",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501816",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 4,
      "weight": 1.4,
      "cube": 0.4,
      "revenue": 4.8,
      "timeWindow": [
        400,
        1053
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 18",
        "firstName": "Customer18",
        "lastName": "Customer18",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer18@example.com",
        "phoneNumber": "+120255501817",
        "location": [
          48.870529,
          1.966413
        ],
        "customData": ""
      },
      "location": [
        48.870529,
        1.966413
      ],
      "alias": "Customer 18",
      "firstName": "Customer18",
      "lastName": "Customer18",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501817",
      "customData": "",
      "type": 1,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 8,
      "weight": 1.8,
      "cube": 1.7,
      "revenue": 15.4,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 19",
        "firstName": "Customer19",
        "lastName": "Customer19",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer19@example.com",
        "phoneNumber": "+120255501818",
        "location": [
          48.885094,
          2.298155
        ],
        "customData": ""
      },
      "location": [
        48.885094,
        2.298155
      ],
      "alias": "Customer 19",
      "firstName": "Customer19",
      "lastName": "Customer19",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501818",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 5,
      "weight": 1.3,
      "cube": 1.2,
      "revenue": 16.2,
      "timeWindow": [
        430,
        1020
      ],
      "serviceTime": 0,
      "depotId": 0
    },
    {
      "creationTimestamp": 1752745377776,
      "customerInfo": {
        "alias": "Customer 20",
        "firstName": "Customer20",
        "lastName": "Customer20",
        "address": {
          "country": "",
          "state": "",
          "county": "",
          "city": "",
          "postalCode": "",
          "streetName": "",
          "streetNumber": ""
        },
        "email": "customer20@example.com",
        "phoneNumber": "+120255501819",
        "location": [
          48.970061,
          2.199346
        ],
        "customData": ""
      },
      "location": [
        48.970061,
        2.199346
      ],
      "alias": "Customer 20",
      "firstName": "Customer20",
      "lastName": "Customer20",
      "address": {
        "country": "",
        "state": "",
        "county": "",
        "city": "",
        "postalCode": "",
        "streetName": "",
        "streetNumber": ""
      },
      "phoneNumber": "+120255501819",
      "customData": "",
      "type": 0,
      "status": 0,
      "state": 1,
      "priority": 0,
      "numberOfPackages": 3,
      "weight": 3.5,
      "cube": 0.6,
      "revenue": 29.1,
      "timeWindow": [
        435,
        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"
      }
    },
    {
      "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"
      }
    }
  ],
  "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": 99999999,
      "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": 8000,
    "routeType": 0,
    "restrictions": 0,
    "distanceUnit": 0,
    "orderSequenceOptions": []
  },
  "creationTimestamp": 1752745377776,
  "matrixBuildType": 1,
  "request": {
    "id": 1234,
    "optimizationId": 12345,
    "status": 1,
    "message": "Operation done successfully!",
    "creationTimestamp": 1752745377776
  }
}

```

This optimization also has a new solution. This solution can be displayed using the get solution request. See [Get optimization solution](/docs/cloud-rest-api/guides/fleet-management/core-concepts/optimization.md#7-get-optimizations-solution)

## Conclusion[​](#conclusion "Direct link to 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.
