For AI agents: markdown of this page — /docs-content-en/entities/catalog-price-types/search.md documentation index — /llms.txt

Search price types

POST /v1/catalog-price-types/search

Search price types with filters. The equivalent of GET /v1/catalog-price-types with filters, but over POST — more convenient for conditions across several fields.

Request body fields

Parameter Type Default Description
Parameterfilter Typeobject Default— DescriptionFiltering by the fields of GET /v1/catalog-price-types/fields.
Filtering syntax. Example: { "base": "Y" }
Parameterlimit Typenumber Default50 DescriptionNumber of records (up to 5000)
Parameteroffset Typenumber Default0 DescriptionSkip N records. Combined with a date-range filter wider than 14 days, the request is rejected — see UNSTABLE_OFFSET_PAGINATION in the "Errors" section
Parameterselect Typestring[] Default— DescriptionField selection: ["id", "name", "base"]
Parametersort Typestring Default— DescriptionSort field. The - prefix means descending: "sort": "-sort". The long form "order": { "sort": "desc" } is accepted too
ParameterautoWindow Typeboolean Defaulttrue DescriptionSplit the result set into weekly windows when filtering by a date range wider than 14 days. false disables splitting

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/catalog-price-types/search" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": { "base": "Y" },
    "limit": 10
  }'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/catalog-price-types/search" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": { "base": "Y" },
    "limit": 10
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-price-types/search', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    filter: { base: 'Y' },
    limit: 10,
  }),
})

const { success, data, meta } = await res.json()
console.log('catalogGroupId of the base price:', data[0].id)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-price-types/search', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    filter: { base: 'Y' },
    limit: 10,
  }),
})

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

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typearray DescriptionArray of price types (all fields — see Price type fields)
Fieldmeta.total Typenumber DescriptionTotal number of price types matching the filter
Fieldmeta.hasMore Typeboolean DescriptionWhether more records exist beyond limit
Fieldmeta.durationMs Typenumber DescriptionRequest duration in milliseconds

Response example

JSON
{
  "success": true,
  "data": [
    {
      "base": "Y",
      "createdBy": 1,
      "dateCreate": "2020-04-22T05:37:42.000Z",
      "id": 1,
      "modifiedBy": 1,
      "name": "BASE",
      "sort": 100,
      "timestampX": "2024-10-22T04:31:37.000Z",
      "xmlId": "BASE"
    }
  ],
  "meta": {
    "total": 1,
    "hasMore": false,
    "durationMs": 95
  }
}

Error response example

400 — filtering by a field that does not exist:

JSON
{
  "success": false,
  "error": {
    "code": "UNKNOWN_FILTER_FIELD",
    "message": "Unknown filter field 'nonExistentField' for entity 'catalog-price-types'. Available: id, name, base, xmlId, sort, createdBy, modifiedBy, dateCreate, timestampX"
  }
}

Errors

HTTP Code Description
HTTP400 CodeUNKNOWN_FILTER_FIELD DescriptionFiltering by a field a price type does not have. The message lists the available fields
HTTP400 CodeUNKNOWN_SORT_FIELD DescriptionSorting by a field a price type does not have
HTTP400 CodeUNSTABLE_OFFSET_PAGINATION Descriptionoffset above zero together with a date-range filter wider than 14 days. Send a single request with limit up to 5000, or autoWindow: false with an explicit sort: "id", or split the date range into parts
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 refused to read price types: the key owner has no portal administrator rights
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not carry the catalog scope
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is missing
HTTP429 CodeRATE_LIMITED DescriptionRate limit exceeded: 300 requests per minute per portal. All API keys of the portal share one limit. The current limit is returned in the x-ratelimit-limit header. Retry after the delay in the Retry-After header

For the full list of common API errors, see Errors.

Known specifics

The base: "Y" filter is the shortest way to learn the catalogGroupId of the base price. It returns exactly one record, and its id is not necessarily 1.

The method requires administrator rights. The catalog scope is not enough: Bitrix24 returns price types only to a key whose owner has the Bitrix24 account administrator role. Otherwise a 422 BITRIX_ERROR arrives with a Bitrix24 message about insufficient rights.

A date filter wider than 14 days is split into weekly windows. Vibecode splits such a dateCreate or timestampX range into windows on its own and merges the result. Together with an offset above zero this is not possible — 400 UNSTABLE_OFFSET_PAGINATION arrives; autoWindow: false disables the split.

Writing is not supported. POST /v1/catalog-price-types (without /search), PATCH and DELETE return 404 ROUTE_NOT_FOUND — price types are created in the Bitrix24 interface.

See also