# Re-route a scheduled order to a different machine (reflow accept) (/docs/api-reference/production-orders/ProductionOrdersController_reroute)

`POST /api/factories/{factoryId}/production-orders/{id}/reroute`

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

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

## Parameters

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

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "machineId": {
      "type": "string",
      "description": "Machine id to move the order onto."
    },
    "methodId": {
      "type": "string",
      "description": "Method id to switch to (when the suggestion uses a different method)."
    },
    "subOrderId": {
      "type": "string",
      "description": "Which sub-order (operation) to reroute. REQUIRED for multi-operation (per-op routed) orders — identifies the single op-sub to move. Ignored for legacy single-sub orders."
    }
  },
  "required": [
    "machineId"
  ]
}
```

## Responses

### 200: Order re-routed

### 400: Order is not scheduled