> 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/types/itemmovement.md).

# ItemMovement

Item Movement Type

Represents a movement of items between repositories. Item movements are orders or tasks to transfer specific quantities of an inventory item from one location to another.

## Fields

| Field              | Type                    | Description                                   |
| ------------------ | ----------------------- | --------------------------------------------- |
| `id`               | `ID!`                   | Unique identifier of the movement             |
| `tenantID`         | `UUID!`                 | Tenant identifier                             |
| `createdAt`        | `Time!`                 | Creation timestamp                            |
| `createdBy`        | `UUID!`                 | User identifier who created the movement      |
| `updatedAt`        | `Time`                  | Last update timestamp                         |
| `updatedBy`        | `UUID!`                 | User identifier who last updated the movement |
| `deletedAt`        | `Time`                  | Deletion timestamp                            |
| `deletedBy`        | `UUID!`                 | User identifier who deleted the movement      |
| `dataTypeID`       | `UUID`                  | Data type identifier                          |
| `dataTypeSlug`     | `String`                | Data type slug                                |
| `data`             | `Map`                   | Custom data associated with the movement      |
| `fromRepositoryID` | `UUID!`                 | Source repository ID                          |
| `toRepositoryID`   | `UUID!`                 | Destination repository ID                     |
| `itemID`           | `UUID!`                 | ID of the item being moved                    |
| `quantity`         | `Int!`                  | Quantity to move                              |
| `executedAt`       | `Time`                  | When the movement was executed                |
| `executedBy`       | `UUID`                  | User who executed the movement                |
| `blockedBy`        | `ItemMovementBlockedBy` | Reason if movement is blocked                 |
| `collectionID`     | `UUID`                  | ID of collection movement if part of one      |
| `fromRepository`   | `Repository`            | Source repository object                      |
| `toRepository`     | `Repository`            | Destination repository object                 |
| `item`             | `InventoryItem`         | The inventory item being moved                |
| `collection`       | `InventoryCollection`   | Collection movement this belongs to           |
| `transactions`     | `[Transaction!]`        | Related inventory transactions                |

## Interfaces

* `Node`

## Movement States

* **Pending**: Created but not yet executed (`executedAt` is null)
* **Executed**: Movement has been completed (`executedAt` is set)
* **Blocked**: Movement cannot proceed (`blockedBy` is set)

## Usage Example

```graphql
query {
  itemMovements(
    where: {
      itemID: "550e8400-e29b-41d4-a716-446655440000",
      executedAt_NULL: true
    }
  ) {
    edges {
      node {
        id
        quantity
        executedAt
        blockedBy
        fromRepository {
          name
          type
        }
        toRepository {
          name
          type
        }
        item {
          sku
          data
        }
      }
    }
  }
}
```

## Notes

* Movements validate stock availability when created (unless from virtual repository)
* Executing a movement updates stock records and creates transactions
* Movements can be blocked by insufficient stock or other business rules
* Collection movements allow grouping multiple movements for coordinated execution


---

# 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/types/itemmovement.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.
