moovexDocs

Get Route Result

Retrieve routing results

GET/routing/result/{productionId}

Retrieve the results from a routing request. Poll this endpoint after calling Create Routes until the status is completed or failed.

Path Parameters

ParameterTypeRequiredDescription
productionIdstringYesThe production ID returned from Create Routes

Response Status Values

StatusDescription
processingRouting is in progress
completedRouting finished successfully
failedRouting encountered an error
cancelledRouting was cancelled

Example Response (Completed)

{
  "status": "completed",
  "trips": [
    {
      "id": "trip_abc123",
      "jobIds": ["job_1", "job_2"],
      "stops": [
        {
          "loc": { "lat": 40.7128, "lng": -74.0060 },
          "pickIds": ["job_1"],
          "dropIds": [],
          "date": "2024-01-15T09:00:00Z",
          "name": "123 Main St",
          "wait": 0,
          "dur": 0,
          "dis": 0
        },
        {
          "loc": { "lat": 40.7200, "lng": -74.0100 },
          "pickIds": ["job_2"],
          "dropIds": [],
          "date": "2024-01-15T09:08:00Z",
          "name": "456 Oak Ave",
          "wait": 0,
          "dur": 480,
          "dis": 1200
        },
        {
          "loc": { "lat": 40.7580, "lng": -73.9855 },
          "pickIds": [],
          "dropIds": ["job_1", "job_2"],
          "date": "2024-01-15T09:25:00Z",
          "name": "Times Square",
          "wait": 0,
          "dur": 1020,
          "dis": 4500
        }
      ],
      "duration": 1500,
      "distance": 5700,
      "seats": 3,
      "attr": ["wheelchair"],
      "areas": ["manhattan"],
      "routeTrajectory": {
        "geometry": "encoded_polyline_string",
        "distance": 5700,
        "duration": 1500,
        "legs": [
          { "distance": 1200, "duration": 480 },
          { "distance": 4500, "duration": 1020 }
        ]
      }
    }
  ],
  "unrouted": []
}

Trip

FieldTypeDescription
idstringTrip identifier
jobIdsstring[]Jobs included in this trip
stopsStop[]Ordered sequence of stops
durationnumberTotal trip duration (seconds)
distancenumberTotal trip distance (meters)
seatsnumberTotal seats needed
attrstring[]Combined attributes from all jobs
areasstring[]Areas the trip passes through
profileNamestring[]Service profiles
routeTrajectoryRouteTrajectoryRoute geometry and leg details

Stop

FieldTypeDescription
locCoordinatesStop location
pickIdsstring[]Job IDs picking up at this stop
dropIdsstring[]Job IDs dropping off at this stop
dateISO8601Scheduled arrival time
namestringStop name/address
waitnumberWait time at stop (seconds)
durnumberDuration from previous stop (seconds)
disnumberDistance from previous stop (meters)

Coordinates

FieldTypeDescription
latnumberLatitude
lngnumberLongitude

RouteTrajectory

FieldTypeDescription
geometrystringEncoded polyline of the route
distancenumberTotal distance (meters)
durationnumberTotal duration (seconds)
legsRouteLeg[]Per-segment details

RouteLeg

FieldTypeDescription
distancenumberSegment distance (meters)
durationnumberSegment duration (seconds)

Unrouted Jobs

If jobs cannot be routed (conflicting constraints, unreachable locations), they appear in the unrouted array:

{
  "status": "completed",
  "trips": [...],
  "unrouted": ["job_5", "job_8"]
}

On this page