bulkDecrementInventoryItemsByVariantAndLocation( )


Decrements quantities of multiple inventory items by variant and location.

Notes::

  • trackQuantity must be true to allow for decrementing the quantity.
  • If you pass restrictInventory: true and the decrementData.decrementBy amount is greater than the current quantity in stock, the request will fail with an INSUFFICIENT_INVENTORY error.
  • Pass restrictInventory: false to allow for negative quantities.
  • If you pass preorderRequest: true and the item is available for preorder, the item's preorderCounter will increase and the item's quantity will stay the same.
Authentication

This method may require higher-level permissions than the caller has, based on their identity and roles and permissions. In these cases, you can ensure the method is called with the required level of authorization by using one of the following:

Permissions
Inventory write in v3 catalog
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
decrementDataArray<DecrementDataByVariantAndLocation>Required

Variant and location IDs, as well as decrement data.


optionsBulkDecrementInventoryItemsByVariantAndLocationOptions
Returns
Return Type:Promise<BulkDecrementInventoryItemsByVariantAndLocationResponse>
Errors
428Failed Precondition

There are 4 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?