BaseProductVariant

Properties#

idstring
The variant's ID.
titlenull | string
The variant's title.
skunull | string
The variant's SKU.
barcodenull | string
The variant's barcode.
eannull | string
The variant's EAN.
upcnull | string
The variant's UPC.
allow_backordernull | boolean
Whether the variant can be ordered even if it's out of stock.
manage_inventorynull | boolean
Whether Medusa manages the variant's inventory. If disabled, the variant is always considered in stock.
hs_codenull | string
The variant's HS code.
origin_countrynull | string
The variant's origin country.
mid_codenull | string
The variant's MID code.
materialnull | string
The variant's material.
weightnull | number
The variant's weight.
lengthnull | number
The variant's length.
heightnull | number
The variant's height.
widthnull | number
The variant's width.
optionsnull | BaseProductOptionValue[]
The variant's values for the product's options.
created_atstring
The date the variant was created.
updated_atstring
The date the variant was updated.
deleted_atnull | string
The date the variant was deleted.
inventory_quantitynumberOptional
The variant's inventory quantity if manage_inventory is enabled.
variant_ranknull | numberOptional
The variant's ranking among its siblings.
productnull | BaseProductOptional
The variant's product.
product_idstringOptional
The ID of the product that the variant belongs to.
calculated_priceBaseCalculatedPriceSetOptional
The variant's calculated price for the provided context.
metadatanull | Record<string, unknown>Optional
Key-value pairs of custom data.
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