Skip to main content

ProductVariant

Represents a version of a product such as different size or color.

type ProductVariant implements Node, ObjectWithMetadata {
id: ID!
metadata: [MetadataItem!]!
privateMetadata: [MetadataItem!]!
name: String!
sku: String
nauticalStockNumber: String!
trackInventory: Boolean!
overrideCurrency: Boolean!
isPriceOverrideAllowed: Boolean!
isDigital: Boolean!
isShippingRequired: Boolean!
isPublished: Boolean!
publishedAt: DateTime
createdAt: DateTime!
updatedAt: DateTime!
seoTitle: String
seoDescription: String
externalId: String
externalSource: String
allowBackorders: Boolean
auditEvents(
before: String
after: String
first: Int
last: Int
): ProductVariantAuditEventCountableConnection!
timeline(
kinds: [TimelineEntryKind!]
): [TimelineEntry!]!
currency: String!
status: ProductVariantStatus!
subStatus: ProductSubStatusEnum
dimensions: ProductDimensions
warnings: [WarningMessageItem!]!
weight: Weight
pricing: VariantPricingInfo
product: Product!
seller: Seller
images: [ProductImage!]!
attributes: [SelectedAttribute!]!
customFields: [SelectedAttribute!]!
price: Money
costPrice: Money
margin: Int
digitalContent: DigitalContent
stocks(
countryCode: CountryCode
): [Stock!]!
quantityAvailable(
countryCode: CountryCode
): Int!
isBundle: Boolean!
bundleItems: [BundleItem!]!
bundleAvailableQuantity(
countryCode: CountryCode
): Int!
quantityOrdered: Int
netRevenue: Float
grossRevenue: Float
sortOrderInCollection: Int
availableImages: [ProductImage!]!
documents: [Document!]!
stockEvents: [StockEvent!]!
sales: [Sale!]!
vouchers: [Voucher!]!
webhookHistory(
before: String
after: String
first: Int
last: Int
): ShopifyWebhookTransactionCountableConnection!
}
Show more ↓

Fields​

ProductVariant.id ● ID! non-null scalar​

The Globally Unique ID of this object

ProductVariant.metadata ● [MetadataItem!]! non-null object​

List of public metadata items. Can be accessed without permissions.

ProductVariant.privateMetadata ● [MetadataItem!]! non-null object​

List of private metadata items. Requires proper staff permissions to access.

ProductVariant.name ● String! non-null scalar​

Name of the variant

ProductVariant.sku ● String scalar​

Stock Keeping Unit

ProductVariant.nauticalStockNumber ● String! non-null scalar​

Nautical Stock Number (NSN)

ProductVariant.trackInventory ● Boolean! non-null scalar​

Whether to track inventory for this variant

ProductVariant.overrideCurrency ● Boolean! non-null scalar​

Whether to override the default currency

ProductVariant.isPriceOverrideAllowed ● Boolean! non-null scalar​

Whether price override is allowed

ProductVariant.isDigital ● Boolean! non-null scalar​

Whether this is a digital product variant

ProductVariant.isShippingRequired ● Boolean! non-null scalar​

Whether shipping is required for this variant

ProductVariant.isPublished ● Boolean! non-null scalar​

Whether the product variant is published

ProductVariant.publishedAt ● DateTime scalar​

When the variant was published

ProductVariant.createdAt ● DateTime! non-null scalar​

When the variant was created

ProductVariant.updatedAt ● DateTime! non-null scalar​

When the variant was last updated

ProductVariant.seoTitle ● String scalar​

SEO title

ProductVariant.seoDescription ● String scalar​

SEO meta description

ProductVariant.externalId ● String scalar​

External system identifier

ProductVariant.externalSource ● String scalar​

External system source

ProductVariant.allowBackorders ● Boolean scalar​

Whether backorders are allowed

ProductVariant.auditEvents ● ProductVariantAuditEventCountableConnection! non-null object​

Database-level audit trail for this variant (requires MANAGE_PRODUCTS).

ProductVariant.auditEvents.before ● String scalar​

Returns the items in the list that come before the specified cursor.

ProductVariant.auditEvents.after ● String scalar​

Returns the items in the list that come after the specified cursor.

ProductVariant.auditEvents.first ● Int scalar​

Returns the first n items from the list.

ProductVariant.auditEvents.last ● Int scalar​

Returns the items in the list that come after the specified cursor.

ProductVariant.timeline ● [TimelineEntry!]! non-null object​

Unified change-history feed for this variant. Projects pghistory ProductVariantEvent rows (SKU, price, status, inventory changes) into a TimelineEntry list ordered most-recent-first. Powers the dashboard Events page and mirrors the Seller and Order timeline pattern. Requires MANAGE_PRODUCTS. Optional kinds argument filters server-side.

ProductVariant.timeline.kinds ● [TimelineEntryKind!] list enum​

ProductVariant.currency ● String! non-null scalar​

Currency code for pricing. Falls back to the parent product's currency when the variant has none of its own.

ProductVariant.status ● ProductVariantStatus! non-null enum​

Status of the variant

ProductVariant.subStatus ● ProductSubStatusEnum enum​

The sub status of the product variant

ProductVariant.dimensions ● ProductDimensions object​

Product dimensions

ProductVariant.warnings ● [WarningMessageItem!]! non-null object​

List of warnings for this variant

ProductVariant.weight ● Weight object​

Weight of the variant

ProductVariant.pricing ● VariantPricingInfo object​

Variant pricing information for storefront display

ProductVariant.product ● Product! non-null object​

The product this variant belongs to

ProductVariant.seller ● Seller object​

The seller that owns this variant

ProductVariant.images ● [ProductImage!]! non-null object​

List of images assigned to this variant

ProductVariant.attributes ● [SelectedAttribute!]! non-null object​

List of attributes assigned to this variant

ProductVariant.customFields ● [SelectedAttribute!]! non-null object​

List of custom fields assigned to this variant

ProductVariant.price ● Money object​

Base price of the variant (requires MANAGE_PRODUCTS permission)

ProductVariant.costPrice ● Money object​

Cost price of the variant (requires MANAGE_PRODUCTS permission)

ProductVariant.margin ● Int scalar​

Gross margin percentage (requires MANAGE_PRODUCTS permission)

ProductVariant.digitalContent ● DigitalContent object​

Digital content (requires MANAGE_PRODUCTS permission)

ProductVariant.stocks ● [Stock!]! non-null object​

Stock information (requires MANAGE_PRODUCTS or MANAGE_ORDERS)

ProductVariant.stocks.countryCode ● CountryCode enum​

ProductVariant.quantityAvailable ● Int! non-null scalar​

Quantity of variant available for sale

ProductVariant.quantityAvailable.countryCode ● CountryCode enum​

ProductVariant.isBundle ● Boolean! non-null scalar​

Whether this variant belongs to a bundle product. Equivalent to product.isBundle — exposed here so clients can branch on the variant without an additional product lookup.

ProductVariant.bundleItems ● [BundleItem!]! non-null object​

If this variant is a bundle, the list of component variants and their quantities. Empty list for non-bundle variants.

ProductVariant.bundleAvailableQuantity ● Int! non-null scalar​

Derived availability for a bundle variant — min over components of floor(component_available / bundle_item.quantity). Returns the standard quantity_available for non-bundle variants so clients can use this field uniformly.

ProductVariant.bundleAvailableQuantity.countryCode ● CountryCode enum​

ProductVariant.quantityOrdered ● Int scalar​

Total quantity ordered.

ProductVariant.netRevenue ● Float scalar​

Net revenue from sales.

ProductVariant.grossRevenue ● Float scalar​

Gross revenue from sales.

ProductVariant.sortOrderInCollection ● Int scalar​

Variant sort order in the specific collection.

ProductVariant.availableImages ● [ProductImage!]! non-null object​

List of product images available for assignment to a variant.

ProductVariant.documents ● [Document!]! non-null object​

List of documents associated with the product variant.

ProductVariant.stockEvents ● [StockEvent!]! non-null object​

List of stock events associated with the variant.

ProductVariant.sales ● [Sale!]! non-null object​

List of sales associated with the product.

ProductVariant.vouchers ● [Voucher!]! non-null object​

List of vouchers associated with the product.

ProductVariant.webhookHistory ● ShopifyWebhookTransactionCountableConnection! non-null object​

Shopify webhook events related to this variant.

ProductVariant.webhookHistory.before ● String scalar​

Returns the items in the list that come before the specified cursor.

ProductVariant.webhookHistory.after ● String scalar​

Returns the items in the list that come after the specified cursor.

ProductVariant.webhookHistory.first ● Int scalar​

Returns the first n items from the list.

ProductVariant.webhookHistory.last ● Int scalar​

Returns the items in the list that come after the specified cursor.

Interfaces​

Node interface​

An object with a Globally Unique ID

ObjectWithMetadata interface​

An object that supports metadata.

Returned By​

productVariant query

Member Of​

BundleItem object ● CheckoutLine object ● DigitalContent object ● DigitalContentCreate object ● DigitalContentDelete object ● DigitalContentUpdate object ● NauticalOrderLine object ● OrderLine object ● Product object ● ProductVariantBulkCreate object ● ProductVariantCountableEdge object ● ProductVariantCreate object ● ProductVariantDelete object ● ProductVariantImageAssign object ● ProductVariantImageBulkAssign object ● ProductVariantImageUnassign object ● ProductVariantStocksCreate object ● ProductVariantStocksDelete object ● ProductVariantStocksUpdate object ● ProductVariantUpdate object ● ProductVariantVideoAssign object ● ProductVariantVideoUnassign object ● Stock object ● WishlistItem object

Implemented By​

CustomFieldInstance union ● DocumentTargetInstance union

Was this page helpful?