Skip to main content

deleteWarehouse Mutation

Deletes selected warehouse.

Requires the MANAGE_PRODUCTSpermission.

Triggers the following webhook events:

  • WAREHOUSE_DELETED (async): A warehouse is deleted.
  • PRODUCT_VARIANT_OUT_OF_STOCK (async): A product variant stock is removed together with the deleted warehouse.
  • PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL (async): A product variant is out of stock in a channel (non click-and-collect warehouses).

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

  • PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is out of stock in a channel (click-and-collect warehouses).

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

deleteWarehouse(
id: ID!
): WarehouseDelete
Details
type WarehouseDelete {
warehouseErrors: [WarehouseError!]! @deprecated
errors: [WarehouseError!]!
warehouse: Warehouse
}

Arguments

id ● ID!

ID of a warehouse to delete.

Type

WarehouseDelete

Deletes selected warehouse.

Requires the MANAGE_PRODUCTSpermission.

Triggers the following webhook events:

  • WAREHOUSE_DELETED (async): A warehouse is deleted.
  • PRODUCT_VARIANT_OUT_OF_STOCK (async): A product variant stock is removed together with the deleted warehouse.
  • PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL (async): A product variant is out of stock in a channel (non click-and-collect warehouses).

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

  • PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is out of stock in a channel (click-and-collect warehouses).

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