crm.item.productrow.list
Scope: catalog Permissions to execute: for all
crm.item.productrow.list({order: ?{} = null, filter: {}, start: ?number = 0})
Method returns array with product SKUs
{ "productRows": [] }
where each array element is a structure similar to the method result crm.item.productrow.get.
Each result string has the field type, indicating the following:
TYPE_PRODUCT = 1; // Standard product TYPE_SET = 2; // Set TYPE_SKU = 3; // Product with SKUs TYPE_OFFER = 4; // SKU TYPE_FREE_OFFER = 5; // SKU that doesn't have product yet (not specified or deleted) TYPE_EMPTY_SKU = 6; // Specific type, indicates non-valid product with SKUsYou can handle the product via crm.product.*. Handling product variants - only via catalog.product.* (Can be used for products as well.) Additionally, catalog.product.get requires product/variant ID only. (Retrieved results are different only by iblockId for product and if parentId is available for a variant.) At the same time catalog.product.list already requires indication of iblockId inside the filter, which is most often is 25 - for products (in cloud), and 27 - for variants (Check it in each individual instance).
You can get the value ownerType
for the smart process via crm.enum.ownertype - value SYMBOL_CODE_SHORT.
Parameters
Parameter | Description | Available from version |
---|---|---|
order | List for sorting, where the key is a field, and value - ASC or DESC. | |
filter | List for filtering. Examples of filters are listed below. Keys =ownerType and =ownerId are required. | |
start | Shift for page navigation. |
Example
Find all product SKUs, bound to the quote with ID 1
{ "filter": { "=ownerType": "Q", "=ownerId": 1 } }
Find all product SKUs, bound to SPA with entityTypeId = 128 and with ID 9, with discount more than 10% or price lower than 1000
{ "filter": { "=ownerType": "T80", "=ownerId": 9, "0": { "logic": "OR", "0": { ">discountRate": 10 }, "1": { "<price": 1000 } } } }
Find all product SKUs, bound with quote with ID 2, bound with products from catalog
{ "filter": { "=ownerType": "Q", "=ownerId": 2, "!=productId": 0 } }
© «Bitrix24», 2001-2024