[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fbasket-item-properties\u002Fcreate":3,"docs-tabs-entities\u002Fbasket-item-properties\u002Fcreate":6},{"content":4,"lastmod":5},"## Create a basket item property\n\n`POST \u002Fv1\u002Fbasket-item-properties`\n\nCreates a property on an existing basket item to store additional information about the product.\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| `basketId` | number | yes | Basket item ID. Source: [`GET \u002Fv1\u002Fbasket-items`](\u002Fdocs\u002Fentities\u002Fbasket-items\u002Flist) |\n| `name` | string | yes | Property name |\n| `value` | string \\| null | yes | Property value. Creation rejects `null` and an empty string |\n| `code` | string \\| null | yes | Property symbolic code. Creation rejects `null` and an empty string |\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\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbasket-item-properties\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n  \"basketId\": 1001,\n  \"name\": \"Color\",\n  \"value\": \"Blue\",\n  \"code\": \"COLOR\",\n  \"sort\": 100\n}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbasket-item-properties\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n  \"basketId\": 1001,\n  \"name\": \"Color\",\n  \"value\": \"Blue\",\n  \"code\": \"COLOR\",\n  \"sort\": 100\n}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbasket-item-properties', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    \"basketId\": 1001,\n    \"name\": \"Color\",\n    \"value\": \"Blue\",\n    \"code\": \"COLOR\",\n    \"sort\": 100\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', {\n  method: 'POST',\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    \"basketId\": 1001,\n    \"name\": \"Color\",\n    \"value\": \"Blue\",\n    \"code\": \"COLOR\",\n    \"sort\": 100\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: `201` |\n| `data` | object | Created 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\": 100,\n    \"value\": \"Blue\",\n    \"xmlId\": \"bx_6acd18b609cf1\"\n  }\n}\n```\n\n## Error response example\n\n400 — the required `code` field is missing:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"MISSING_REQUIRED_FIELDS\",\n    \"message\": \"Body field \\\"code\\\" is required to create basketItemProperty.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|------|------|\n| 400 | `MISSING_REQUIRED_FIELDS` | A required field `basketId`, `name`, `value` or `code` is missing or `null`. The `name`, `value` or `code` field is an empty string |\n| 400 | `INVALID_PARAMS` | An empty or nonnumeric string was supplied in `basketId` |\n| 400 | `READONLY_FIELD` | The read-only `id` field was supplied |\n| 404 | `ENTITY_NOT_FOUND` | The specified basket item was not found |\n| 415 | `FST_ERR_CTP_INVALID_MEDIA_TYPE` | An unsupported content type was supplied, such as `application\u002Fxml` |\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## See also\n\n- [List basket item properties](.\u002Flist.md)\n- [Get a basket item property](.\u002Fget.md)\n- [Update a basket item property](.\u002Fupdate.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",{},1795415168469]