Search.../

Introduction

 

Developer Preview
APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.

 

This service allows you to query and modify the inventory for your store's products.

Terminology

  • Item: a product from the catalog.
  • Variant: a product variant. The inventory is managed per variant.

A variant can override the following values from the parent product:

  • Price
  • SKU
  • Weight
  • Inventory

Permissions information

Functions in the Inventory API are restricted and only run if you elevate permissions using the wix-auth elevate() function.

Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.

Events

Inventory API events are fired on your site’s backend when certain events occur with Inventory. See wix-stores-backend events for more information related to these events.

To use the Inventory API, import inventory from wix-stores.v2:

import { inventory } from 'wix-stores.v2';
js | Copy Code

Was this helpful?