Get Product Fields by Filter catalog.product.getFieldsByFilter
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Scope:
catalogWho can execute the method: administrator
This method retrieves product fields based on a filter.
Parameters
Required parameters are marked with *
|
Name |
Description |
|
filter* |
Filter to retrieve all product fields |
Filter Parameter
Required parameters are marked with *
|
Name |
Description |
|
iblockId* |
Identifier of the information block. To obtain existing identifiers of information blocks, use catalog.catalog.list |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"filter":{"iblockId":23}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/catalog.product.getFieldsByFilter
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"filter":{"iblockId":23},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/catalog.product.getFieldsByFilter
try
{
const response = await $b24.callMethod(
'catalog.product.getFieldsByFilter',
{
filter: {
iblockId: 23,
}
}
);
const result = response.getData().result;
console.log(result);
}
catch( error )
{
console.error(error);
}
try {
$response = $b24Service
->core
->call(
'catalog.product.getFieldsByFilter',
[
'filter' => [
'iblockId' => 23,
],
]
);
$result = $response
->getResponseData()
->getResult();
if ($result->error()) {
error_log($result->error());
} else {
echo 'Success: ' . print_r($result->data(), true);
}
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error getting product fields by filter: ' . $e->getMessage();
}
BX24.callMethod(
'catalog.product.getFieldsByFilter',
{
filter: {
iblockId: 23,
}
},
function(result) {
if (result.error())
console.error(result.error());
else
console.log(result.data());
}
);
require_once('crest.php');
$result = CRest::call(
'catalog.product.getFieldsByFilter',
[
'filter' => [
'iblockId' => 23
]
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Response Handling
HTTP status: 200
{
"result": {
"product": {
"active": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Activity",
"type": "char"
},
"available": {
"isImmutable": false,
"isReadOnly": true,
"isRequired": false,
"name": "Availability for Purchase",
"type": "char"
},
"bundle": {
"isImmutable": false,
"isReadOnly": true,
"isRequired": false,
"name": "Set Availability",
"type": "char"
},
"canBuyZero": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Allow Purchase When Out of Stock",
"type": "char"
},
"code": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Symbolic Code",
"type": "string"
},
"createdBy": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Created By",
"type": "integer"
},
"dateActiveFrom": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "DATE_ACTIVE_FROM",
"type": "datetime"
},
"dateActiveTo": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "DATE_ACTIVE_TO",
"type": "datetime"
},
"dateCreate": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Creation Date",
"type": "datetime"
},
"detailPicture": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Detail Picture",
"type": "file"
},
"detailText": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Detailed Description",
"type": "string"
},
"detailTextType": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Type of Detailed Description",
"type": "string"
},
"height": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Height",
"type": "double"
},
"iblockId": {
"isImmutable": true,
"isReadOnly": false,
"isRequired": true,
"name": "Information Block Identifier",
"type": "integer"
},
"iblockSectionId": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Main Section",
"type": "integer"
},
"id": {
"isImmutable": false,
"isReadOnly": true,
"isRequired": false,
"name": "Identifier",
"type": "integer"
},
"length": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Length",
"type": "double"
},
"measure": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Unit of Measurement",
"type": "integer"
},
"modifiedBy": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Modified By",
"type": "integer"
},
"name": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": true,
"name": "Name",
"type": "string"
},
"negativeAmountTrace": {
"isImmutable": false,
"isReadOnly": true,
"isRequired": false,
"name": "NEGATIVE_AMOUNT_TRACE",
"type": "char"
},
"previewPicture": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Preview Picture",
"type": "file"
},
"previewText": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Preview Description",
"type": "string"
},
"previewTextType": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Type of Preview Description",
"type": "string"
},
"priceType": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Payment Type",
"type": "char"
},
"property258": {
"isDynamic": true,
"isImmutable": false,
"isMultiple": false,
"isReadOnly": false,
"isRequired": false,
"name": "New Line",
"propertyType": "S",
"type": "productproperty",
"userType": ""
},
"property259": {
"isDynamic": true,
"isImmutable": false,
"isMultiple": true,
"isReadOnly": false,
"isRequired": false,
"name": "New Line 2",
"propertyType": "S",
"type": "productproperty",
"userType": ""
},
"purchasingCurrency": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Purchasing Price Currency",
"type": "string"
},
"purchasingPrice": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Purchasing Price",
"type": "string"
},
"quantity": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Available Quantity",
"type": "double"
},
"quantityReserved": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Reserved Quantity",
"type": "double"
},
"quantityTrace": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Quantity Accounting Mode",
"type": "char"
},
"sort": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Sort Index",
"type": "integer"
},
"subscribe": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Allow Subscription to Product",
"type": "char"
},
"timestampX": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Modification Date",
"type": "datetime"
},
"type": {
"isImmutable": false,
"isReadOnly": true,
"isRequired": false,
"name": "Product Type",
"type": "integer"
},
"vatId": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "VAT Identifier",
"type": "integer"
},
"vatIncluded": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "VAT Included in Price",
"type": "char"
},
"weight": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Weight",
"type": "double"
},
"width": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "Width",
"type": "double"
},
"xmlId": {
"isImmutable": false,
"isReadOnly": false,
"isRequired": false,
"name": "External Code",
"type": "string"
}
}
},
"time": {
"start": 1717598883.81413,
"finish": 1717598884.460406,
"duration": 0.6462759971618652,
"processing": 0.15173888206481934,
"date_start": "2024-06-05T17:48:03+02:00",
"date_finish": "2024-06-05T17:48:04+02:00"
}
}
Returned Data
|
Name |
Description |
|
result |
Root element of the response |
|
product |
Object in the format |
|
time |
Information about the execution time of the request |
Error Handling
HTTP status: 400
{
"error":200040300010,
"error_description":"Access Denied"
}
|
Name |
Description |
|
error |
String error code. It may consist of digits, Latin letters, and underscores |
|
error_description |
Textual description of the error. The description is not intended to be shown to the end user in its raw form |
Possible Error Codes
|
Code |
Description |
|
|
Insufficient rights to read the trade catalog |
|
|
Filter parameter not specified or empty |
|
|
Information block identifier not specified |
|
|
Other errors (e.g., fatal errors) |
Statuses and System Error Codes
HTTP Status: 20x, 40x, 50x
The errors described below may occur when calling any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support |
|
|
|
An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The current method is not permitted for calls using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The HTTPS protocol is required for method calls |
|
|
|
The REST API is blocked due to overload. This is a manual individual block; please contact Bitrix24 technical support to lift it |
|
|
|
The REST API is only available on commercial plans |
|
|
|
The user associated with the access token or webhook used to call the method lacks the necessary permissions |
|
|
|
The manifest is not available |
|
|
|
The request requires higher privileges than those provided by the webhook token |
|
|
|
The provided access token has expired |
|
|
|
The user does not have access to the application. This means that the application is installed, but the portal administrator has restricted access to this application to specific users only |
|
|
|
The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |
Continue Learning
- Add Product catalog.product.add
- Update Product catalog.product.update
- Get Product by ID catalog.product.get
- Get a list of products by filter catalog.product.list
- Download Product Files catalog.product.download
- Delete Product catalog.product.delete