ProductsList
The method allows you to download basic product data from the store's warehouse, using optional selection and sorting criteria. The results of this function should return all matching products, excluding variants.
Input parameters
Incoming as $_POST fields.
POST request:
returned data JSON:
Dane wyjściowe:
category_id | string | (optional) Get products from a specific category. WARNING: ProductsList must handle both the empty value of this field and the value of "all" - in both cases it means no filtering by category! |
filter_limit | int | (optional) limiting the number of returned products |
filter_sort | string | (optional) value by which the list of products is to be sorted. Possible values: "id [ASC|DESC]", "name [ASC|DESC]", "quantity [ASC|DESC]", "price [ASC|DESC]" |
filter_id | string | (optional) limit the results to a specific product id |
filter_ids_list | string | (optional) limit the results to a list of specific product id's |
filter_ean | string | (optional) limiting the results to a specific ean |
filter_sku | string | (optional) limiting the results to a specific SKU |
filter_name | string | (optional) item name filter (can be part of the name) |
filter_price_from | float | (optional) lower price limit (products with a lower price are not returned) |
filter_price_to | float | (optional) upper price limit |
filter_quantity_from | int | (optional) lower limit of the quantity of products |
filter_quantity_to | int | (optional) upper limit on the quantity of products |
filter_available | int | (optional) displaying only products marked as available (1) or unavailable (0) or all (empty value) |
page | int | (optional) Page number when pagination occurs. |
Outgoing data
Array fields that the method should return.
list of products | array | An array with product identifiers as the key and an array with the fields listed below: |
| - name | string | Product name |
| - quantity | int | Product quantity (stock) |
| - price | float | Price gros |
| - ean | string | (optional) EAN - 13 digit barcode |
| - sku | string | (optional) Stock Keeping Unit |
| - location | string | (optional) Location in the warehouse |
| - currency | char (3) | (optional) ISO code of the product currency, e.g. EUR, USD, PLN |
pages | int | (optional) number of pages. We recommend 1000 results on 1 page. The limit is 1000 pages. |
Example:
Input data:Array
(
[filter_price_from] => 100
[filter_sort] => price
)
(
[filter_price_from] => 100
[filter_sort] => price
)
POST request:
filter_price_from=100&filter_sort=price
returned data JSON:
{"214":{"name":"krem intensywnie nawil\u017caj\u0105cy 50ml Olivia","quantity":"2","price":"119.00","sku":"AB-123"},"5105":{"name":"Shiseido krem na noc ka\u017cdy rodzaj cery 150ml","quantity":"1","price":"169.00","sku":"ZZ-552"},"pages":4}
Dane wyjściowe:
Array
(
[214] => Array
(
[name] => krem intensywnie nawilżający 50ml Olivia
[quantity] => 2
[price] => 119.00
[sku] => AB-123
)
[5105] => Array
(
[name] => Shiseido krem na noc każdy rodzaj cery 150ml
[quantity] => 1
[price] => 169.00
[sku] => ZZ-552
)
[pages] => 4
)
(
[214] => Array
(
[name] => krem intensywnie nawilżający 50ml Olivia
[quantity] => 2
[price] => 119.00
[sku] => AB-123
)
[5105] => Array
(
[name] => Shiseido krem na noc każdy rodzaj cery 150ml
[quantity] => 1
[price] => 169.00
[sku] => ZZ-552
)
[pages] => 4
)