# Remove product variants to a selling plan

## Remove multiple product variants from a selling plan

> Remove multiple product variants from a selling plan. Optionally, you can also update the inventory policy\
> of the removed variants in the same request to avoid making separate API calls.\
> \
> When \`inventory\_policy\` is provided, the inventory policy update is performed synchronously (inline)\
> for better performance and to avoid race conditions.<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}/remove_variant":{"delete":{"summary":"Remove multiple product variants from a selling plan","description":"Remove multiple product variants from a selling plan. Optionally, you can also update the inventory policy\nof the removed variants in the same request to avoid making separate API calls.\n\nWhen `inventory_policy` is provided, the inventory policy update is performed synchronously (inline)\nfor better performance and to avoid race conditions.\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"},{"in":"query","name":"shopify_variant_ids","required":true,"schema":{"type":"array","items":{"type":"integer"}},"description":"Array of Shopify variant IDs to remove","style":"form","explode":false},{"in":"query","name":"inventory_policy","required":false,"schema":{"type":"string","enum":["CONTINUE","DENY"]},"description":"Optional. Inventory policy to set for the removed variants. CONTINUE allows overselling, DENY prevents it."}],"responses":{"200":{"description":"Variants removed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"variants_removed":{"type":"array","items":{"type":"integer"},"description":"List of variant IDs that were removed"},"inventory_policy_updated":{"type":"boolean","description":"Whether the inventory policy was successfully updated (only present when inventory_policy is provided)"},"inventory_policy":{"type":"string","enum":["CONTINUE","DENY"],"description":"The inventory policy that was set (only present when inventory_policy_updated is true)"}}}}}},"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 or variants not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"422":{"description":"Failed to remove variants or invalid inventory policy","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stoqapp.com/preorders-api/remove-product-variants-to-a-selling-plan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
