About the Inventory API

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:

  • Retrieve inventory information for a specific product or variant.
  • Update inventory tracking settings and stock status for product variants.
  • Increment or decrement inventory quantities for up to 300 variants across multiple products in a single call.
  • Query inventory items with filtering, sorting, and paging.

Inventory track modes

The Inventory API supports 2 track modes that determine how a product's stock status works:

  • Tracked inventory, where 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.
  • Untracked inventory, where 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.

Terminology

  • Inventory item: The inventory record for a specific product. Contains tracking settings, variant-level stock data, and preorder configuration.
  • Variant: A specific version of a product, such as a particular size or color. Each variant maintains its own stock data. Products without variants have a single default variant.
  • Tracked inventory: An inventory mode where the quantity field determines stock status. The system automatically decrements quantity on purchase.
  • Untracked inventory: An inventory mode where the inStock flag controls stock status manually. The system doesn't track or decrement quantity on purchase.
  • Preorder: A feature that allows customers to purchase out-of-stock items. Preorder is available only for tracked inventory, and you can set a limit on the number of preorder purchases.
Did this help?