---
title: "Queue a bulk update of inventory policy for multiple variants"
description: "Queues a background job to update the inventory policy for multiple variants. The operation is performed asynchronously to handle large numbers of variants efficiently. Updates are processed in batches of up to 1000 vari"
url: https://docs.stoqapp.com/v1/preorders/queue-a-bulk-update-of-inventory-policy-for-multiple-variants/
api: "API v1 (legacy)"
method: POST
path: "/external/preorders/{id}/bulk_toggle_inventory_policy"
---

# Queue a bulk update of inventory policy for multiple variants

`POST https://app.stoqapp.com/api/v1/external/preorders/{id}/bulk_toggle_inventory_policy`

Queues a background job to update the inventory policy for multiple variants.
The operation is performed asynchronously to handle large numbers of variants efficiently.
Updates are processed in batches of up to 1000 variants to stay within message size limits.

## Path parameters

- `id` (string, required): Selling plan ID

## Headers

- `X-Auth-Token` (string, required): API key for authentication

## Request body

- `shopify_variant_ids` (array of integers, required): Array of Shopify variant IDs to update
- `inventory_policy` (string, required): The inventory policy to set for the variants One of: `CONTINUE`, `DENY`.

## Returns

- `success` (boolean): e.g. `true`
- `message` (string): e.g. `Inventory policy update queued`
- `variants_queued` (array of integers): List of variant IDs that were queued for processing

Rate limit: this call costs 2 points ([rate limits](https://docs.stoqapp.com/docs/rate-limits/)).

## Example request

```sh
curl -X POST "https://app.stoqapp.com/api/v1/external/preorders/79b44c6c-ebc7-41d4-8a1b-573d7c693454/bulk_toggle_inventory_policy" \
  -H "X-Auth-Token: $STOQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "shopify_variant_ids": [
      43900910010503,
      43900910010999
    ],
    "inventory_policy": "CONTINUE"
  }'
```

## 200

Inventory policy update has been queued successfully

```json
{
  "success": true,
  "message": "Inventory policy update queued",
  "variants_queued": [
    43900910010503,
    43900910010999
  ]
}
```

## 400

Bad request - missing or invalid parameters

## 401

Unauthorized

## 404

Selling plan not found

## 422

Invalid inventory policy

