# Create a transfer between sub-orders (steps) (/docs/api-reference/production-orders/ProductionOrdersController_createTransfer)

`POST /api/factories/{factoryId}/production-orders/{id}/sub-orders/{subId}/transfer`

Base URL: https://api.xentr.ai

Authentication: bearer token (`Authorization: Bearer <token>`).

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `factoryId` | path | yes | string | Factory ID |
| `id` | path | yes | string | Production Order ID |
| `subId` | path | yes | string | Source Sub-Order ID |

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "quantity": {
      "type": "number",
      "description": "Quantity to transfer",
      "example": 100
    },
    "serialNumbers": {
      "description": "Serial numbers being transferred",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "toSubOrderId": {
      "type": "string",
      "description": "Target sub-order ID to transfer to"
    },
    "locationFrom": {
      "type": "string",
      "description": "Location from"
    },
    "locationTo": {
      "type": "string",
      "description": "Location to"
    },
    "transferredBy": {
      "type": "string",
      "description": "User who initiated the transfer"
    }
  },
  "required": [
    "quantity"
  ]
}
```

## Responses

### 201: Transfer created

### 404: Sub-order not found