The input fields for specifying a product variant to create or update.
Access Scopes
Fields
barcode:
String -
The value of the barcode associated with the product.
compareAtPrice:
Money -
The compare-at price of the variant.
id:
ID -
Specifies the product variant to update or create a new variant if absent.
imageId:
ID -
The ID of the image that's associated with the variant. Deprecated as of the 2023-07 release.
imageSrc:
String -
The URL of an image to associate with the variant. This field can only be used through mutations that create product images and must match one of the URLs being created on the product.
Deprecated as of the 2023-07 release.
inventoryItem:
InventoryItemInput -
The inventory item associated with the variant. Used for unit cost.
inventoryPolicy:
ProductVariantInventoryPolicy -
Whether customers are allowed to place an order for the product variant when it's out of stock.
inventoryQuantities:
InventoryLevelInput -
The inventory quantities at each location where the variant is stocked. Supported as input with the `productVariantCreate` mutation only.
mediaId:
ID -
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:
String -
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:
MetafieldInput -
Additional customizable information about the product variant.
options:
String -
The custom properties that a shop owner uses to define product variants.
position:
Int -
The order of the product variant in the list of product variants. The first position in the list is 1.
privateMetafields:
PrivateMetafieldInput -
The private metafields associated with the product.
productId:
ID -
The product to create the variant for. Used as input only to the `productVariantCreate` mutation.
requiresComponents:
Boolean -
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.
taxCode:
String -
The tax code associated with the variant.
taxable:
Boolean -
Whether the variant is taxable.