لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/requisite-presets.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Requisite presets

Presets for requisite field sets. The built-in presets depend on the account country — an international Bitrix24 account has Company and Person. A preset defines which fields are available on a requisite and serves as the source of presetId for creating a requisite via POST /v1/requisites.

Bitrix24 API: crm.requisite.preset.* Scope: crm

Create requisite preset

POST /v1/requisite-presets

Creates a new preset — a template for a set of requisite fields. After creation, the preset becomes available as a presetId source for POST /v1/requisites. A deleted preset cannot be restored — create a new one if needed.

Request fields (body)

Field Type Required Description
FieldentityTypeId Typenumber Requiredyes DescriptionField-set type — always 8, requisite
Fieldname Typestring Requiredyes DescriptionPreset name ("Company", "Person")
FieldcountryId Typenumber Requiredno DescriptionField-set country ID, for example 122. The value depends on the account country
Fieldactive Typeboolean Requiredno DescriptionWhether the preset is active. Defaults to true
Fieldsort Typenumber Requiredno DescriptionSort order. Defaults to 500
FieldxmlId Typestring Requiredno DescriptionExternal identifier for synchronization

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/requisite-presets" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entityTypeId": 8,
    "name": "Company",
    "countryId": 122,
    "active": true,
    "sort": 100
  }'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/requisite-presets" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "entityTypeId": 8,
    "name": "Company",
    "countryId": 122
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/requisite-presets', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    entityTypeId: 8,
    name: 'Company',
    countryId: 122,
    active: true,
    sort: 100,
  }),
})

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

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/requisite-presets', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    entityTypeId: 8,
    name: 'Company',
    countryId: 122,
  }),
})

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

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionThe created preset
Fielddata.id Typenumber DescriptionID of the new preset
Fielddata.entityTypeId Typenumber DescriptionField-set type — 8
Fielddata.countryId Typenumber DescriptionField-set country ID
Fielddata.name Typestring DescriptionPreset name
Fielddata.active Typeboolean DescriptionWhether the preset is active
Fielddata.sort Typenumber DescriptionSort order
Fielddata.xmlId Typestring | null DescriptionExternal identifier
Fielddata.createdAt Typestring DescriptionCreation date (ISO 8601)
Fielddata.updatedAt Typestring | null Descriptionnull right after creation
Fielddata.createdBy Typenumber DescriptionCreator ID
Fielddata.modifyBy Typenumber | null Descriptionnull right after creation

Response example

HTTP status: 201 Created

JSON
{
  "success": true,
  "data": {
    "id": 31,
    "entityTypeId": 8,
    "countryId": 122,
    "createdAt": "2026-06-10T09:31:49.000Z",
    "updatedAt": null,
    "createdBy": 1,
    "modifyBy": null,
    "name": "Company",
    "xmlId": null,
    "active": true,
    "sort": 500
  }
}

Error response example

422 — Bitrix24 rejected the request (a required field was not provided):

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "ENTITY_TYPE_ID is not defined or invalid."
  }
}

Errors

HTTP Code Description
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 rejected the request — a required field was not provided or an invalid value was passed (the error text contains the field name)
HTTP403 CodeSCOPE_DENIED DescriptionAPI key lacks the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionAPI key has no configured tokens

Full list of common API errors — Errors.

Known specifics

The preset contains no fields after creation. Right after creation the preset's field set is empty. To add fields (company name, VAT ID, address, and so on), use POST /v1/requisite-presets/:presetId/fields. The list of fields available to add — GET /v1/requisite-presets/:presetId/fields/available.

See also