> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/products/llms.txt)
> Source: https://docs.saleor.io/api-reference/products/mutations/product-variant-stocks-update

# productVariantStocksUpdate Mutation

Updates stocks for product variant.

Requires the MANAGE\_PRODUCTS permission.

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.

```graphql
productVariantStocksUpdate(
  sku: String
  stocks: [StockInput!]!
  variantId: ID
): ProductVariantStocksUpdate
```

Details

```graphql
type ProductVariantStocksUpdate {
  productVariant: ProductVariant
  bulkStockErrors: [BulkStockError!]! @deprecated
  errors: [BulkStockError!]!
}
```

<a id="arguments"></a>

### Arguments

<a id="sku"></a>

#### [`sku`](#sku) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

SKU of product variant for which stocks will be updated.

<a id="stocks"></a>

#### [`stocks`](#stocks) ● [`[StockInput!]!`](/api-reference/products/inputs/stock-input.md)

Input list of stocks to create or update.

<a id="variant-id"></a>

#### [`variantId`](#variant-id) ● [`ID`](/api-reference/miscellaneous/scalars/id.md)

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

<a id="type"></a>

### Type

<a id="productvariantstocksupdate"></a>

#### [`ProductVariantStocksUpdate`](/api-reference/products/objects/product-variant-stocks-update.md)

Updates stocks for product variant.

Requires the MANAGE\_PRODUCTS permission.

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.
