Home > @infiniteobjects/shopify-data-manager > AdminTypes > ProductVariant
Represents a product variant.
Signature:
export interface ProductVariant extends HasMetafieldDefinitions, HasMetafields, HasPublishedTranslations, LegacyInteroperability, Navigable, Node
Extends: HasMetafieldDefinitions, HasMetafields, HasPublishedTranslations, LegacyInteroperability, Navigable, Node
Property | Modifiers | Type | Description |
---|---|---|---|
availableForSale | Scalars[‘Boolean’][‘output’] | Whether the product variant is available for sale. | |
barcode? | Maybe<Scalars[‘String’][‘output’]> | (Optional) The value of the barcode associated with the product. | |
compareAtPrice? | Maybe<Scalars[‘Money’][‘output’]> | (Optional) The compare-at price of the variant in the default shop currency. | |
contextualPricing | ProductVariantContextualPricing | The pricing that applies for a customer in a given context. | |
createdAt | Scalars[‘DateTime’][‘output’] | The date and time when the variant was created. | |
defaultCursor | Scalars[‘String’][‘output’] | A default cursor that returns the single next record, sorted ascending by ID. | |
deliveryProfile? | Maybe<DeliveryProfile> | (Optional) The delivery profile for the variant. | |
displayName | Scalars[‘String’][‘output’] | Display name of the variant, based on product’s title + variant’s title. | |
fulfillmentService? | Maybe<FulfillmentService> | <p>(Optional) The fulfillment service that stocks a product variant.</p><p>This is a third-party fulfillment service if the following conditions are met: - The product variant is stocked by a single fulfillment service. - The [FulfillmentService](/api/admin-graphql/latest/objects/FulfillmentService) is a third-party fulfillment service. Third-party fulfillment services don’t have a handle with the value manual . - The fulfillment service hasn’t [opted into SKU sharing](/api/admin-graphql/latest/objects/FulfillmentService#field-fulfillmentservice-permitsskusharing).</p><p>If the conditions aren’t met, then the fulfillment service has the manual handle.</p> |
|
fulfillmentServiceEditable | EditableProperty | Whether changes to the fulfillment service for the product variant are allowed. | |
harmonizedSystemCode? | Maybe<Scalars[‘String’][‘output’]> | (Optional) The Harmonized System Code (or HS Tariff Code) for the variant. | |
id | Scalars[‘ID’][‘output’] | A globally-unique ID. | |
image? | Maybe<Image> | (Optional) The featured image for the variant. | |
inventoryItem | InventoryItem | The inventory item, which is used to query for inventory information. | |
inventoryManagement | ProductVariantInventoryManagement | `${ProductVariantInventoryManagement}` | The fulfillment service that tracks the number of items in stock for the product variant. | |
inventoryPolicy | ProductVariantInventoryPolicy | `${ProductVariantInventoryPolicy}` | Whether customers are allowed to place an order for the product variant when it’s out of stock. | |
inventoryQuantity? | Maybe<Scalars[‘Int’][‘output’]> | (Optional) The total sellable quantity of the variant. | |
legacyResourceId | Scalars[‘UnsignedInt64’][‘output’] | The ID of the corresponding resource in the REST Admin API. | |
media | MediaConnection | The media associated with the product variant. | |
metafield? | Maybe<Metafield> | (Optional) Returns a metafield by namespace and key that belongs to the resource. | |
metafieldDefinitions | MetafieldDefinitionConnection | List of metafield definitions. | |
metafields | MetafieldConnection | List of metafields that belong to the resource. | |
position | Scalars[‘Int’][‘output’] | The order of the product variant in the list of product variants. The first position in the list is 1. | |
presentmentPrices | ProductVariantPricePairConnection | List of prices and compare-at prices in the presentment currencies for this shop. | |
price | Scalars[‘Money’][‘output’] | The price of the product variant in the default shop currency. | |
privateMetafield? | Maybe<PrivateMetafield> | (Optional) Returns a private metafield by namespace and key that belongs to the resource. | |
privateMetafields | PrivateMetafieldConnection | List of private metafields that belong to the resource. | |
product | Product | The product that this variant belongs to. | |
productVariantComponents | ProductVariantComponentConnection | A list of the product variant components. | |
requiresComponents | Scalars[‘Boolean’][‘output’] | 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. |
|
requiresShipping | Scalars[‘Boolean’][‘output’] | Whether a customer needs to provide a shipping address when placing an order for the product variant. | |
selectedOptions | Array<SelectedOption> | List of product options applied to the variant. | |
sellableOnlineQuantity | Scalars[‘Int’][‘output’] | 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](https://help.shopify.com/manual/markets/inventory_and_fulfillment). | |
sellingPlanGroupCount | Scalars[‘Int’][‘output’] | Count of selling plan groups associated with the product variant. | |
sellingPlanGroups | SellingPlanGroupConnection | A list of all selling plan groups defined in the current shop associated with the product variant. | |
sku? | Maybe<Scalars[‘String’][‘output’]> | (Optional) A case-sensitive identifier for the product variant in the shop. Required in order to connect to a fulfillment service. | |
storefrontId | Scalars[‘StorefrontID’][‘output’] | <p>The Storefront GraphQL API ID of the ProductVariant .</p><p>As of the 2022-04 version release, the Storefront GraphQL API will no longer return Base64 encoded IDs to match the behavior of the Admin GraphQL API. Therefore, you can safely use the id field’s value instead.</p> |
|
taxable | Scalars[‘Boolean’][‘output’] | Whether a tax is charged when the product variant is sold. | |
taxCode? | Maybe<Scalars[‘String’][‘output’]> | (Optional) The tax code for the product variant. | |
title | Scalars[‘String’][‘output’] | The title of the product variant. | |
translations | Array<Translation> | The translations associated with the resource. | |
updatedAt | Scalars[‘DateTime’][‘output’] | The date and time (ISO 8601 format) when the product variant was last modified. | |
weight? | Maybe<Scalars[‘Float’][‘output’]> | (Optional) The weight of the product variant in the unit system specified with weight_unit. | |
weightUnit | WeightUnit | `${WeightUnit}` | The unit of measurement that applies to the product variant’s weight. If you don’t specify a value for weight_unit, then the shop’s default unit of measurement is applied. Valid values: g , kg , oz , lb . |