The Inventory Items API allows you to manage inventories for Wix Stores.
This API provides extensive functionalities to handle inventory items across multiple products, variants and in multiple locations, ensuring that store owners can track and update their stock levels seamlessly.
With the Wix Inventory Items API, you can:
It’s important to note the following point before starting to code:
getCatalogVersion()
to get the site's Stores catalog version before using any of the Inventory Items V3 API methods. Based on the response, you must then use either the original Inventory API or the Inventory Items V3 API.To use the InventoryItemsV3 API, install the @wix/stores
package using npm or Yarn:
or
Then import { inventoryItemsV3 }
from @wix/stores
:
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates multiple inventory items.
Inventory items to create.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Decrements quantities of multiple inventory items.
Notes::
trackQuantity
must be true
to allow for decrementing the quantity.restrictInventory: true
and the decrementData.decrementBy
amount is greater than the current quantity in stock, the request will fail with an INSUFFICIENT_INVENTORY
error.restrictInventory: false
to allow for negative quantities.preorderRequest: true
and the item is available for preorder, the item's preorderCounter
will increase and the item's quantity will stay the same.
Inventory item IDs and decrement data.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Decrements quantities of multiple inventory items by variant and location.
Notes::
trackQuantity
must be true
to allow for decrementing the quantity.restrictInventory: true
and the decrementData.decrementBy
amount is greater than the current quantity in stock, the request will fail with an INSUFFICIENT_INVENTORY
error.restrictInventory: false
to allow for negative quantities.preorderRequest: true
and the item is available for preorder, the item's preorderCounter
will increase and the item's quantity will stay the same.
Variant and location IDs, as well as decrement data.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Deletes multiple inventory items.
IDs of inventory items to delete.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Increments quantities of multiple inventory items.
Note: trackQuantity
must be true
to allow for incrementing the quantity.
Inventory item IDs and increment data.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Increments quantities of multiple inventory items by variant and location.
Note: trackQuantity
must be true
to allow for incrementing the quantity.
Variant and location IDs, as well as increment data.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates multiple inventory items.
Each time an inventory item is updated, revision
increments by 1.
The current revision
must be passed when updating an inventory item.
This ensures you're working with the latest inventory item and prevents unintended overwrites.
Inventory items to update.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates multiple inventory items, given the provided filter.
Each time an inventory item is updated, revision
increments by 1.
The current revision
must be passed when updating an inventory item.
This ensures you're working with the latest inventory item and prevents unintended overwrites.
Filter object.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates an inventory item.
The combination of variantId
and locationId
is unique.
Inventory item to create.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Deletes an inventory item.
Inventory item ID.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves an inventory item.
Inventory item ID.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.