ProductsQuantity
The method provides only stock of base products and their variants
Input parameters
Incoming as $_POST fields.
POST request:
returned data JSON:
Dane wyjściowe:
page | int | (optional) Page number when pagination occurs. |
Outgoing data
Array fields that the method should return.
products list | array | An array, the key is the product ID, and value is subarray (see below). |
| - variant stock | array | An array where the key is the variant ID (key 0 is for the main product) and value is the stock for each variant |
pages | int | (optional) number of pages. We recommend 1000 results on 1 page. The limit is 1000 pages. |
Example:
Input data:POST request:
returned data JSON:
{"12":["1"],"13":["0"],"15":{"0":"1","53":"1"},"31":{"0":"1","79":"0","80":"1","81":"0"},"pages":9}
Dane wyjściowe:
Array
(
[12] => Array
(
[0] => 1
)
[13] => Array
(
[0] => 0
)
[15] => Array
(
[0] => 1
[53] => 1
)
[31] => Array
(
[0] => 1
[79] => 0
[80] => 1
[81] => 0
)
[pages] => 9
)
(
[12] => Array
(
[0] => 1
)
[13] => Array
(
[0] => 0
)
[15] => Array
(
[0] => 1
[53] => 1
)
[31] => Array
(
[0] => 1
[79] => 0
[80] => 1
[81] => 0
)
[pages] => 9
)