# Update a BOM item (/docs/api-reference/products/ProductsController_updateBomItem)

`PATCH /api/factories/{factoryId}/products/{productId}/bom/{itemId}`

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 |
| `itemId` | path | yes | string | BOM item ID |

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "componentPartNumber": {
      "type": "string",
      "description": "Component part number"
    },
    "componentName": {
      "type": "string",
      "description": "Component name"
    },
    "quantity": {
      "type": "number",
      "description": "Quantity required"
    },
    "unit": {
      "type": "string",
      "description": "Unit of measure"
    },
    "sortOrder": {
      "type": "number",
      "description": "Sort order"
    },
    "onHand": {
      "type": "string",
      "description": "Freeform on-hand quantity note for this component.",
      "example": "12 rolls"
    }
  }
}
```

## Responses

### 200: BOM item updated

### 404: BOM item not found