Skip to main content
Skip to main content

create - Inventory Next Module Reference

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

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

This method creates inventory items.

Example

const inventoryItems = await inventoryModuleService.create([
{
sku: "SHIRT",
},
])

Parameters

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

Returns

PromisePromise<InventoryItemDTO[]>Required
The created inventory items.

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

This method creates an inventory item.

Example

const inventoryItem = await inventoryModuleService.create({
sku: "SHIRT",
})

Parameters

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

Returns

PromisePromise<InventoryItemDTO>Required
The created inventory item.
Was this section helpful?