Skip to main content
Skip to main content

update - Inventory Next Module Reference

This documentation provides a reference to the update method. This belongs to the Inventory Next Module.

update(input, context?): Promise<InventoryItemDTO>

This method updates an existing inventory item.

Example

const inventoryItem = await inventoryModuleService.update({
id: "iitem_123",
title: "Medusa Shirt Inventory",
})

Parameters

The attributes to update in the inventory item.
contextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<InventoryItemDTO>Required
The updated inventory item.

update(input, context?): Promise<InventoryItemDTO[]>

This method updates existing inventory items.

Example

const inventoryItems = await inventoryModuleService.update([
{
id: "iitem_123",
title: "Medusa Shirt Inventory",
},
{
id: "iitem_321",
description: "The inventory of Medusa pants",
},
])

Parameters

The attributes to update in the inventory items.
contextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<InventoryItemDTO[]>Required
The updated inventory items.
Was this section helpful?