Skip to main content
Skip to main content

deleteInventoryLevel - Inventory Module Reference

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

This method is used to delete an inventory level. The inventory level is identified by the IDs of its associated inventory item and location.

Example

import {
initialize as initializeInventoryModule,
} from "@medusajs/inventory"

async function deleteInventoryLevel (
inventoryItemId: string,
locationId: string
) {
const inventoryModule = await initializeInventoryModule({})

await inventoryModule.deleteInventoryLevel(
inventoryItemId,
locationId
)
}

Parameters

inventoryItemIdstringRequired
The ID of the associated inventory item.
locationIdstringRequired
The ID of the associated location.
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<void>Required
Resolves when the inventory level(s) are successfully restored.
Was this section helpful?