# patchPickingOrderData

Audience: Developer

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

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

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

## Arguments

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

## Returns

[PickingOrderOutput](https://docs.pyck.cloud/api/types/pickingorderoutput.md)

## Example

Applies RFC 6902 JSON Patch operations to the picking order's data field. Only changed fields are modified; untouched fields are preserved. See https://datatracker.ietf.org/doc/html/rfc6902 for the specification.

```graphql
mutation PatchPickingOrderData($id: ID!, $patches: [JSONPatchInput!]!) {
  patchPickingOrderData(id: $id, patches: $patches) {
    eventCount
    pickingOrder {
      createdAt
      createdBy
      customerID
      data
      dataTypeID
      dataTypeSlug
      deletedAt
      deletedBy
      id
      tenantID
      updatedAt
      updatedBy
    }
    transactionID
  }
}
```

**Variables**

```json
{
  "id": "<picking order id to patch>",
  "patches": [
    {
      "op": "REPLACE",
      "path": "/zone",
      "value": "\"Zone-C\""
    },
    {
      "op": "REPLACE",
      "path": "/priority",
      "value": "5"
    }
  ]
}
```
