ProductVariantReq
constructor
Properties
id
stringThe id of an existing product variant. If provided, the details of the product variant will be updated. If not, a new product variant will be created.
title
stringThe title of the product variant.
sku
stringThe unique SKU of the product variant.
ean
stringThe EAN number of the product variant.
upc
stringThe UPC number of the product variant.
barcode
stringA generic GTIN field of the product variant.
hs_code
stringThe Harmonized System code of the product variant.
inventory_quantity
numberThe amount of stock kept of the product variant.
allow_backorder
booleanWhether the product variant can be purchased when out of stock.
manage_inventory
booleanWhether Medusa should keep track of the inventory of this product variant.
weight
numberThe weight of the product variant.
length
numberThe length of the product variant.
height
numberThe height of the product variant.
width
numberThe width of the product variant.
origin_country
stringThe country of origin of the product variant.
mid_code
stringThe Manufacturer Identification code of the product variant.
material
stringThe material composition of the product variant.
metadata
Record<string, unknown>An optional set of key-value pairs with additional information.
prices
ProductVariantPricesUpdateReq[]An array of product variant prices. A product variant can have different prices for each region or currency code.
prices
ProductVariantPricesUpdateReq[]options
ProductVariantOptionReq[]An array of Product Option values that the variant corresponds to.Default: []
options
ProductVariantOptionReq[][]
Was this section helpful?