# Update a unit of measure (edit or deactivate) (/docs/api-reference/units-of-measure/UnitsOfMeasureController_updateUnit)

`PATCH /api/factories/{factoryId}/units-of-measure/{id}`

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 |  |

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "symbol": {
      "type": "string"
    },
    "dimension": {
      "type": "string",
      "enum": [
        "count",
        "mass",
        "volume",
        "length",
        "area"
      ]
    },
    "decimalPlaces": {
      "type": "number"
    },
    "sortOrder": {
      "type": "number"
    },
    "isActive": {
      "type": "boolean",
      "description": "Set false to deactivate (preserves products referencing it)."
    }
  }
}
```

## Responses

### 200