# updateInboundShipment

## Overview

Updates a DRAFT inbound shipment (an `InboundShipment`) — patches the receipt date and existing-line quantities and removes lines. Edits are incremental: only lines named in `updateLines` / `removeLineIds` are touched, and adding brand-new lines is not supported (inbound-shipment lines require a purchase-order source link, so new receipt lines are raised via `createInboundShipment` against a PO).

## Modules Commands Used

- [inbound-shipment] UpdateInboundShipment

## Exception Handling

| Error Code | Description |
| --- | --- |
| INBOUND_SHIPMENT_INVALID_STATUS | The inbound shipment is not in DRAFT status and cannot be edited. |
| INBOUND_SHIPMENT_SHIPMENT_LINE_NOT_FOUND | A referenced receipt line does not exist on the inbound shipment. |
| INBOUND_SHIPMENT_ITEM_NOT_FOUND | A referenced item does not exist. |
| INBOUND_SHIPMENT_STORAGE_LOCATION_NOT_FOUND | The specified storage location does not exist. |
| INBOUND_SHIPMENT_INVALID_QUANTITY | The received quantity is invalid (e.g., zero or negative). |
| INBOUND_SHIPMENT_PRIMARY_UNIT_MISMATCH | A line unit does not match the item's primary unit. |
| INBOUND_SHIPMENT_INVALID_UNIT_CONVERSION_RATE | The unit conversion rate is invalid. |
| INBOUND_SHIPMENT_EMPTY_SHIPMENT_LINES | At least one receipt line is required. |
| INSUFFICIENT_PERMISSION | The caller does not have permission to perform this operation |
