v1

latestOpenAPI 3.0.12026-08-0620949.4 KB
Variants

Creates or updates a variant

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.

post/api/v1/languages/{language_id}/variants

Path parameters

language_idstring required

Request body

Example request

{
  "variant": {
    "title": "My Variant",
    "article_code": "V1234",
    "default": true,
    "ean": "4012345012345",
    "main_image": "www.example.com/my_variant_image.bmp",
    "price_cost": 10.52,
    "price_excl": 9.95,
    "price_incl": 10.52,
    "unit_price": 10.52,
    "unit_unit": "kilo",
    "sku": "ABC-DE-FGH-IJ",
    "stock_level": 12
  }
}

Response

Variant successfully saved

messagestring

Example response

{
  "variant": {
    "title": "My Variant",
    "article_code": "V1234",
    "default": true,
    "ean": "4012345012345",
    "main_image": "www.example.com/my_variant_image.bmp",
    "price_cost": 10.52,
    "price_excl": 9.95,
    "price_incl": 10.52,
    "unit_price": 10.52,
    "unit_unit": "kilo",
    "sku": "ABC-DE-FGH-IJ",
    "stock_level": 12
  },
  "message": "Variant successfully saved"
}