# updateSupplier

Audience: Developer

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

## Arguments

| Name | Type |
| --- | --- |
| `id` | ID! |
| `input` | [UpdateSupplierInput](https://docs.pyck.cloud/api/inputs/updatesupplierinput.md)! |

## Returns

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

## Example

Updates a supplier's data.

```graphql
mutation UpdateSupplier($id: ID!, $input: UpdateSupplierInput!) {
  updateSupplier(id: $id, input: $input) {
    createdAt
    createdBy
    data
    dataTypeID
    dataTypeSlug
    deletedAt
    deletedBy
    id
    tenantID
    updatedAt
    updatedBy
  }
}
```

**Variables**

```json
{
  "id": "<supplier ID>",
  "input": {
    "data": {
      "companyName": "Global Parts Updated",
      "region": "APAC"
    },
    "dataTypeID": "<supplier data type ID>"
  }
}
```
