# updateInventoryItem

Audience: Developer

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

## Arguments

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

## Returns

[InventoryItemOutput](https://docs.pyck.cloud/api/types/inventoryitemoutput.md)

## Example

Updates an existing inventory item. Supply any fields to change (sku, data, dataTypeID); omitted fields are left unchanged.

```graphql
mutation UpdateInventoryItem($id: ID!, $input: UpdateInventoryItemInput!) {
  updateInventoryItem(id: $id, input: $input) {
    eventCount
    inventoryItem {
      createdAt
      createdBy
      currentStockTotals {
        lastChangedAt
        quantity
      }
      data
      dataTypeID
      dataTypeSlug
      deletedAt
      deletedBy
      id
      sku
      tenantID
      updatedAt
      updatedBy
    }
    transactionID
  }
}
```

**Variables**

```json
{
  "id": "<inventory item ID>",
  "input": {
    "sku": "WIDGET-UPDATED"
  }
}
```
