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

Search requisite presets

POST /v1/requisite-presets/search

Search requisite presets with filters and auto-pagination. Equivalent to GET /v1/requisite-presets, but parameters are passed in the request body — more convenient for complex filters with many conditions and for programmatic request building.

Request fields (body)

Parameter Type Default Description
Parameterfilter Typeobject Default— DescriptionFiltering by the fields from GET /v1/requisite-presets/fields.
Filtering syntax. Example: { "active": true, "countryId": 122 }
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
Parameterorder Typeobject Default— DescriptionSorting: { "sort": "asc" }, { "name": "desc" }. For the identifier, use { "id": "desc" }; the { "ID": "desc" } form is accepted too
Parameterselect Typestring[] Default— DescriptionField selection: ["id", "name", "active", "countryId"]
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/requisite-presets/search" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": { "active": true },
    "limit": 20
  }'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/requisite-presets/search" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": { "active": true },
    "limit": 20
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/requisite-presets/search', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    filter: { active: true },
    limit: 20,
  }),
})

const { success, data, meta } = await res.json()
console.log('Found:', meta.total)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/requisite-presets/search', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    filter: { active: true },
    limit: 20,
  }),
})

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

Other scenarios

Find presets by country:

JSON
{ "filter": { "countryId": 122 }, "order": { "sort": "asc" } }

Active presets only, select only id and name:

JSON
{
  "filter": { "active": true },
  "select": ["id", "name"],
  "order": { "sort": "asc" }
}

Find a preset by xmlId:

JSON
{ "filter": { "xmlId": "#CRM_REQUISITE_PRESET_DEF_RU_COMPANY#" } }

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typearray DescriptionArray of presets (all fields — see Requisite preset fields)
Fieldmeta.total Typenumber DescriptionHow many records matched the filter
Fieldmeta.hasMore Typeboolean DescriptionWhether there are more records beyond limit
Fieldmeta.durationMs Typenumber DescriptionRequest duration in milliseconds
Fieldmeta.autoWindowed Typeboolean Descriptiontrue if the result set was split into time windows
Fieldmeta.windowCount Typenumber DescriptionNumber of windows. Present with autoWindowed: true
Fieldmeta.batchWaves Typenumber DescriptionNumber of parallel request waves. Present with autoWindowed: true

The meta fields sit next to data, not inside it. Paginate using meta.hasMore: a data length equal to limit does not rule out this being the last page.

Response example

JSON
{
  "success": true,
  "data": [
    {
      "id": 1,
      "entityTypeId": 8,
      "countryId": 122,
      "name": "Company",
      "createdAt": "2020-04-20T10:47:23.000Z",
      "updatedAt": "2021-08-13T14:34:26.000Z",
      "createdBy": 0,
      "modifyBy": 1,
      "active": true,
      "sort": 510,
      "xmlId": "#CRM_REQUISITE_PRESET_DEF_RU_COMPANY#"
    },
    {
      "id": 5,
      "entityTypeId": 8,
      "countryId": 122,
      "name": "Person",
      "createdAt": "2020-04-20T10:47:23.000Z",
      "updatedAt": "2021-08-13T14:34:34.000Z",
      "createdBy": 0,
      "modifyBy": null,
      "active": true,
      "sort": 530,
      "xmlId": "#CRM_REQUISITE_PRESET_DEF_RU_PERSON#"
    }
  ],
  "meta": {
    "total": 13,
    "hasMore": false,
    "durationMs": 224
  }
}

With a date-range filter wider than 14 days, meta additionally returns autoWindowed, windowCount, and batchWaves:

JSON
{
  "success": true,
  "data": [ /* ... */ ],
  "meta": {
    "total": 14,
    "hasMore": false,
    "autoWindowed": true,
    "windowCount": 444,
    "batchWaves": 9,
    "durationMs": 12658
  }
}

Error response example

403 — no scope:

JSON
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This endpoint requires 'crm' scope"
  }
}

Errors

HTTP Code Description
HTTP403 CodeSCOPE_DENIED DescriptionAPI key lacks the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionAPI key has no configured tokens
HTTP400 CodeINVALID_FILTER DescriptionFilter syntax error
HTTP400 CodeUNSTABLE_OFFSET_PAGINATION Descriptionoffset greater than zero together with a date-range filter wider than 14 days. Two different retrieval algorithms produce inconsistent results, so the request is rejected. Fetch everything in a single request with limit up to 5000, or pass autoWindow: false with sorting by id, or split the date range into parts yourself
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

Time-window splitting. A date-range filter wider than 14 days is automatically split into weekly windows executed in parallel waves, so the query gets around the ceiling of 5000 records per call. meta then returns autoWindowed: true, the number of windows windowCount, and the number of waves batchWaves. The autoWindow: false parameter disables splitting. While splitting is active, an offset greater than zero is rejected with UNSTABLE_OFFSET_PAGINATION. The requested order is applied inside each window, but the merged result stays chronological and is not globally re-sorted.

The xmlId field is a stable identifier for built-in presets. Built-in presets have constant xmlId values, and the exact set depends on the account country — for example, #CRM_REQUISITE_PRESET_DEF_RU_COMPANY#, #CRM_REQUISITE_PRESET_DEF_RU_INDIVIDUAL#, #CRM_REQUISITE_PRESET_DEF_RU_PERSON#. Searching by xmlId is more reliable than searching by id, which can differ between Bitrix24 accounts.

Pagination. When limit > 50, the request is automatically split into multiple calls to Bitrix24. For large result sets, use offset and paginated requests.

See also