/shipments/{shipmentId}/legs/preflight

Check a candidate leg plan for non-blocking warnings WITHOUT writing. Four categories: capacity (a tour's container would overflow), time-window (a leg's window does not overlap its tour), downstream-time-window (the simulated post-change schedule of an affected tour arrives at a stop after its requested window closes), and chain-deadline (a leg's projected dropoff leaves the shipment's remaining legs no chance to make the final delivery). Returns the same warnings the equivalent PUT would raise; a PUT that carries a warning is rejected with 422 unless the matching accept flag is set. Also returns tourImpacts: for each tour the plan routes a leg onto, the estimated schedule time the plan adds to that tour in seconds (driving + service + driver waiting, post-change minus current), from the same simulation that produced the warnings. With withSchedules: true the response additionally carries schedules: each affected tour's simulated before/after stop timeline, from that same simulation. Read-only — no optimistic-lock token, no state change.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The ID of the shipment whose leg plan to check.

Body Params
plan
array of objects
required
length ≤ 10

The candidate leg plan to check (same shape as the PUT body's plan). Capped at 10 legs.

plan*
boolean

When true, the response additionally carries schedules: each affected tour's simulated before/after stop timeline (projected arrivals, waiting, per-stop buffer, newly added stops). The warnings are identical with and without it. Defaults to false.

Responses

400

Malformed leg plan.

401

Unauthorized - invalid or missing API key.

403

Forbidden - the key may not update this shipment.

404

Shipment not found.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json