stack

Home > @infiniteobjects/shopify-data-manager > AdminTypes > ProductVariantInput

AdminTypes.ProductVariantInput interface

The input fields for specifying a product variant to create or update.

Signature:

export interface ProductVariantInput 

Properties

Property Modifiers Type Description
barcode?   InputMaybe<Scalars[‘String’][‘input’]> (Optional) The value of the barcode associated with the product.
compareAtPrice?   InputMaybe<Scalars[‘Money’][‘input’]> (Optional) The compare-at price of the variant.
harmonizedSystemCode?   InputMaybe<Scalars[‘String’][‘input’]> (Optional) The Harmonized System code (or HS Tariff code) for the variant.
id?   InputMaybe<Scalars[‘ID’][‘input’]> (Optional) Specifies the product variant to update or create a new variant if absent.
inventoryItem?   InputMaybe<InventoryItemInput> (Optional) The inventory item associated with the variant. Used for unit cost.
inventoryPolicy?   InputMaybe<ProductVariantInventoryPolicy | `${ProductVariantInventoryPolicy}`> (Optional) Whether customers are allowed to place an order for the product variant when it’s out of stock.
inventoryQuantities?   InputMaybe<Array<InventoryLevelInput>> (Optional) The inventory quantities at each location where the variant is stocked. Supported as input with the productVariantCreate mutation only.
mediaId?   InputMaybe<Scalars[‘ID’][‘input’]> (Optional) The ID of the media to associate with the variant. This field can only be used in mutations that create media images and must match one of the IDs being created on the product. This field only accepts one value.
mediaSrc?   InputMaybe<Array<Scalars[‘String’][‘input’]>> (Optional) The URL of the media to associate with the variant. This field can only be used in mutations that create media images and must match one of the URLs being created on the product. This field only accepts one value.
metafields?   InputMaybe<Array<MetafieldInput>> (Optional) Additional customizable information about the product variant.
options?   InputMaybe<Array<Scalars[‘String’][‘input’]>> (Optional) The custom properties that a shop owner uses to define product variants.
position?   InputMaybe<Scalars[‘Int’][‘input’]> (Optional) The order of the product variant in the list of product variants. The first position in the list is 1.
price?   InputMaybe<Scalars[‘Money’][‘input’]> (Optional) The price of the variant.
productId?   InputMaybe<Scalars[‘ID’][‘input’]> (Optional) The product to create the variant for. Used as input only to the productVariantCreate mutation.
requiresComponents?   InputMaybe<Scalars[‘Boolean’][‘input’]> (Optional) Whether a product variant requires components. The default value is false. If true, then the product variant can only be purchased as a parent bundle with components and it will be omitted from channels that don’t support bundles.
requiresShipping?   InputMaybe<Scalars[‘Boolean’][‘input’]> (Optional) Whether the variant requires shipping.
sku?   InputMaybe<Scalars[‘String’][‘input’]> (Optional) The SKU for the variant. Case-sensitive string.
taxable?   InputMaybe<Scalars[‘Boolean’][‘input’]> (Optional) Whether the variant is taxable.
taxCode?   InputMaybe<Scalars[‘String’][‘input’]> (Optional) The tax code associated with the variant.
weight?   InputMaybe<Scalars[‘Float’][‘input’]> (Optional) The weight of the variant.
weightUnit?   InputMaybe<WeightUnit | `${WeightUnit}`> (Optional) The unit of weight that’s used to measure the variant.