- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
adjustInventory - Inventory Next Module Reference
This documentation provides a reference to the adjustInventory
method. This belongs to the Inventory Next Module.
Note: You should only use this methods when implementing complex customizations. For common cases, check out available workflows instead.
adjustInventory(data, context?): Promise<InventoryLevelDTO[]>#
This method adjusts the inventory quantity of an item in a location.
Example#
1const inventoryLevel1 =2 await inventoryModuleService.adjustInventory([3 // add to the inventory quantity4 {5 inventoryItemId: "iitem_123",6 locationId: "loc_123",7 adjustment: 58 },9 // subtract from the inventory quantity10 {11 inventoryItemId: "iitem_321",12 locationId: "loc_321",13 adjustment: -514 }15 ])
Parameters#
data
object[]The adjustments to make.
data
object[]A context used to share resources, such as transaction manager, between the application and the module.
Returns#
Promise
Promise<InventoryLevelDTO[]>The updated inventory level.
Promise
Promise<InventoryLevelDTO[]>adjustInventory(inventoryItemId, locationId, adjustment, context?): Promise<InventoryLevelDTO>#
Example#
Parameters#
inventoryItemId
stringThe inventory item's ID.
locationId
stringThe location's ID.
adjustment
BigNumberInputthe adjustment to make to the quantity.
adjustment
BigNumberInputA context used to share resources, such as transaction manager, between the application and the module.
Returns#
Promise
Promise<InventoryLevelDTO>The updated inventory level.
Promise
Promise<InventoryLevelDTO>Was this page helpful?