# patchReplenishmentOrderItemData

Audience: Developer

Apply RFC 6902 JSON Patch operations to the replenishment order item's data field.

Apply RFC 6902 JSON Patch operations to the replenishment order item'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

[ReplenishmentOrderItemOutput](https://docs.pyck.cloud/dev/api/types/replenishmentorderitemoutput.md)

## Example

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

```graphql
mutation PatchReplenishmentOrderItemData($id: ID!, $patches: [JSONPatchInput!]!) {
  patchReplenishmentOrderItemData(id: $id, patches: $patches) {
    eventCount
    replenishmentOrderItem {
      createdAt
      createdBy
      data
      dataTypeID
      dataTypeSlug
      deletedAt
      deletedBy
      id
      quantity
      replenishmentOrderID
      sku
      tenantID
      updatedAt
      updatedBy
    }
    transactionID
  }
}
```

**Variables**

```json
{
  "id": "<replenishment order item id to patch>",
  "patches": [
    {
      "op": "REPLACE",
      "path": "/received",
      "value": "true"
    }
  ]
}
```
