Skip to main content
Log inSign up
query

Returns a ProductVariant resource by ID.

•
ID!required

The ID of the ProductVariant to return.


Was this section helpful?

•

Represents a product variant.

availableForSale•
non-null

Whether the product variant is available for sale.

barcode•

The value of the barcode associated with the product.

compareAtPrice•

The compare-at price of the variant in the default shop currency.

contextualPricing•
non-null

The pricing that applies for a customer in a given context. As of API version 2025-04, only active markets are considered in the price resolution.

createdAt•
non-null

The date and time when the variant was created.

defaultCursor•
non-null

A default cursor that returns the single next record, sorted ascending by ID.

deliveryProfile•

The delivery profile for the variant.

displayName•
non-null

Display name of the variant, based on product's title + variant's title.

events•
non-null

The paginated list of events associated with the host subject.

id•
non-null

A globally-unique ID.

image•

The featured image for the variant.

inventoryItem•
non-null

The inventory item, which is used to query for inventory information.

inventoryPolicy•
non-null

Whether customers are allowed to place an order for the product variant when it's out of stock.

inventoryQuantity•

The total sellable quantity of the variant.

legacyResourceId•
non-null

The ID of the corresponding resource in the REST Admin API.

media•
non-null

The media associated with the product variant.

metafield•

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

metafields•
non-null

A list of custom fields that a merchant associates with a Shopify resource.

position•
non-null

The order of the product variant in the list of product variants. The first position in the list is 1.

price•
non-null

The price of the product variant in the default shop currency.

product•
non-null

The product that this variant belongs to.

productVariantComponents•
non-null

A list of the product variant components.

requiresComponents•
non-null

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.

selectedOptions•
non-null

List of product options applied to the variant.

sellableOnlineQuantity•
non-null

The total sellable quantity of the variant for online channels. This doesn't represent the total available inventory or capture limitations based on customer location.

sellingPlanGroups•
non-null

A list of all selling plan groups defined in the current shop associated with the product variant.

sellingPlanGroupsCount•

Count of selling plan groups associated with the product variant.

sku•

A case-sensitive identifier for the product variant in the shop. Required in order to connect to a fulfillment service.

taxable•
non-null

Whether a tax is charged when the product variant is sold.

taxCode•

The tax code for the product variant.

title•
non-null

The title of the product variant.

translations•
non-null

The published translations associated with the resource.

unitPriceMeasurement•

The unit price measurement for the variant.

updatedAt•
non-null

The date and time (ISO 8601 format) when the product variant was last modified.

metafieldDefinitions•
non-nullDeprecated

List of metafield definitions. This field will be removed in a future version. Use the root metafieldDefinitions field instead.

presentmentPrices•
non-nullDeprecated

List of prices and compare-at prices in the presentment currencies for this shop. Use contextualPricing instead.

privateMetafield•
Deprecated

Returns a private metafield by namespace and key that belongs to the resource. Metafields created using a reserved namespace are private by default. See our guide for migrating private metafields.

privateMetafields•
non-nullDeprecated

List of private metafields that belong to the resource. Metafields created using a reserved namespace are private by default. See our guide for migrating private metafields.

sellingPlanGroupCount•
non-nullDeprecated

Count of selling plan groups associated with the product variant. Use sellingPlanGroupsCount instead.

storefrontId•
non-nullDeprecated

The Storefront GraphQL API ID of the ProductVariant.

As of the 2022-04 version release, the Storefront GraphQL API will no longer return Base64 encoded IDs to match the behavior of the Admin GraphQL API. Therefore, you can safely use the id field's value instead. Use id instead.


Was this section helpful?