Skip to main content
Skip to main content

createReservationItem - Inventory Module Reference

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

This method is used to create a reservation item.

Example

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

async function createReservationItem (item: {
inventory_item_id: string,
location_id: string,
quantity: number
}) {
const inventoryModule = await initializeInventoryModule({})

const reservationItem = await inventoryModule.createReservationItems(
item
)

// do something with the reservation item or return them
}

Parameters

The details of the reservation item to create.
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ReservationItemDTO>Required
The created reservation item's details.
Was this section helpful?