Get Optimization Status

This endpoint is used to check on the status of an optimization. The user should use the id provided from the Schedule Route Optimization endpoint for this.

Response Parameters:

  • status (string). “failed“, “pending“, “success“

When status === "pending"

  • progress (number). Percentage complete

When status === "success"

  • summary. An updated summary now that the RO provider has provided a solution.
    • workers:
      • count (number). number of workers included in the optimization.
  • tasks:
    • count (number). number of tasks included in the optimization.
  • routeZones:
    • count (number). number of routeZones included in the optimization.
  • metrics. Some info about the optimization (see sample payload)
{
  "status": "pending",
  "progress": 0.24011902032613028
}
{
  "status": "success",
  "summary": {
    "workers": {
      "GLlLB2123ABCkXOJAHPklMPZ": {
        "type": "WORKER",
        "travelDistance": 149185.86589133905,
        "travelTime": 7215.941165573895,
        "serviceTime": 1800,
        "routeOnDutyTime": 8115.941,
        "count": 2
      }
    },
    "routeZones": {},
    "unassigned": 0,
    "assigned": 2,
    "cost": 0.2,
    "metrics": {
      "totalTransitTime": 7215.941165573895,
      "totalTransitDistance": 149185.86589133905,
      "totalNumberOrders": 2,
      "totalTimeOnBreak": 0,
      "totalServiceTime": 1800,
      "totalTransitTimeFromHubs": 0,
      "totalTransitDistanceFromHubs": 0,
      "totalTransitTimeToHubs": 3045.1322562620044,
      "totalTransitDistanceToHubs": 73242.48777689616
    }
  },
  "optimizationId": "CQ6rFedL7VBL2VjURsGnb1cx"
}