## Update an SKU

`PATCH /v1/catalog-skus/:id`

Updates an existing parent product. Fields are passed flat at the root of the JSON. Pass only the fields you want to change — the rest keep their current values.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Parent product identifier. List: [`GET /v1/catalog-skus`](./list.md) |

## Request fields (body)

| Field | Type | Required | Description |
|------|-----|:-----:|---------|
| `name` | string | no | Parent product name |
| `active` | boolean | no | Whether the product is active |
| `iblockSectionId` | number | no | ID of the main catalog section. List: [`GET /v1/catalog-sections`](/docs/entities/catalog-sections) |
| `iblockSection` | number[] | no | Array of IDs of all sections the product is linked to. Replaces the previous set entirely |
| `code` | string | no | Product symbolic code |
| `xmlId` | string | no | External code |
| `sort` | number | no | Sort order |
| `dateActiveFrom` | datetime | no | Activity start date |
| `dateActiveTo` | datetime | no | Activity end date |
| `previewText` | string | no | Preview text |
| `previewTextType` | string | no | Preview text format: `text` or `html` |
| `detailText` | string | no | Detailed description |
| `detailTextType` | string | no | Detailed description format: `text` or `html` |
| `previewPicture` | object | no | Preview picture: `{ "fileData": ["name.png", "<base64>"] }`. `{ "remove": "Y" }` deletes the picture |
| `detailPicture` | object | no | Detail picture, same format |
| `propertyNNN` | object | no | Catalog property value as an object `{ "value": … }`, where `NNN` is the property `id` from [`GET /v1/catalog-product-properties`](/docs/entities/catalog-product-properties): `"property301": { "value": "linen" }` |

Full list of fields — [`GET /v1/catalog-skus/fields`](./fields.md).

**The body must contain at least one writable field.** An empty `PATCH` (`{}`) is rejected with `400 EMPTY_UPDATE_BODY`, and a `PATCH` without a single recognized writable field is rejected with `400 NO_RECOGNIZED_UPDATE_FIELDS`. The message of the second error lists the writable fields.

`id` is passed in the path; it cannot be passed in the body. The `type`, `available`, `bundle`, `createdBy`, and `modifiedBy` fields are filled by Bitrix24, and `iblockId` is set only on create — writing any of them is rejected with `400 READONLY_FIELD`.

## Examples

### curl — personal key

```bash
curl -X PATCH "https://vibecode.bitrix24.com/v1/catalog-skus/7203" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Basic T-shirt, cotton"
  }'
```

### curl — OAuth application

```bash
curl -X PATCH "https://vibecode.bitrix24.com/v1/catalog-skus/7203" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Basic T-shirt, cotton"
  }'
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-skus/7203', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Basic T-shirt, cotton',
  }),
})

const { success, data } = await res.json()
console.log('New name:', data.name)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-skus/7203', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Basic T-shirt, cotton',
  }),
})

const { success, data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | object | Full object of the updated parent product. The field set is the same as [`GET /v1/catalog-skus/:id`](./get.md) |

## Response example

The main fields are shown; `propertyNNN` properties are omitted.

```json
{
  "success": true,
  "data": {
    "id": 7203,
    "iblockId": 25,
    "iblockSectionId": null,
    "iblockSection": null,
    "name": "Basic T-shirt, cotton",
    "type": 3,
    "active": true,
    "available": true,
    "bundle": false,
    "code": null,
    "xmlId": "7203",
    "sort": 500,
    "createdBy": 1295,
    "modifiedBy": 1295,
    "dateCreate": "2026-10-08T18:45:34.000Z",
    "timestampX": "2026-10-08T18:46:21.000Z"
  }
}
```

## Error response example

404 — no parent product with the specified `id` exists:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "sku does not exist."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 404 | `ENTITY_NOT_FOUND` | No product with the specified `id` exists (`sku does not exist.`) |
| 404 | `ENTITY_NOT_FOUND` | The `id` belongs to a regular product (`catalogSku <id> not found`). The update is still written, see "Known specifics" |
| 400 | `EMPTY_UPDATE_BODY` | The request body is empty — pass at least one field |
| 400 | `NO_RECOGNIZED_UPDATE_FIELDS` | The body contains no recognized writable field. The message lists the writable fields |
| 400 | `READONLY_FIELD` | A read-only field was passed in the body: `id`, `type`, `iblockId`, `available`, `bundle`, `createdBy`, `modifiedBy` |
| 403 | `SCOPE_DENIED` | The key lacks the `catalog` scope |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not passed |

Full list of common API errors — [Errors](/docs/errors).

## Known specifics

**A catalog property is passed as an object.** A `PATCH` with a scalar property value returns `200` but does not write the value: a string property is cleared, and a checkbox keeps its previous value. Pass `{ "value": … }` — this changes both a string and a `"Y"`/`"N"` checkbox.

**The method does not check that the `id` belongs to a parent product.** With the `id` of a regular product, the call updates that product and returns `404 ENTITY_NOT_FOUND` with the message `catalogSku <id> not found` — here `404` does not mean the write failed. Check the record before updating: [`GET /v1/catalog-skus/:id`](./get.md) returns `404 ENTITY_NOT_FOUND` for an `id` that does not belong to a parent product.

## See also

- [Create an SKU](/docs/entities/catalog-skus/create)
- [List SKUs](/docs/entities/catalog-skus/list)
- [Get an SKU](/docs/entities/catalog-skus/get)
- [Delete an SKU](/docs/entities/catalog-skus/delete)
- [SKU fields](/docs/entities/catalog-skus/fields)
- [Batch](/docs/batch)
- [Limits and optimization](/docs/optimization)
