Product Variant
Requires access scope.
Represents a product variant.
Anchor to Fields and connectionsFields and connections
- Anchor to availableForSaleavailable•Boolean!non-null
For Sale Whether the product variant is available for sale.
- Anchor to barcodebarcode•String
The value of the barcode associated with the product.
- Anchor to compareAtPricecompare•Money
At Price The compare-at price of the variant in the default shop currency.
- Anchor to contextualPricingcontextual•Product
Pricing Variant Contextual Pricing!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.
- Anchor to createdAtcreated•Date
At Time!non-null The date and time when the variant was created.
- Anchor to defaultCursordefault•String!non-null
Cursor A default cursor that returns the single next record, sorted ascending by ID.
- Anchor to deliveryProfiledelivery•Delivery
Profile Profile The delivery profile for the variant.
- Anchor to displayNamedisplay•String!non-null
Name Display name of the variant, based on product's title + variant's title.
- Anchor to eventsevents•Event
Connection!non-null The paginated list of events associated with the host subject.
- •ID!non-null
A globally-unique ID.
- Anchor to imageimage•Image
The featured image for the variant.
- Anchor to inventoryIteminventory•Inventory
Item Item!non-null The inventory item, which is used to query for inventory information.
- Anchor to inventoryPolicyinventory•Product
Policy Variant Inventory Policy!non-null Whether customers are allowed to place an order for the product variant when it's out of stock.
- Anchor to inventoryQuantityinventory•Int
Quantity The total sellable quantity of the variant.
- Anchor to legacyResourceIdlegacy•Unsigned
Resource Id Int64!non-null The ID of the corresponding resource in the REST Admin API.
- Anchor to mediamedia•Media
Connection!non-null The media associated with the product variant.
- Anchor to metafieldmetafield•Metafield
A custom field, including its
namespace
andkey
, that's associated with a Shopify resource for the purposes of adding and storing additional information.- Anchor to metafieldsmetafields•Metafield
Connection!non-null A list of custom fields that a merchant associates with a Shopify resource.
- Anchor to positionposition•Int!non-null
The order of the product variant in the list of product variants. The first position in the list is 1.
- Anchor to priceprice•Money!non-null
The price of the product variant in the default shop currency.
- Anchor to productproduct•Product!non-null
The product that this variant belongs to.
- Anchor to productVariantComponentsproduct•Product
Variant Components Variant Component Connection!non-null A list of the product variant components.
- Anchor to requiresComponentsrequires•Boolean!non-null
Components Whether a product variant requires components. The default value is
false
. Iftrue
, 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.- Anchor to selectedOptionsselected•[Selected
Options Option!]!non-null List of product options applied to the variant.
- Anchor to sellableOnlineQuantitysellable•Int!non-null
Online Quantity 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.
- Anchor to sellingPlanGroupsselling•Selling
Plan Groups Plan Group Connection!non-null A list of all selling plan groups defined in the current shop associated with the product variant.
- Anchor to sellingPlanGroupsCountselling•Count
Plan Groups Count Count of selling plan groups associated with the product variant.
- •String
A case-sensitive identifier for the product variant in the shop. Required in order to connect to a fulfillment service.
- Anchor to taxabletaxable•Boolean!non-null
Whether a tax is charged when the product variant is sold.
- Anchor to taxCodetax•String
Code The tax code for the product variant.
- Anchor to titletitle•String!non-null
The title of the product variant.
- Anchor to translationstranslations•[Translation!]!non-null
The published translations associated with the resource.
- Anchor to unitPriceMeasurementunit•Unit
Price Measurement Price Measurement The unit price measurement for the variant.
- Anchor to updatedAtupdated•Date
At Time!non-null The date and time (ISO 8601 format) when the product variant was last modified.
Deprecated fields and connections
- Anchor to metafieldDefinitionsmetafield•Metafield
Definitions Definition Connection!non-nullDeprecated - Anchor to presentmentPricespresentment•Product
Prices Variant Price Pair Connection!non-nullDeprecated - Anchor to sellingPlanGroupCountselling•Int!non-nullDeprecated
Plan Group Count - Anchor to storefrontIdstorefront•Storefront
Id ID!non-nullDeprecated
Anchor to QueriesQueries
- •query
Returns a ProductVariant resource by ID.
- •query
Return a product variant by an identifier.
- •query
Returns a list of product variants.
Anchor to MutationsMutations
- •mutation
Appends media from a product to variants of the product.
- Anchor to productIdproduct•ID!required
Id Specifies the product associated to the media.
- Anchor to variantMediavariant•[Product
Media Variant Append Media Input!]!required A list of pairs of variants and media to be attached to the variants.
Arguments
- Anchor to productproduct•Product
The product associated with the variants and media.
- Anchor to productVariantsproduct•[Product
Variants Variant!] The product variants that were updated.
- Anchor to userErrorsuser•[Media
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Detaches media from product variants.
- Anchor to productIdproduct•ID!required
Id Specifies the product to which the variants and media are associated.
- Anchor to variantMediavariant•[Product
Media Variant Detach Media Input!]!required A list of pairs of variants and media to be deleted from the variants.
Arguments
- Anchor to productproduct•Product
The product associated with the variants and media.
- Anchor to productVariantsproduct•[Product
Variants Variant!] The product variants that were updated.
- Anchor to userErrorsuser•[Media
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Adds multiple selling plan groups to a product variant.
- •ID!required
The ID of the product variant.
- Anchor to sellingPlanGroupIdsselling•[ID!]!required
Plan Group Ids The IDs of the selling plan groups to add.
Arguments
- Anchor to productVariantproduct•Product
Variant Variant The product variant object.
- Anchor to userErrorsuser•[Selling
Errors Plan Group User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Remove multiple groups from a product variant.
- •ID!required
The ID of the product variant.
- Anchor to sellingPlanGroupIdsselling•[ID!]!required
Plan Group Ids The IDs of the selling plan groups to leave.
Arguments
- Anchor to productVariantproduct•Product
Variant Variant The product variant object.
- Anchor to userErrorsuser•[Selling
Errors Plan Group User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates new bundles, updates existing bundles, and removes bundle components for one or multiple bundles.
- Anchor to inputinput•[Product
Variant Relationship Update Input!]!required The input options for the product variant being updated.
Arguments
- Anchor to parentProductVariantsparent•[Product
Product Variants Variant!] The product variants with successfully updated product variant relationships.
- Anchor to userErrorsuser•[Product
Errors Variant Relationship Bulk Update User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates multiple variants in a single product. This mutation can be called directly or via the bulkOperation.
- Anchor to mediamedia•[Create
Media Input!] List of new media to be added to the product.
- Anchor to productIdproduct•ID!required
Id The ID of the product on which to create the variants.
- Anchor to strategystrategy•Product
Variants Bulk Create StrategyDefault:DEFAULT The strategy defines which behavior the mutation should observe, such as whether to keep or delete the standalone variant (when product has only a single or default variant) when creating new variants in bulk.
- Anchor to variantsvariants•[Product
Variants Bulk Input!]!required An array of product variants to be created.
Arguments
- Anchor to productproduct•Product
The updated product object.
- Anchor to productVariantsproduct•[Product
Variants Variant!] The newly created variants.
- Anchor to userErrorsuser•[Product
Errors Variants Bulk Create User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates multiple variants in a single product. This mutation can be called directly or via the bulkOperation.
- Anchor to allowPartialUpdatesallow•BooleanDefault:false
Partial Updates When partial updates are allowed, valid variant changes may be persisted even if some of the variants updated have invalid data and cannot be persisted. When partial updates are not allowed, any error will prevent all variants from updating.
- Anchor to mediamedia•[Create
Media Input!] List of new media to be added to the product.
- Anchor to productIdproduct•ID!required
Id The ID of the product associated with the variants to update.
- Anchor to variantsvariants•[Product
Variants Bulk Input!]!required An array of product variants to update.
Arguments
- Anchor to productproduct•Product
The updated product object.
- Anchor to productVariantsproduct•[Product
Variants Variant!] The updated variants.
- Anchor to userErrorsuser•[Product
Errors Variants Bulk Update User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates quantity pricing on a price list. You can use the
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.
- Anchor to inputinput•Quantity
Pricing By Variant Update Input!required The input data used to update the quantity pricing in the price list.
- Anchor to priceListIdprice•ID!required
List Id The ID of the price list for which quantity pricing will be updated.
Arguments
- Anchor to productVariantsproduct•[Product
Variants Variant!] The variants for which quantity pricing was created successfully in the price list.
- Anchor to userErrorsuser•[Quantity
Errors Pricing By Variant User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields