Skip to main content

archiveWarehouse

Archive a warehouse.

This mutation archives a warehouse. Once archived, the warehouse cannot be used for new operations but existing data remains accessible.

Authentication & Permissions

Requires authentication and the warehouse:archive permission for the warehouse's brand.

Business Rules

The warehouse cannot be archived if:

  • It is being used by an active order (It has order fulfillments associated)
  • It is being used by an active supply shipment
  • Its locations are being used by product inventory
  • It has an external relation with an integration

Use the canBeArchived field on the Warehouse type to check if a warehouse can be archived before attempting to archive it.

Possible Errors

  • **Warehouse not found**: The specified warehouse does not exist
  • **Warehouse does not belong to the provided company**: The warehouse belongs to a different company
  • **Warehouse does not belong to the provided brand**: The warehouse belongs to a different brand
  • **Warehouse can't be archived**: One or more archiving rules prevent archiving (see archiveBlockingReasons field)
archiveWarehouse(
input: ArchiveWarehouseInput!
): Warehouse

Arguments

archiveWarehouse.input ● ArchiveWarehouseInput! non-null input

Parameters for ArchiveWarehouse

Type

Warehouse object

A warehouse