For AI agents: markdown of this page — /docs-content-en/entities/product-sections/search.md documentation index — /llms.txt
Search sections
POST /v1/product-sections/search
Search product sections with filtering and auto-pagination. Equivalent to GET /v1/product-sections with filters, but via POST — more convenient for complex queries with many conditions.
Request fields (body)
| Parameter | Type | Default | Description |
|---|---|---|---|
Parameterfilter |
Typeobject | Default— | DescriptionExact-match and $in (IN set) only, by id, name, xmlId, code, catalogId, sectionId. Operators (>, <, !, %, $ne, $contains, $nin) and filtering by sort are not supported — you get 400 UNSUPPORTED_FILTER.Filtering syntax. Example: { "filter": { "sectionId": 31 } }. Filtering by catalogId does not narrow the selection — see "Known specifics" |
Parameterlimit |
Typenumber | Default50 |
DescriptionNumber of records (up to 5000) |
Parameterselect |
Typestring[] | Default— | DescriptionField selection: ["id", "name", "catalogId"] |
Parameterorder |
Typeobject | Default— | DescriptionSorting by field: { "sort": "asc" } |
Examples
curl — personal key
curl -X POST "https://vibecode.bitrix24.com/v1/product-sections/search" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filter": { "sectionId": 31 },
"limit": 10,
"select": ["id", "name", "catalogId", "code"]
}'
curl — OAuth application
curl -X POST "https://vibecode.bitrix24.com/v1/product-sections/search" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filter": { "sectionId": 31 },
"limit": 10,
"select": ["id", "name", "catalogId", "code"]
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/product-sections/search', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
filter: { sectionId: 31 },
limit: 10,
select: ['id', 'name', 'catalogId', 'code'],
}),
})
const { success, data, meta } = await res.json()
console.log('Found:', meta.total)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/product-sections/search', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
filter: { sectionId: 31 },
limit: 10,
select: ['id', 'name', 'catalogId', 'code'],
}),
})
const { success, data, meta } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typearray | DescriptionArray of sections |
Fielddata[].id |
Typenumber | DescriptionSection identifier |
Fielddata[].name |
Typestring | DescriptionSection name |
Fielddata[].catalogId |
Typenumber | DescriptionCatalog identifier |
Fielddata[].sectionId |
Typenumber | DescriptionParent section identifier. null for a root section |
Fielddata[].code |
Typestring | DescriptionSection symbolic code |
Fielddata[].xmlId |
Typestring | DescriptionExternal identifier |
Fieldmeta.total |
Typenumber | DescriptionTotal number of records matching the filter |
Fieldmeta.hasMore |
Typeboolean | DescriptionWhether more records exist beyond limit |
Fieldmeta.durationMs |
Typenumber | DescriptionRequest duration in milliseconds |
The meta fields sit next to data, not inside it. Page through the results using meta.hasMore: a page whose data length equals limit can still be the last one.
Response example
{
"success": true,
"data": [
{
"id": 33,
"name": "Footwear",
"catalogId": 25,
"code": "shoes"
},
{
"id": 39,
"name": "Dresses",
"catalogId": 25,
"code": "dresses"
}
],
"meta": {
"total": 6,
"hasMore": false,
"durationMs": 533
}
}
Error response example
400 — an operator or a non-filterable field in the filter:
{
"success": false,
"error": {
"code": "UNSUPPORTED_FILTER",
"message": "UNSUPPORTED_FILTER: operators are not supported on 'product-sections' (near 'name'). Its Bitrix24 method (crm.productsection.list) filters by exact match only — operators are silently ignored by Bitrix24. Use exact match (field: value) or $in (field: {$in: [...]}) on: id, name, xmlId, code, catalogId, sectionId."
}
}
catalogId is in that list because the filter accepts it without an error. It still does not narrow the selection — see "Only sections of the CRM product catalog".
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeUNSUPPORTED_FILTER |
DescriptionAn operator or a non-filterable field in the filter. Filter by exact match or $in on id, name, xmlId, code, sectionId. The filter also accepts catalogId without an error, but it does not narrow the selection |
| HTTP400 | CodeINVALID_FILTER |
DescriptionError while parsing the filter |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the crm scope |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header was not provided |
| 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
Auto-pagination. When limit > 50 the request is split into several calls to the server. The maximum is 5000 records per call. If more match the filter, meta.hasMore will be true.
Exact match only in the filter. The method filters by exact match (and $in) on id, name, xmlId, code, sectionId. Operators, $ne/$contains/$nin and filtering by sort return 400 UNSUPPORTED_FILTER. The one exception is catalogId: the filter accepts it without an error, but it does not narrow the selection — see "Only sections of the CRM product catalog" below. Sorting (order) by sort and other fields works.
Only sections of the CRM product catalog. The method returns sections of the CRM product catalog — its ID comes in the catalogId field of every section. With the catalogId of an offers catalog or of a catalog that does not exist, the method returns all sections of the CRM product catalog, as if there were no filter, rather than an empty list. $in on catalogId does not narrow the selection either. Sections of another catalog are returned by GET /v1/catalog-sections with filter[iblockId].