# crm.product.fields

URL: https://chugunov.pro/api-bitrix24/crm/outdated/products/crm-product-fields/
Проверено на Битрикс24 REST API, обновлено 11.09.2026 (ревизия источника fb39d6c).
Источник: официальная документация Битрикс24 (bitrix-tools/b24-rest-docs, лицензия MIT, © Bitrix). Справочник независимый, официальной документацией не является.

Получить поля товара
Scope: `crm`
Кто может выполнять метод: любой пользователь

> Устаревший метод. Развитие метода остановлено. Используйте catalog.product.getFieldsByFilter.

## Описание

Метод `crm.product.fields` возвращает описание полей товара.

Без параметров.

## Примеры запроса

### cURL (Webhook)

```http
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.product.fields
```

### cURL (OAuth)

```http
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.product.fields
```

### JS

```js
try
{
	const response = await $b24.callMethod(
		"crm.product.fields",
		{}
	);
	
	const result = response.getData().result;
	if(result.error())
	{
		console.error(result.error());
	}
	else
	{
		console.dir(result);
	}
}
catch(error)
{
	console.error('Error:', error);
}
```

### PHP

```php
try {
    $fieldsResult = $serviceBuilder->getCRMScope()->product()->fields();
    $fieldsDescription = $fieldsResult->getFieldsDescription();
    foreach ($fieldsDescription as $field) {
        if (isset($field['DATE_CREATE'])) {
            $field['DATE_CREATE'] = (new DateTime($field['DATE_CREATE']))->format(DateTime::ATOM);
        }
        
        if (isset($field['TIMESTAMP_X'])) {
            $field['TIMESTAMP_X'] = (new DateTime($field['TIMESTAMP_X']))->format(DateTime::ATOM);
        }
        
        print($field['ID'] . ': ' . $field['NAME'] . PHP_EOL);
    }
} catch (Throwable $e) {
    print('Error: ' . $e->getMessage() . PHP_EOL);
}
```

### BX24.js

```js
BX24.callMethod(
    "crm.product.fields",
    {},
    function(result)
    {
        if(result.error())
            console.error(result.error());
        else
            console.dir(result.data());
    }
);
```

### PHP CRest

```php
require_once('crest.php');

$result = CRest::call(
    'crm.product.fields',
    []
);

echo '<PRE>';
print_r($result);
echo '</PRE>';
```

### Go

```go
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "crm.product.fields", nil, b24.WithIdempotent())
if err != nil {
	return fmt.Errorf("crm.product.fields: %w", err)
}

// Ответ приходит как json.RawMessage — разберите его
// в структуру под форму ответа, показанную ниже на этой странице.
fmt.Printf("%s\n", res.Result)
```

Оригинал в официальной документации: https://apidocs.bitrix24.ru/api-reference/crm/outdated/products/crm-product-fields.html
