
## Section fields

`GET /v1/catalog-sections/fields`

Returns the catalog section field schema: types, read-only and nullable flags, and the list of operations available in a batch request.

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/catalog-sections/fields" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/catalog-sections/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/catalog-sections/fields', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

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

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-sections/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, where each value describes one field: its type, whether it is writable, whether it can come back as `null`, a label and a description. The set of keys is broken down in the table after the field list. `data.batch` is the list of operations accepted by a [batch request](/docs/batch).

| Field | Type | RO | Description |
|------|-----|:--:|---------|
| `id` | number | yes | Section identifier |
| `iblockId` | number | no | ID of the catalog the section belongs to. List: [`GET /v1/catalogs`](/docs/entities/catalogs) |
| `iblockSectionId` | number \| null | no | ID of the parent section. `null` for a top-level section. List: [`GET /v1/catalog-sections`](/docs/entities/catalog-sections/list) |
| `name` | string | no | Section name |
| `xmlId` | string \| null | no | External identifier. `null` when not set |
| `code` | string \| null | no | Symbolic code of the section. `null` when not set |
| `sort` | number | no | Sort index |
| `active` | boolean | no | Whether the section is active |
| `description` | string \| null | no | Section description. `null` when not set |
| `descriptionType` | string | no | Description format: `text` or `html` |

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data.fields.<name>.type` | string | Field type: `number`, `string`, `boolean` |
| `data.fields.<name>.readonly` | boolean | `true` — the field is set by the system and is not accepted on create or update |
| `data.fields.<name>.nullable` | boolean | `true` — the field can come back as `null`. The key is present only on such fields |
| `data.fields.<name>.label` | string | Short display name of the field |
| `data.fields.<name>.description` | string | Field explanation |
| `data.batch` | string[] | Section operations available in a [batch request](/docs/batch): `create`, `update`, `delete` |

## Response example

The `label` and `description` keys in `data.fields.<name>` are returned in English. Request headers do not switch the language. These keys are omitted from the example below for brevity.

```json
{
  "success": true,
  "data": {
    "fields": {
      "id": { "type": "number", "readonly": true },
      "iblockId": { "type": "number", "readonly": false },
      "iblockSectionId": { "type": "number", "readonly": false, "nullable": true },
      "name": { "type": "string", "readonly": false },
      "xmlId": { "type": "string", "readonly": false, "nullable": true },
      "code": { "type": "string", "readonly": false, "nullable": true },
      "sort": { "type": "number", "readonly": false },
      "active": { "type": "boolean", "readonly": false },
      "description": { "type": "string", "readonly": false, "nullable": true },
      "descriptionType": { "type": "string", "readonly": false }
    },
    "batch": ["create", "update", "delete"]
  }
}
```

## Error response example

403 — no scope:

```json
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This endpoint requires 'catalog' scope"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not provided |
| 429 | `RATE_LIMITED` | Rate 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](/docs/errors).

## See also

- [List sections](/docs/entities/catalog-sections/list)
- [Create a section](/docs/entities/catalog-sections/create)
- [Search sections](/docs/entities/catalog-sections/search)
- [Catalogs](/docs/entities/catalogs)
- [API reference](/docs/api-reference)
