Update Inventory Item
Update Inventory Item Mutation
Updates an existing InventoryItem object in the system with new data.
Arguments
id
ID!
The unique identifier of the inventory item to update
input
UpdateInventoryItemInput!
Input data for updating the inventory item
Return Type
InventoryItemOutput - Contains the updated inventory item and any related workflows.
Input Fields
UpdateInventoryItemInput:
dataTypeID
UUID
Optional data type ID to associate with the item
clearDataTypeID
Boolean
Clear the existing data type ID
dataTypeSlug
String
Optional data type slug
clearDataTypeSlug
Boolean
Clear the existing data type slug
data
Map
Custom data associated with the item
clearData
Boolean
Clear the existing custom data
sku
String
Stock keeping unit (SKU) - unique identifier for the item
inventoryJSONData
Map
Additional inventory-specific JSON data
clearInventoryJSONData
Boolean
Clear the existing inventory JSON data
addItemMovementItemIDs
[ID!]
IDs of item movements to add
removeItemMovementItemIDs
[ID!]
IDs of item movements to remove
clearItemMovementItems
Boolean
Clear all associated item movements
addItemTransactionIDs
[ID!]
IDs of transactions to add
removeItemTransactionIDs
[ID!]
IDs of transactions to remove
clearItemTransactions
Boolean
Clear all associated transactions
addItemStockIDs
[ID!]
IDs of stock records to add
removeItemStockIDs
[ID!]
IDs of stock records to remove
clearItemStocks
Boolean
Clear all associated stock records
addItemSetIDs
[ID!]
IDs of item sets to add
removeItemSetIDs
[ID!]
IDs of item sets to remove
Return Fields
InventoryItemOutput:
inventoryItem
InventoryItem
The updated inventory item
workflows
[TemporalWorkflow]
Related workflow instances that were triggered
Usage Example
JavaScript Example
Important Notes
The SKU should remain unique across all inventory items
Updating an inventory item may trigger related workflows for stock management
Use the clear flags to explicitly remove optional fields
The
dataandinventoryJSONDatafields support flexible JSON structuresChanges to item associations (movements, transactions, stock) are applied incrementally
Last updated
Was this helpful?
