Mục lục tài liệu
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.
Đường dẫn
POST
/api/v1/partners/addons/route-optimization/jobs/{jobId}/evaluationsXác thực yêu cầu
api-keyVí dụ gọi bằng curl
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": [
{}
]
}
]
}'Tham số
| Tên | Vị trí | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
| jobId | path | string (uuid) | Có |
Nội dung gửi lên
| Trường | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
| routes | object[] | Có | The whole plan to evaluate, one entry per trip; the answer keeps this order |
Các trường của routes
| Trường | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
| external_vehicle_id | string | Có | A vehicle of the job |
| trip_index | number | Không | Order 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_start | string (date-time) | Không | When 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. |
| stops | RouteOptimizationEvaluationStopDto[] | Có | The stops in the order the vehicle serves them; kept exactly as given, never reordered |
1 trườngCreateRouteOptimizationEvaluationDto
Kết quả trả về
200The evaluation, wrapped in the success envelope: summary, routes in the order sent, vehicles (day start, day end, over_shift), unassigned_order_references400ROUTE_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_POINT403ROUTE_OPT_EVALUATION_NOT_AVAILABLE: sandbox keys and free or self-serve measurement keys404ROUTE_OPT_JOB_NOT_FOUND409ROUTE_OPT_EVALUATION_JOB_NOT_FINISHED (not SUCCEEDED or PARTIAL) or ROUTE_OPT_EVALUATION_UNSUPPORTED (more than one planning date)410RESULT_PURGED429ROUTE_OPT_RATE_LIMITED: a trial account sent more than 30 evaluations in one minute503ROUTE_OPT_ENGINE_UNAVAILABLE: the road engine did not answer