Dispatch plans

Import Orders Into Dispatch Plan

Changed on

Add up to 22,000 orders per request to the plan's unplanned backlog. Orders the plan already holds are reported as unchanged, so a retry is safe. The whole selection is refused when any id is unknown or ineligible (400 PLAN_SELECTION_INVALID, naming the ids) or another plan holds one of its orders (409 ORDER_HELD_BY_PLAN). More ids than one request takes fail with 422 VALIDATION_ERRORS. A plan holds at most 22,000 orders, 1,500 routes and 24,000 stops; an import that would grow it past them is refused with 400 PLAN_DOCUMENT_INVALID. Fails with 409 PLAN_LEASE_HELD (naming heldBy) while anyone has the plan open in the Planner, and with 409 PLAN_REVISION_STALE (naming currentRevision) when the plan changed since expectedRevision.

post/v1/plans/{planId}/orders:import

Request

Path parameters

planIdstring required

Request body

expectedRevisioninteger required

The revision of the plan you last read.

orderIdsstring[] required

Orders to add to the backlog.

Response

OK

planIdstring required
revisioninteger required
contentHashstring required
importedOrderIdsstring[] required

Orders that joined the plan's backlog.

unchangedOrderIdsstring[] required

Orders the plan already held, left as they were.

memberCountinteger required

Orders the plan holds now.

Changes