[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcatalog-measures\u002Fupdate":3,"docs-tabs-entities\u002Fcatalog-measures\u002Fupdate":6},{"content":4,"lastmod":5},"## Update a unit of measure\n\n`PATCH \u002Fv1\u002Fcatalog-measures\u002F:id`\n\nPartially updates an existing unit of measure in the product catalog reference list. Send only the fields you change. The body is flat, with no `fields` wrapper.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Unit of measure ID. List: [`GET \u002Fv1\u002Fcatalog-measures`](\u002Fdocs\u002Fentities\u002Fcatalog-measures\u002Flist) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `code` | number | no | Unit code from the Russian National Classifier of Units of Measurement (OKEI), an integer. Unique within the Bitrix24 account. `null` is not accepted |\n| `measureTitle` | string | no | Unit of measure name |\n| `symbol` | string \\| null | no | Short symbol. `null` clears the field |\n| `symbolIntl` | string \\| null | no | International symbol. `null` clears the field |\n| `symbolLetterIntl` | string \\| null | no | International letter symbol. `null` clears the field |\n| `isDefault` | string | no | Default unit: `Y` or `N`. `null` is not accepted |\n| `id` | number | no | `RO`. The ID is set in the path only. In the body it is rejected with `400 READONLY_FIELD` |\n\nClearing with `null` works only in a single request. For the batch write limitation, see [Catalog units of measure](\u002Fdocs\u002Fentities\u002Fcatalog-measures).\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-measures\u002F17\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"measureTitle\": \"Documentation test 2\"\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-measures\u002F17\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"measureTitle\": \"Documentation test 2\"\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-measures\u002F17', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    measureTitle: 'Documentation test 2',\n  }),\n})\n\nconst { success, data } = await res.json()\nconsole.log('Measure title:', data.measureTitle)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-measures\u002F17', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    measureTitle: 'Documentation test 2',\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\nThe response returns the full record after the update, including the fields that did not change.\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data.id` | number | Unit of measure ID |\n| `data.code` | number | OKEI unit code |\n| `data.measureTitle` | string \\| null | Unit of measure name |\n| `data.symbol` | string \\| null | Short symbol |\n| `data.symbolIntl` | string \\| null | International symbol |\n| `data.symbolLetterIntl` | string \\| null | International letter symbol |\n| `data.isDefault` | string | `Y` — default unit, `N` — not default |\n| `meta.warnings` | array | Present only if the body contains a field that is not among the unit of measure fields. Each element has `code: \"UNRECOGNIZED_WRITE_FIELD\"`, `field` with the field name, and `message`. On a route that wraps the field map itself, an object under `fields` is rejected with `400 NESTED_FIELDS_ENVELOPE` when the schema does not declare `fields`; pass fields flat at the JSON root. |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"code\": 9917,\n    \"id\": 17,\n    \"isDefault\": \"N\",\n    \"measureTitle\": \"Documentation test 2\",\n    \"symbol\": \"dt\",\n    \"symbolIntl\": \"td\",\n    \"symbolLetterIntl\": \"TDC\"\n  }\n}\n```\n\n## Error response example\n\n404 — no unit of measure with this `id`:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"measure does not exist.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 404 | `ENTITY_NOT_FOUND` | No unit of measure with this `id` exists on the portal |\n| 400 | `INVALID_PARAMS` | The path `id` is not a non-negative integer. The message is `id must be a non-negative integer` |\n| 400 | `INVALID_PARAMS` | `code` is not an integer, for example `1.5` |\n| 400 | `INVALID_PARAMS` | `null` is passed in `code` or `isDefault` |\n| 400 | `INVALID_PARAMS` | `isDefault` is neither `Y` nor `N` |\n| 400 | `EMPTY_UPDATE_BODY` | The request body is empty. Pass at least one field |\n| 400 | `NESTED_FIELDS_ENVELOPE` | The body contains an object under `fields` instead of root-level fields; the unit is not updated |\n| 400 | `READONLY_FIELD` | `id` is passed in the body |\n| 422 | `BITRIX_ERROR` | The new `code` is already taken by another unit on the portal. The message is `Duplicate entry for key [code]`, and the response also contains `error.b24Code` |\n| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n\nFor the full list of common API errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**An unknown scalar field does not stop the request.** If the body contains only an unknown scalar field, the response comes back with status `200`, the record does not change, and a warning in `meta.warnings` reports the skipped field. An object under `fields` is rejected with `400 NESTED_FIELDS_ENVELOPE` before the update: pass fields at the JSON root. Check field names against [`GET \u002Fv1\u002Fcatalog-measures\u002Ffields`](\u002Fdocs\u002Fentities\u002Fcatalog-measures\u002Ffields), and verify success by the values in `data`, not only by `success`.\n\n## See also\n\n- [Get a unit of measure](\u002Fdocs\u002Fentities\u002Fcatalog-measures\u002Fget)\n- [Create a unit of measure](\u002Fdocs\u002Fentities\u002Fcatalog-measures\u002Fcreate)\n- [List units of measure](\u002Fdocs\u002Fentities\u002Fcatalog-measures\u002Flist)\n- [Delete a unit of measure](\u002Fdocs\u002Fentities\u002Fcatalog-measures\u002Fdelete)\n- [Unit of measure fields](\u002Fdocs\u002Fentities\u002Fcatalog-measures\u002Ffields)\n- [Batch](\u002Fdocs\u002Fbatch)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n","2026-10-15",{},1795415191746]