requestItemReturnValidationStep - Medusa Core Workflows Reference

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

This step validates that items can be added to a return. If the order or return is canceled, the order change is not active, the items do not exist in the order, or the return reasons are invalid, the step will throw an error.

NoteYou can retrieve an order, return, and order change details using Query, or useQueryGraphStep.

Example#

Code
1const data = requestItemReturnValidationStep({2  order: {3    id: "order_123",4    items: [5      {6        id: "orli_123",7        // other item details...8      }9    ]10  },11  orderChange: {12    id: "orch_123",13    // other order change details...14  },15  orderReturn: {16    id: "return_123",17    // other return details...18  },19  items: [20    {21      id: "orli_123",22      quantity: 1,23    }24  ]25})

Input#

RequestItemReturnValidationStepInputRequestItemReturnValidationStepInput
The data to validate that items can be added to a return.
orderPick<OrderDTO, "id" | "items">
The order's details.
orderReturnReturnDTO
The return's details.
orderChangeOrderChangeDTO
The order change's details.
The items to be added to the return.
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