ProductVariant
A Product Variant represents a Product with a specific set of Product Option configurations. The maximum number of Product Variants that a Product can have is given by the number of available Product Option combinations. A product must at least have one product variant.
Properties
id
stringRequiredThe product variant's ID
created_at
DateRequiredThe date with timezone at which the resource was created.
updated_at
DateRequiredThe date with timezone at which the resource was updated.
deleted_at
null | DateRequiredThe date with timezone at which the resource was deleted.
title
stringRequiredA title that can be displayed for easy identification of the Product Variant.
product_id
stringRequiredThe ID of the product that the product variant belongs to.
The details of the product that the product variant belongs to.
The details of the prices of the Product Variant, each represented as a Money Amount. Each Money Amount represents a price in a given currency or a specific Region.
sku
null | stringRequiredThe unique stock keeping unit used to identify the Product Variant. This will usually be a unique identifer for the item that is to be shipped, and can be referenced across multiple systems.
barcode
null | stringRequiredA generic field for a GTIN number that can be used to identify the Product Variant.
ean
null | stringRequiredAn EAN barcode number that can be used to identify the Product Variant.
upc
null | stringRequiredA UPC barcode number that can be used to identify the Product Variant.
variant_rank
null | numberRequiredThe ranking of this variant
Default: 0
inventory_quantity
numberRequiredThe current quantity of the item that is stocked.
allow_backorder
booleanRequiredWhether the Product Variant should be purchasable when
inventory\_quantity
is 0.Default: false
manage_inventory
booleanRequiredWhether Medusa should manage inventory for the Product Variant.
Default: true
hs_code
null | stringRequiredThe Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.
origin_country
null | stringRequiredThe country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.
mid_code
null | stringRequiredThe Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.
material
null | stringRequiredThe material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.
weight
null | numberRequiredThe weight of the Product Variant. May be used in shipping rate calculations.
length
null | numberRequiredThe length of the Product Variant. May be used in shipping rate calculations.
height
null | numberRequiredThe height of the Product Variant. May be used in shipping rate calculations.
width
null | numberRequiredThe width of the Product Variant. May be used in shipping rate calculations.
The details of the product options that this product variant defines values for.
The details inventory items of the product variant.
metadata
null | Record<string, unknown>RequiredAn optional key-value map with additional details
purchasable
booleanOnly used with the inventory modules.
A boolean value indicating whether the Product Variant is purchasable.
A variant is purchasable if:
- inventory is not managed
- it has no inventory items
- it is in stock
- it is backorderable.
Was this section helpful?