---
title: "inventoryItemUpdate"
description: "Modifies an inventory item"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/inventory/mutations/inventory-item-update'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/inventory/mutations/inventory-item-update.md'
---
# inventoryItemUpdate

Modifies an inventory item

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Mutation

## Type Signature

`InventoryItemUpdatePayload`

## Arguments

* `id`

  [ID!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The Inventory item ID to be updated.

* `input`

  [InventoryItemUpdateInput!](https://developer.shopline.com/docs/admin-graph-ql-api/inventory/inputs/inventory-item-update-input.md)

  Input fields to update an inventory item.

## Returns

* `inventoryItem`

  [InventoryItem](https://developer.shopline.com/docs/admin-graph-ql-api/inventory/objects/inventory-item.md)

  The updated inventory item.

* `userErrors`

  [[UserError]!](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/user-error.md)

  A list of the errors encountered during the mutation. 

## Code Example

```graphql
mutation inventoryItemUpdate($id: ID! $input: InventoryItemUpdateInput! ) {
	inventoryItemUpdate(id: $id, input: $input ) 
		 {
			# InventoryItemUpdatePayload fields
		}
		
	}

```

## Variables

```json
{
  "id": {},
  "input": {
    "cost": {},
    "countryCodeOfOrigin": {},
    "harmonizedSystemCode": {},
    "tracked": {}
  }
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

