Skip to main content
Log inSign up
input_object

The input fields for specifying a product variant to create or update.

•

The value of the barcode associated with the product.

•

The compare-at price of the variant.

•

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

•

The inventory item associated with the variant. Used for unit cost.

•

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

•

The inventory quantities at each location where the variant is stocked. Supported as input with the productVariantCreate mutation only.

•

The ID of the media to associate with the variant. This field can only be used in mutations that create media images and must match one of the IDs being created on the product. This field only accepts one value.

•

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

•

Additional customizable information about the product variant.

•

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

•

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

•

The price of the variant.

•

The product to create the variant for. Used as input only to the productVariantCreate mutation.

•

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.

•

Whether the variant is taxable.

•

The tax code associated with the variant.

Show
deprecated fields Deprecated
Anchor to fulfillmentServiceIdfulfillmentServiceId
•
IDDeprecated

The ID of a fulfillment service that stocks a product variant.

The relationship between a product variant and a fulfillment service was changed in the 2022-07 API version. A ProductVariant can be stocked by multiple fulfillment services. As a result, we recommend that you use the inventoryItem field if you need to determine where a product variant is stocked.

If you previously set this field, then we recommend that you instead activate inventory items at locations. Each Location is associated with a single FulfillmentService.

Learn more about managing inventory quantities and states.

Anchor to harmonizedSystemCodeharmonizedSystemCode
•
StringDeprecated

The Harmonized System code (or HS Tariff code) for the variant. Use inventoryItem.harmonizedSystemCode instead.

•
IDDeprecated

The ID of the image that's associated with the variant. Deprecated as of the 2023-07 release. Use mediaId instead.

•
StringDeprecated

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.

Deprecated as of the 2023-07 release. Use mediaSrc instead.

•

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. Use inventoryItem.tracked instead.

•

The private metafields associated with the product. Metafields created using a reserved namespace are private by default. See our guide for migrating private metafields.

•
BooleanDeprecated

Whether the variant requires shipping. Use inventoryItem.requiresShipping instead.

•
StringDeprecated

The SKU for the variant. Case-sensitive string. Use inventoryItem.sku instead.

•
StringDeprecated

Variant title is not a writable field. This field is generated from the selected variant options.

•
FloatDeprecated

The weight of the variant. Use inventoryItem.measurement.weight.value instead.

•
WeightUnitDeprecated

The unit of weight that's used to measure the variant. Use inventoryItem.measurement.weight.unit instead.


Was this section helpful?

Anchor to Input objects using this inputInput objects using this input

•
INPUT OBJECTDeprecated

A list of variants associated with the product.


Was this section helpful?