Close a loading load (create a closure)
POST/loads/:loadId/closures
Moves a LOADING load to CLOSED and publishes LoadClosed with
the package and short-shipped counts. A load closes only when every
assigned package is loaded or short-shipped with a reason: any
package still outstanding is 409 packages-outstanding
(ErrPackagesOutstanding). Short-ships are recorded in the same
command, each with its reason.
Request
Responses
- 200
- 400
- 404
- 409
- 500
The load is CLOSED.
Response Headers
Idempotency-Replayed
True when this response was replayed from a stored idempotent execution (R5).
Malformed body or a missing/invalid required field (bad-request).
No such load (load-not-found).
Load refusal: packages-outstanding, trailer-not-docked,
load-not-closed, load-confirmed, duplicate-open-load,
load-state, or idempotency-key-reused.
Unexpected failure (internal-error).