Trailers
Trailers on site, door work, holds and seals.
List trailers
Lists trailers by arrival, one keyset page at a time. Filters: `siteId`, `state` (default: not DEPARTED), `kind`, `locationCode`, `unitNumber`, `visitId` (the visit the trailer is attached to: the one that brought it, until a later visit takes it). A query parameter this operation does not define is a 400 `unknown-query-parameter`.
Get a trailer
Returns the trailer with an `ETag` of its version.
Start door work (StartDoorWork)
Unloading or loading begins on a DOCKED trailer: WAITING to IN_PROGRESS. Refused while the trailer is held (409 `trailer-on-hold`). Where the site yard policy sets `requireSecuringBeforeDoorWork`, an unsecured trailer is refused with 409 `trailer-not-secured` (ADR 0013); with the policy off (the default) nothing changes.
Complete door work (CompleteDoorWork)
Door work ends: IN_PROGRESS to DONE, recording the resulting `loadState` (a completed unload is EMPTY). ClearDoorAfterWork then queues a FROM_DOOR move for a DROP trailer; a live trailer stays until its visit checks out.
Place a hold (PlaceHold)
Puts the trailer on hold; a held trailer cannot be docked and its door work cannot start. A DOCKED trailer may be held.
Release the hold (ReleaseHold)
Removes the hold (409 `trailer-not-on-hold` when there is none).
Record or break the seal (RecordSeal, BreakSeal)
`INTACT` records the seal number found on the doors; `APPLIED` records a seal put on at the origin or dock; `BROKEN` marks it broken and places a SEAL_BROKEN hold. `sealClass` (I, S or H, ISO 17712) is optional with INTACT and APPLIED: an unknown class is 422 `invalid-seal-class`, and when the site yard policy sets `minimumSealClass` a seal of a lower class, or with no class, is 409 `seal-class-too-low`. `VERIFIED` and `MISMATCH` are never recorded by a caller: SealCheckAtGate sets them at check-in (ADR 0012).
Set what a trailer carries (ClassifyTrailer)
Sets the hazard class, the UN number and the temperature-control need of a trailer that is on site (ADR 0014): a full replacement, so a field left out is cleared and `{}` declares nothing. The same facts again change nothing and answer 200. Classifying a parked trailer does not move it; the placement rules judge the next placement (`POST /moves`, check-in, and the spot where a move is completed). An unknown hazard class is 422 `invalid-hazmat-class`, a malformed UN number 422 `invalid-un-number`, a UN number without a class 422 `validation`; a departed trailer is 409 `illegal-transition`.
Secure a docked trailer (SecureTrailer)
Records that the DOCKED trailer is secured, by a vehicle restraint (`RESTRAINT`) or wheel chocks (`WHEEL_CHOCKS`): the dock safety interlock of OSHA 29 CFR 1910.178(k)(1) and ANSI MH30.3 (ADR 0013). Where the site yard policy sets `requireSecuringBeforeDoorWork`, door work does not start until this is recorded. Securing the same way again changes nothing and answers 200. A trailer that is not DOCKED, or is already secured another way (release it first), is 409 `illegal-transition`; a trailer with an open move is 409 `trailer-has-open-move`; a method other than the two is 422 `validation`. Raises TrailerSecured.
Release the securing (ReleaseTrailerSecuring)
Records that the restraint was released or the chocks removed. It is required before a trailer is moved away from its door (`POST /moves` answers 409 `trailer-still-secured`) and before its visit checks out (409 `trailer-still-secured`). A trailer that is not secured is 409 `trailer-not-secured`; the securing stays while door work is IN_PROGRESS (409 `door-work-open`). A DROP trailer whose door work is done then gets its FROM_DOOR move. Raises TrailerSecuringReleased.