
## Create a price

`POST /v1/catalog-prices`

Creates a product price. Fields are passed flat at the JSON root. Without quantity ranges, a product can have only one price of each type; with ranges, one price per range.

## Request fields (body)

| Field | Type | Required | Description |
|------|-----|:-----:|---------|
| `productId` | number | yes | ID of the product the price belongs to. List: `GET /v1/catalog-products?filter[iblockId]=<id>` (the `iblockId` value comes from `GET /v1/catalogs`) |
| `catalogGroupId` | number | yes | Price type. Type numbers depend on the Bitrix24 account: the list is [`GET /v1/catalog-price-types`](/docs/entities/catalog-price-types); the base type is the record whose `base` equals `Y` |
| `price` | number | yes | Price value |
| `currency` | string | yes | Price currency, e.g. `USD`. List: `GET /v1/currencies` |
| `quantityFrom` | number | no | Lower bound of the quantity range |
| `quantityTo` | number | no | Upper bound of the quantity range |

## Examples

### curl — personal key

```bash
curl -X POST "https://vibecode.bitrix24.com/v1/catalog-prices" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "productId": 7081,
    "catalogGroupId": 1,
    "price": 1500,
    "currency": "USD"
  }'
```

### curl — OAuth application

```bash
curl -X POST "https://vibecode.bitrix24.com/v1/catalog-prices" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "productId": 7081,
    "catalogGroupId": 1,
    "price": 1500,
    "currency": "USD"
  }'
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-prices', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    productId: 7081,
    catalogGroupId: 1,
    price: 1500,
    currency: 'USD',
  }),
})

const { success, data } = await res.json()
console.log('Price ID:', data.id)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-prices', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    productId: 7081,
    catalogGroupId: 1,
    price: 1500,
    currency: 'USD',
  }),
})

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

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | object | The created price with all its fields — [Price fields](./fields.md) |
| `data.id` | number | Identifier of the created price |
| `data.productId` | number | Product ID |
| `data.catalogGroupId` | number | Price type |
| `data.price` | number | Price value |
| `data.currency` | string | Price currency |
| `data.quantityFrom` | number \| null | Lower bound of the quantity range |
| `data.quantityTo` | number \| null | Upper bound of the quantity range |
| `data.priceScale` | number | Price in the Bitrix24 account's base currency. Equals `price` on creation |
| `data.extraId` | number \| null | Markup identifier (`catalog_extra`). Deprecated Bitrix24 field |
| `data.timestampX` | string | Modification date (ISO 8601 with timezone) |

## Response example

```json
{
  "success": true,
  "data": {
    "catalogGroupId": 1,
    "currency": "USD",
    "extraId": null,
    "id": 861,
    "price": 1500,
    "priceScale": 1500,
    "productId": 7081,
    "quantityFrom": null,
    "quantityTo": null,
    "timestampX": "2026-09-16T10:02:57.000Z"
  }
}
```

## Error response example

422 — a required field was not provided:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Required fields: currency",
    "b24Code": "0"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 422 | `BITRIX_ERROR` | A required field was not provided — the message lists the missing ones (`Required fields: <name>`) |
| 422 | `BITRIX_ERROR` | The product already has a price of this type, and neither price has a quantity range: `Validate price error. Catalog product is allowed has only single price without ranges in price group.` Change the existing one via [`PATCH /v1/catalog-prices/:id`](./update.md) |
| 422 | `BITRIX_ERROR` | The product has no price of this type for quantities above `quantityTo`: `Invalid quantity range entry: no price is specified for quantity over <quantityTo>`. If the product has no price of this type yet, first create a price with `quantityFrom` one greater than `quantityTo` and no `quantityTo`, then repeat the request |
| 422 | `BITRIX_ERROR` | The product already has a price of this type without a range, and the new price sets a range: `Quantity bounds error: higher bound 0 must be above zero (for the last range)`. First assign a range to the existing price via [`PATCH /v1/catalog-prices/:id`](./update.md): for example, for a new price covering `1–10`, set `quantityFrom: 11` on the existing one, then repeat the request |
| 422 | `BITRIX_ERROR` | No price type with this `catalogGroupId` exists on the portal: `Validate price error. Catalog price group is wrong`. The response's `error.hint` points to [`GET /v1/catalog-price-types`](/docs/entities/catalog-price-types) and explains what to do if the key owner lacks permission to read that list |
| 400 | `READONLY_FIELD` | The body contains `id` — this field is set by the system and is not accepted on creation |
| 403 | `SCOPE_DENIED` | The key lacks the `catalog` scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |

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

## See also

- [List prices](/docs/entities/catalog-prices/list)
- [Get a price](/docs/entities/catalog-prices/get)
- [Update a price](/docs/entities/catalog-prices/update)
- [Delete a price](/docs/entities/catalog-prices/delete)
- [Catalog products](/docs/entities/catalog-products)
- [Batch](/docs/batch)
- [Limits and optimization](/docs/optimization)
