Documentation of the shops data exchange protocol - baselinker.com
Function list
Tests
ChangeLog
Remap Builder


ProductsQuantity
The method provides only stock of base products and their variants


Input parameters
Incoming as $_POST fields.
pageint(optional) Page number when pagination occurs.



Outgoing data
Array fields that the method should return.
products listarrayAn array, the key is the product ID, and value is subarray (see below).
| - variant stockarrayAn array where the key is the variant ID (key 0 is for the main product) and value is the stock for each variant
pagesint(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
)