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

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

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

•String

A filter made up of terms, connectives, modifiers, and comparators. 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
Anchor to 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.

Example:

  • false
  • true
Anchor to created_at
•time

Filter by the date and time when the event happened.

Example:

  • created_at:>2020-10-21
  • created_at:<now
•id

Filter by id range.

Example:

  • id:1234
  • id:>=1234
  • id:<=1234
Anchor to subject_type
•string

The resource type affected by this event. See EventSubjectType for possible values.

Example:

  • PRODUCT_VARIANT
  • PRODUCT
  • COLLECTION

•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

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•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

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

•String!
required

The key for the metafield.


•MetafieldConnection!
non-null

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

Arguments

•String

The metafield namespace to filter by. If omitted, the app-reserved namespace will be used.

•[String!]

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

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•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

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•String

A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.

Anchor to default
•string

Filter by a case-insensitive search of multiple fields in a document.

Example:

  • query=Bob Norman
  • query=title:green hoodie
Anchor to barcode
•string

Filter by the product variant barcode field.

Example:

  • barcode:ABC-abc-1234
Anchor to bundles
•boolean

Filter by a product bundle. A product bundle is a set of two or more related products, which are commonly offered at a discount.

Example:

  • bundles:true
Anchor to category_id
•string

Filter by the product category ID (product.category.id). A product category is the category of a product from Shopify's Standard Product Taxonomy.

Example:

  • category_id:sg-4-17-2-17
Anchor to collection_id
•id

Filter by the collection id field.

Example:

  • collection_id:108179161409
Anchor to combined_listing_role
•string

Filter by the role of the product in a combined listing.

Valid values:

  • parent
  • child
  • no_role

Example:

  • combined_listing_role:parent
Anchor to created_at
•time

Filter by the date and time when the product was created.

Example:

  • created_at:>'2020-10-21T23:39:20Z'
  • created_at:<now
  • created_at:<='2024'
Anchor to delivery_profile_id
•id

Filter by the delivery profile id field.

Example:

  • delivery_profile_id:108179161409
Anchor to error_feedback
•string

Filter by products with publishing errors.

Anchor to gift_card
•boolean

Filter by the product isGiftCard field.

Example:

  • gift_card:true
•string

Filter by a comma-separated list of product handles.

Example:

  • handle:the-minimal-snowboard
Anchor to has_only_composites
•boolean

Filter by products that have only composite variants.

Example:

  • has_only_composites:true
Anchor to has_only_default_variant
•boolean

Filter by products that have only a default variant. A default variant is the only variant if no other variants are specified.

Example:

  • has_only_default_variant:true
Anchor to has_variant_with_components
•boolean

Filter by products that have variants with associated components.

Example:

  • has_variant_with_components:true
•id

Filter by id range.

Example:

  • id:1234
  • id:>=1234
  • id:<=1234
Anchor to inventory_total
•integer

Filter by inventory count.

Example:

  • inventory_total:0
  • inventory_total:>150
  • inventory_total:>=200
Anchor to is_price_reduced
•boolean

Filter by products that have a reduced price. For more information, refer to the CollectionRule object.

Example:

  • is_price_reduced:true
Anchor to metafields.{namespace}.{key}
•mixed

Filters resources by metafield value. Format: metafields.{namespace}.{key}:{value}. Learn more about querying by metafield value.

Example:

  • metafields.custom.on_sale:true
  • metafields.product.material:"gid://shopify/Metaobject/43458085"
Anchor to out_of_stock_somewhere
•boolean

Filter by products that are out of stock in at least one location.

Example:

  • out_of_stock_somewhere:true
•bigdecimal

Filter by the product variant price field.

Example:

  • price:100.57
Anchor to product_configuration_owner
•string

Filter by the app id field.

Example:

  • product_configuration_owner:10001
Anchor to product_publication_status
•string

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

Valid values:

  • * {channel_app_id}-approved
  • * {channel_app_id}-rejected
  • * {channel_app_id}-needs_action
  • * {channel_app_id}-awaiting_review
  • * {channel_app_id}-published
  • * {channel_app_id}-demoted
  • * {channel_app_id}-scheduled
  • * {channel_app_id}-provisionally_published

Example:

  • product_publication_status:189769876-approved
Anchor to product_type
•string

Filter by a comma-separated list of product types.

Example:

  • product_type:snowboard
Anchor to publication_ids
•string

Filter by a comma-separated list of publication IDs that are associated with the product.

Example:

  • publication_ids:184111530305,184111694145
Anchor to 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.

Valid values:

  • * {channel_app_id}-unset
  • * {channel_app_id}-pending
  • * {channel_app_id}-approved
  • * {channel_app_id}-not_approved

Example:

  • publishable_status:580111-unset
  • publishable_status:580111-pending
Anchor to published_at
•time

Filter by the date and time when the product was published to the online store and other sales channels.

Example:

  • published_at:>2020-10-21T23:39:20Z
  • published_at:<now
  • published_at:<=2024
Anchor to 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 the channel app ID (Channel.app.id) with suffixes: - {channel_app_id}-published: Returns resources published to the specified channel. - {channel_app_id}-visible: Same as {channel_app_id}-published (kept for backwards compatibility). - {channel_app_id}-intended: Returns resources added to the channel but not yet published. - {channel_app_id}-hidden: Returns resources not added to the channel or not published. Other: - unavailable: Returns resources not published to any channel.

Valid values:

  • online_store_channel
  • published
  • visible
  • unpublished
  • * {channel_app_id}-published
  • * {channel_app_id}-visible
  • * {channel_app_id}-intended
  • * {channel_app_id}-hidden
  • unavailable

Example:

  • published_status:online_store_channel
  • published_status:published
  • published_status:580111-published
  • published_status:580111-hidden
  • published_status:unavailable
•string

Filter by the product variant sku field. Learn more about SKUs.

Example:

  • sku:XYZ-12345
•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.

Valid values:

  • active Default
  • archived
  • draft

Example:

  • status:active,draft
•string

Filter objects by the tag field.

Example:

  • tag:my_tag
Anchor to tag_not
•string

Filter by objects that don’t have the specified tag.

Example:

  • tag_not:my_tag
•string

Filter by the product title field.

Example:

  • title:The Minimal Snowboard
Anchor to updated_at
•time

Filter by the date and time when the product was last updated.

Example:

  • updated_at:>'2020-10-21T23:39:20Z'
  • updated_at:<now
  • updated_at:<='2024'
Anchor to variant_id
•id

Filter by the product variant id field.

Example:

  • variant_id:45779434701121
Anchor to variant_title
•string

Filter by the product variant title field.

Example:

  • variant_title:'Special ski wax'
•string

Filter by the origin or source of the product. Learn more about vendors and managing vendor information.

Example:

  • vendor:Snowdevil
  • vendor:Snowdevil OR vendor:Icedevil

Anchor to productVariantComponentsproductVariantComponents
•ProductVariantComponentConnection!
non-null

A list of the product variant components.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•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

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•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

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

Anchor to metafieldDefinitionsmetafieldDefinitions
•MetafieldDefinitionConnection!
non-nullDeprecated

Arguments

•String

Filter metafield definitions by namespace.

•MetafieldDefinitionPinnedStatus
Default:ANY

Filter by the definition's pinned status.

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

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

•String

A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.

Anchor to default
•string

Filter by a case-insensitive search of multiple fields in a document.

Example:

  • query=Bob Norman
  • query=title:green hoodie
Anchor to created_at
•time

Filter by the date and time when the metafield definition was created.

Example:

  • created_at:>2020-10-21T23:39:20Z
  • created_at:<now
  • created_at:<=2024
•id

Filter by id range.

Example:

  • id:1234
  • id:>=1234
  • id:<=1234
•string

Filter by the metafield definition key field.

Example:

  • key:some-key
Anchor to namespace
•string

Filter by the metafield definition namespace field.

Example:

  • namespace:some-namespace
Anchor to owner_type
•string

Filter by the metafield definition ownerType field.

Example:

  • owner_type:PRODUCT
•string

Filter by the metafield definition type field.

Example:

  • type:single_line_text_field
Anchor to updated_at
•time

Filter by the date and time when the metafield definition was last updated.

Example:

  • updated_at:>2020-10-21T23:39:20Z
  • updated_at:<now
  • updated_at:<=2024

•ProductVariantPricePairConnection!
non-nullDeprecated

Arguments

Anchor to presentmentCurrenciespresentmentCurrencies
•[CurrencyCode!]

The presentment currencies prices should return in.

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•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

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

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

•String

A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.

Anchor to default
•string

Filter by a case-insensitive search of multiple fields in a document.

Example:

  • query=Bob Norman
  • query=title:green hoodie
Anchor to barcode
•string

Filter by the product variant barcode field.

Example:

  • barcode:ABC-abc-123
Anchor to collection
•string

Filter by the ID of the collection that the product variant belongs to.

Example:

  • collection:465903092033
Anchor to delivery_profile_id
•id

Filter by the product variant delivery profile ID (ProductVariant.deliveryProfile.id).

Example:

  • delivery_profile_id:108179161409
Anchor to exclude_composite
•boolean

Filter by product variants that aren't composites.

Example:

  • exclude_composite:true
Anchor to exclude_variants_with_components
•boolean

Filter by whether there are components that are associated with the product variants in a bundle.

Example:

  • exclude_variants_with_components:true
Anchor to gift_card
•boolean

Filter by the product isGiftCard field.

Example:

  • gift_card:true
•id

Filter by id range.

Example:

  • id:1234
  • id:>=1234
  • id:<=1234
Anchor to inventory_quantity
•integer

Filter by an aggregate of inventory across all locations where the product variant is stocked.

Example:

  • inventory_quantity:10
Anchor to location_id
•id

Filter by the location ID for the product variant.

Example:

  • location_id:88511152449
Anchor to managed
•boolean

Filter by whether there is fulfillment service tracking associated with the product variants.

Example:

  • managed:true
Anchor to managed_by
•string

Filter by the fulfillment service that tracks the number of items in stock for the product variant.

Example:

  • managed_by:shopify
Anchor to option1
•string

Filter by a custom property that a shop owner uses to define product variants.

Example:

  • option1:small
Anchor to option2
•string

Filter by a custom property that a shop owner uses to define product variants.

Example:

  • option2:medium
Anchor to option3
•string

Filter by a custom property that a shop owner uses to define product variants.

Example:

  • option3:large
Anchor to product_id
•id

Filter by the product id field.

Example:

  • product_id:8474977763649
Anchor to product_ids
•string

Filter by a comma-separated list of product IDs.

Example:

  • product_ids:8474977763649,8474977796417
Anchor to product_publication_status
•string

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

Valid values:

  • * {channel_app_id}-approved
  • * {channel_app_id}-rejected
  • * {channel_app_id}-needs_action
  • * {channel_app_id}-awaiting_review
  • * {channel_app_id}-published
  • * {channel_app_id}-demoted
  • * {channel_app_id}-scheduled
  • * {channel_app_id}-provisionally_published

Example:

  • product_publication_status:189769876-approved
Anchor to product_status
•string

Filter by a comma-separated list of product statuses.

Example:

  • product_status:ACTIVE,DRAFT
Anchor to product_type
•string

Filter by the product type that's associated with the product variants.

Example:

  • product_type:snowboard
Anchor to 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.

Valid values:

  • * {channel_app_id}-unset
  • * {channel_app_id}-pending
  • * {channel_app_id}-approved
  • * {channel_app_id}-not_approved

Example:

  • publishable_status:580111-unset
  • publishable_status:580111-pending
Anchor to 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 the channel app ID (Channel.app.id) with suffixes: - {channel_app_id}-published: Returns resources published to the specified channel. - {channel_app_id}-visible: Same as {channel_app_id}-published (kept for backwards compatibility). - {channel_app_id}-intended: Returns resources added to the channel but not yet published. - {channel_app_id}-hidden: Returns resources not added to the channel or not published. Other: - unavailable: Returns resources not published to any channel.

Valid values:

  • online_store_channel
  • published
  • visible
  • unpublished
  • * {channel_app_id}-published
  • * {channel_app_id}-visible
  • * {channel_app_id}-intended
  • * {channel_app_id}-hidden
  • unavailable

Example:

  • published_status:online_store_channel
  • published_status:published
  • published_status:580111-published
  • published_status:580111-hidden
  • published_status:unavailable
Anchor to requires_components
•boolean

Filter by whether the product variant can only be purchased with components. Learn more.

Example:

  • requires_components:true
•string

Filter by the product variant sku field. Learn more about SKUs.

Example:

  • sku:XYZ-12345
•string

Filter objects by the tag field.

Example:

  • tag:my_tag
Anchor to tag_not
•string

Filter by objects that don’t have the specified tag.

Example:

  • tag_not:my_tag
Anchor to taxable
•boolean

Filter by the product variant taxable field.

Example:

  • taxable:false
•string

Filter by the product variant title field.

Example:

  • title:ice
Anchor to updated_at
•time

Filter by date and time when the product variant was updated.

Example:

  • updated_at:>2020-10-21T23:39:20Z
  • updated_at:<now
  • updated_at:<=2024
•string

Filter by the origin or source of the product variant. Learn more about vendors and managing vendor information.

Example:

  • vendor:Snowdevil
  • vendor:Snowdevil OR vendor:Icedevil
•ID

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



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

•[ProductVariantsBulkInput!]!
required

An array of product variants to be created.

•ID!
required

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

•[CreateMediaInput!]

List of new media to be added to the product.

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


•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

•[ProductVariantsBulkInput!]!
required

An array of product variants to update.

•ID!
required

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

•[CreateMediaInput!]

List of new media to be added to the product.

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


•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

•ID!
required

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

•QuantityPricingByVariantUpdateInput!
required

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



Was this section helpful?