Unload a package back to staging (create an unloading)
POST/packages/:packageId/unloadings
Moves a LOADED package back to STAGED and publishes
PackageUnloaded with the operator's reason. Unloading is only
possible before the load is ship-confirmed: once the package is
SHIPPED it refuses with 409 already-shipped
(ErrAlreadyShipped) — the truck has left.
Request
Responses
- 200
- 400
- 404
- 409
- 500
The package is STAGED again.
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 package (package-not-found).
Package refusal: already-shipped (unload after ship-confirm),
wrong-load, package-on-another-load, package-state, or
idempotency-key-reused.
Unexpected failure (internal-error).