validateInventoryLevelsDelete - Medusa Core Workflows Reference

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

This step validates that inventory levels are deletable. If the inventory levels have reserved or incoming items, or the force flag is not set and the inventory levels have stocked items, the step will throw an error.

NoteYou can retrieve an inventory level's details using Query, or useQueryGraphStep.

Example#

Code
1const data = validateInventoryLevelsDelete({2  inventoryLevels: [3    {4      id: "iilev_123",5      // other inventory level details...6    }7  ]8})

Input#

ValidateInventoryLevelsDeleteStepInputValidateInventoryLevelsDeleteStepInput
The data to validate the deletion of inventory levels.
inventoryLevelsInventoryLevelDTO[]
The inventory levels to validate.
forcebooleanOptional
If true, the inventory levels will be deleted even if they have stocked items.
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