# sale.propertyRelation.list

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

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

## Описание

Метод `sale.propertyRelation.list` позволяет получить список привязок свойств.

## Параметры

- `select` `array` — необязательный. Массив содержит список полей, которые необходимо выбрать (смотрите поля объекта [sale_order_property_relation](https://apidocs.bitrix24.ru/api-reference/sale/data-types.html#sale_order_property_relation)).
  Если не передан или передан пустой массив, то будут выбраны все доступные поля привязок свойств.
- `filter` `object` — необязательный. Объект для фильтрации выбранных привязок свойств в формате `{"field_1": "value_1", ... "field_N": "value_N"}`.
  Возможные значения для `field` соответствуют полям объекта [sale_order_property_relation](https://apidocs.bitrix24.ru/api-reference/sale/data-types.html#sale_order_property_relation).
  Ключу может быть задан дополнительный префикс, уточняющий поведение фильтра. Возможные значения префикса:
  - `>=` — больше либо равно
  - `>` — больше
  - `<=` — меньше либо равно
  - `<` — меньше
  - `@` — IN (в качестве значения передаётся массив)
  - `!@`— NOT IN (в качестве значения передаётся массив)
  - `%` — LIKE, поиск по подстроке. Символ `%` в значении фильтра передавать не нужно. Поиск ищет подстроку в любой позиции строки
  - `=%` — LIKE, поиск по подстроке. Символ `%` нужно передавать в значении. Примеры:
      - "мол%" — ищем значения, начинающиеся с «мол»
      - "%мол" — ищем значения, заканчивающиеся на «мол»
      - "%мол%" — ищем значения, где «мол» может быть в любой позиции
  - `%=` — LIKE (см. описание выше)
  - `!%` — NOT LIKE, поиск по подстроке. Символ `%` в значении фильтра передавать не нужно. Поиск идет с обоих сторон.
  - `!=%` — NOT LIKE, поиск по подстроке. Символ `%` нужно передавать в значении. Примеры:
      - "мол%" — ищем значения, не начинающиеся с «мол»
      - "%мол" — ищем значения, не заканчивающиеся на «мол»
      - "%мол%" — ищем значения, где подстроки «мол» нет в любой позиции
  - `!%=` — NOT LIKE (см. описание выше)
  - `=` — равно, точное совпадение (используется по умолчанию)
  - `!=` - не равно
  - `!` — не равно
- `order` `object` — необязательный. Объект для сортировки выбранных привязок свойств в формате `{"field_1": "order_1", ... "field_N": "order_N"}`.
  Возможные значения для `field` соответствуют полям объекта [sale_order_property_relation](https://apidocs.bitrix24.ru/api-reference/sale/data-types.html#sale_order_property_relation).
  Возможные значения для `order`:
  - `asc` — в порядке возрастания
  - `desc` — в порядке убывания
- `start` `integer` — необязательный. Параметр используется для управления постраничной навигацией.
  Размер страницы результатов всегда статичный: 50 записей.
  Чтобы выбрать вторую страницу результатов, необходимо передавать значение `50`. Чтобы выбрать третью страницу результатов — значение `100` и так далее.
  Формула расчета значения параметра `start`:
  `start = (N-1) * 50`, где `N` — номер нужной страницы

## Ответ

HTTP-статус: 200

```json
{
    "result": {
        "propertyRelations": [
            {
                "entityId": 6,
                "entityType": "L",
                "propertyId": 39
            },
            {
                "entityId": 6,
                "entityType": "D",
                "propertyId": 40
            },
            {
                "entityId": 6,
                "entityType": "L",
                "propertyId": 40
            },
        ]
    },
    "total": 3,
    "time": {
        "start": 1712308456.66363,
        "finish": 1712308457.096419,
        "duration": 0.4327890872955322,
        "processing": 0.023340940475463867,
        "date_start": "2024-04-05T12:14:16+03:00",
        "date_finish": "2024-04-05T12:14:17+03:00"
    }
}
```

### Возвращаемые данные

- `result` `object`. Корневой элемент ответа
- `propertyRelations` `sale_order_property_relation`. Массив объектов с информацией о выбранных привязках свойств
- `total` `integer`. Общее количество найденных записей
- `time` `time`. Информация о времени выполнения запроса

## Ошибки

HTTP-статус: 400

```json
{
    "error":200040300010,
    "error_description":"Access Denied"
}
```

- `200040300010` — Недостаточно прав для чтения доступных полей привязок свойств
- `0` — Другие ошибки (например, фатальные ошибки)

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

### cURL (Webhook)

```curl
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"select":["entityId","entityType","propertyId"],"filter":{"entityId":6},"order":{"entityId":"asc"}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/sale.propertyRelation.list
```

### cURL (OAuth)

```curl
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"select":["entityId","entityType","propertyId"],"filter":{"entityId":6},"order":{"entityId":"asc"},    "auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/sale.propertyRelation.list
```

### JS (TS)

```ts
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'

declare const $b24: B24Frame

// Shape of the payload returned in result (match the "response handling" section of the page)
type PropertyRelationListResult = {
  propertyRelations: {
    entityId: number
    entityType: string
    propertyId: number
  }[]
}

try {
  // sale.propertyRelation.list returns a single page (max 50 records). For the whole result set
  // use a list helper: $b24.actions.v2.callList.make() returns every record as one
  // array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
  // NOTE: the list helpers do not accept `order` (it is excluded from their params, so
  // passing it is a TS error) — keep this call.make + `start` variant when sort matters.
  const response = await $b24.actions.v2.call.make<PropertyRelationListResult>({
    method: 'sale.propertyRelation.list',
    params: {
      select: [
        'entityId',
        'entityType',
        'propertyId',
      ],
      filter: {
        entityId: 6,
      },
      order: {
        entityId: 'asc',
      },
      start: 0,
    },
    requestId: Text.getUuidRfc4122()
  })

  // The payload is available only on a successful response
  if (!response.isSuccess) {
    console.error(response.getErrorMessages().join('; '))
  } else {
    const result = response.getData()!.result
    console.info(result.propertyRelations.length, result.propertyRelations)
  }
} catch (error) {
  // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
  console.error(error)
}
```

### JS (UMD)

```html
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
  async function listPropertyRelations() {
    try {
      // Initialize the SDK inside a Bitrix24 frame
      const $b24 = await B24Js.initializeB24Frame()

      // sale.propertyRelation.list returns a single page (max 50 records). For the whole result set
      // use a list helper: $b24.actions.v2.callList.make() returns every record as one
      // array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
      // NOTE: the list helpers do not accept `order` (it is excluded from their params, so
      // passing it is a TS error) — keep this call.make + `start` variant when sort matters.
      const response = await $b24.actions.v2.call.make({
        method: 'sale.propertyRelation.list',
        params: {
          select: [
            'entityId',
            'entityType',
            'propertyId',
          ],
          filter: {
            entityId: 6,
          },
          order: {
            entityId: 'asc',
          },
          start: 0,
        },
        requestId: B24Js.Text.getUuidRfc4122()
      })

      // The payload is available only on a successful response
      if (!response.isSuccess) {
        console.error(response.getErrorMessages().join('; '))
        return
      }

      const result = response.getData().result
      console.info(result.propertyRelations.length, result.propertyRelations)
    } catch (error) {
      // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
      console.error(error)
    }
  }

  document.addEventListener('DOMContentLoaded', listPropertyRelations)
</script>
```

### Python

```python
from b24pysdk.errors import BitrixAPIError, BitrixSDKException

try:
    bitrix_response = client.sale.propertyrelation.list(
        select=[
            "entityId",
            "entityType",
            "propertyId",
        ],
        filter={
            "entityId": 6,
        },
        order={
            "entityId": "asc",
        },
        start='1712308456.66363',
    ).response
    result = bitrix_response.result
    print(result)
except BitrixAPIError as error:
    print(
        "Ошибка Bitrix API",
        f"error: {error.error}",
        f"error_description: {error.error_description}",
        sep="\n",
    )
except BitrixSDKException as error:
    print(f"Ошибка Bitrix SDK: {error.message}")
except Exception as error:
    print(f"Непредвиденная ошибка: {error}")
```

### PHP

```php
try {
    $response = $b24Service
        ->core
        ->call(
            'sale.propertyRelation.list',
            [
                'select' => [
                    'entityId',
                    'entityType',
                    'propertyId',
                ],
                'filter' => [
                    'entityId' => 6,
                ],
                'order' => [
                    'entityId' => 'asc',
                ],
            ]
        );

    $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 listing sale property relations: ' . $e->getMessage();
}
```

### BX24.js

```js
BX24.callMethod(
    'sale.propertyRelation.list', 
    {
        select:[
            'entityId',
            'entityType',
            'propertyId',
        ],
        filter:{
            entityId: 6,
        },
        order:{
            entityId: 'asc',
        },
    }, 
    function(result)
    {
        if(result.error())
            console.error(result.error());
       else
            console.log(result.data());
    }
);
```

### PHP CRest

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

$result = CRest::call(
    'sale.propertyRelation.list',
    [
        'select' => [
            'entityId',
            'entityType',
            'propertyId',
        ],
        'filter' => [
            'entityId' => 6,
        ],
        'order' => [
            'entityId' => 'asc',
        ],
    ]
);

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

### Go

```go
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "sale.propertyRelation.list", b24.Params{
	"select": []string{"entityId", "entityType", "propertyId"},
	"filter": b24.Params{
		"entityId": 6,
	},
	"order": b24.Params{
		"entityId": "asc",
	},
}, b24.WithIdempotent())
if err != nil {
	return fmt.Errorf("sale.propertyRelation.list: %w", err)
}

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

Оригинал в официальной документации: https://apidocs.bitrix24.ru/api-reference/sale/property-relation/sale-property-relation-list.html
