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

Requisite preset fields

GET /v1/requisite-presets/fields

Returns the schema of requisite preset fields: types and the read-only flag.

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/requisite-presets/fields" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/requisite-presets/fields" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/requisite-presets/fields', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { success, data } = await res.json()
console.log('Total fields:', Object.keys(data.fields).length)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/requisite-presets/fields', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

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

Response fields

data.fields is an object keyed by field name; each value describes the field: its type, whether it is writable, a label and a description. The set of keys is broken down in the table after the field list. data.batch lists the preset operations available in a batch request.

Field Type RO Description
Fieldid Typenumber ROyes DescriptionPreset identifier
FieldentityTypeId Typenumber ROno DescriptionEntity type — always 8, requisite. Set when the preset is created. Flagged createOnly in the schema; sending it in the update body is rejected with 400 READONLY_FIELD
FieldcountryId Typenumber ROno DescriptionCountry identifier for the field set. Set when the preset is created. Flagged createOnly in the schema; sending it in the update body is rejected with 400 READONLY_FIELD
Fieldname Typestring ROno DescriptionPreset name
Fieldactive Typeboolean ROno DescriptionWhether the preset is active
Fieldsort Typenumber ROno DescriptionSort order
FieldxmlId Typestring ROno DescriptionExternal identifier for synchronization
FieldcreatedAt Typedatetime ROyes DescriptionCreation date
FieldupdatedAt Typedatetime ROyes DescriptionLast modification date
FieldcreatedBy Typenumber ROyes DescriptionID of the user who created the preset. List: GET /v1/users
FieldmodifyBy Typenumber ROyes DescriptionID of the user who last modified the preset. List: GET /v1/users

xmlId, updatedAt, modifyBy can be null. The createdBy field equals 0 for system-created presets.

The label and description keys in data.fields.<name> are returned in English. Request headers do not switch the language.

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.fields.<name>.type Typestring DescriptionField type: number, string, boolean, datetime
Fielddata.fields.<name>.readonly Typeboolean Descriptiontrue — the field is set by the system and is not accepted on create or update
Fielddata.fields.<name>.createOnly Typeboolean Descriptiontrue — the field is set on create only; in the update body it is rejected with 400 READONLY_FIELD. The key is present on entityTypeId and countryId
Fielddata.fields.<name>.label Typestring DescriptionDisplay name of the field
Fielddata.fields.<name>.description Typestring DescriptionField explanation
Fielddata.batch Typestring[] DescriptionPreset operations available in a batch request: create, update, delete

Response example

The label and description keys are omitted from the example for brevity.

JSON
{
  "success": true,
  "data": {
    "fields": {
      "id": { "type": "number", "readonly": true },
      "entityTypeId": { "type": "number", "readonly": false, "createOnly": true },
      "countryId": { "type": "number", "readonly": false, "createOnly": true },
      "name": { "type": "string", "readonly": false },
      "active": { "type": "boolean", "readonly": false },
      "sort": { "type": "number", "readonly": false },
      "xmlId": { "type": "string", "readonly": false },
      "createdAt": { "type": "datetime", "readonly": true },
      "updatedAt": { "type": "datetime", "readonly": true },
      "createdBy": { "type": "number", "readonly": true },
      "modifyBy": { "type": "number", "readonly": true }
    },
    "batch": ["create", "update", "delete"]
  }
}

Error response example

403 — missing 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
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.

See also