Add a package to an open load (AddPackage)
POST/loads/:loadId/packages
Refused with 409 package-already-loaded (ErrPackageAlreadyLoaded) if the tracking number is on another OPEN or CLOSED load, and with 409 load-over-capacity (ErrLoadOverCapacity) if the load would exceed its capacity snapshot. On a LINEHAUL or AIR departure the package is also booked on the departure (gap G15): 409 departure-full or departure-closed when it cannot be. On a PICKUP departure the booking was made at FulfillmentLocked and booked does not change. Adding a tracking number that is already on this load changes nothing.
Request
Responses
- 200
- 400
- 404
- 409
- 413
- 422
- 500
Package added (or already on this load).
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.