Skip to main content

Optional location inputs for inventory transfers

You can now create inventory transfers without specifying an origin or destination location.

Previously, the InventoryTransferCreateAsReadyToShip mutation required both origin and destination location IDs.

Now, these inputs are optional. This change supports workflows where the transfer's origin or destination is unknown at creation time.


Note

You must provide at least one of origin or location as input to validate the mutation.


Example:

mutation OmitOriginExample {
  inventoryTransferCreateAsReadyToShip(
    input: {
      lineItems: [
        { inventoryItemId: "gid://shopify/InventoryItem/...", quantity: 5 }
      ]
      originLocationId: null,
      destinationLocationId: "gid://shopify/Location/...",
    }
  ) {
    inventoryTransfer {
      id
      status
      origin { name }
      destination { name }
    }
  }
}

What you need to do

Nothing.

This isn't a breaking change. No action is required. Existing apps that provide IDs for inventory transfer origins or destinations will continue to function correctly. If your app previously required these fields, then you can update your validation logic to treat them as optional.

Was this section helpful?