getProductsQuantity
The method allows to retrieve stock from the BaseLinker storage or the shop/wholesaler storage connected to BaseLinker.
Input parameters
Output data:
A sample request in PHP:
storage_id | varchar(30) | Storage ID in format "[type:bl|shop|warehouse]_[id:int]" (e.g. "shop_2445"). |
page | int | (optional) Results paging (for BaseLinker storage 1000 products per page) |
Output data
The method returns the data in JSON format.
status | varchar(30) | SUCCESS - request executed correctly ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code |
storage_id | varchar(30) | Storage ID in format "[type:bl|shop|warehouse]_[id:int]" (e.g. "shop_2445"). |
products | array | An array of products containig the fields listed below |
| - product_id | varchar(30) | The main Product ID. |
| - quantity | int | Stock quantity |
| - variants | array | An array of variants containing the fields listed below |
| - | - variant_id | varchar(30) | Variant main identifier. |
| - | - quantity | int | Stock quantity |
Sample
Input data:Output data:
A sample request in PHP: