# patchSupplierData

Audience: Programmer

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

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

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

## Arguments

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

## Returns

[Supplier](https://docs.pyck.cloud/latest/api/types/supplier.md)

## Example

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

```graphql
mutation PatchSupplierData($id: ID!, $patches: [JSONPatchInput!]!) {
  patchSupplierData(id: $id, patches: $patches) {
    createdAt
    createdBy
    data
    dataTypeID
    dataTypeSlug
    deletedAt
    deletedBy
    id
    tenantID
    updatedAt
    updatedBy
  }
}
```

**Variables**

```json
{
  "id": "<supplier id to patch>",
  "patches": [
    {
      "op": "REPLACE",
      "path": "/rating",
      "value": "5"
    },
    {
      "op": "REPLACE",
      "path": "/active",
      "value": "false"
    }
  ]
}
```
