Skip to main content
Log inSign up
object

Requires read_products access scope.

Represents a product variant.

Anchor to Fields and connectionsFields and connections

Boolean!non-null

Whether the product variant is available for sale.

The value of the barcode associated with the product.

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

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.

DateTime!non-null

The date and time when the variant was created.

String!non-null

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

The delivery profile for the variant.

String!non-null

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

ID!non-null

A globally-unique ID.

The featured image for the variant.

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

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

The total sellable quantity of the variant.

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

The media associated with the product variant.

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

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

Int!non-null

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

Money!non-null

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

Product!non-null

The product that this variant belongs to.

Anchor to productVariantComponentsproductVariantComponents

A list of the product variant components.

Boolean!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.

List of product options applied to the variant.

Anchor to sellableOnlineQuantitysellableOnlineQuantity
Int!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.

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

Anchor to sellingPlanGroupsCountsellingPlanGroupsCount

Count of selling plan groups associated with the product variant.

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

Boolean!non-null

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

The tax code for the product variant.

String!non-null

The title of the product variant.

The published translations associated with the resource.

DateTime!non-null

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

Show
deprecated fields and connections Deprecated

The fulfillment service that stocks a product variant.

This is a third-party fulfillment service if the following conditions are met:

  • The product variant is stocked by a single fulfillment service.
  • The FulfillmentService is a third-party fulfillment service. Third-party fulfillment services don't have a handle with the value manual.
  • The fulfillment service hasn't opted into SKU sharing.

If the conditions aren't met, then the fulfillment service has the manual handle. The relationship between a product variant and a fulfillment service was changed in the 2022-07 API version. A ProductVariant can be stocked by multiple fulfillment services. As a result, we recommend that you use the inventoryItem field if you need to determine where a product variant is stocked.

If you need to determine whether a product is a gift card, then you should use product.isGiftCard.

Learn more about managing inventory quantities and states.

Anchor to fulfillmentServiceEditablefulfillmentServiceEditable
EditableProperty!non-nullDeprecated

Whether changes to the fulfillment service for the product variant are allowed. The relationship between a product variant and a fulfillment service was changed in the 2022-07 API version. A ProductVariant can be stocked by multiple fulfillment services. As a result, the fulfillment_service is no longer directly editable on a ProductVariant and this field is no longer applicable.

Anchor to harmonizedSystemCodeharmonizedSystemCode
StringDeprecated

The Harmonized System Code (or HS Tariff Code) for the variant. Use inventoryItem.harmonizedSystemCode instead.

The fulfillment service that tracks the number of items in stock for the product variant. Use inventoryItem.tracked instead.

Anchor to metafieldDefinitionsmetafieldDefinitions

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

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

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.

PrivateMetafieldConnection!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.

Boolean!non-nullDeprecated

Whether a customer needs to provide a shipping address when placing an order for the product variant. Use inventoryItem.requiresShipping instead.

Anchor to sellingPlanGroupCountsellingPlanGroupCount
Int!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.

FloatDeprecated

The weight of the product variant in the unit system specified with weight_unit. Use inventoryItem.measurement.weight.value instead

WeightUnit!non-nullDeprecated

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. Use inventoryItem.measurement.weight.unit instead


Was this section helpful?

query

Returns a ProductVariant resource by ID.

query

Returns a list of product variants.


Was this section helpful?

mutation

Appends media from a product to variants of the product.

mutation

Detaches media from product variants.

mutation

Adds multiple selling plan groups to a product variant.

mutation

Remove multiple groups from a product variant.

mutation

Creates new bundles, updates existing bundles, and removes bundle components for one or multiple bundles.

mutation

Creates multiple variants in a single product. This mutation can be called directly or via the bulkOperation.

mutation

Updates multiple variants in a single product. This mutation can be called directly or via the bulkOperation.

mutation

Updates quantity pricing on a price list. You can use the quantityPricingByVariantUpdate mutation to set fixed prices, quantity rules, and quantity price breaks. This mutation does not allow partial successes. If any of the requested resources fail to update, none of the requested resources will be updated. Delete operations are executed before create operations.

Show
deprecated mutations Deprecated
mutationDeprecated

Creates a product variant. Use productVariantsBulkCreate instead.

mutationDeprecated

Updates a product variant. Use productVariantsBulkUpdate instead.


Was this section helpful?