Skip to main content
Skip to main content

adjustInventory - Inventory Next Module Reference

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

This method adjusts the inventory quantity of an item in a location.

Example

// add to the inventory quantity
const inventoryLevel1 =
await inventoryModuleService.adjustInventory(
"iitem_123",
"loc_123",
5
)

// subtract from the inventory quantity
const inventoryLevel2 =
await inventoryModuleService.adjustInventory(
"iitem_123",
"loc_123",
-5
)

Parameters

inventoryItemIdstringRequired
The inventory item's ID.
locationIdstringRequired
The location's ID.
adjustmentnumberRequired
the adjustment to make to the quantity.
contextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<InventoryLevelDTO>Required
The updated inventory level.
Was this section helpful?