createReservationsStep - Medusa Core Workflows Reference
This documentation provides a reference to the createReservationsStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step creates one or more reservations.
Example#
Input#
CreateReservationsStepInput
CreateReservationsStepInputThe data to create reservation items.
CreateReservationsStepInput
CreateReservationsStepInputinventory_item_id
stringThe ID of the associated inventory item.
inventory_item_id
stringlocation_id
stringThe ID of the associated location.
location_id
stringquantity
BigNumberInputThe reserved quantity.
quantity
BigNumberInputline_item_id
null | stringOptionalThe ID of the associated line item.
line_item_id
null | stringOptionalallow_backorder
booleanOptionalAllow backorder of the item. If true, it won't check inventory levels before reserving it.
allow_backorder
booleanOptionaldescription
null | stringOptionalThe description of the reservation.
description
null | stringOptionalcreated_by
null | stringOptionalThe user or system that created the reservation. Can be any form of identification string.
created_by
null | stringOptionalexternal_id
null | stringOptionalAn ID associated with an external third-party system that the reservation item is connected to.
external_id
null | stringOptionalmetadata
null | Record<string, unknown>OptionalHolds custom data in key-value pairs.
metadata
null | Record<string, unknown>OptionalOutput#
ReservationItemDTO[]
ReservationItemDTO[]
ReservationItemDTO[]
ReservationItemDTO[]id
stringThe ID of the reservation item.
id
stringlocation_id
stringThe associated location's ID.
location_id
stringinventory_item_id
stringThe associated inventory item's ID.
inventory_item_id
stringquantity
BigNumberInputThe quantity of the reservation item.
quantity
BigNumberInputmetadata
null | Record<string, unknown>Holds custom data in key-value pairs.
metadata
null | Record<string, unknown>created_at
string | DateThe creation date of the reservation item.
created_at
string | Dateupdated_at
string | DateThe update date of the reservation item.
updated_at
string | Datedeleted_at
null | string | DateThe deletion date of the reservation item.
deleted_at
null | string | Dateline_item_id
null | stringOptionalThe associated line item's ID.
line_item_id
null | stringOptionaldescription
null | stringOptionalThe description of the reservation item.
description
null | stringOptionalallow_backorder
booleanOptionalAllow backorder of the item. If true, it won't check inventory levels before reserving it.
allow_backorder
booleanOptionalcreated_by
null | stringOptionalThe created by of the reservation item.
created_by
null | stringOptionalWas this page helpful?