Skip to main content
GET
/
v2
/
vrp
/
jobs
/
{id}
/
solution
Solution
curl --request GET \
  --url https://api.solvice.io/v2/vrp/jobs/{id}/solution \
  --header 'Authorization: <api-key>'
{
  "trips": [
    {
      "visits": [
        {
          "arrival": "2022-03-10T12:15:50-04:00",
          "serviceTime": 123,
          "travelTime": 123,
          "distance": 123,
          "job": "<string>",
          "activity": "<string>",
          "location": {
            "latitude": 123,
            "longitude": 123,
            "h3Index": 123
          },
          "latlon": [
            123
          ],
          "snappedLocation": {
            "latitude": 123,
            "longitude": 123,
            "h3Index": 123
          },
          "breakTime": 123,
          "waitTime": 123,
          "depot": "<string>",
          "depotArrival": "2022-03-10T12:15:50-04:00"
        }
      ],
      "resource": "<string>",
      "date": "<string>",
      "departureTime": "<string>",
      "waitTime": 123,
      "travelTime": 123,
      "workTime": 123,
      "serviceTime": 123,
      "polyline": "<string>",
      "occupancy": 123,
      "start": {
        "job": "Job-1",
        "arrival": "2023-01-13T08:30:00Z",
        "serviceTime": 600,
        "travelTime": 1800,
        "distance": 15000,
        "activity": "service",
        "location": {
          "latitude": 51.0543,
          "longitude": 3.7174
        },
        "latlng": [
          51.0543,
          3.7174
        ],
        "breakTime": 0,
        "waitTime": 0
      },
      "end": {
        "job": "Job-1",
        "arrival": "2023-01-13T08:30:00Z",
        "serviceTime": 600,
        "travelTime": 1800,
        "distance": 15000,
        "activity": "service",
        "location": {
          "latitude": 51.0543,
          "longitude": 3.7174
        },
        "latlng": [
          51.0543,
          3.7174
        ],
        "breakTime": 0,
        "waitTime": 0
      },
      "distance": 123
    }
  ],
  "id": "<string>",
  "status": "SOLVED",
  "score": {
    "hardScore": 123,
    "mediumScore": 123,
    "softScore": 123,
    "feasible": true
  },
  "unresolved": "<unknown>",
  "totalWaitTimeInSeconds": 123,
  "occupancy": 123,
  "totalTravelDistanceInMeters": 123,
  "totalTravelTimeInSeconds": 123,
  "totalServiceTimeInSeconds": 123,
  "unserved": [
    "<string>"
  ],
  "unservedReasons": {},
  "suggestions": [
    {
      "score": {
        "hardScore": 123,
        "mediumScore": 123,
        "softScore": 123,
        "feasible": true
      },
      "assignments": [
        {
          "job": "<string>",
          "resource": "<string>",
          "executedAfter": "<string>",
          "suggestedArrival": "<string>",
          "latestArrival": "<string>",
          "score": {
            "hardScore": 123,
            "mediumScore": 123,
            "softScore": 123,
            "feasible": true
          },
          "scoreExplanation": {
            "constraint": "TRIP_CAPACITY",
            "score": "<string>"
          },
          "suggestedInitialArrival": "2022-03-10T12:15:50-04:00",
          "violations": [
            {
              "constraint": "TRIP_CAPACITY",
              "score": "<string>"
            }
          ]
        }
      ]
    }
  ],
  "messages": [
    "<string>"
  ],
  "estimatedCost": {
    "totalCostEur": 450.75,
    "travelTimeCostEur": 125.5,
    "distanceCostEur": 87.5,
    "waitTimeCostEur": 15,
    "laborCostEur": 200,
    "activationCostEur": 50,
    "penaltyCostEur": 27.25
  },
  "violations": [
    {
      "name": "<string>",
      "value": 123,
      "level": "[HARD, MEDIUM, SOFT]"
    }
  ],
  "workloadFairness": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.solvice.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Api Key based authentication (apikey)

Path Parameters

id
string
required

Response

Status

OnRoute response from solve

trips
object[]
required

Actual solution: trips per shift/day and per resource

id
string | null

Id of the solve job

Example:

"0000-00000-00000-0000"

status
enum<string> | null

Status of the solve job.

Available options:
ERROR,
QUEUED,
SOLVING,
SOLVED
Example:

"SOLVED"

score
object

The score of a solution shows how good this solution is w.r.t all the constraints. All solvers try to maximize the score.

unresolved
any

Constraints that are violated

totalWaitTimeInSeconds
integer<int64> | null

Wait time for all resources

Example:

123

occupancy
number<double> | null

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

Example:

0.8

totalTravelDistanceInMeters
integer<int64> | null

Travel distance for all resources in meters

Example:

123

totalTravelTimeInSeconds
integer<int64> | null

Travel time for all resources

Example:

123

totalServiceTimeInSeconds
integer<int64> | null

Service time for all resources

Example:

123

unserved
string[] | null

Unserved jobs

Example:

"[job-1]"

unservedReasons
object

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

Example:
{
"job-1": [
"DATE_TIME_WINDOW_CONFLICT",
"TRIP_CAPACITY"
]
}
suggestions
object[] | null

List of suggested assignments returned by suggest api call

messages
string[] | null

Events and warnings generated during the solver execution

estimatedCost
object

Financial cost breakdown of the optimized solution. Only populated when costs configuration is provided in the request.

Example:
{
"totalCostEur": 450.75,
"travelTimeCostEur": 125.5,
"distanceCostEur": 87.5,
"waitTimeCostEur": 15,
"laborCostEur": 200,
"activationCostEur": 50,
"penaltyCostEur": 27.25
}
violations
object[] | null
workloadFairness
number<double> | null