retrieveReservedQuantity - Inventory Module Reference
This documentation provides a reference to the retrieveReservedQuantity
method. This belongs to the Inventory Module.
This method is used to retrieve the reserved quantity of an inventory item within the specified locations.
Example
import {
initialize as initializeInventoryModule,
} from "@medusajs/inventory"
async function retrieveReservedQuantity (
inventoryItemId: string,
locationIds: string[],
) {
const inventoryModule = await initializeInventoryModule({})
const quantity = await inventoryModule.retrieveReservedQuantity(
inventoryItemId,
locationIds,
)
// do something with the quantity or return it
}
Parameters
inventoryItemId
stringRequiredThe ID of the inventory item to retrieve its reserved quantity.
locationIds
string[]RequiredThe IDs of the locations to retrieve the reserved quantity from.
context
SharedContextA context used to share resources, such as transaction manager, between the application and the module.
context
SharedContextReturns
Promise
Promise<number>RequiredThe reserved quantity of the inventory item in the specified locations.
Promise
Promise<number>RequiredWas this section helpful?