# updateInventoryItemMovement

Audience: Programmer

**Served by:** [inventory](https://docs.pyck.cloud/latest/api/services/inventory.md)

## Arguments

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `id` | ID! |  |  |
| `input` | [UpdateItemMovementInput](https://docs.pyck.cloud/latest/api/inputs/updateitemmovementinput.md)! |  |  |

## Returns

[InventoryItemMovementOutput](https://docs.pyck.cloud/latest/api/types/inventoryitemmovementoutput.md)

## Example

Updates a pending inventory item movement. Only non-immutable fields (handler, blockedBy) can be changed after creation. Executed movements cannot be updated or deleted.

```graphql
mutation UpdateInventoryItemMovement($id: ID!, $input: UpdateItemMovementInput!) {
  updateInventoryItemMovement(id: $id, input: $input) {
    eventCount
    inventoryItemMovement {
      blockedBy
      collectionID
      createdAt
      createdBy
      data
      dataTypeID
      dataTypeSlug
      deletedAt
      deletedBy
      executed
      executedAt
      fromID
      handler
      id
      itemID
      orderID
      position
      quantity
      tenantID
      toID
      updatedAt
      updatedBy
    }
    transactionID
  }
}
```

**Variables**

```json
{
  "id": "<item movement ID>",
  "input": {
    "blockedBy": "<movement ID that blocks this one (optional)>",
    "handler": "operator-updated"
  }
}
```
