# Create Transfer

**POST** `/v1/inventory/transfers`

Creates a stock transfer from one location to another. Stock is deducted from the source immediately and the transfer status is set to `in_transit`. The destination is credited only when the transfer is received via `PUT /v1/inventory/transfers/:id/receive`.

To transfer a specific batch (e.g. moving near-expiry LOT-B from warehouse to store), pass `batch_id`. The system verifies the batch has enough stock at the source location.

### Request fields

| Field | Type | Required | Description |
|---|---|---|---|
| `from_location_id` | integer | Yes | Source location |
| `to_location_id` | integer | Yes | Destination location (must differ from source) |
| `listing_id` | integer | Yes | Listing to transfer |
| `quantity` | integer | Yes | Units to move |
| `batch_id` | integer | No | Transfer a specific batch (validates batch stock at source) |
| `note` | string | No | Transfer note |
| `expected_at` | timestamp | No | Expected arrival date |

### Response fields

| Field | Type | Description |
|---|---|---|
| `transfer` | object | The created transfer object |

**Example — move near-expiry LOT-B from warehouse to store:**
```json
{
  "from_location_id": 1,
  "to_location_id": 3,
  "listing_id": 42,
  "quantity": 50,
  "batch_id": 7,
  "note": "Near-expiry batch — move to store for faster sale"
}
```
