Admin API / Mutations

adjustProductVariantQuantities

Adds or removes units of stock on 1 to 100 variants. It records a reason for each change. Each change applies to the stock at the time of the write, so a sale between a read and this call stays counted. The caller must be able to change the listing (Product.viewer.canEdit). One result per input item, in input order: a failed item changes nothing and does not stop the other items. An auction or giveaway variant, a variant with unlimited stock, and a change that leaves stock below 0 give ProductValidationError with QUANTITY_INVALID. A variant whose stock Shopify or ShipHero sets gives ExternallyManagedStockError. A repeat with the same idempotencyKey and input returns the first result and changes nothing.

Requires a client key with one of these scopes: admin:products:writeRequires this member role or higher: SELLER
adjustProductVariantQuantities(
  input: AdjustProductVariantQuantitiesInput!
): AdjustProductVariantQuantitiesPayload!

Arguments

ArgumentTypeDescription
inputAdjustProductVariantQuantitiesInput!The changes and the idempotency key.

Return type

AdjustProductVariantQuantitiesPayload!