Skip to main content
Docs menu
POST

/addons/route-optimization/jobs/{jobId}/evaluations

Evaluate a user-fixed stop sequence over a finished job

Times the given trips exactly as sent, over the job's orders (assigned or not) and vehicles: road drive times, waits for windows, loading and unloading, load stop by stop. Nothing is reordered or repaired; late stops, loads over vehicle_tonnage and days past the working time are reported. Orders of the job in no trip come back with reason NOT_IN_SEQUENCE. Synchronous and stateless; not a run. Production keys and sales or trial measurement keys only; a trial account may evaluate 30 times a minute.

Path

POST/api/v1/partners/addons/route-optimization/jobs/{jobId}/evaluations
Authentication requiredapi-key

curl example

curl -X POST "https://api.route4green.com/api/v1/partners/addons/route-optimization/jobs/{jobId}/evaluations" \
  -H "api-key: YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "routes": [
    {
      "external_vehicle_id": "string",
      "trip_index": 0,
      "planned_start": "2026-01-01T00:00:00+07:00",
      "stops": [
        {}
      ]
    }
  ]
}'

Parameters

NameInTypeRequiredDescription
jobIdpathstring (uuid)Yes

Request body

FieldTypeRequiredDescription
routesobject[]YesThe whole plan to evaluate, one entry per trip; the answer keeps this order

Fields of routes

FieldTypeRequiredDescription
external_vehicle_idstringYesA vehicle of the job
trip_indexnumberNoOrder of this trip among the vehicle's trips, 0 first (default 0). Each later trip starts when the previous one is back at the depot plus the turnaround.
planned_startstring (date-time)NoWhen the trip leaves (ISO 8601). Without it, trip 0 leaves at the vehicle's working start and a later trip when the previous one is back plus the turnaround.
stopsRouteOptimizationEvaluationStopDto[]YesThe stops in the order the vehicle serves them; kept exactly as given, never reordered
1 fieldsCreateRouteOptimizationEvaluationDto

Responses

200The evaluation, wrapped in the success envelope: summary, routes in the order sent, vehicles (day start, day end, over_shift), unassigned_order_references
400ROUTE_OPT_VALIDATION_ERROR: an unknown order or vehicle, a stop listed twice, a pickup after its drop or on another trip, a pickup without its drop, or a drop whose pickup is not the depot without its PICKUP_POINT
403ROUTE_OPT_EVALUATION_NOT_AVAILABLE: sandbox keys and free or self-serve measurement keys
404ROUTE_OPT_JOB_NOT_FOUND
409ROUTE_OPT_EVALUATION_JOB_NOT_FINISHED (not SUCCEEDED or PARTIAL) or ROUTE_OPT_EVALUATION_UNSUPPORTED (more than one planning date)
410RESULT_PURGED
429ROUTE_OPT_RATE_LIMITED: a trial account sent more than 30 evaluations in one minute
503ROUTE_OPT_ENGINE_UNAVAILABLE: the road engine did not answer

Back to group: Route optimisation

POST /addons/route-optimization/jobs/{jobId}/evaluations | Route4Green