Close an open load (CloseLoad)
POST/loads/:loadId/closures
OPEN to CLOSED; closes the departure of the load (CloseDeparture) and publishes LoadClosed on the analytics stream. Closing a CLOSED load returns it unchanged.
Request
Responses
- 200
- 400
- 404
- 409
- 413
- 422
- 500
Load closed (or already closed).
Response Headers
Present, with the value true, only on a response replayed from a stored first answer (a 2xx or a refusal that is final for the request; a 5xx and a refusal that depends on state another request can change are never stored).
Malformed request. Types: malformed-request (bad JSON, unknown field, NUL character), idempotency-key-required, idempotency-key-invalid, invalid-limit, invalid-cursor and unknown-query-parameter.
Unknown id (problem type not-found), or a NUL character in the request path (problem type resource-not-found).
State or capacity conflict, or Idempotency-Key reuse. Types: idempotency-key-reused (the key was already used with a different request), departure-full (ErrDepartureFull), departure-closed (ErrDepartureClosed), lane-closed (ErrLaneClosed), package-already-loaded (ErrPackageAlreadyLoaded), load-over-capacity (ErrLoadOverCapacity), load-already-exists (ErrLoadAlreadyExists), illegal-transition and concurrent-update.
Request body above 64 KiB (problem type request-body-too-large).
Validation failure. Types: overlapping-slots (ErrOverlappingSlots), invalid-departure-times (ErrInvalidDepartureTimes) and validation-failed. An empty request body is decoded as all-zero values and fails here (validation-failed), not as a 400.
Unexpected failure (problem type internal-error); the detail never carries the internal message. A 5xx is never stored by the Idempotency-Key middleware, so the same key can retry.