v23

latestOpenAPI 3.1.0raw.githubusercontent.com2026-01-181345107.3 KB
Actions

Synchronous Change and Re-evaluate

Apply manual changes to an existing VRP solution and re-evaluate synchronously. Fetches the original request and solution, applies your changes by setting plannedArrival/plannedResource, and returns the modified solution immediately. Use for 'what-if' scenario testing and dispatcher overrides.

post/v2/vrp/jobs/{id}/change

Path parameters

idstring required

Query parameters

millisstring nullable

Request body

operation'evaluate' | 'solve' required
    Type of operation to perform after applying manual changes.

    - EVALUATE: Quick scoring/validation only. Returns modified solution with score but no optimization.
               Use this when you just want to see the impact of your changes. (~200ms)

    - SOLVE: Re-optimizes all non-manually-placed jobs around your changes.
            Your manual placements stay as soft constraints, but other jobs may move to improve overall score.
            Use this when you want the solver to fix up the rest of the solution. (~5s with default termination)

Example request

{
  "changes": [
    {
      "job": "job-A",
      "after": "job-F",
      "resource": "vehicle-1",
      "arrival": "2025-01-15T14:30:00Z"
    }
  ],
  "operation": "evaluate"
}

Response

Modified solution with changes applied

idstring nullable

Id of the solve job

status'ERROR' | 'QUEUED' | 'SOLVING' | 'SOLVED' nullable

Status of the solve job.

{"stackTrail":"components:schemas:OnRouteResponse:properties:unresolved","oasType":"schema","type":"unknown","description":"Constraints that are violated"}
totalWaitTimeInSecondsinteger nullable

Wait time for all resources

occupancynumber double nullable

How full this schedule is in terms of work time (incl travel) over capacity. Eg 80%

totalTravelDistanceInMetersinteger nullable

Travel distance for all resources in meters

totalTravelTimeInSecondsinteger nullable

Travel time for all resources

totalServiceTimeInSecondsinteger nullable

Service time for all resources

unservedstring[] nullable

Unserved jobs

unservedReasonsobject nullable

Reasons why jobs could not be served, mapped by job name

messagesstring[] nullable

Events and warnings generated during the solver execution

workloadFairnessnumber double nullable

Example response

{
  "id": "0000-00000-00000-0000",
  "status": "SOLVED",
  "score": {
    "hard": 0,
    "soft": -12345,
    "feasible": true
  },
  "trips": [
    {
      "resource": "vehicle-1",
      "date": "2023-01-13T00:00:00Z",
      "departureTime": "2023-01-13T08:00:00Z",
      "visits": [
        {
          "job": "Job-1",
          "arrival": "2023-01-13T08:30:00Z",
          "serviceTime": 600,
          "travelTime": 1800,
          "distance": 15000,
          "location": {
            "latitude": 51.0543,
            "longitude": 3.7174
          },
          "waitTime": 0
        }
      ],
      "waitTime": 0,
      "travelTime": 3600,
      "distance": 30000,
      "workTime": 4200,
      "serviceTime": 600,
      "occupancy": 0.47
    }
  ],
  "totalWaitTimeInSeconds": 0,
  "totalTravelTimeInSeconds": 3600,
  "totalTravelDistanceInMeters": 30000,
  "totalServiceTimeInSeconds": 600,
  "occupancy": 0.47,
  "workloadFairness": 0.95,
  "unserved": [],
  "suggestions": [],
  "messages": [
    "Solution found in 2.5 seconds"
  ]
}