## Update a price type

`PATCH /v1/catalog-price-types/:id`

Partially updates a catalog price type, preserving the values of fields omitted from the request. The request body is flat, without a `fields` wrapper.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|-------|----------|
| `id` (path) | number | yes | Price type ID, a non-negative integer. List: [List price types](./list.md). |

## Request fields (body)

Send at least one editable field.

| Field | Type | Required | Description |
|------|-----|-------|----------|
| `name` | string | no | Price type name. |
| `sort` | number | no | Sort order in the Bitrix24 interface. |
| `xmlId` | string \| null | no | External identifier for import and export integrations. |
| `id` | number | no | `RO`. Price type ID. List: [List price types](./list.md). |
| `base` | string | no | `RO`. Base price type flag, set by the system. |
| `createdBy` | number \| null | no | `RO`. ID of the user who created the record. List: [List users](/docs/entities/users/list). |
| `modifiedBy` | number \| null | no | `RO`. ID of the user who last updated the record. List: [List users](/docs/entities/users/list). |
| `dateCreate` | string \| null | no | `RO`. Creation date and time in ISO 8601 format. |
| `timestampX` | string \| null | no | `RO`. Last update date and time in ISO 8601 format. |

Fields marked `RO` are read-only. Do not include them in the request body.

## Examples

### curl — personal key

```bash
curl -X PATCH "https://vibecode.bitrix24.com/v1/catalog-price-types/19" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Wholesale 2026", "sort": 210}'
```

### curl — OAuth application

```bash
curl -X PATCH "https://vibecode.bitrix24.com/v1/catalog-price-types/19" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Wholesale 2026", "sort": 210}'
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-price-types/19', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"name": "Wholesale 2026", "sort": 210}),
})

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

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-price-types/19', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"name": "Wholesale 2026", "sort": 210}),
})

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

## Response fields

A successful response returns `200` and the complete updated price type.

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | Always `true` on success. |
| `data` | object | Price type object. |
| `data.id` | number | `RO`. Price type ID. List: [List price types](./list.md). Pass this value in `catalogGroupId` when working with [catalog prices](/docs/entities/catalog-prices). |
| `data.name` | string | Price type name. |
| `data.base` | string | `RO`. `Y` — the account's base price type, `N` — another type. |
| `data.xmlId` | string \| null | External identifier for integrations. |
| `data.sort` | number | Sort order in the Bitrix24 interface. |
| `data.createdBy` | number \| null | `RO`. ID of the user who created the record. List: [List users](/docs/entities/users/list). |
| `data.modifiedBy` | number \| null | `RO`. ID of the user who last updated the record. List: [List users](/docs/entities/users/list). |
| `data.dateCreate` | string \| null | `RO`. Creation date and time in ISO 8601 format. |
| `data.timestampX` | string \| null | `RO`. Last update date and time in ISO 8601 format. |

## Response example

```json
{
  "success": true,
  "data": {
    "base": "N",
    "createdBy": 1295,
    "dateCreate": "2026-10-14T17:18:58.000Z",
    "id": 19,
    "modifiedBy": 1295,
    "name": "Wholesale 2026",
    "sort": 210,
    "timestampX": "2026-10-14T17:18:59.000Z",
    "xmlId": "WHOLESALE"
  }
}
```

## Error response example

400 — an attempt to change `base`, so the price type was not updated:

```json
{
  "success": false,
  "error": {
    "code": "READONLY_FIELD",
    "message": "Field 'base' is read-only and cannot be set"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 404 | `ENTITY_NOT_FOUND` | No price type exists with the specified `id`. |
| 400 | `INVALID_PARAMS` | `id` is not a non-negative integer, for example `abc`. |
| 400 | `EMPTY_UPDATE_BODY` | The body is empty or is not a JSON object. Send at least one editable field. |
| 400 | `READONLY_FIELD` | The body contains a field marked `RO`. Remove it from the request. |
| 400 | `INVALID_PARAMS` | An object or array was passed in a string or numeric field. |
| 400 | `INVALID_PARAMS` | Bitrix24 rejected the request parameters. |
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request. The reason is in `error.message`. |
| 403 | `BITRIX_ACCESS_DENIED` | The user does not have the Bitrix24 “Manage price types” permission. |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode. |
| 403 | `SCOPE_DENIED` | The key does not have the `catalog` scope. |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was omitted. |
| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens configured. For an OAuth application key, check the user session. |

For the full list of common API errors, see [Errors](/docs/errors).

## See also

- [Get a price type](./get.md)
- [Create a price type](./create.md)
- [List price types](./list.md)
- [Delete a price type](./delete.md)
- [Price type fields](./fields.md)
