# Update a routing op (/docs/api-reference/products/RoutingOpsController_update)

`PATCH /api/factories/{factoryId}/products/{productId}/methods/{methodId}/routing-ops/{opId}`

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

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

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `factoryId` | path | yes | string | Factory ID |
| `productId` | path | yes | string | Product ID |
| `methodId` | path | yes | string | Production method ID |
| `opId` | path | yes | string | Routing op ID |

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "opName": {
      "type": "string"
    },
    "seq": {
      "type": "number"
    },
    "machineIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tool": {
      "type": "string"
    },
    "outPerCycle": {
      "type": "number"
    },
    "cycleS": {
      "type": "number"
    },
    "scrapPct": {
      "type": "number"
    },
    "setupMin": {
      "type": "number"
    },
    "consumes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "input": {
      "type": "string"
    },
    "workInstruction": {
      "type": "string"
    }
  }
}
```

## Responses

### 200: Routing op updated