---
title: "Creates or updates a variant"
method: POST
path: "/api/v1/languages/{language_id}/variants"
tags: ["Variants"]
---

# Creates or updates a variant

`POST /api/v1/languages/{language_id}/variants`

Creates a new variant or updates an existing variant based on the variant's `id`. The product with id `product_id` is linked to this variant. When the product does not exist, a stub product is created.

## Path parameters

- `language_id` string, required

## Request body

- object
  - `variant` Variant
    - `id` union, required
      - string
      - integer
    - `title` string
    - `article_code` string
    - `default` boolean
    - `ean` string
    - `main_image` string, url
    - `price_cost` number, double
    - `price_excl` number, double
    - `price_incl` number, double
    - `unit_price` number, double
    - `unit_unit` string
    - `sku` string
    - `stock_level` integer
    - `product_id` union, required
      - string
      - integer
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Response `200`

Variant successfully saved

- object
  - `variant` Variant
    - `id` union, required
      - string
      - integer
    - `title` string
    - `article_code` string
    - `default` boolean
    - `ean` string
    - `main_image` string, url
    - `price_cost` number, double
    - `price_excl` number, double
    - `price_incl` number, double
    - `unit_price` number, double
    - `unit_unit` string
    - `sku` string
    - `stock_level` integer
    - `product_id` union, required
      - string
      - integer
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `message` string

## Other responses

- `400` — Missing required parameters or unknown parameters
- `401` — Not authorized
- `404` — Language not found
- `500` — Unexpected error

---

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