API documentation
Method list
Test your request
Changelog


getInventoryProductsStock
The method allows you to retrieve stock and reservations data of products from BaseLinker catalogs, optionally narrowed down with product filters.


Input parameters
inventory_idintCatalog ID. The list of identifiers can be retrieved using the method getInventories.
filter_idint(optional) limits results to a specific product ID
filter_category_idint(optional) limits results to products from a specific category
filter_eanvarchar(32)(optional) limits results to a specific EAN (including additional product EANs)
filter_skuvarchar(50)(optional) limits results to a specific SKU (stock keeping unit)
filter_namevarchar(200)(optional) product name filter (part of the searched name or an empty field)
filter_asinvarchar(50)(optional) limits results to a specific ASIN
filter_stock_fromint(optional) minimum stock quantity
filter_stock_toint(optional) maximum stock quantity
pageint(optional) Results paging (1000 products per page for BaseLinker warehouse)
filter_sortvarchar(30)(optional) sorts the returned products. Possible values: "id [ASC|DESC]".
filter_locationsvarchar(20)(optional) filters results by location name



Output data
The method returns the data in JSON format.
statusvarchar(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
productsarrayA list containing product stocks, where the key is the product ID and the value is an array containing the fields listed below.
| - product_idintID of the product.
| - stockarrayA list where the key is the warehouse ID and the value is a stock for this warehouse. Warehouse ID should have the following format: "[type:bl|shop|warehouse]_[id:int]" (e.g. "bl_123"). The list of warehouse IDs can be retrieved with getInventoryWarehouses method.
| - reservationsarrayOnly returned for inventories that have reservations enabled. A list where the key is the warehouse ID and the value is a reserved stock for this warehouse.
| - variantsarrayA list containing variants stocks, where the key is the variant ID. The value is a list where a key is a warehouse ID and value is a stock in this warehouse.
| - variant_reservationsarrayOnly returned for inventories that have reservations enabled and only for products that have variants. A list containing variant reservations, where the key is the variant ID and the value is a list where the key is a warehouse ID and the value is a reserved stock for this warehouse. Only variants with non-zero reservations are included.



Sample
Input data:
Output data:
A sample request in PHP: