Moves
Yard moves: request, claim-next, complete, cancel.
Request a move (RequestMove)
A supervisor asks for a HOSTLER move of a trailer to a spot or door. The destination is validated now (known active slot of the site, closure, door flow, hold) and RESERVED: no two open moves share a destination (409 `destination-reserved`), the destination must be free (409 `location-occupied`), and a trailer has at most one open move (409 `trailer-has-open-move`). A trailer that is secured at its door (ADR 0013) is not moved away until the securing is released (409 `trailer-still-secured`). A trailer that carries a hazard class or needs temperature control is sent only to a yard spot its kind allows (409 `placement-rule-violated`, ADR 0014); the same rule judges the spot where the hostler completes the move.
List moves
Lists moves oldest first, one keyset page at a time. Filters: `siteId`, `state`, `trailerId`, `hostlerRef` (the moves a hostler holds or held). A query parameter this operation does not define is a 400 `unknown-query-parameter`.
Claim the next move (ClaimNextMove)
Pull dispatch: the system, never the caller, picks the REQUESTED HOSTLER move of the site with the lowest priority band, then the earliest dueBy, then the oldest request, and leases it to the hostler for the site's `leaseSeconds`. The trailer leaves its place (StartMoving). A hostler holds at most one CLAIMED move (409 `hostler-busy`). 404 `no-claimable-move` when nothing waits.
Complete a move (CompleteMove)
The trailer arrives at `actualLocation` (default: the destination); a location other than the destination needs a `deviationNote` (422 `unexplained-destination`). Only the lease holder completes a HOSTLER move (409 `not-lease-holder`); a gate clerk or dock operator completes a VISITING_DRIVER move without `hostlerRef`. The trailer and the move change in one transaction; an occupied destination is refused (409 `location-occupied`) and the move stays CLAIMED.
Cancel a move (CancelMove)
Cancels a REQUESTED or CLAIMED move. Cancelling a CLAIMED HOSTLER move returns the trailer to where it was (ReturnToOrigin); a VISITING_DRIVER move cannot be cancelled once the trailer is at the gate (409 `illegal-transition`).