Skip to main content
Version: 202201

Create Variant

POST 

/openapi/2022-01/products/:product_id/variants

Create a new product variant with the specified details.

Request

Path Parameters

    product_id stringrequired

    Product's ID

Body

    variant object
    option1string

    The first style value of the variant

    option2string

    The second style value of the variant

    option3string

    The second style value of the variant

    image_idstring
    compare_at_pricestring

    Variant original price, used for comparison with the actual price, can be converted to float64, supports only two decimal places

    pricestring

    Variant actual price, can be converted to float64, supports only two decimal places, set to "0.00" if price needs to be empty

    positionint32required
    skustring
    barcodestring
    notestring
    inventory_quantityint32
    weightstring
    weight_unitstring

    Weight unit, supports kg, g, lb, oz

    cost_pricestring
    wholesale_price object[]
  • Array [
  • pricestring
    min_quantityint32

    Mini Order Quantity

  • ]

Responses

200

Schema
    variant object
    idstring
    Example: 1b735278-62c7-41ad-9976-b1b63a90590d
    product_idstring
    Example: 636a07da-39eb-4829-bde9-b65fae1c28b0
    image_idstring
    Example: 91d032e7-bbc8-47e4-8668-9ba6fe714de6
    created_atstring
    Example: 2024-04-15T02:00:57Z
    updated_atstring
    Example: 2024-04-15T02:00:57Z
    titlestring
    Example: S-red
    option1string
    Example: S
    option2string
    Example: red
    option3string
    Example:
    image object
    srcstring
    Example: //cdn.shoplazza.com/efd33b921cacd5311a32dd03a9bc8740.png
    widthinteger
    Default value: 0
    Example: 1588
    heightinteger
    Default value: 0
    Example: 2246
    pathstring
    Example: efd33b921cacd5311a32dd03a9bc8740.png
    altstring
    Example:
    positioninteger
    Default value: 0
    Example: 1
    compare_at_pricestring
    Example: 100.00
    pricestring
    Example: 100.00
    skustring
    Example: S-RED
    barcodestring
    Example: 123
    notestring
    Example: s-red
    inventory_quantityinteger
    Default value: 0
    Example: 10
    weightstring
    Example: 0.10
    weight_unitstring
    Example: kg
    cost_pricestring
    Example: 11.00
    wholesale_price object[]
  • Array [
  • pricestring
    Example: 100.00
    min_quantityinteger
    Default value: 0
    Example: 1
  • ]
  • extend