
## Funnel fields

`GET /v1/deal-categories/fields`

Returns a description of all funnel fields with their types and attributes.

## Examples

### curl — personal key

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

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/deal-categories/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/deal-categories/fields', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { success, data } = await res.json()
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/deal-categories/fields', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const { success, data } = await res.json()
```

## Response fields

The `data` object contains a `fields` map and a `batch` list with the operations available in batch mode. Every field in the map is described by its `type`, the `readonly` flag, a `label` and a `description`.

The `label` and `description` field captions are returned in English. Request headers do not switch the language.

| Field | Type | RO | Description |
|------|-----|:--:|---------|
| `id` | number | yes | Funnel ID |
| `name` | string | | Name |
| `sort` | number | | Sort order |
| `isLocked` | boolean | yes | Whether the funnel is locked — unavailable on the current plan |
| `createdAt` | datetime | yes | Creation date |

## Response example

```json
{
  "success": true,
  "data": {
    "fields": {
      "id": {
        "type": "number",
        "readonly": true,
        "label": "ID",
        "description": "Unique identifier of the deal pipeline (category)."
      },
      "name": {
        "type": "string",
        "readonly": false,
        "label": "Name",
        "description": "Display name of the pipeline."
      },
      "sort": {
        "type": "number",
        "readonly": false,
        "label": "Sort",
        "description": "Sort order among pipelines."
      },
      "isLocked": {
        "type": "boolean",
        "readonly": true,
        "label": "Locked",
        "description": "Whether the pipeline is locked (unavailable on the current plan)."
      },
      "createdAt": {
        "type": "datetime",
        "readonly": true,
        "label": "Created at",
        "description": "When the pipeline was created."
      }
    },
    "batch": ["create", "update", "delete"]
  }
}
```

## Error response example

403 — no scope:

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

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 403 | `SCOPE_DENIED` | The API key lacks the `crm` scope |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 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 errors, see [Errors](/docs/errors).

## See also

- [Sales pipelines](/docs/entities/deal-categories)
- [List funnels](/docs/entities/deal-categories/list)
- [Deals](/docs/entities/deals)
