Skip to main content
Skip to main content

deleteReservationItemsByLineItem - Inventory Module Reference

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

This method is used to delete the reservation items associated with a line item or multiple line items.

Example

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

async function deleteReservationItemsByLineItem (
lineItemIds: string[]
) {
const inventoryModule = await initializeInventoryModule({})

await inventoryModule.deleteReservationItemsByLineItem(
lineItemIds
)
}

Parameters

lineItemIdstring | string[]Required
The ID(s) of the line item(s).
A context used to share re9sources, such as transaction manager, between the application and the module.

Returns

PromisePromise<void>Required
Resolves when the reservation items are successfully deleted.
Was this section helpful?