The Inventory Items API allows you to manage inventory for products in Wix Stores. An inventory item tracks the stock for a specific product variant at a specific location.
With the Inventory Items API, you can:
For a comprehensive guide to inventory concepts including tracking methods, availability status, preorder configuration, and multi-location management, see About Inventory Management.
It's important to note the following points before starting to code:
Each inventory item represents a specific variant at a specific location. The combination of variantId and locationId is unique—you can't have two inventory items for the same variant at the same location.
When working with multi-location inventory (where a product's variants are tracked across multiple physical locations like stores or warehouses), be aware that the product's read-only inventory field reflects only the default location's inventory status.
Inventory can be tracked using either quantity tracking or in-stock tracking. The trackQuantity field indicates which method is being used and is automatically set based on how you configure the item.
To use this tracking method, set the quantity field to the number of items available. Use this when you need exact stock counts. Quantity can be negative when inventory is decremented for paid orders. This method supports preorder limits.
To use this tracking method, set inStock to true for available items or false for unavailable. Use this for made-to-order products or digital products with unlimited inventory. Preorder limits aren't supported with this method.
Preorder settings are configured per inventory item, meaning each variant-location combination can have its own preorder configuration.
When preorder is enabled for an inventory item:
availabilityStatus becomes PREORDER when stock reaches zeroNote: The product entity's inventory.preorderStatus and inventory.preorderAvailability fields reflect the preorder state of the default location only.
For a comprehensive glossary of Catalog V3 terms, see Terminology.