# Update a production method (/docs/api-reference/production-methods/ProductionMethodsController_update)

`PATCH /api/factories/{factoryId}/production-methods/{id}`

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

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

Partial update of a method. Audit-logged.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `factoryId` | path | yes | string | Factory slug. |
| `id` | path | yes | string | Method id. |

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Display name.",
      "example": "Standard Mold v2"
    },
    "cavityCount": {
      "type": "number",
      "description": "Parts per cycle for count products, or output per cycle for measure products (e.g. 0.5 kg/cycle). Must be > 0.",
      "example": 4
    },
    "cycleTimeS": {
      "type": "number",
      "description": "Cycle time in seconds.",
      "example": 28.5
    },
    "setupTimeS": {
      "type": "number",
      "description": "Setup time in seconds.",
      "example": 900
    },
    "warmupTimeS": {
      "type": "number",
      "description": "Warmup time in seconds.",
      "example": 300
    },
    "machineIds": {
      "description": "Compatible machine IDs.",
      "example": [
        "a1b2c3d4-..."
      ],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "positionX": {
      "type": "number",
      "description": "Canvas X position.",
      "example": 320
    },
    "positionY": {
      "type": "number",
      "description": "Canvas Y position.",
      "example": 180
    },
    "isActive": {
      "type": "boolean",
      "description": "Active flag.",
      "example": true
    },
    "recommended": {
      "type": "boolean",
      "description": "Mark this method as the recommended one for the product. When true, all other methods of the same product are automatically unmarked.",
      "example": true
    }
  }
}
```

## Responses

### 200: Method updated.

### 404: Method not found.