Change the package capacity of a scheduled departure (ChangeDepartureCapacity)
PUT/departures/:departureId/capacity
Planner command added by gap G28. Allowed on a SCHEDULED departure; the new capacity may not be below the packages already booked (departure-full). Publishes DepartureCapacityChanged. A capacity equal to the current one changes nothing and publishes nothing. A load that is already open keeps the capacity snapshot it took at OpenLoad.
Request
Responses
- 200
- 400
- 404
- 409
- 422
- 500
Capacity changed.
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.
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.