Skip to content
Saleor
Esc
↑↓navigate↵open⌘Jpreview

Schema: Saleor 3.23.43Download SDLUpgrade guides

On this page

productVariantStocksUpdate Mutation

Updates stocks for product variant.

Requires one of the following permissions:MANAGE_PRODUCTS

Triggers the following webhook events:

  • PRODUCT_VARIANT_STOCK_UPDATED (async): A product variant stock is updated.
  • PRODUCT_VARIANT_BACK_IN_STOCK (async): A product variant stock transitioned from no availability to available quantity.
  • PRODUCT_VARIANT_OUT_OF_STOCK (async): A product variant stock transitioned from available quantity to no availability.
  • PRODUCT_VARIANT_BACK_IN_STOCK_IN_CHANNEL (async): A product variant is back in stock in a channel (non click-and-collect warehouses).

Note: Triggered only when the useLegacyShippingZoneStockAvailability shop setting is disabled.

  • PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL (async): A product variant is out of stock in a channel (non click-and-collect warehouses).

Note: Triggered only when the useLegacyShippingZoneStockAvailability shop setting is disabled.

  • PRODUCT_VARIANT_BACK_IN_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is back in stock in a channel (click-and-collect warehouses).

Note: Triggered only when the useLegacyShippingZoneStockAvailability shop setting is disabled.

  • PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is out of stock in a channel (click-and-collect warehouses).

Note: Triggered only when the useLegacyShippingZoneStockAvailability shop setting is disabled.

Applied directives

@webhookEventsInfo(asyncEvents: [PRODUCT_VARIANT_STOCK_UPDATED, PRODUCT_VARIANT_BACK_IN_STOCK, PRODUCT_VARIANT_OUT_OF_STOCK, PRODUCT_VARIANT_BACK_IN_STOCK_IN_CHANNEL, PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL, PRODUCT_VARIANT_BACK_IN_STOCK_FOR_CLICK_AND_COLLECT, PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT], syncEvents: [])
productVariantStocksUpdate(sku: String, stocks: [StockInput!]!, variantId: ID): ProductVariantStocksUpdate

Returns

ProductVariantStocksUpdate

Show return type
type ProductVariantStocksUpdate {
  productVariant: ProductVariant
  bulkStockErrors: [BulkStockError!]! @deprecated(reason: "Use `errors` field instead.")
  errors: [BulkStockError!]!
}

Arguments

sku

sku · String

SKU of product variant for which stocks will be updated.

stocks

stocks · [StockInput!]!

Input list of stocks to create or update.

variantId

variantId · ID

ID of a product variant for which stocks will be updated.


Schema: Saleor 3.23.43. Download SDL.

Last updated on August 10, 2026

Was this page helpful?