Skip to content

Export Inventory from Magento V2

This task will export inventory levels for all products from Magento in an XML format. See below for a sample output file.

Note

If you're using Magento 2.3+ with Multi-Source Inventory (MSI) enabled, you will need to use the Export Source Items task instead.

GET /V1/stockItems/lowStock

Settings

Connection

Required
The Magento V2 connection to use. See the Connecting to Magento v2 article if you require more information on how to create/manage connections.

Page Size

Required
The number of records to include in each page of results. Defaults to 50. Increasing this value will increase the speed of the export, but will consume more memory.

Store View Code

Required
The Magento store view code to perform the API calls against. Default value of 'default'.

Output File

Required
The name of the file to export the products to.

Zynk Settings

See Common Task Settings.

Examples

A sample output file is shown below.

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfStockItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <StockItem>
    <item_id>1</item_id>
    <product_id>1</product_id>
    <stock_id>1</stock_id>
    <qty>222</qty>
    <is_in_stock>true</is_in_stock>
    <is_qty_decimal>false</is_qty_decimal>
    <show_default_notification_message>false</show_default_notification_message>
    <use_config_min_qty>true</use_config_min_qty>
    <min_qty>0</min_qty>
    <use_config_min_sale_qty>1</use_config_min_sale_qty>
    <min_sale_qty>1</min_sale_qty>
    <use_config_max_sale_qty>true</use_config_max_sale_qty>
    <max_sale_qty>10000</max_sale_qty>
    <use_config_backorders>true</use_config_backorders>
    <backorders>0</backorders>
    <use_config_notify_stock_qty>true</use_config_notify_stock_qty>
    <notify_stock_qty>1</notify_stock_qty>
    <use_config_qty_increments>true</use_config_qty_increments>
    <qty_increments>0</qty_increments>
    <use_config_enable_qty_inc>true</use_config_enable_qty_inc>
    <enable_qty_increments>false</enable_qty_increments>
    <use_config_manage_stock>true</use_config_manage_stock>
    <manage_stock>true</manage_stock>
    <is_decimal_divided>false</is_decimal_divided>
    <stock_status_changed_auto>0</stock_status_changed_auto>
    <sku>24-MB01</sku>
  </StockItem>
</ArrayOfStockItem>