# patchReplenishmentOrderData

Audience: Programmer

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

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

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

## Arguments

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

## Returns

[ReplenishmentOrderOutput](https://docs.pyck.cloud/latest/api/types/replenishmentorderoutput.md)

## Example

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

```graphql
mutation PatchReplenishmentOrderData($id: ID!, $patches: [JSONPatchInput!]!) {
  patchReplenishmentOrderData(id: $id, patches: $patches) {
    eventCount
    replenishmentOrder {
      createdAt
      createdBy
      data
      dataTypeID
      dataTypeSlug
      deletedAt
      deletedBy
      id
      supplierID
      tenantID
      updatedAt
      updatedBy
    }
    transactionID
  }
}
```

**Variables**

```json
{
  "id": "<replenishment order id to patch>",
  "patches": [
    {
      "op": "REPLACE",
      "path": "/priority",
      "value": "\"high\""
    }
  ]
}
```
