---
title: "Add a variant to a product"
method: POST
path: "/api/v1/products/{id}/variants"
tags: ["ProductVariants"]
---

# Add a variant to a product

`POST /api/v1/products/{id}/variants`

## Path parameters

- `id` integer, required — The product ID

## Request body

- V1ProductVariant
  - `id` integer
  - `parent_product_id` integer
  - `product_code` string, nullable
  - `rrp` number, double
  - `is_default_variant` boolean
  - `number_in_stock` integer
  - `price` number, double
  - `product_weight` number, double
  - `condition` string, nullable
  - `gtin` string, nullable
  - `mpn` string, nullable
  - `live` boolean
  - `combination_name` string, nullable
  - `variant_combinations` V1VariantCombination[], nullable
    - `variant_name` string, required
    - `variant_choice` string, required

## Response `201`

The added variant

- TempestResponseListV1ProductVariant
  - `meta` object, nullable
  - `links` TempestLink[], nullable
    - `rel` string, nullable
    - `href` string, nullable
  - `validation_result` TempestValidationError[], nullable
    - `member_names` string[], nullable
    - `error_message` string, nullable
  - `errors` object, nullable
  - `data` V1ProductVariant[], nullable
    - `id` integer
    - `parent_product_id` integer
    - `product_code` string, nullable
    - `rrp` number, double
    - `is_default_variant` boolean
    - `number_in_stock` integer
    - `price` number, double
    - `product_weight` number, double
    - `condition` string, nullable
    - `gtin` string, nullable
    - `mpn` string, nullable
    - `live` boolean
    - `combination_name` string, nullable
    - `variant_combinations` V1VariantCombination[], nullable
      - `variant_name` string, required
      - `variant_choice` string, required

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — No product found

---

[API](https://skmtc.dev/ekm/apis/ekm-partner-api.md) · [All operations](https://skmtc.dev/ekm/apis/ekm-partner-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ekm/ekm-partner-api/revisions/853bef073bb3/schema)
