Loading...
Was this page helpful?
This documentation provides a reference to the receiveItemReturnRequestValidationStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step validates that a return's items can be marked as received. If the order or return is canceled, the order change is not active, or the items do not exist in the return, the step will throw an error.
1const data = receiveItemReturnRequestValidationStep({2 order: {3 id: "order_123",4 // other order details...5 },6 orderChange: {7 id: "orch_123",8 // other order change details...9 },10 orderReturn: {11 id: "return_123",12 // other return details...13 },14 items: [15 {16 id: "orli_123",17 quantity: 1,18 }19 ]20})
ReceiveItemReturnRequestValidationStepInput
ReceiveItemReturnRequestValidationStepInputorder
Pick<OrderDTO, "id" | "items">orderReturn
ReturnDTOorderChange
OrderChangeDTOitems
ReceiveOrderReturnItemsWorkflowInput["items"]