Skip to main content

removeWarehouse

Requires permission inventory:warehouse:delete.

Deletes a warehouse. It is refused while the warehouse still holds stock; transfer the stock to another warehouse or adjust it to zero first. Needs the warehouse delete permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation RemoveWarehouse($id: ID!) {
removeWarehouse(id: $id) {
id
code
taxRegistrationNumber
name
status
type
address {
postalCode
city
country
latitude
longitude
state
}
}
}

Variables:

{
"id": "id"
}

Response:

{
"data": {
"removeWarehouse": {
"id": "id",
"code": "string",
"taxRegistrationNumber": "string",
"name": "string",
"status": "ACTIVE",
"type": "string",
"address": {
"postalCode": "string",
"city": "string",
"country": "string",
"latitude": 0,
"longitude": 0,
"state": "string"
}
}
}
}
removeWarehouse(
id: ID!
): Warehouse!

Arguments​

removeWarehouse.id ● ID! non-null scalar​

The ID of the warehouse.

Type​

Warehouse object​

A location where stock is held.