Skip to main content
object

Requires read_products access scope.

The ProductVariant object represents a version of a product that comes in more than one option, such as size or color. For example, if a merchant sells t-shirts with options for size and color, then a small, blue t-shirt would be one product variant and a large, blue t-shirt would be another.

Use the ProductVariant object to manage the full lifecycle and configuration of a product's variants. Common use cases for using the ProductVariant object include:

  • Tracking inventory for each variant
  • Setting unique prices for each variant
  • Assigning barcodes and SKUs to connect variants to fulfillment services
  • Attaching variant-specific images and media
  • Setting delivery and tax requirements
  • Supporting product bundles, subscriptions, and selling plans

A ProductVariant is associated with a parent Product object. ProductVariant serves as the central link between a product's merchandising configuration, inventory, pricing, fulfillment, and sales channels within the GraphQL Admin API schema. Each variant can reference other GraphQL types such as:

Learn more about Shopify's product model.

•Boolean!
non-null

Whether the product variant is available for sale.

•String

The value of the barcode associated with the product.

•Money

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

•ProductVariantContextualPricing!
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.

Arguments

•ContextualPricingContext!
required

The context used to generate contextual pricing for the variant.


•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.

•DeliveryProfile

The delivery profile for the variant.

•String!
non-null

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

•EventConnection!
non-null

The paginated list of events associated with the host subject.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•String

A filter made up of terms, connectives, modifiers, and comparators. | comments | boolean | Whether or not to include comment-events in your search, passing false will exclude comment-events, any other value will include comment-events. | | | - false
- true | | created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - created_at:>2025-10-21
- created_at:<now | | id | id | Filter by id range. | | | - id:1234
- id:>=1234
- id:<=1234 | | subject_type | string | The resource type affected by this event. See EventSubjectType for possible values. | | | - PRODUCT_VARIANT
- PRODUCT
- COLLECTION | You can apply one or more filters to a query. Learn more about Shopify API search syntax.

•string

The action that occured.

Example:

  • action:create
•Boolean
Default:false

Reverse the order of the underlying list.

•EventSortKeys
Default:ID

Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.


•ID!
non-null

A globally-unique ID.

•InventoryItem!
non-null

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

•ProductVariantInventoryPolicy!
non-null

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

•Int

The total sellable quantity of the variant.

•UnsignedInt64!
non-null

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

•MediaConnection!
non-null

The media associated with the product variant.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.


•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.

Arguments

•String!
required

The key for the metafield.

•String

The container the metafield belongs to. If omitted, the app-reserved namespace will be used.


•MetafieldConnection!
non-null

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

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•[String!]

List of keys of metafields in the format namespace.key, will be returned in the same format.

•Int

The last n elements from the paginated list.

•String

The metafield namespace to filter by. If omitted, all metafields are returned.

•Boolean
Default:false

Reverse the order of the underlying list.


•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.

•ProductConnection!
non-null

A list of products that have product variants that contain this variant as a product component.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•String

A filter made up of terms, connectives, modifiers, and comparators.

nametypedescriptionacceptable_valuesdefault_valueexample_use
defaultstringFilter by a case-insensitive search of multiple fields
in a document.- query=Bob Norman
- query=title:green hoodie
barcodestringFilter by the product variant barcode
field.- barcode:ABC-abc-1234
bundlesbooleanFilter by a [product
bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles).
A product bundle is a set of two or more related products, which are
commonly offered at a discount.- bundles:true
category_idstringFilter by the product category ID
(product.category.id). A product category is the category of a product
from Shopify's Standard Product Taxonomy.
- category_id:sg-4-17-2-17
collection_ididFilter by the collection id
field.- collection_id:108179161409
combined_listing_rolestringFilter by the role of the product in a combined listing.
- parent
- child
- no_role
-
combined_listing_role:parent
created_attimeFilter by the date and time when the product was
created.- created_at:>'2020-10-21T23:39:20Z'
-
created_at:<now
- created_at:<='2024'
delivery_profile_ididFilter by the delivery profile id
field.- delivery_profile_id:108179161409
error_feedbackstringFilter by products with publishing errors.
gift_cardbooleanFilter by the product isGiftCard
field.- gift_card:true
handlestringFilter by a comma-separated list of product handles.
- handle:the-minimal-snowboard
has_only_compositesbooleanFilter by products that have only
composite variants.- has_only_composites:true
has_only_default_variantbooleanFilter by products that have only a
default variant. A default variant is the only variant if no other variants
are specified.- has_only_default_variant:true
has_variant_with_componentsbooleanFilter by products that have
variants with associated components.-
has_variant_with_components:true
ididFilter by id range.- id:1234
- id:>=1234
- id:<=1234
inventory_totalintegerFilter by inventory count.-
inventory_total:0
- inventory_total:>150
-
inventory_total:>=200
is_price_reducedbooleanFilter by products that have a reduced price.
For more information, refer to the CollectionRule
object.- is_price_reduced:true
metafields.{namespace}.{key}mixedFilters resources by metafield
value. Format: metafields.{namespace}.{key}:{value}. Learn more about
querying by metafield value.
- metafields.custom.on_sale:true
-
metafields.product.material:"gid://shopify/Metaobject/43458085"
out_of_stock_somewherebooleanFilter by products that are out of
stock in at least one location.- out_of_stock_somewhere:true
pricebigdecimalFilter by the product variant price
field.- price:100.57
product_configuration_ownerstringFilter by the app
id
field.- product_configuration_owner:10001
product_publication_statusstringFilter by channel approval process
status of the resource on a channel, such as the online store. The value is
a composite of the channel app ID
(Channel.app.id) and one of the valid values. For simple visibility checks, use published_status
instead.- * {channel_app_id}-approved
- `*
{channel_app_id}-rejected<br/> - * {channel_app_id}-needs_action`
-
* {channel_app_id}-awaiting_review
- `*
{channel_app_id}-published<br/> - * {channel_app_id}-demoted<br/> - *
{channel_app_id}-scheduled<br/> - *
{channel_app_id}-provisionally_published`-
product_publication_status:189769876-approved
product_typestringFilter by a comma-separated list of [product
types](https://help.shopify.com/manual/products/details/product-type).
  • product_type:snowboard | | publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - publication_ids:184111530305,184111694145 | | publishable_status | string | Deprecated: This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use published_status for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the channel app ID (Channel.app.id) and one of the valid status values. | - * {channel_app_id}-unset
    - * {channel_app_id}-pending
    - * {channel_app_id}-approved
    - * {channel_app_id}-not_approved | | - publishable_status:580111-unset
    - publishable_status:580111-pending | | published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - published_at:>2020-10-21T23:39:20Z
    - published_at:<now
    - published_at:<=2024 | | published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - online_store_channel: Returns all resources in the online store channel, regardless of publication status. - published/visible: Returns resources that are published to the online store. - unpublished: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, channel app ID (Channel.app.id), or app handle with suffixes: - {id_or_handle}-published: Returns resources published to the specified channel. - {id_or_handle}-visible: Same as {id_or_handle}-published (kept for backwards compatibility). - {id_or_handle}-intended: Returns resources added to the channel but not yet published. - {id_or_handle}-hidden: Returns resources not added to the channel or not published. Other: - unavailable: Returns resources not published to any channel. | - online_store_channel
    - published
    - visible
  • unpublished
    - * {channel_id_or_handle}-published
    - * {channel_id_or_handle}-visible
    - * {channel_id_or_handle}-intended
    - * {channel_id_or_handle}-hidden
    - * {channel_app_id_or_handle}-published
    - * {channel_app_id_or_handle}-visible
    - * {channel_app_id_or_handle}-intended
    - * {channel_app_id_or_handle}-hidden
    - unavailable | | - published_status:online_store_channel
    - published_status:published
    - published_status:580111-published
  • published_status:580111-hidden
    - published_status:my-channel-handle-published
    - published_status:unavailable | | sku | string | Filter by the product variant sku field. Learn more about SKUs. | | | - sku:XYZ-12345 | | status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an ACTIVE status in online stores, sales channels, and apps. | - active
    - archived
    - draft | active | - status:active,draft | | tag | string | Filter objects by the tag field. | | | - tag:my_tag | | tag_not | string | Filter by objects that don’t have the specified tag. | | | - tag_not:my_tag | | title | string | Filter by the product title field. | | | - title:The Minimal Snowboard | | tracks_inventory | boolean | Filter by products that have inventory tracking enabled. | | | - tracks_inventory:true | | updated_at | time | Filter by the date and time when the product was last updated. | | | - updated_at:>'2020-10-21T23:39:20Z'
    - updated_at:<now
    - updated_at:<='2024' | | variant_id | id | Filter by the product variant id field. | | | - variant_id:45779434701121 | | variant_title | string | Filter by the product variant title field. | | | - variant_title:'Special ski wax' | | vendor | string | Filter by the origin or source of the product. Learn more about vendors and managing vendor information. | | | - vendor:Snowdevil
    - vendor:Snowdevil OR vendor:Icedevil | You can apply one or more filters to a query. Learn more about Shopify API search syntax.
•Boolean
Default:false

Reverse the order of the underlying list.


Anchor to productVariantComponentsproductVariantComponents
•ProductVariantComponentConnection!
non-null

A list of the product variant components.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.


•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.

•[SelectedOption!]!
non-null

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.

•SellingPlanGroupConnection!
non-null

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

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.


Anchor to sellingPlanGroupsCountsellingPlanGroupsCount
•Count

Count of selling plan groups associated with the product variant.

•Boolean!
non-null

Whether to show the unit price for this product variant.

•String

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.

•String!
non-null

The title of the product variant.

•[Translation!]!
non-null

The published translations associated with the resource.

Arguments

•String!
required

Filters translations locale.

•ID

Filters translations by market ID. Use this argument to retrieve content specific to a market.


•MoneyV2

The unit price value for the variant based on the variant measurement.

Anchor to unitPriceMeasurementunitPriceMeasurement
•UnitPriceMeasurement

The unit price measurement for the variant.

•DateTime!
non-null

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

Deprecated fields

•Image
Deprecated

Arguments

•CropRegion
Deprecated
•Int
Deprecated
•Int
Deprecated
•Int
DeprecatedDefault:1

Anchor to metafieldDefinitionsmetafieldDefinitions
•MetafieldDefinitionConnection!
non-nullDeprecated

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•String

Filter metafield definitions by namespace.

•MetafieldDefinitionPinnedStatus
Default:ANY

Filter by the definition's pinned status.

•String

A filter made up of terms, connectives, modifiers, and comparators.

nametypedescriptionacceptable_valuesdefault_valueexample_use
defaultstringFilter by a case-insensitive search of multiple fields
in a document.- query=Bob Norman
- query=title:green hoodie
created_attimeFilter by the date and time when the metafield
definition was created.- created_at:>2020-10-21T23:39:20Z
-
created_at:<now
- created_at:<=2024
ididFilter by id range.- id:1234
- id:>=1234
- id:<=1234
keystringFilter by the metafield definition key
field.- key:some-key
namespacestringFilter by the metafield definition namespace
field.- namespace:some-namespace
owner_typestringFilter by the metafield definition ownerType
field.- owner_type:PRODUCT
typestringFilter by the metafield definition type
field.- type:single_line_text_field
updated_attimeFilter by the date and time when the metafield
definition was last updated.- updated_at:>2020-10-21T23:39:20Z
  • updated_at:<now
    - updated_at:<=2024 | You can apply one or more filters to a query. Learn more about Shopify API search syntax.
•Boolean
Default:false

Reverse the order of the underlying list.

•MetafieldDefinitionSortKeys
Default:ID

Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.


•ProductVariantPricePairConnection!
non-nullDeprecated

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

Anchor to presentmentCurrenciespresentmentCurrencies
•[CurrencyCode!]

The presentment currencies prices should return in.

•Boolean
Default:false

Reverse the order of the underlying list.


Anchor to sellingPlanGroupCountsellingPlanGroupCount
•Int!
non-nullDeprecated
•StorefrontID!
non-nullDeprecated
•String
Deprecated

Was this section helpful?

•query

Retrieves a product variant by its ID.

A product variant is a specific version of a product that comes in more than one option, such as size or color. For example, if a merchant sells t-shirts with options for size and color, then a small, blue t-shirt would be one product variant and a large, blue t-shirt would be another.

Use the productVariant query when you need to:

  • Access essential product variant data (for example, title, price, image, and metafields).
  • Build product detail pages and manage inventory.
  • Handle international sales with localized pricing and content.
  • Manage product variants that are part of a bundle or selling plan.

Learn more about working with Shopify's product model.

Arguments

•ID!
required

The ID of the ProductVariant to return.


•query

Return a product variant by an identifier.

Arguments

•ProductVariantIdentifierInput!
required

The identifier of the product variant.


•query

Retrieves a list of product variants associated with a product.

A product variant is a specific version of a product that comes in more than one option, such as size or color. For example, if a merchant sells t-shirts with options for size and color, then a small, blue t-shirt would be one product variant and a large, blue t-shirt would be another.

Use the productVariants query when you need to:

  • Search for product variants by attributes such as SKU, barcode, or inventory quantity.
  • Filter product variants by attributes, such as whether they're gift cards or have custom metafields.
  • Fetch product variants for bulk operations, such as updating prices or inventory.
  • Preload data for product variants, such as inventory items, selected options, or associated products.

The productVariants query supports pagination to handle large product catalogs and saved searches for frequently used product variant queries.

The productVariants query returns product variants with their associated metadata, including:

  • Basic product variant information (for example, title, SKU, barcode, price, and inventory)
  • Media attachments (for example, images and videos)
  • Associated products, selling plans, bundles, and metafields

Learn more about working with Shopify's product model.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•String

A filter made up of terms, connectives, modifiers, and comparators.

nametypedescriptionacceptable_valuesdefault_valueexample_use
defaultstringFilter by a case-insensitive search of multiple fields
in a document.- query=Bob Norman
- query=title:green hoodie
barcodestringFilter by the product variant barcode
field.- barcode:ABC-abc-123
collectionstringFilter by the ID of the collection
that the product variant belongs to.- collection:465903092033
delivery_profile_ididFilter by the product variant delivery profile ID
(ProductVariant.deliveryProfile.id).-
delivery_profile_id:108179161409
exclude_compositebooleanFilter by product variants that aren't composites.- exclude_composite:true
exclude_variants_with_componentsbooleanFilter by whether there are components
that are associated with the product variants in a bundle.-
exclude_variants_with_components:true
gift_cardbooleanFilter by the product isGiftCard
field.- gift_card:true
ididFilter by id range.- id:1234
- id:>=1234
- id:<=1234
inventory_quantityintegerFilter by an aggregate of inventory across
all locations where the product variant is stocked.-
inventory_quantity:10
location_ididFilter by the [location
ID](https://shopify.dev/api/admin-graphql/latest/objects/Location#field-id)
for the product variant.- location_id:88511152449
managedbooleanFilter by whether there is fulfillment service
tracking associated with the product variants.- managed:true
managed_bystringFilter by the fulfillment service that tracks the
number of items in stock for the product variant.-
managed_by:shopify
option1stringFilter by a custom property that a shop owner uses to
define product variants.- option1:small
option2stringFilter by a custom property that a shop owner uses to
define product variants.- option2:medium
option3stringFilter by a custom property that a shop owner uses to
define product variants.- option3:large
product_ididFilter by the product id
field.- product_id:8474977763649
product_idsstringFilter by a comma-separated list of product IDs.
- product_ids:8474977763649,8474977796417
product_publication_statusstringFilter by channel approval process
status of the resource on a channel, such as the online store. The value is
a composite of the channel app ID
(Channel.app.id) and one of the valid values. For simple visibility checks, use published_status
instead.- * {channel_app_id}-approved
- `*
{channel_app_id}-rejected<br/> - * {channel_app_id}-needs_action`
-
* {channel_app_id}-awaiting_review
- `*
{channel_app_id}-published<br/> - * {channel_app_id}-demoted<br/> - *
{channel_app_id}-scheduled<br/> - *
{channel_app_id}-provisionally_published`-
product_publication_status:189769876-approved
product_statusstringFilter by a comma-separated list of product statuses.
- product_status:ACTIVE,DRAFT
product_typestringFilter by the product type that's associated with
the product variants.- product_type:snowboard
-
product_type:snowboard,skis
- `product_type:snowboard OR
product_type:skis`
publishable_statusstringDeprecated: This parameter is deprecated
as of 2025-12 and will be removed in a future API version. Use published_status
for visibility checks. Filter by the publishable status of the resource on a
channel. The value is a composite of the [channel app
ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price)
(Channel.app.id) and one of the valid status values.- `*
{channel_app_id}-unset<br/> - * {channel_app_id}-pending<br/> - *
{channel_app_id}-approved<br/> - * {channel_app_id}-not_approved`-
publishable_status:580111-unset
- publishable_status:580111-pending
published_statusstringFilter resources by their visibility and
publication state on a channel. Online store channel filtering: -
online_store_channel: Returns all resources in the online store channel,
regardless of publication status. - published/visible: Returns resources
that are published to the online store. - unpublished: Returns resources
that are not published to the online store. Channel-specific filtering using
a channel ID, channel handle, [channel app
ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price)
(Channel.app.id), or app handle with suffixes: -
{id_or_handle}-published: Returns resources published to the specified
channel. - {id_or_handle}-visible: Same as {id_or_handle}-published
(kept for backwards compatibility). - {id_or_handle}-intended: Returns
resources added to the channel but not yet published. -
{id_or_handle}-hidden: Returns resources not added to the channel or not
published. Other: - unavailable: Returns resources not published to any
channel.- online_store_channel
- published
- visible
  • unpublished
    - * {channel_id_or_handle}-published
    - * {channel_id_or_handle}-visible
    - * {channel_id_or_handle}-intended
    - * {channel_id_or_handle}-hidden
    - * {channel_app_id_or_handle}-published
    - * {channel_app_id_or_handle}-visible
    - * {channel_app_id_or_handle}-intended
    - * {channel_app_id_or_handle}-hidden
    - unavailable | | - published_status:online_store_channel
    - published_status:published
    - published_status:580111-published
  • published_status:580111-hidden
    - published_status:my-channel-handle-published
    - published_status:unavailable | | requires_components | boolean | Filter by whether the product variant can only be purchased with components. Learn more. | | | - requires_components:true | | sku | string | Filter by the product variant sku field. Learn more about SKUs. | | | - sku:XYZ-12345 | | tag | string | Filter objects by the tag field. | | | - tag:my_tag | | tag_not | string | Filter by objects that don’t have the specified tag. | | | - tag_not:my_tag | | taxable | boolean | Filter by the product variant taxable field. | | | - taxable:false | | title | string | Filter by the product variant title field. | | | - title:ice | | updated_at | time | Filter by date and time when the product variant was updated. | | | - updated_at:>2020-10-21T23:39:20Z
    - updated_at:<now
    - updated_at:<=2024 | | vendor | string | Filter by the origin or source of the product variant. Learn more about vendors and managing vendor information. | | | - vendor:Snowdevil
    - vendor:Snowdevil,Icedevil
    - vendor:Snowdevil OR vendor:Icedevil | You can apply one or more filters to a query. Learn more about Shopify API search syntax.
•Boolean
Default:false

Reverse the order of the underlying list.

•ID

The ID of a saved search. The search’s query string is used as the query argument.

•ProductVariantSortKeys
Default:ID

Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.



Was this section helpful?

•mutation

Appends existing media from a product to specific variants of that product, creating associations between media files and particular product options. This allows different variants to showcase relevant images or videos.

For example, a t-shirt product might have color variants where each color variant displays only the images showing that specific color, helping customers see exactly what they're purchasing.

Use ProductVariantAppendMedia to:

  • Associate specific images with product variants for accurate display
  • Build variant-specific media management in product interfaces
  • Implement automated media assignment based on variant attributes

The operation links existing product media to variants without duplicating files, maintaining efficient media storage while enabling variant-specific displays.

Learn more about product variants.

Arguments

•ID!
required

Specifies the product associated to the media.

•[ProductVariantAppendMediaInput!]!
required

A list of pairs of variants and media to be attached to the variants.


•mutation

Detaches media from product variants.

Arguments

•ID!
required

Specifies the product to which the variants and media are associated.

•[ProductVariantDetachMediaInput!]!
required

A list of pairs of variants and media to be deleted from the variants.


•mutation

Adds multiple selling plan groups to a product variant.

Arguments

•ID!
required

The ID of the product variant.

•[ID!]!
required

The IDs of the selling plan groups to add.


•mutation

Remove multiple groups from a product variant.

Arguments

•ID!
required

The ID of the product variant.

•[ID!]!
required

The IDs of the selling plan groups to leave.


•mutation

Creates new bundles, updates component quantities in existing bundles, and removes bundle components for one or multiple ProductVariant objects.

Each bundle variant can contain up to 30 component variants with specified quantities. After an app assigns components to a bundle, only that app can manage those components.


Note

For most use cases, use productBundleCreate instead, which creates product fixed bundles. productVariantRelationshipBulkUpdate is for variant fixed bundles, where each variant has its own component configuration.


Arguments

•[ProductVariantRelationshipUpdateInput!]!
required

The input options for the product variant being updated.


•mutation

Creates multiple product variants for a single product in one operation. You can run this mutation directly or as part of a bulk operation for large-scale catalog updates.

Use the productVariantsBulkCreate mutation to efficiently add new product variants—such as different sizes, colors, or materials—to an existing product. The mutation is helpful if you need to add product variants in bulk, such as importing from an external system.

The mutation supports:

  • Creating variants with custom option values
  • Associating media (for example, images, videos, and 3D models) with the product or its variants
  • Handling complex product configurations

Note

By default, stores have a limit of 2048 product variants for each product.


After creating variants, you can make additional changes using one of the following mutations:

  • productVariantsBulkUpdate: Updates multiple product variants for a single product in one operation.
  • productSet: Used to perform multiple operations on products, such as creating or modifying product options and variants.

You can also specifically manage product options through related mutations:

Learn more about the product model and adding product data.

Arguments

•[CreateMediaInput!]

List of new media to be added to the product.

•ID!
required

The ID of the product on which to create the variants.

•ProductVariantsBulkCreateStrategy
Default: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.

•[ProductVariantsBulkInput!]!
required

An array of product variants to be created.


•mutation

Updates multiple product variants for a single product in one operation. You can run this mutation directly or as part of a bulk operation for large-scale catalog updates.

Use the productVariantsBulkUpdate mutation to efficiently modify product variants—such as different sizes, colors, or materials—associated with an existing product. The mutation is helpful if you need to update a product's variants in bulk, such as importing from an external system.

The mutation supports:

  • Updating variants with custom option values
  • Associating media (for example, images, videos, and 3D models) with the product or its variants
  • Handling complex product configurations

Note

By default, stores have a limit of 2048 product variants for each product.


After creating variants, you can make additional changes using the productSet mutation, which is used to perform multiple operations on products, such as creating or modifying product options and variants.

You can also specifically manage product options through related mutations:

Learn more about the product model and adding product data.

Arguments

•Boolean
Default:false

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.

•[CreateMediaInput!]

List of new media to be added to the product.

•ID!
required

The ID of the product associated with the variants to update.

•[ProductVariantsBulkInput!]!
required

An array of product variants to update.


•mutation

Updates quantity pricing on a PriceList for specific ProductVariant objects. You can set fixed prices (see PriceListPrice), quantity rules, and quantity price breaks in a single operation.

QuantityRule objects define minimum, maximum, and increment constraints for ordering. QuantityPriceBreak objects offer tiered pricing based on purchase volume.

The mutation executes delete operations before create operations and doesn't allow partial updates.


Note

If any requested change fails, then the mutation doesn't apply any of the changes.


Arguments

•QuantityPricingByVariantUpdateInput!
required

The input data used to update the quantity pricing in the price list.

•ID!
required

The ID of the price list for which quantity pricing will be updated.



Was this section helpful?

•interface

Was this section helpful?