- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
restoreReservationItemsByLineItem - Inventory Next Module Reference
This documentation provides a reference to the restoreReservationItemsByLineItem
method. This belongs to the Inventory Next Module.
Note: You should only use this methods when implementing complex customizations. For common cases, check out available workflows instead.
This method is used to restore the reservation items associated with a line item or multiple line items that were deleted.
Example#
1import {2 initialize as initializeInventoryModule,3} from "@medusajs/inventory"4 5async function restoreReservationItemsByLineItem (6 lineItemIds: string[]7) {8 const inventoryModule = await initializeInventoryModule({})9 10 await inventoryModule.restoreReservationItemsByLineItem(11 lineItemIds12 )13}
Parameters#
lineItemId
string | string[]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#
Promise
Promise<void>Resolves when the reservation items are successfully deleted.
Was this page helpful?