Фильтрация продуктов / Группировка вариаций
const url = 'https://api-admin.billz.ai/v2/product-search-with-filters';const options = { method: 'POST', headers: { 'accept-language': 'ru', 'platform-id': '7d4a4c38-dd84-4902-b744-0488b80a4c01', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"category_ids":["15c1d3e9-f628-4094-8c69-7b0e67a6240d"],"status":"all","skus":["100-29","10276F"],"group_variations":false,"product_field_filters":[{"field_id":"491e1d8a-ad22-4180-bcc5-0c5699bdf4f9","field_type":"attribute","field_values":["aee6d71d-32ed-4695-8f3b-5516dacf75fe"]},{"field_id":"84122e63-9993-4fac-80d6-6ad8bfa95f2e","field_type":"attribute","field_values":["6321d850-77a4-40cd-aa47-4548f0dc8707"]},{"field_id":"3b6db763-eeaf-41c3-af99-48472add4e2e","field_type":"custom","field_values":["18"]}],"archived_list":false,"brand_ids":["e158f882-d0e0-499d-b6f8-9029ac1886ca"],"measurement_unit_ids":["c5336f71-d684-4e2e-b5bc-307138593543"],"supply_price_from":1,"supply_price_to":10000000,"retail_price_from":1,"retail_price_to":10000000,"whole_sale_price_from":1,"whole_sale_price_to":10000000,"shop_ids":["6f244db4-75d6-4fac-9841-14867d45e36a"],"supplier_ids":["5f4c5af2-3320-4fa4-aed9-65a35e1dab8f"],"limit":10,"page":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-admin.billz.ai/v2/product-search-with-filters \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'accept-language: ru' \ --header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01' \ --data '{ "category_ids": [ "15c1d3e9-f628-4094-8c69-7b0e67a6240d" ], "status": "all", "skus": [ "100-29", "10276F" ], "group_variations": false, "product_field_filters": [ { "field_id": "491e1d8a-ad22-4180-bcc5-0c5699bdf4f9", "field_type": "attribute", "field_values": [ "aee6d71d-32ed-4695-8f3b-5516dacf75fe" ] }, { "field_id": "84122e63-9993-4fac-80d6-6ad8bfa95f2e", "field_type": "attribute", "field_values": [ "6321d850-77a4-40cd-aa47-4548f0dc8707" ] }, { "field_id": "3b6db763-eeaf-41c3-af99-48472add4e2e", "field_type": "custom", "field_values": [ "18" ] } ], "archived_list": false, "brand_ids": [ "e158f882-d0e0-499d-b6f8-9029ac1886ca" ], "measurement_unit_ids": [ "c5336f71-d684-4e2e-b5bc-307138593543" ], "supply_price_from": 1, "supply_price_to": 10000000, "retail_price_from": 1, "retail_price_to": 10000000, "whole_sale_price_from": 1, "whole_sale_price_to": 10000000, "shop_ids": [ "6f244db4-75d6-4fac-9841-14867d45e36a" ], "supplier_ids": [ "5f4c5af2-3320-4fa4-aed9-65a35e1dab8f" ], "limit": 10, "page": 1 }'Коды ошибок: 400 — ошибка валидации входных данных; 401, 403, 429, 500 — общие для всех методов. Форматы тела и семантика — Коды ответов и ошибки.
Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Query Parameters
Заголовок раздела «Query Parameters»Фильтр по товарам, добавленным в инвентаризацию из файла
Если задан, в ответе заполняется products[].stocktaking_is_added
Header Parameters
Заголовок раздела «Header Parameters»Ru|uz|en — влияет на локализацию fields[]
Идентификатор платформы. Для интеграций используется статичное значение.
Request Bodyrequired
Заголовок раздела «Request Bodyrequired»object
0 -> подставляется 1
0 -> подставляется 10
Ограничена по длине
Enums: all, active, inactive, small_left, zero_left, negative_balanced
Пример: -name
Ограничено число элементов. Без права видеть остатки всех магазинов список пересекается с доступными пользователю магазинами
Нижняя граница остатка
Ограничено число элементов
True -> в products[] родительские товары, вариации в поле variations[]
Архивные товары
Идентификатор родительского заказа
Один поставщик (в дополнение к supplier_ids)
Ограничено число элементов
Фильтры по полям товара
object
Формат yyyy-mm-dd hh:mm:ss; неверный — 400
Имеет приоритет над last_update_date
Свободная цена
Весовой товар
Курсор постраничного поиска: значение sort последнего элемента предыдущего ответа
Example
{ "category_ids": [ "15c1d3e9-f628-4094-8c69-7b0e67a6240d" ], "status": "all", "skus": [ "100-29", "10276F" ], "group_variations": false, "product_field_filters": [ { "field_id": "491e1d8a-ad22-4180-bcc5-0c5699bdf4f9", "field_type": "attribute", "field_values": [ "aee6d71d-32ed-4695-8f3b-5516dacf75fe" ] }, { "field_id": "84122e63-9993-4fac-80d6-6ad8bfa95f2e", "field_type": "attribute", "field_values": [ "6321d850-77a4-40cd-aa47-4548f0dc8707" ] }, { "field_id": "3b6db763-eeaf-41c3-af99-48472add4e2e", "field_type": "custom", "field_values": [ "18" ] } ], "archived_list": false, "brand_ids": [ "e158f882-d0e0-499d-b6f8-9029ac1886ca" ], "measurement_unit_ids": [ "c5336f71-d684-4e2e-b5bc-307138593543" ], "supply_price_from": 1, "supply_price_to": 10000000, "retail_price_from": 1, "retail_price_to": 10000000, "whole_sale_price_from": 1, "whole_sale_price_to": 10000000, "shop_ids": [ "6f244db4-75d6-4fac-9841-14867d45e36a" ], "supplier_ids": [ "5f4c5af2-3320-4fa4-aed9-65a35e1dab8f" ], "limit": 10, "page": 1}Responses
Заголовок раздела «Responses»Успешный ответ
object
Общее количество найденных товаров
Общее число найденных товаров
Список товаров
object
Отсутствует в ответе, если значение пустое
Отсутствует в ответе, если значение пустое
Отсутствует в ответе, если значение пустое
Отсутствует в ответе, если значение пустое
object
object
object
Состав комплекта
object
object
Остатки по магазинам
object
Цены по магазинам
object
object
object
object
object
Заполняется при group_variations=true
object
Проставляется только при передаче query correlation_id
Товар в архиве
Дата архивации
Кто архивировал
object
object
object
PLU-код весового товара
Код весового товара
Весовой товар
object
Курсор для постраничного поиска
Настройки колонок таблицы товаров
object
Examplegenerated
{ "count": 1, "total": 1, "products": [ { "id": "example", "parent_id": "example", "company_id": "example", "category_id": "example", "is_variative": true, "name": "example", "sku": "example", "main_image_url": "example", "barcode": "example", "additional_barcodes": [ { "id": 1, "barcode": "example", "product_id": "example", "company_id": "example", "deleted_at": 1 } ], "categories": [ { "id": "example", "name": "example", "parent_id": "example", "all_parent_ids": [ "example" ], "sub_rows": "example", "product_count": 1, "company_id": "example", "is_open": true, "level_number": 1, "from_parent": true, "deleted_at": 1, "subRows": [ { "id": "example", "name": "example", "parent_id": "example", "all_parent_ids": [ "example" ], "subRows": [], "product_count": 1, "company_id": "example", "is_open": true, "level_number": 1, "from_parent": true, "deleted_at": 1, "super_parent_id": "example" } ], "super_parent_id": "example" } ], "set_products": [ "example" ], "retail_price": 1, "supply_price": 1, "description": "example", "measurement_type": "example", "measurement_values": { "total_measurement_value": 1, "total_active_measurement_value": 1, "total_inactive_measurement_value": 1 }, "measurement_unit": { "id": "example", "name": "example", "company_id": "example", "short_name": "example", "precision": "example", "is_editable": true, "is_default": true }, "supplier_id": "example", "supplier_ids": [ "example" ], "shop_measurement_values": [ { "shop_id": "example", "total_measurement_value": 1, "total_active_measurement_value": 1, "total_inactive_measurement_value": 1, "small_left_measurement_value": 1, "has_trigger": true, "total_supply_sum": 1, "...": "example", "total_min_supply_price": 1, "total_max_supply_price": 1, "total_active_min_supply_price": 1, "total_active_max_supply_price": 1, "total_active_supply_sum": 1, "total_inactive_min_supply_price": 1, "total_inactive_max_supply_price": 1, "total_inactive_supply_sum": 1, "total_sold_measurement_value": 1, "total_imported_measurement_value": 1, "total_transfer_arrived_measurement_value": 1, "total_transfered_measurement_value": 1, "total_in_transfer_measurement_value": 1, "total_in_transfer_min_supply_price": 1, "total_in_transfer_max_supply_price": 1, "total_in_transfer_supply_sum": 1, "total_written_off_measurement_value": 1, "import_started_measurement_value": 1, "is_small_left": true, "total_retail_sum": 1, "total_active_retail_sum": 1, "total_inactive_retail_sum": 1 } ], "shop_prices": [ { "shop_id": "example", "retail_price": 1, "retail_currency": "example", "supply_currency": "example", "min_supply_price": 1, "max_supply_price": 1, "supply_price": 1, "wholesale_price": 1, "min_price": 1, "max_price": 1, "prices_list": [ 1 ], "from_supply_price": 1, "currency_prices": [ { "currency": "example", "retail_price": 1, "min_supply_price": 1, "max_supply_price": 1, "supply_price": 1, "wholesale_price": 1, "min_price": 1, "max_price": 1, "prices_list": [ 1 ] } ], "promo_price": 1, "promos": [ {} ], "retail_price_created_at": "example", "supply_price_created_at": "example" } ], "prices": { "total_supply_price": 1, "total_retail_price": 1, "total_active_supply_price": 1, "total_active_retail_price": 1, "total_inactive_supply_price": 1, "total_inactive_retail_price": 1 }, "product_type_id": "example", "custom_fields": [ { "custom_field_name": "example", "custom_field_system_name": "example", "custom_field_id": "example", "custom_field_value": "example", "from_parent": true } ], "created_at": "example", "updated_at": "example", "is_marked": true, "brand_id": "example", "brand_name": "example", "variations": [ { "id": "example", "name": "example", "base_name": "example", "barcode": "example", "brand_id": "example", "brand_name": "example", "sku": "example", "description": "example", "supply_price": "example", "retail_price": "example", "profit_margin": "example", "product_attributes": "example", "total_measurement_value": "example", "shipments": "example", "shop_prices": "example", "...": "example" } ], "product_attributes": [ "example" ], "base_name": "example", "stocktaking_is_added": true, "variation_id": "example", "is_archived": true, "archived_at": "example", "archived_by": { "id": "example", "name": "example" }, "free_price": true, "min_price": 1, "max_price": 1, "deleted": true, "suppliers": [ "example" ], "product_supplier_stock": [ { "supplier_id": "example", "supplier_name": "example", "shop_id": "example", "measurement_value": 1, "min_supply_price": 1, "max_supply_price": 1, "retail_price": 1, "wholesale_price": 1 } ], "product_supply_stock": [ { "shop_id": "example", "shop_name": "example", "measurement_value": 1, "active_measurement_value": 1, "inactive_measurement_value": 1, "supply_price": 1, "supplier_ids": [ "example" ] } ], "status": 1, "scale_plu": 1, "scale_code": 1, "is_scalable": true, "shop_free_prices": [ { "shop_id": "example", "sell_with_free_price": true } ], "sort": [ "example" ], "cash_sale": 1 } ], "fields": [ { "id": "example", "name": "example", "sequence_number": 1, "is_active": true, "is_attribute": true, "is_custom_field": true } ]}