[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fbasket-item-properties\u002Fupdate":3,"docs-tabs-entities\u002Fbasket-item-properties\u002Fupdate":6},{"content":4,"lastmod":5},"## Update a basket item property\n\n`PATCH \u002Fv1\u002Fbasket-item-properties\u002F:id`\n\nUpdates the value and other writable fields of an existing basket item property by its ID.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Property ID. Source: [`GET \u002Fv1\u002Fbasket-item-properties`](.\u002Flist.md) |\n\n## Request body fields\n\nPass fields at the root of the JSON body, without a `fields` wrapper.\n\n| Field | Type | Required | Description |\n|------|------|------|------|\n| `name` | string | no | Property name |\n| `value` | string \\| null | no | Property value |\n| `code` | string \\| null | no | Property symbolic code |\n| `sort` | number | no | Sort order |\n| `xmlId` | string \\| null | no | External ID |\n| `id` | number | no | Property ID. Source: [`GET \u002Fv1\u002Fbasket-item-properties`](.\u002Flist.md). `RO`. Read-only, assigned by the server. |\n| `basketId` | number | no | Basket item ID. Source: [`GET \u002Fv1\u002Fbasket-items`](\u002Fdocs\u002Fentities\u002Fbasket-items\u002Flist). Create-only. Do not send in PATCH. |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbasket-item-properties\u002F1037\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n  \"name\": \"Color\",\n  \"code\": \"COLOR\",\n  \"value\": \"Red\",\n  \"sort\": 200,\n  \"xmlId\": \"color-red\"\n}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbasket-item-properties\u002F1037\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n  \"name\": \"Color\",\n  \"code\": \"COLOR\",\n  \"value\": \"Red\",\n  \"sort\": 200,\n  \"xmlId\": \"color-red\"\n}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbasket-item-properties\u002F1037', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    \"name\": \"Color\",\n    \"code\": \"COLOR\",\n    \"value\": \"Red\",\n    \"sort\": 200,\n    \"xmlId\": \"color-red\"\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbasket-item-properties\u002F1037', {\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    \"name\": \"Color\",\n    \"code\": \"COLOR\",\n    \"value\": \"Red\",\n    \"sort\": 200,\n    \"xmlId\": \"color-red\"\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|------|------|\n| `success` | boolean | `true` on success. HTTP status: `200` |\n| `data` | object | Updated basket item property |\n| `data.id` | number | Property ID. Source: [`GET \u002Fv1\u002Fbasket-item-properties`](.\u002Flist.md) |\n| `data.basketId` | number | Basket item ID. Source: [`GET \u002Fv1\u002Fbasket-items`](\u002Fdocs\u002Fentities\u002Fbasket-items\u002Flist) |\n| `data.name` | string | Property name |\n| `data.value` | string \\| null | Property value |\n| `data.code` | string \\| null | Property symbolic code |\n| `data.sort` | number | Sort order |\n| `data.xmlId` | string \\| null | External ID |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"basketId\": 1001,\n    \"code\": \"COLOR\",\n    \"id\": 1037,\n    \"name\": \"Color\",\n    \"sort\": 200,\n    \"value\": \"Red\",\n    \"xmlId\": \"color-red\"\n  }\n}\n```\n\n## Error response example\n\n404 — property not found:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"basket property is not exists\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|------|------|\n| 400 | `READONLY_FIELD` | The request contains `id` or `basketId`, which cannot be updated |\n| 400 | `EMPTY_UPDATE_BODY` | The request body is empty |\n| 400 | `NO_RECOGNIZED_UPDATE_FIELDS` | The body contains no recognized writable field |\n| 400 | `INVALID_PARAMS` | The path `id` is not a non-negative integer |\n| 404 | `ENTITY_NOT_FOUND` | No property exists with this `id`, or it has already been deleted |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the operation. The reason is in `message` |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode |\n| 403 | `SCOPE_DENIED` | The API key does not have the `sale` scope |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 429 | `RATE_LIMITED` | The request limit was exceeded |\n\nFor the full list of shared API errors, see [Error codes](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\nIf `name`, `code` or `value` is omitted, Vibecode reads their current values and supplies them before the write. Updating only `value` preserves the other fields.\n\n## See also\n\n- [List basket item properties](.\u002Flist.md)\n- [Get a basket item property](.\u002Fget.md)\n- [Create a basket item property](.\u002Fcreate.md)\n- [Delete a basket item property](.\u002Fdelete.md)\n- [Basket item property fields](.\u002Ffields.md)\n- [Basket item properties](\u002Fdocs\u002Fentities\u002Fbasket-item-properties)\n- [List basket items](\u002Fdocs\u002Fentities\u002Fbasket-items\u002Flist)\n- [Batch calls](\u002Fdocs\u002Fbatch)\n- [Entity API contract](\u002Fdocs\u002Fentity-api)\n","2026-10-12",{},1795415169816]