Skip to main content

transferInventory

Requires permission inventory:stock_transfer:create.

Moves stock from one warehouse to another, for one or more items, in one call. The two warehouses must differ and both must exist, every item needs a variant, and each item needs enough available stock (on hand less reserved) in the source warehouse. An idempotency key makes a retry return the original movement. Needs the stock transfers feature on your plan and the stock transfer create 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 TransferInventory($input: TransferInventoryInput!) {
transferInventory(input: $input) {
id
batchNumber
movementNumber
serialNumber
status
type
fromWarehouse {
id
code
taxRegistrationNumber
name
status
type
}
}
}

Variables:

{
"input": {
"fromWarehouseId": "id",
"items": [
{
"productId": "id",
"quantity": 0,
"variantId": "id"
}
],
"toWarehouseId": "id"
}
}

Response:

{
"data": {
"transferInventory": {
"id": "id",
"batchNumber": "string",
"movementNumber": "string",
"serialNumber": "string",
"status": "CANCELLED",
"type": "ADJUSTMENT",
"fromWarehouse": {
"id": "id",
"code": "string",
"taxRegistrationNumber": "string",
"name": "string",
"status": "ACTIVE",
"type": "string"
}
}
}
}
transferInventory(
input: TransferInventoryInput!
): StockMovement!

Arguments​

transferInventory.input ● TransferInventoryInput! non-null input​

The details of the transfer inventory request.

Type​

StockMovement object​

A movement of stock: a receipt, issue, transfer or adjustment.