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

# stockBulkUpdate Mutation

Updates stocks for a given variant and warehouse. Variant and warehouse selectors have to be the same for all stock inputs. Is not allowed to use 'variantId' in one input and 'variantExternalReference' in another.

Requires the MANAGE\_PRODUCTS permission.

Triggers the following webhook events:

-   PRODUCT\_VARIANT\_STOCK\_UPDATED (async): A product variant stock details were updated.

```graphql
stockBulkUpdate(
  errorPolicy: ErrorPolicyEnum
  stocks: [StockBulkUpdateInput!]!
): StockBulkUpdate
```

Details

```graphql
type StockBulkUpdate {
  count: Int!
  results: [StockBulkResult!]!
  errors: [StockBulkUpdateError!]!
}
```

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

### Arguments

<a id="error-policy"></a>

#### [`errorPolicy`](#error-policy) ● [`ErrorPolicyEnum`](/api-reference/miscellaneous/enums/error-policy-enum.md)

Policies of error handling. DEFAULT: REJECT\_EVERYTHING

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

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

Input list of stocks to update.

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

### Type

<a id="stockbulkupdate"></a>

#### [`StockBulkUpdate`](/api-reference/products/objects/stock-bulk-update.md)

Updates stocks for a given variant and warehouse. Variant and warehouse selectors have to be the same for all stock inputs. Is not allowed to use 'variantId' in one input and 'variantExternalReference' in another.

Requires the MANAGE\_PRODUCTS permission.

Triggers the following webhook events:

-   PRODUCT\_VARIANT\_STOCK\_UPDATED (async): A product variant stock details were updated.
