# patchInventoryCollectionMovementData

Audience: Developer

Apply RFC 6902 JSON Patch operations to the collection movement's data field.

Apply RFC 6902 JSON Patch operations to the collection movement's data field.

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

## Arguments

| Name | Type |
| --- | --- |
| `id` | ID! |
| `patches` | \[[JSONPatchInput](https://docs.pyck.cloud/dev/api/inputs/jsonpatchinput.md)!\]! |

## Returns

[UpdateCollectionMovementOutput](https://docs.pyck.cloud/dev/api/types/updatecollectionmovementoutput.md)

## Example

Applies RFC 6902 JSON Patch operations to the collection movement's data field. Only changed fields are modified; untouched fields are preserved.

```graphql
mutation PatchInventoryCollectionMovementData($id: ID!, $patches: [JSONPatchInput!]!) {
  patchInventoryCollectionMovementData(id: $id, patches: $patches) {
    eventCount
    inventoryCollection {
      createdAt
      createdBy
      data
      dataTypeID
      dataTypeSlug
      deletedAt
      deletedBy
      handler
      id
      tenantID
      updatedAt
      updatedBy
    }
    transactionID
  }
}
```

**Variables**

```json
{
  "id": "<collection movement id to patch>",
  "patches": [
    {
      "op": "REPLACE",
      "path": "/note",
      "value": "\"Updated via patch\""
    }
  ]
}
```
