Skip to main content

ProductVariantCreateInput Input Type

No description

input ProductVariantCreateInput {
attributes: [AttributeValueInput!]!
sku: String
name: String
trackInventory: Boolean
weight: WeightScalar
preorder: PreorderSettingsInput @deprecated
quantityLimitPerCustomer: Int
metadata: [MetadataInput!]
privateMetadata: [MetadataInput!]
externalReference: String
product: ID!
stocks: [StockInput!]
}

Fields​

attributes ● [AttributeValueInput!]!​

List of attributes specific to this variant.

sku ● String​

Stock keeping unit.

name ● String​

Variant name.

trackInventory ● Boolean​

Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. If the field is not provided, Shop.trackInventoryByDefault will be used.

weight ● WeightScalar​

Weight of the Product Variant.

quantityLimitPerCustomer ● Int​

Determines maximum quantity of ProductVariant,that can be bought in a single checkout.

metadata ● [MetadataInput!]​

Fields required to update the product variant metadata. Can be read by any API client authorized to read the object it's attached to.

Warning: never store sensitive information, including financial data such as credit card details.

privateMetadata ● [MetadataInput!]​

Fields required to update the product variant private metadata. Requires permissions to modify and to read the metadata of the object it's attached to.

Warning: never store sensitive information, including financial data such as credit card details.

externalReference ● String​

External ID of this product variant.

product ● ID!​

Product ID of which type is the variant.

stocks ● [StockInput!]​

Stocks of a product available for sale.

Show deprecatedHide deprecated

preorder ● PreorderSettingsInput​

DEPRECATED

Preorder is deprecated and will be removed. Model pre-sales with regular stock instead: create the planned quantity in a warehouse, or set trackInventory to false to sell without a stock limit.

Determines if variant is in preorder.

Member Of​

productVariantCreate mutation