# Receive Transfer

**PUT** `/v1/inventory/transfers/:transfer_id/receive`

Confirm receipt of stock at the destination location. Pass the actual quantity received — if it differs from the sent quantity, the shortfall is automatically returned to the source and the transfer is marked `received_discrepancy`.

Only transfers with status `in_transit` can be received.

### Path parameters

| Field | Type | Description |
|---|---|---|
| `transfer_id` | integer | ID of the transfer to receive |

### Body parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `received_qty` | integer | No | Actual quantity received. Defaults to full sent quantity if omitted. |

### Response fields

| Field | Type | Description |
|---|---|---|
| `transfer` | object | Updated transfer object |
| `received_qty` | integer | Quantity credited to destination |
| `discrepancy` | integer | Shortfall units returned to source (0 if none) |

### Transfer statuses after receive

| Status | Meaning |
|---|---|
| `received` | Full quantity received |
| `received_discrepancy` | Short received — shortfall returned to source automatically |

### What happens on receive

- `received_qty` units are credited to the destination stock
- If `received_qty < quantity`, the shortfall is returned to the source location as a `transfer_return` movement
- If the transfer was for a specific batch, the batch is created or incremented at the destination with the original `lot_number`, `expiry_date`, `condition`, and `uom`
- `received_qty` is persisted on the transfer record for audit trail

### Related

- `GET /v1/inventory/transfers/:id` — fetch transfer details (expected quantity, batch info) before confirming receipt
