Skip to main content

ProductVariantStocksCreate Object

Creates stocks for product variant.

Requires the MANAGE_PRODUCTSpermission.

Triggers the following webhook events:

  • PRODUCT_VARIANT_BACK_IN_STOCK (async): A product variant stock is created in a warehouse.
  • PRODUCT_VARIANT_BACK_IN_STOCK_IN_CHANNEL (async): A product variant is back in stock in a channel (non click-and-collect warehouses).

Note: Triggered only when the useLegacyShippingZoneStockAvailability shop setting is disabled.

  • PRODUCT_VARIANT_BACK_IN_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is back in stock in a channel (click-and-collect warehouses).

Note: Triggered only when the useLegacyShippingZoneStockAvailability shop setting is disabled.

type ProductVariantStocksCreate {
productVariant: ProductVariant
bulkStockErrors: [BulkStockError!]! @deprecated
errors: [BulkStockError!]!
}

Fields​

productVariant ● ProductVariant​

Updated product variant.

errors ● [BulkStockError!]!​

Show deprecatedHide deprecated

bulkStockErrors ● [BulkStockError!]!​

DEPRECATED

Use errors field instead.

Returned By​

productVariantStocksCreate mutation