Skip to main content

productVariant Query

Look up a product variant by ID or SKU.

Requires one of the following permissions to include the unpublished items: MANAGE_ORDERSMANAGE_DISCOUNTSMANAGE_PRODUCTS
productVariant(
id: ID
sku: String
externalReference: String
channel: String
): ProductVariant
Details
type ProductVariant implements Node, ObjectWithMetadata, ObjectWithAttributes {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(
key: String!
): String
privateMetafields(
keys: [String!]
): Metadata
metadata: [MetadataItem!]!
metafield(
key: String!
): String
metafields(
keys: [String!]
): Metadata
assignedAttribute(
slug: String!
): AssignedAttribute
assignedAttributes(
limit: PositiveInt = 100
): [AssignedAttribute!]!
name: String!
sku: String
product: Product!
trackInventory: Boolean!
quantityLimitPerCustomer: Int
weight: Weight
channel: String
channelListings: [ProductVariantChannelListing!]
pricing(
address: AddressInput
): VariantPricingInfo
attributes(
variantSelection: VariantAttributeScope
): [SelectedAttribute!]! @deprecated
margin: Int
quantityOrdered: Int
revenue(
period: ReportingPeriod
): TaxedMoney
images: [ProductImage!] @deprecated
media: [ProductMedia!]
translation(
languageCode: LanguageCodeEnum!
): ProductVariantTranslation
stocks(
address: AddressInput
countryCode: CountryCode
): [Stock!]
quantityAvailable(
address: AddressInput
countryCode: CountryCode
): Int
preorder: PreorderData
created: DateTime!
updatedAt: DateTime!
externalReference: String
}

Arguments

id ● ID

ID of the product variant.

sku ● String

SKU of the product variant.

externalReference ● String

External ID of the product.

channel ● String

Slug of a channel for which the data should be returned.

Type

ProductVariant

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