For AI agents: markdown of this page — /docs-content-en/entities/catalog-price-types/create.md documentation index — /llms.txt
Create a price type
POST /v1/catalog-price-types
Creates a catalog price type for separate product prices on the Bitrix24 account. The request body is flat, without a fields wrapper.
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | 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. |
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. |
modifiedBy |
number | null | no | RO. ID of the user who last updated the record. List: List users. |
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
curl -X POST "https://vibecode.bitrix24.com/v1/catalog-price-types" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Wholesale", "sort": 200, "xmlId": "WHOLESALE"}'
curl — OAuth application
curl -X POST "https://vibecode.bitrix24.com/v1/catalog-price-types" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Wholesale", "sort": 200, "xmlId": "WHOLESALE"}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-price-types', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Wholesale", "sort": 200, "xmlId": "WHOLESALE"}),
})
const { success, data } = await res.json()
console.log('ID:', data.id)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-price-types', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Wholesale", "sort": 200, "xmlId": "WHOLESALE"}),
})
const { success, data } = await res.json()
console.log('ID:', data.id)
Response fields
The response has status 201 and contains the complete created 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. Pass this value in catalogGroupId when working with 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. |
data.modifiedBy |
number | null | RO. ID of the user who last updated the record. List: List users. |
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
{
"success": true,
"data": {
"base": "N",
"createdBy": 1295,
"dateCreate": "2026-10-14T17:18:58.000Z",
"id": 19,
"modifiedBy": 1295,
"name": "Wholesale",
"sort": 200,
"timestampX": "2026-10-14T17:18:58.000Z",
"xmlId": "WHOLESALE"
}
}
Error response example
400 — name was omitted, so the price type was not created:
{
"success": false,
"error": {
"code": "MISSING_REQUIRED_FIELDS",
"message": "Body field \"name\" is required to create catalogPriceType."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | MISSING_REQUIRED_FIELDS |
name was omitted, or its value is null or an empty string. |
| 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.
Known specifics
On creation, the viewing and buying groups are set to [1, 2] — administrators and all users. This method cannot manage these groups.