Import inventory

In this step, you will send the number of products you currently have in stock to VTEX.

Before you start

The Logistics module is the service responsible for the inventory and shipping information for your store. This includes the definition of logistics routes, shipping rates, pickup points and, of course, inventory management.

A basic concept here is that of a logistics route, the path connecting your store to the customer. For an order to be placed in a store, the desired item should have stock available in at least one warehouse connected through a loading dock to a freight carrier that delivers to the customer's address. The image below illustrates these concepts.

If you would like an introduction to our Logistics module, check out the Logistics overview in our Help Center.

Create Warehouses

The stock availability of an SKU is stored at the warehouse level. Before updating the inventory of an SKU, you must create the warehouses that will hold its stock.

If you have a small quantity of warehouses to manage, this can be done with the warehouse management section of your Admin panel. Otherwise, you can use the Create/Update Warehouse endpoint of the Logistics API to create them programmatically.

Update SKU Inventory

To update an SKU inventory, you should use the Update Inventory By SKU and Warehouse endpoint, from the Logistics API.

📘

You can find the warehouseId for each Warehouse using the List All Warehouses endpoint.

You should set the total quantity of items in stock for each SKU. In between steps, you can use the List Inventory By SKU endpoint or see how you can Manage inventory from your Admin panel.

Wrapping up

If you’ve done things correctly, you should have imported your inventory information. This includes creating the warehouses needed for your logistics operation and updating the stock availability of each SKU in all warehouses.


Did this page help you?