Skip to main content
Skip to main content

createReservationItems - Inventory Module Reference

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

This method is used to create reservation items.

Example

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

async function createReservationItems (items: {
inventory_item_id: string,
location_id: string,
quantity: number
}[]) {
const inventoryModule = await initializeInventoryModule({})

const reservationItems = await inventoryModule.createReservationItems(
items
)

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

Parameters

The details of the reservation items 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 items' details.
Was this section helpful?