Skip to main content
Skip to main content

retrieve - Inventory Next Module Reference

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

This method retrieves an inventory item by its ID.

Example

A simple example that retrieves a inventory item by its ID:

const inventoryItem =
await inventoryModuleService.retrieve("iitem_123")

To specify relations that should be retrieved:

const inventoryItem = await inventoryModuleService.retrieve(
"iitem_123",
{
relations: ["location_levels"],
}
)

Parameters

inventoryItemIdstringRequired
The inventory item's ID.
The configurations determining how the inventory item is retrieved. Its properties, such as select or relations, accept the attributes or relations associated with a inventory item.
contextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

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