> For the complete documentation index, see [llms.txt](https://docs.pyck.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pyck.cloud/graphql-api/mutations/createinventoryitemmovement.md).

# Create Inventory Item Movement

Create Inventory Item Movement Mutation

Creates a new item movement order to transfer inventory between repositories.

## Arguments

| Name    | Type                                | Description                          |
| ------- | ----------------------------------- | ------------------------------------ |
| `input` | `CreateInventoryItemMovementInput!` | Input data for creating the movement |

## Return Type

`InventoryItemMovementOutput` - Contains the created movement and any triggered workflows.

| Field          | Type                 | Description                               |
| -------------- | -------------------- | ----------------------------------------- |
| `itemMovement` | `ItemMovement!`      | The created item movement                 |
| `workflows`    | `[TemporalWorkflow]` | Any workflows triggered by this operation |

## Input Fields

`CreateInventoryItemMovementInput`:

| Field              | Type     | Description                     |
| ------------------ | -------- | ------------------------------- |
| `fromRepositoryID` | `UUID!`  | Source repository ID            |
| `toRepositoryID`   | `UUID!`  | Destination repository ID       |
| `itemID`           | `UUID!`  | ID of the item to move          |
| `quantity`         | `Int!`   | Quantity to move                |
| `dataTypeID`       | `UUID`   | Optional data type ID           |
| `dataTypeSlug`     | `String` | Optional data type slug         |
| `data`             | `Map`    | Custom data for the movement    |
| `collectionID`     | `UUID`   | Optional collection movement ID |

## Usage Example

```graphql
mutation {
  # Create a simple item movement
  createInventoryItemMovement(
    input: {
      fromRepositoryID: "shelf-a1",
      toRepositoryID: "packing-station-1",
      itemID: "item-123",
      quantity: 10,
      data: {
        "reason": "Order fulfillment",
        "orderRef": "ORD-2024-001"
      }
    }
  ) {
    itemMovement {
      id
      quantity
      fromRepository {
        name
      }
      toRepository {
        name
      }
      item {
        sku
      }
      blockedBy
    }
  }
}
```

```graphql
mutation {
  # Create movement as part of a collection
  createInventoryItemMovement(
    input: {
      fromRepositoryID: "warehouse-bulk",
      toRepositoryID: "pick-face-a1",
      itemID: "item-789",
      quantity: 50,
      collectionID: "collection-456",
      dataTypeSlug: "replenishment_movement",
      data: {
        "priority": "high",
        "triggerLevel": 10
      }
    }
  ) {
    itemMovement {
      id
      quantity
      collectionID
    }
    workflows {
      id
      type
      runID
      status
      startedAt
      completedAt
    }
  }
}
```

## Notes

* Movement validates stock availability (unless from virtual repository)
* Created in pending state - use `executeInventoryItemMovement` to execute
* Can be part of a collection for coordinated execution
* May be blocked if insufficient stock or business rules prevent it


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pyck.cloud/graphql-api/mutations/createinventoryitemmovement.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
