# Generate variant children for a variant parent product

POST https://api.oletapp.com/your-store/v1/products/{id}/variants

Creates new product rows as children of the variant parent. Each variant names its own option combination explicitly; this is not a matrix expansion of the parent's attributes.

- `attribute_id` in each option must belong to the parent.
- Option combinations are deduped against the request and against existing children.
- Capped at 200 children per product, all-or-nothing.
- `supply_price` is never accepted.
- Idempotent via `Idempotency-Key`, with every created id replayed.
- Children are ordinary products afterwards, read, updated and deleted via `/products/{id}`.

- `409 CONFLICT`: a duplicate option combination.

**Requires scope:** `catalog:write`

Required scope: `catalog:write`

## Parameters

| Name | In | Type | Required |
|---|---|---|---|
| `id` | path | string | yes |

## Request body

```
{
  variants: {
  active?: boolean
  name?: string
  options: { ... }[]
  retail_price?: integer
  sku?: string
}[]
}
```

## Response (201)

```
{
  data: { ... }[]
}
```

Errors follow the standard error envelope: https://getolet.com/resources/developers/errors.md

## Example

```bash
curl -X POST "https://api.oletapp.com/your-store/v1/products/{id}/variants" \
  -H "Authorization: Bearer olet_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"variants":[]}'
```
