CreateProductVariantDTO

A product variant to create.

titlestring
The tile of the product variant.
product_idstringOptional
The id of the product
skustringOptional
The SKU of the product variant.
barcodestringOptional
The barcode of the product variant.
eanstringOptional
The EAN of the product variant.
upcstringOptional
The UPC of the product variant.
allow_backorderbooleanOptional
Whether the product variant can be ordered when it's out of stock.
manage_inventorybooleanOptional
Whether the product variant's inventory should be managed by the core system.
inventory_itemsCreateProductVariantInventoryKit[]Optional
The variant's inventory items. It's only available if manage_inventory is enabled.
hs_codestringOptional
The HS Code of the product variant.
origin_countrystringOptional
The origin country of the product variant.
mid_codestringOptional
The MID Code of the product variant.
materialstringOptional
The material of the product variant.
weightnumberOptional
The weight of the product variant.
lengthnumberOptional
The length of the product variant.
heightnumberOptional
The height of the product variant.
widthnumberOptional
The width of the product variant.
optionsRecord<string, string>Optional
The options of the variant. Each key is an option's title, and value is an option's value. If an option with the specified title doesn't exist, a new one is created.
metadataMetadataTypeOptional
Holds custom data in key-value pairs.
Was this page helpful?
Edit this page
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break