FAQWhat 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?
RecipesHow 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 createInventoryItemsStep - Medusa Core Workflows Reference
This documentation provides a reference to the createInventoryItemsStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step creates one or more inventory items.
src/workflows/my-workflow.ts
1import { createWorkflow } from "@medusajs/framework/workflows-sdk"2import { createInventoryItemsStep } from "@medusajs/medusa/core-flows"3
4const myWorkflow = createWorkflow(5 "my-workflow",6 () => {7 const data = createInventoryItemsStep({})8 }9)
The data to create the inventory items.
The SKU of the inventory item.
origin_country
null | stringOptional
The origin country of the inventory item.
mid_code
null | stringOptional
The MID code of the inventory item.
material
null | stringOptional
The material of the inventory item.
weight
null | numberOptional
The weight of the inventory item.
length
null | numberOptional
The length of the inventory item.
height
null | numberOptional
The height of the inventory item.
width
null | numberOptional
The width of the inventory item.
title
null | stringOptional
The title of the inventory item.
description
null | stringOptional
The description of the inventory item.
thumbnail
null | stringOptional
The thumbnail of the inventory item.
metadata
null | Record<string, unknown>Optional
Holds custom data in key-value pairs.
hs_code
null | stringOptional
The HS code of the inventory item.
requires_shipping
booleanOptional
Whether the inventory item requires shipping.
Output#
The ID of the inventory item.
Whether the inventory item requires shipping.
The creation date of the inventory item.
The update date of the inventory item.
deleted_at
null | string | Date
The deletion date of the inventory item.
The SKU of the inventory item.
origin_country
null | stringOptional
The origin country of the inventory item.
hs_code
null | stringOptional
The HS code of the inventory item.
mid_code
null | stringOptional
The mid code of the inventory item.
material
null | stringOptional
The material of the inventory item.
weight
null | numberOptional
The weight of the inventory item.
length
null | numberOptional
The length of the inventory item.
height
null | numberOptional
The height of the inventory item.
width
null | numberOptional
The width of the inventory item.
title
null | stringOptional
The title of the inventory item.
description
null | stringOptional
The description of the inventory item.
thumbnail
null | stringOptional
The thumbnail of the inventory item.
metadata
null | Record<string, unknown>Optional
Holds custom data in key-value pairs.