# patchReceivingInboundData

Audience: Developer

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

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

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

## Arguments

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

## Returns

[ReceivingInboundOutput](https://docs.pyck.cloud/dev/api/types/receivinginboundoutput.md)

## Example

Applies RFC 6902 JSON Patch operations to the inbound'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 PatchReceivingInboundData($id: ID!, $patches: [JSONPatchInput!]!) {
  patchReceivingInboundData(id: $id, patches: $patches) {
    eventCount
    receivingInbound {
      createdAt
      createdBy
      data
      dataTypeID
      dataTypeSlug
      deletedAt
      deletedBy
      id
      orderID
      supplierID
      tenantID
      updatedAt
      updatedBy
    }
    transactionID
  }
}
```

**Variables**

```json
{
  "id": "<inbound id to patch>",
  "patches": [
    {
      "op": "REPLACE",
      "path": "/warehouse",
      "value": "\"WH-B\""
    },
    {
      "op": "ADD",
      "path": "/tags/-",
      "value": "\"urgent\""
    }
  ]
}
```
