Skip to main content

updateWarehouse

Requires permission inventory:warehouse:update.

Updates a warehouse, including its code and status. A code already used by another warehouse is refused. Needs the warehouse update 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 UpdateWarehouse($id: ID!, $input: UpdateWarehouseInput!) {
updateWarehouse(id: $id, input: $input) {
id
code
taxRegistrationNumber
name
status
type
address {
postalCode
city
country
latitude
longitude
state
}
}
}

Variables:

{
"id": "id",
"input": {}
}

Response:

{
"data": {
"updateWarehouse": {
"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"
}
}
}
}
updateWarehouse(
id: ID!
input: UpdateWarehouseInput!
): Warehouse!

Arguments​

updateWarehouse.id ● ID! non-null scalar​

The ID of the warehouse.

updateWarehouse.input ● UpdateWarehouseInput! non-null input​

The fields to change.

Type​

Warehouse object​

A location where stock is held.