Admin API / Types
ProductVariantInput
InputA variant of a listing.
input ProductVariantInputInput fields
| Field | Type | Description |
|---|---|---|
availableQuantity | NonNegativeInt | Units in stock. Required for a variant that ships, and refused for a variant that does not ship, whose stock is unlimited (QUANTITY_INVALID). A live auction variant that ships: 1, or 0 for a kept variant, or more than 1 when the store allows multi-unit live auctions (MarketplaceListingRules.multiUnitLiveAuctionsEnabled). A timed auction or giveaway variant that ships: 1. On updateProduct, an absolute value that replaces the stored stock; omitted keeps the stored stock of a kept variant. |
media | [ProductVariantMediaInput!] | The images of the variant, in display order. At most 30 (MEDIA_LIMIT_EXCEEDED), and at most 600 across all variants of one call (MEDIA_LIMIT_EXCEEDED at variants or variantChanges.add). Each mediaId and fileUrl at most once in one list; a second use fails with VALIDATION_ERROR. The listing media and other variants can use the same upload. Omitted or null: a new variant has no images. On updateProduct, omitted or null keeps the stored images of a kept variant, a list replaces them, and [] removes them. A list replaces every stored image of the variant, also an image that a Shopify sync or a live capture added. A list cannot name a stored image, so omit media to keep the images of a kept variant. variantChanges cannot change the stored images of a variant yet: send the full variants list to replace them. On a timed auction or giveaway listing, updateProduct cannot change variant images: variants and variantChanges give UNSUPPORTED_FOR_SALE_MODE. |
price | MoneyInput! | The price in USD (CURRENCY_NOT_SUPPORTED), rounded to cents, from Marketplace.listingRules.minimumPrice to maximumPrice, with no upper bound when maximumPrice is null (PRICE_OUT_OF_RANGE). An auction: the floor, the lowest opening bid. A giveaway: 0, and the minimum does not apply. |
productVariantId | ID | updateProduct only: a stored variant of the listing to keep and change. Omitted: a new variant. A stored variant that variants does not name is removed, with its stock. Omit variants to keep the variants as they are; adjustProductVariantQuantities changes stock by a delta. Another listing's variant gives VARIANT_NOT_FOUND, and so does any value on createProduct and any value in variantChanges.add. |
requiresShipping | Boolean | Whether buyers get the variant in a shipment. Defaults to true. On updateProduct, omitted keeps the stored value of a kept variant. |
sku | String | The seller's stock-keeping unit, trimmed. Blank: none. On updateProduct, omitted keeps the stored value of a kept variant. |
title | String | The variant name. Required when the listing has more than one variant (VARIANT_TITLE_REQUIRED). A single variant with no title is named Default. On updateProduct, omitted keeps the stored name of a kept variant. |