Skip to main content
Skip to main content

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

allow_backorderbooleanRequired
Whether the Product Variant should be purchasable when inventory\_quantity is 0.

Default: false

barcodenull | stringRequired
A generic field for a GTIN number that can be used to identify the Product Variant.
created_atDateRequired
The date with timezone at which the resource was created.
deleted_atnull | DateRequired
The date with timezone at which the resource was deleted.
eannull | stringRequired
An EAN barcode number that can be used to identify the Product Variant.
heightnull | numberRequired
The height of the Product Variant. May be used in shipping rate calculations.
hs_codenull | stringRequired
The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.
idstringRequired
The product variant's ID
inventory_itemsProductVariantInventoryItem[]Required
The details inventory items of the product variant.
inventory_quantitynumberRequired
The current quantity of the item that is stocked.
lengthnull | numberRequired
The length of the Product Variant. May be used in shipping rate calculations.
manage_inventorybooleanRequired
Whether Medusa should manage inventory for the Product Variant.

Default: true

materialnull | stringRequired
The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.
metadatanull | Record<string, unknown>Required
An optional key-value map with additional details
mid_codenull | stringRequired
The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.
optionsProductOptionValue[]Required
The details of the product options that this product variant defines values for.
origin_countrynull | stringRequired
The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.
pricesMoneyAmount[]Required
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.
productProductRequired
The details of the product that the product variant belongs to.
product_idstringRequired
The ID of the product that the product variant belongs to.
purchasableboolean
Only 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.
skunull | stringRequired
The 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.
titlestringRequired
A title that can be displayed for easy identification of the Product Variant.
upcnull | stringRequired
A UPC barcode number that can be used to identify the Product Variant.
updated_atDateRequired
The date with timezone at which the resource was updated.
variant_ranknull | numberRequired
The ranking of this variant

Default: 0

weightnull | numberRequired
The weight of the Product Variant. May be used in shipping rate calculations.
widthnull | numberRequired
The width of the Product Variant. May be used in shipping rate calculations.
Was this section helpful?