Mahsulotlarni filtrlash / Variatsiyalarni guruhlash
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 }'Xato kodlari: 400 — kiruvchi ma’lumotlar validatsiya xatosi; 401, 403, 429, 500 — barcha metodlar uchun umumiy. Tana formatlari va semantikasi: Javob kodlari va xatolar.
Authorizations
“Authorizations” bo'limiParameters
“Parameters” bo'limiQuery Parameters
“Query Parameters” bo'limiInventarizatsiyaga fayldan qo’shilgan mahsulotlar bo’yicha filtr
Berilgan bo’lsa, javobda products[].stocktaking_is_added to’ldiriladi
Header Parameters
“Header Parameters” bo'limiRu|uz|en — fields[] lokalizatsiyasiga ta’sir qiladi
Platforma identifikatori. Integratsiyalar uchun statik qiymat ishlatiladi.
Request Bodyrequired
“Request Bodyrequired” bo'limiobject
0 -> 1 qo’yiladi
0 -> 10 qo’yiladi
Uzunligi cheklangan
Enums: all, active, inactive, small_left, zero_left, negative_balanced
Misol: -name
Elementlar soni cheklangan. Barcha do’konlar qoldiqlarini ko’rish ruxsati bo’lmasa, ro’yxat foydalanuvchiga ochiq do’konlar bilan kesishtiriladi
Qoldiqning quyi chegarasi
Elementlar soni cheklangan
True -> products[] da ota mahsulotlar, variatsiyalar variations[] maydonida
Arxivdagi mahsulotlar
Ota buyurtma identifikatori
Bitta yetkazib beruvchi (supplier_ids ga qo’shimcha)
Elementlar soni cheklangan
Mahsulot maydonlari bo’yicha filtrlar
object
Format yyyy-mm-dd hh:mm:ss; noto’g’ri bo’lsa — 400
last_update_date ga nisbatan ustunlikka ega
Erkin narx
Vaznli mahsulot
Sahifalab qidirish kursori: oldingi javobning oxirgi elementidagi sort qiymati
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” bo'limiMuvaffaqiyatli javob
object
Topilgan mahsulotlarning umumiy soni
Topilgan mahsulotlar umumiy soni
Tovarlar ro’yxati
object
Qiymat bo’sh bo’lsa, javobda bo’lmaydi
Qiymat bo’sh bo’lsa, javobda bo’lmaydi
Qiymat bo’sh bo’lsa, javobda bo’lmaydi
Qiymat bo’sh bo’lsa, javobda bo’lmaydi
object
object
object
Komplekt tarkibi
object
object
Do’konlar bo’yicha qoldiqlar
object
Do’konlar bo’yicha narxlar
object
object
object
object
object
group_variations=true bo’lganda to’ldiriladi
object
Faqat query correlation_id uzatilganda to’ldiriladi
Mahsulot arxivda
Arxivlash sanasi
Kim arxivlagan
object
object
object
Tortiladigan mahsulotning PLU-kodi
Vaznli mahsulot kodi
Vaznli mahsulot
object
Sahifalab qidirish uchun kursor
Mahsulotlar jadvali ustunlari sozlamalari
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 } ]}