# createTransferOrder

## Overview

Creates a Transfer Order in DRAFT. The resolver looks up the seed `Unit.symbol = "each"` once per call, injects `unitId = each.id` on every line, and forwards the payload to the module's `createTransferOrder` command. The module-generated `docNumber` is returned on the response. The module-internal check is limited to self-transfer rejection (source equals destination).

## Modules Commands Used

- [transfer-order] createTransferOrder

## Exception Handling

| Error Code | Description |
| --- | --- |
| INVENTORY_INVALID_TRANSFER_LOCATIONS | Self-transfer (source equals destination) |
| INVENTORY_EMPTY_TRANSFER_LINES | The lines array is empty |
| INVENTORY_INVALID_QUANTITY | A line's expectedQty is zero or negative |
