The Inventory API allows you to manage stock levels for products in a Wix Stores catalog. The API tracks inventory per variant, so you can manage stock separately for each size, color, or other product option.
With the Inventory API, you can:
The Inventory API supports 2 track modes that determine how a product's stock status works:
trackQuantity is true: The quantity field determines stock status. When the quantity reaches 0, the variant becomes out of stock. The system automatically decrements quantity when a customer completes a purchase. Use the Increment Inventory and Decrement Inventory methods to manually adjust quantities.trackQuantity is false: The inStock field controls stock status manually. The system doesn't decrement quantity on purchase. Use the Update Inventory Variants method to toggle inStock for each variant.quantity field determines stock status. The system automatically decrements quantity on purchase.inStock flag controls stock status manually. The system doesn't track or decrement quantity on purchase.