createInventoryItemsWorkflow - Medusa Core Workflows Reference

This documentation provides a reference to the createInventoryItemsWorkflow. It belongs to the @medusajs/medusa/core-flows package.

This workflow creates one or more inventory items. It's used by the Create Inventory Item Admin API Route.

You can use this workflow within your own customizations or custom workflows, allowing you to create inventory items in your custom flows.

Source Code

Examples#

Steps#

Workflow hook

Step conditioned by when

View step details

Input#

CreateInventoryItemsWorkflowInputCreateInventoryItemsWorkflowInput
The data to create the inventory items.
itemsCreateInventoryItemInput & object[]
The items to create.

Output#

InventoryItemDTO[]InventoryItemDTO[]
idstring
The ID of the inventory item.
requires_shippingboolean
Whether the inventory item requires shipping.
created_atstring | Date
The creation date of the inventory item.
updated_atstring | Date
The update date of the inventory item.
deleted_atnull | string | Date
The deletion date of the inventory item.
skunull | stringOptional
The SKU of the inventory item.
origin_countrynull | stringOptional
The origin country of the inventory item.
hs_codenull | stringOptional
The HS code of the inventory item.
mid_codenull | stringOptional
The mid code of the inventory item.
materialnull | stringOptional
The material of the inventory item.
weightnull | numberOptional
The weight of the inventory item.
lengthnull | numberOptional
The length of the inventory item.
heightnull | numberOptional
The height of the inventory item.
widthnull | numberOptional
The width of the inventory item.
titlenull | stringOptional
The title of the inventory item.
descriptionnull | stringOptional
The description of the inventory item.
thumbnailnull | stringOptional
The thumbnail of the inventory item.
metadatanull | Record<string, unknown>Optional
Holds custom data in key-value pairs.
Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break