# cancelInboundShipment

## Overview

Cancels a DRAFT inbound shipment (an `InboundShipment`), transitioning its status to CANCELLED. Only DRAFT inbound shipments can be cancelled; POSTED is terminal. Cancellation does not affect stock (a DRAFT inbound shipment has never posted inventory ledger entries or costing journal entries).

## Modules Commands Used

- [inbound-shipment] CancelInboundShipment

## Exception Handling

| Error Code | Description |
| --- | --- |
| INBOUND_SHIPMENT_INVALID_STATUS | The inbound shipment does not exist or is not in DRAFT status and cannot be cancelled. |
| INSUFFICIENT_PERMISSION | The caller lacks the `inventory:inventoryOperation` permission. |
