Skip to main content
Skip to main content

createInventoryLevels - Inventory Next Module Reference

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

createInventoryLevels(data, context?): Promise<InventoryLevelDTO[]>

This method creates inventory levels.

Example

const inventoryLevels =
await inventoryModuleService.createInventoryLevels([
{
inventory_item_id: "iitem_123",
location_id: "loc_123",
stocked_quantity: 10,
},
{
inventory_item_id: "iitem_321",
location_id: "loc_321",
stocked_quantity: 20,
reserved_quantity: 10,
},
])

Parameters

The details of the inventory levels to be created.
contextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<InventoryLevelDTO[]>Required
The created inventory levels.

createInventoryLevels(data, context?): Promise<InventoryLevelDTO>

This method creates an inventory level.

Example

const inventoryLevels =
await inventoryModuleService.createInventoryLevels({
inventory_item_id: "iitem_123",
location_id: "loc_123",
stocked_quantity: 10,
})

Parameters

The details of the inventory level to be created.
contextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

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