# Update Selling Policy

## Queue a bulk update of inventory policy for multiple variants

> 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.<br>

```json
{"openapi":"3.0.3","info":{"title":"Preorders API","version":"1.0.0"},"servers":[{"url":"https://app.stoqapp.com/api/v1/external","description":"Production server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Auth-Token"}}},"paths":{"/preorders/{id}/bulk_toggle_inventory_policy":{"post":{"summary":"Queue a bulk update of inventory policy for multiple variants","description":"Queues a background job to update the inventory policy for multiple variants.\nThe operation is performed asynchronously to handle large numbers of variants efficiently.\nUpdates are processed in batches of up to 1000 variants to stay within message size limits.\n","tags":["Preorders"],"parameters":[{"in":"header","name":"X-Auth-Token","required":true,"schema":{"type":"string"},"description":"API key for authentication"},{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"Selling plan ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shopify_variant_ids":{"type":"array","items":{"type":"integer"},"description":"Array of Shopify variant IDs to update"},"inventory_policy":{"type":"string","enum":["CONTINUE","DENY"],"description":"The inventory policy to set for the variants"}},"required":["shopify_variant_ids","inventory_policy"]}}}},"responses":{"200":{"description":"Inventory policy update has been queued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"variants_queued":{"type":"array","items":{"type":"integer"},"description":"List of variant IDs that were queued for processing"}}}}}},"400":{"description":"Bad request - missing or invalid parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"401":{"description":"Unauthorized"},"404":{"description":"Selling plan not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"422":{"description":"Invalid inventory policy","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```
