# Add product variants to a selling plan

## POST /preorders/{id}/add\_variant

> Add multiple product variants to a selling plan

```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}/add_variant":{"post":{"summary":"Add multiple product variants to a selling plan","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 add"}},"required":["shopify_variant_ids"]}}}},"responses":{"200":{"description":"Variants added successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"variants_added":{"type":"array","items":{"type":"integer"},"description":"List of variant IDs that were added"}}}}}},"400":{"description":"Bad request - missing or invalid shopify_variant_ids","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"401":{"description":"Unauthorized"},"404":{"description":"Selling plan not found"},"422":{"description":"Some variants already added or other error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"existing_variants":{"type":"array","items":{"type":"integer"},"description":"List of variant IDs that were already added"}}}}}}}}}}}
```
