Product filtering / Variation grouping
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 }'Error codes: 400 — input validation error; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Filter by products added to the stocktaking from a file
If set, products[].stocktaking_is_added is filled in the response
Header Parameters
Section titled “Header Parameters”Ru|uz|en — affects the localization of fields[]
Platform identifier. A static value is used for integrations.
Request Bodyrequired
Section titled “Request Bodyrequired”object
0 -> defaults to 1
0 -> defaults to 10
Limited in length
Enums: all, active, inactive, small_left, zero_left, negative_balanced
Example: -name
The number of elements is limited. Without the permission to see stock of all shops, the list is intersected with the shops available to the user
Lower stock bound
The number of elements is limited
True -> parent products in products[], variations in the variations[] field
Archived products
Parent order identifier
A single supplier (in addition to supplier_ids)
The number of elements is limited
Filters by product fields
object
Format yyyy-mm-dd hh:mm:ss; invalid — 400
Takes precedence over last_update_date
Free price
Weighed product
Paginated search cursor: the sort value of the last element of the previous response
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
Section titled “Responses”Successful response
object
Total number of products found
Total count of products found
List of products
object
Absent from the response if the value is empty
Absent from the response if the value is empty
Absent from the response if the value is empty
Absent from the response if the value is empty
object
object
object
Bundle contents
object
object
Stock by shop
object
Prices by shop
object
object
object
object
object
Filled when group_variations=true
object
Set only when the correlation_id query parameter is passed
Product in archive
Archiving date
Archived by
object
object
object
PLU code of a weighed product
Weighted product code
Weighed product
object
Cursor for paginated search
Product table column settings
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 } ]}