- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
receiveItemReturnRequestValidationStep - Medusa Core Workflows Reference
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.
Note: You can retrieve an order, return, and order change details using Query,
or useQueryGraphStep.
Example#
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})
Input#
ReceiveItemReturnRequestValidationStepInput
ReceiveItemReturnRequestValidationStepInputThe data to validate that a return's items can be marked as received.
ReceiveItemReturnRequestValidationStepInput
ReceiveItemReturnRequestValidationStepInputorder
Pick<OrderDTO, "id" | "items">The order's details.
order
Pick<OrderDTO, "id" | "items">orderReturn
ReturnDTOThe return's details.
orderReturn
ReturnDTOorderChange
OrderChangeDTOThe order change's details.
orderChange
OrderChangeDTOitems
ReceiveOrderReturnItemsWorkflowInput["items"]The received items.
items
ReceiveOrderReturnItemsWorkflowInput["items"]Was this page helpful?