ProductVariantInput

Specifies a product variant to create or update.

Show definition

# Specifies a product variant to create or update.
input ProductVariantInput {
  # The value of the barcode associated with the product.
  barcode: String

# The compare-at price of the variant. compareAtPrice: Money

# The ID of the fulfillment service associated with the variant. fulfillmentServiceId: ID

# The Harmonized System Code (or HS Tariff Code) for the variant. harmonizedSystemCode: String

# Specifies the product variant to update or create a new variant if absent. id: ID

# The ID of the image that's associated with the variant. imageId: ID

# The URL of an image to associate with the variant. This field can only be # used through mutations that create product images and must match one of the # URLs being created on the product. imageSrc: String

# The fulfillment service that tracks the number of items in stock for the # product variant. If you track the inventory yourself using the admin, then set # the value to shopify. Valid values: shopify or the handle of a fulfillment # service that has inventory management enabled. inventoryManagement: ProductVariantInventoryManagement

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

# Create only field. The inventory quantities at each location where the variant is stocked. inventoryQuantities: [InventoryLevelInput!]

# This argument is deprecated: Use inventoryQuantities instead. inventoryQuantity: Int

# This argument is deprecated: Use the inventoryAdjustQuantity mutation instead. inventoryQuantityAdjustment: Int

# Additional customizable information about the product variant. metafields: [MetafieldInput!]

# The custom properties that a shop owner uses to define product variants. options: [String!]

# The order of the product variant in the list of product variants. The first position in the list is 1. position: Int

# The price of the variant. price: Money

# Create only required field. Specifies the product on which to create the variant. productId: ID

# Whether the variant requires shipping. requiresShipping: Boolean

# The SKU for the variant. sku: String

# The tax code associated with the variant. taxCode: String

# Whether the variant is taxable. taxable: Boolean

# This argument is deprecated: Variant title is not a writable field; it is generated from the selected variant options. title: String

# The weight of the variant. weight: Float

# The unit of weight that's used to measure the variant. weightUnit: WeightUnit }

Input Fields

barcode   (String)

The value of the barcode associated with the product.

compareAtPrice   (Money)

The compare-at price of the variant.

fulfillmentServiceId   (ID)

The ID of the fulfillment service associated with the variant.

harmonizedSystemCode   (String)

The Harmonized System Code (or HS Tariff Code) for the variant.

id   (ID)

Specifies the product variant to update or create a new variant if absent.

imageId   (ID)

The ID of the image that's associated with the variant.

imageSrc   (String)

The URL of an image to associate with the variant. This field can only be used through mutations that create product images and must match one of the URLs being created on the product.

inventoryManagement   (ProductVariantInventoryManagement)

The fulfillment service that tracks the number of items in stock for the product variant. If you track the inventory yourself using the admin, then set the value to shopify. Valid values: shopify or the handle of a fulfillment service that has inventory management enabled.

inventoryPolicy   (ProductVariantInventoryPolicy)

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

inventoryQuantities   ([InventoryLevelInput!])

Create only field. The inventory quantities at each location where the variant is stocked.

inventoryQuantity   (Int)

This argument is deprecated: Use inventoryQuantities instead.

inventoryQuantityAdjustment   (Int)

This argument is deprecated: Use the inventoryAdjustQuantity mutation instead.

metafields   ([MetafieldInput!])

Additional customizable information about the product variant.

options   ([String!])

The custom properties that a shop owner uses to define product variants.

position   (Int)

The order of the product variant in the list of product variants. The first position in the list is 1.

price   (Money)

The price of the variant.

productId   (ID)

Create only required field. Specifies the product on which to create the variant.

requiresShipping   (Boolean)

Whether the variant requires shipping.

sku   (String)

The SKU for the variant.

taxCode   (String)

The tax code associated with the variant.

taxable   (Boolean)

Whether the variant is taxable.

title   (String)

This argument is deprecated: Variant title is not a writable field; it is generated from the selected variant options.

weight   (Float)

The weight of the variant.

weightUnit   (WeightUnit)

The unit of weight that's used to measure the variant.

Sign up for a Partner account to get started.

Sign up