ProductVariant object
Represents a product variant.
Required access
read_products access scope.
On this page
- Connections
- Fields
- Types that return ProductVariant
- Mutations for ProductVariant
- Implements
- Deprecated fields
- Samples
Connections
- media (
[MediaConnection!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/media))
The media associated with the product variant.
- metafields (
[MetafieldConnection!](https://shopify.dev/docs/admin-api/graphql/reference/metafields/metafieldconnection))
A paginated list of metafields associated with the resource.
- presentmentPrices (
[ProductVariantPricePairConnection!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariantpricepair))
List of prices and compare-at prices in the presentment currencies for this shop.
- privateMetafields (
[PrivateMetafieldConnection!](https://shopify.dev/docs/admin-api/graphql/reference/metafields/privatemetafieldconnection))
List of private metafields.
Fields
- availableForSale (
[Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
Whether the product variant is available for sale. - barcode (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
The value of the barcode associated with the product. - compareAtPrice (
[Money](https://shopify.dev/docs/admin-api/graphql/reference/scalar#money-2021-01))
The compare-at price of the variant in the default shop currency. - createdAt (
[DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01))
The date and time when the variant was created. - defaultCursor (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
A default cursor for use in pagination. - deliveryProfile (
[DeliveryProfile](https://shopify.dev/docs/admin-api/graphql/reference/shipping-and-fulfillment/deliveryprofile))
The delivery profile for the variant. - displayName (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
Display name of the variant, based on product’s title + variant’s title. - fulfillmentService (
[FulfillmentService](https://shopify.dev/docs/admin-api/graphql/reference/shipping-and-fulfillment/fulfillmentservice))
The fulfillment service associated with the product. - fulfillmentServiceEditable (
[EditableProperty!](https://shopify.dev/docs/admin-api/graphql/reference/shipping-and-fulfillment/editableproperty))
Whether changes to the fulfillment service for the product variant are allowed. - id (
[ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01))
Globally unique identifier. - image (
[Image](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/image))
The featured image for the variant.
- inventoryItem (
[InventoryItem!](https://shopify.dev/docs/admin-api/graphql/reference/inventory/inventoryitem))
The inventory item, which is used to query for inventory information. - inventoryPolicy (
[ProductVariantInventoryPolicy!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariantinventorypolicy))
Whether customers are allowed to place an order for the product variant when it’s out of stock. - inventoryQuantity (
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
The total sellable quantity of the variant. - legacyResourceId (
[UnsignedInt64!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#unsignedint64-2021-01))
The ID of the corresponding resource in the REST Admin API. - metafield (
[Metafield](https://shopify.dev/docs/admin-api/graphql/reference/metafields/metafield))
The metafield associated with the resource.
- position (
[Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
The order of the product variant in the list of product variants. The first position in the list is 1. - price (
[Money!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#money-2021-01))
The price of the product variant in the default shop currency. - privateMetafield (
[PrivateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/metafields/privatemetafield))
Returns a private metafield found by namespace and key.
- product (
[Product!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/product))
The product that this variant belongs to. - selectedOptions (
[[SelectedOption!]!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/selectedoption))
List of product options applied to the variant. - sellingPlanGroupCount (
[Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
Count of selling plan groups associated with the product variant. - sku (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
An identifier for the product variant in the shop. Required in order to connect to a fulfillment service. - storefrontId (
[StorefrontID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#storefrontid-2021-01))
The storefront ID of the product variant. - taxCode (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
The tax code for the product variant. - taxable (
[Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
Whether a tax is charged when the product variant is sold. - title (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
The title of the product variant. - translations (
[[PublishedTranslation!]!](https://shopify.dev/docs/admin-api/graphql/reference/translations/publishedtranslation))
The translations associated with the resource.
| Argument | Description |
|---|---|
locale( [String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)) REQUIRED |
Filters translations locale. |
- updatedAt (
[DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01))
The date and time (ISO 8601 format) when the product variant was last modified. - weight (
[Float](https://shopify.dev/docs/admin-api/graphql/reference/scalar#float-2021-01))
The weight of the product variant in the unit system specified with weight_unit. - weightUnit (
[WeightUnit!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/weightunit))
The unit of measurement that applies to the product variant’s weight. If you don’t specify a value for weight_unit, then the shop’s default unit of measurement is applied. Valid values:g,kg,oz,lb.
Types that return ProductVariant
[CalculatedDraftOrderLineItem.variant](https://shopify.dev/docs/admin-api/graphql/reference/orders/calculateddraftorderlineitem#variant-2021-01)[CalculatedLineItem.variant](https://shopify.dev/docs/admin-api/graphql/reference/orders/calculatedlineitem#variant-2021-01)[DeliveryProfileItem.variants](https://shopify.dev/docs/admin-api/graphql/reference/shipping-and-fulfillment/deliveryprofileitem#variants-2021-01)[DiscountProducts.productVariants](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/discountproducts#productvariants-2021-01)[DraftOrderLineItem.variant](https://shopify.dev/docs/admin-api/graphql/reference/orders/draftorderlineitem#variant-2021-01)[InventoryItem.variant](https://shopify.dev/docs/admin-api/graphql/reference/inventory/inventoryitem#variant-2021-01)[LineItem.variant](https://shopify.dev/docs/admin-api/graphql/reference/orders/lineitem#variant-2021-01)[LineItemMutable.variant](https://shopify.dev/docs/admin-api/graphql/reference/orders/lineitemmutable#variant-2021-01)[OrderStagedChangeAddVariant.variant](https://shopify.dev/docs/admin-api/graphql/reference/orders/orderstagedchangeaddvariant#variant-2021-01)[PriceRuleItemEntitlements.productVariants](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/priceruleitementitlements#productvariants-2021-01)[PriceRuleLineItemPrerequisites.productVariants](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/pricerulelineitemprerequisites#productvariants-2021-01)[Product.variants](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/product#variants-2021-01)[QueryRoot.productVariant](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/queryroot#productvariant-2021-01)[QueryRoot.productVariants](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/queryroot#productvariants-2021-01)[SellingPlanGroup.productVariants](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/sellingplangroup#productvariants-2021-01)
Mutations for ProductVariant
- productVariantAppendMedia
Appends media from a product to variants of the product. - productVariantCreate
Creates a product variant. - productVariantDelete
Deletes a product variant. - productVariantDetachMedia
Deletes media from product variants. - productVariantJoinSellingPlanGroups
Adds multiple selling plan groups to a product variant. - productVariantLeaveSellingPlanGroups
Remove multiple groups from a product variant. - productVariantUpdate
Updates a product variant.
Implements
[HasMetafields](https://shopify.dev/docs/admin-api/graphql/reference/metafields/hasmetafields)[HasPublishedTranslations](https://shopify.dev/docs/admin-api/graphql/reference/translations/haspublishedtranslations)[LegacyInteroperability](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/legacyinteroperability)[Navigable](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/navigable)[Node](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/node)
Deprecated fields
Show/Hide
An auto-generated type for paginating through multiple ProductVariants.
On this page
Fields
- edges (
[[ProductVariantEdge!]!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant))
A list of edges. - pageInfo (
[PageInfo!](https://shopify.dev/docs/admin-api/graphql/reference/pageinfo))
Information to aid in pagination.
An auto-generated type which holds one ProductVariant and a cursor during pagination.
On this page
Fields
- cursor (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
A cursor for use in pagination. - node (
[ProductVariant!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant))
The item at the end of ProductVariantEdge.
Types that return ProductVariantEdge
[ProductVariantConnection.edges](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant#edges-2021-01)
