Docs menu
/addons/route-optimization/jobs/{jobId}/manual-plans
Save a user-fixed stop sequence as a new plan of a finished job
Same body as the evaluation, plus external_reference. The sequence is evaluated over the job first and must pass the same checks; it is then saved as a new job over the job's orders and vehicles, timed exactly as sent and never reordered: late stops, loads over vehicle_tonnage and days past the working time stay as sent. Orders in no trip come back unassigned with reason NOT_IN_SEQUENCE. Poll the new job and read GET /jobs/:id/result as usual; its engine is 'manual' and parent_job_id names this job. The new job can itself be evaluated, inserted into or saved again. Not a run: no job cap is used, but a trial account may save at most 50 manual plans in 24 hours. Production keys and sales or trial measurement keys only.
Path
/api/v1/partners/addons/route-optimization/jobs/{jobId}/manual-plansapi-keycurl example
curl -X POST "https://api.route4green.com/api/v1/partners/addons/route-optimization/jobs/{jobId}/manual-plans" \
-H "api-key: YOUR_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{
"routes": [
{
"external_vehicle_id": "string",
"trip_index": 0,
"planned_start": "2026-01-01T00:00:00+07:00",
"stops": [
{}
]
}
],
"external_reference": "string"
}'Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| jobId | path | string (uuid) | Yes | |
| Idempotency-Key | header | string | Yes | Unique per save; a retry with the same body returns the same job |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| routes | object[] | Yes | The whole plan to evaluate, one entry per trip; the answer keeps this order |
| external_reference | string | No | Client-supplied identifier for the new plan, echoed back on every read. Absent or blank: the new plan keeps the external_reference of the job it is saved from |
Fields of routes
| Field | Type | Required | Description |
|---|---|---|---|
| external_vehicle_id | string | Yes | A vehicle of the job |
| trip_index | number | No | 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) | No | 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[] | Yes | The stops in the order the vehicle serves them; kept exactly as given, never reordered |
Responses
202The new job, as POST /jobs answers400ROUTE_OPT_VALIDATION_ERROR: the evaluation checks, or a missing Idempotency-Key403ROUTE_OPT_EVALUATION_NOT_AVAILABLE: sandbox keys and free or self-serve measurement keys409ROUTE_OPT_EVALUATION_JOB_NOT_FINISHED, ROUTE_OPT_EVALUATION_UNSUPPORTED (more than one planning date), ROUTE_OPT_MANUAL_PLAN_UNSUPPORTED (more than one transport mode), or IDEMPOTENCY_CONFLICT429ROUTE_OPT_RATE_LIMITED, or ROUTE_OPT_MANUAL_PLAN_LIMIT_REACHED: a trial account already saved 50 manual plans in the last 24 hours