Skip to main content
Version: 202201

Update Variant

PUT 

/openapi/2022-01/variants/:variant_id

Update an existing product variant with the provided details.

Request

Path Parameters

    variant_id stringrequired

    Variant's ID

Body

    variant object
    option1string

    The first style value of the variant

    option2string

    The second style value of the variant

    option3string

    The third style value of the variant

    image object

    Variant image, mandatory if need_variant_image is true

    srcstringrequired

    Image's URL

    widthint32

    Image's width in px

    heightint32

    Image's height in px

    altstring

    Image's alt

    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

    skustring

    SKU

    barcodestring

    The barcode of the variant.

    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: 88e68830-4ef5-4125-bf7d-aef8047176b2
    product_idstring
    Example: a1a88be0-a1d4-47e4-a2f2-ba6e131cf447
    image_idstring
    Example: 8ef098c5-5a08-44b4-b5fb-89214bb507dc
    created_atstring
    Example: 2024-04-17T02:15:18Z
    updated_atstring
    Example: 2024-04-17T02:15:18Z
    titlestring
    Example: S-blue-T
    option1string
    Example: S
    option2string
    Example: blue
    option3string
    Example: T
    image object
    srcstring
    Example: //cdn.shoplazza.com/ccf0794c594bad32a320eea0d6bfe40c.jpeg
    widthinteger
    Default value: 0
    Example: 174
    heightinteger
    Default value: 0
    Example: 180
    pathstring
    Example: ccf0794c594bad32a320eea0d6bfe40c.jpeg
    altstring
    Example:
    positioninteger
    Default value: 0
    Example: 1
    compare_at_pricestring
    Example: 12.10
    pricestring
    Example: 10.10
    skustring
    Example: T-M-S-blue-T-A001004
    barcodestring
    Example: 6929000212340
    notestring
    Example: node
    inventory_quantityinteger
    Default value: 0
    Example: 10
    weightstring
    Example: 1.10
    weight_unitstring
    Example: kg
    cost_pricestring
    Example: 1.10
    wholesale_price object[]
  • Array [
  • pricestring
    Example: 10.10
    min_quantityinteger
    Default value: 0
    Example: 1
  • ]
  • extend object
    lengthinteger
    Default value: 0
    Example: 10
    widthinteger
    Default value: 0
    Example: 10
    heightinteger
    Default value: 0
    Example: 10
    dimension_unitstring
    Example: in
    origin_country_codestring
    Example: AG
    hs_codestring
    Example: 62114390