
## Value fields

`GET /v1/catalog-product-property-enums/fields`

Returns the field reference of an enumeration element with types and field write permissions, plus the operations available in a batch request.

The response is assembled from the static entity schema — Bitrix24 is not called.

## Examples

### curl — personal key

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

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/catalog-product-property-enums/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-product-property-enums/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-product-property-enums/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 whose key matches the field name and whose value carries `type`, `readonly`, and the human-readable `label` and `description`. `data.batch` lists the **write** operations available in a [batch request](/docs/batch); for this entity it contains `create`, `update`, and `delete`. That does not rule out reads in a batch: the `list` and `get` sub-calls through [`POST /v1/batch`](/docs/batch) and `POST /v1/catalog-product-property-enums/batch` work. The `fields` sub-call is accepted in a batch too, but for this entity it answers `200` with an **empty object** — Bitrix24 is not called and the field reference cannot be obtained that way. Fetch it with a standalone `GET /v1/catalog-product-property-enums/fields` request.

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

| Field | Type | RO | Description |
|------|-----|:--:|---------|
| `id` | number | yes | Identifier of the enumeration element. This is the value a [catalog product](/docs/entities/catalog-products) carries in `propertyNNN.value` |
| `propertyId` | number | no | Identifier of the owning property. Required in the list and search filter |
| `value` | string | no | Readable text of the option — the same text a product returns in `propertyNNN.valueEnum` |
| `def` | boolean | no | Whether this option is the property's default value |
| `sort` | number | no | Sort index within the property |
| `xmlId` | string | no | External code. Comes back as `null` when not set |

| 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` for `id`; other fields are writable |
| `data.fields.<name>.label` | string | Human-readable field name |
| `data.fields.<name>.description` | string | Explanation of the field |
| `data.batch` | string[] | Write operations available in a [batch request](/docs/batch). For this entity: `create`, `update`, `delete`; read sub-calls also work |

## Response example

`label` and `description` are shown for the first field only and omitted elsewhere for brevity.

```json
{
  "success": true,
  "data": {
    "fields": {
      "id": {
        "type": "number",
        "readonly": true,
        "label": "ID",
        "description": "Identifier of the enumeration element. This is the value that a product's propertyNNN.value carries."
      },
      "propertyId": { "type": "number" },
      "value": { "type": "string" },
      "def": { "type": "boolean" },
      "sort": { "type": "number" },
      "xmlId": { "type": "string", "nullable": true }
    },
    "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 carry the `catalog` scope |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not sent |
| 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).

## Known specifics

**Only `id` is read-only.** `POST`, `PATCH`, and `DELETE` are available; `POST /aggregate` remains unavailable. `data.batch` contains the three write actions. Read sub-calls in a [batch request](/docs/batch) remain available.

**Only properties of type `L` have an enumeration.** For a property of any other type (`S`, `N`, `F`, `E`, `G`) the option list is empty, and a write is rejected by Bitrix24. The property type is read from [`GET /v1/catalog-product-properties/:id`](/docs/entities/catalog-product-properties/get) in the `propertyType` field.

**Relation to product fields.** A list-property value arrives on a [catalog product](/docs/entities/catalog-products) in the field `propertyNNN`, where `NNN` is the property `id`. Inside are `value` (the enumeration element id, as a string), `valueEnum` (the ready-made text), and `valueId` (the value row id). Match with `String(element.id) === product.propertyNNN.value`.

## See also

- [List values](/docs/entities/catalog-product-property-enums/list)
- [Get a value](/docs/entities/catalog-product-property-enums/get)
- [Search values](/docs/entities/catalog-product-property-enums/search)
- [Catalog product properties](/docs/entities/catalog-product-properties)
- [Catalog products](/docs/entities/catalog-products)
- [API reference](/docs/api-reference)
