- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
updateReturnWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the updateReturnWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow updates a return's details. It's used by the Update Return Admin API Route.
You can use this workflow within your customizations or your own custom workflows, allowing you to update a return in your custom flow.
Source CodeExamples#
Steps#
Workflow Hook
Step conditioned by when
Input#
UpdateReturnWorkflowInput
UpdateReturnWorkflowInput
UpdateReturnWorkflowInput
UpdateReturnWorkflowInputreturn_id
stringThe ID of the return to update.
return_id
stringlocation_id
null | stringOptionalThe ID of the stock location that items are returned to.
location_id
null | stringOptionalno_notification
booleanOptionalWhether to notify the customer about the return update.
no_notification
booleanOptionalmetadata
null | Record<string, any>OptionalCustom key-value pairs of data to store in the return.
metadata
null | Record<string, any>OptionalOutput#
OrderPreviewDTO
OrderPreviewDTOThe details of an order after a change is applied on it.
OrderPreviewDTO
OrderPreviewDTOid
stringThe ID of the order.
id
stringversion
numberThe version of the order.
version
numberdisplay_id
numberThe order's display ID.
display_id
numberstatus
OrderStatusThe status of the order.
status
OrderStatuscurrency_code
stringThe currency of the order
currency_code
stringcreated_at
string | DateWhen the order was created.
created_at
string | Dateupdated_at
string | DateWhen the order was updated.
updated_at
string | Dateoriginal_item_total
BigNumberValueThe original item total of the order.
original_item_total
BigNumberValueoriginal_item_subtotal
BigNumberValueThe original item subtotal of the order.
original_item_subtotal
BigNumberValueoriginal_item_tax_total
BigNumberValueThe original item tax total of the order.
original_item_tax_total
BigNumberValueitem_total
BigNumberValueThe item total of the order.
item_total
BigNumberValueitem_subtotal
BigNumberValueThe item subtotal of the order.
item_subtotal
BigNumberValueitem_tax_total
BigNumberValueThe item tax total of the order.
item_tax_total
BigNumberValueoriginal_total
BigNumberValueThe original total of the order.
original_total
BigNumberValueoriginal_subtotal
BigNumberValueThe original subtotal of the order.
original_subtotal
BigNumberValueoriginal_tax_total
BigNumberValueThe original tax total of the order.
original_tax_total
BigNumberValuetotal
BigNumberValueThe total of the order.
total
BigNumberValuesubtotal
BigNumberValueThe subtotal of the order. (Excluding taxes)
subtotal
BigNumberValuetax_total
BigNumberValueThe tax total of the order.
tax_total
BigNumberValuediscount_subtotal
BigNumberValueThe discount subtotal of the order.
discount_subtotal
BigNumberValuediscount_total
BigNumberValueThe discount total of the order.
discount_total
BigNumberValuediscount_tax_total
BigNumberValueThe discount tax total of the order.
discount_tax_total
BigNumberValuegift_card_total
BigNumberValueThe gift card total of the order.
gift_card_total
BigNumberValuegift_card_tax_total
BigNumberValueThe gift card tax total of the order.
gift_card_tax_total
BigNumberValueshipping_total
BigNumberValueThe shipping total of the order.
shipping_total
BigNumberValueshipping_subtotal
BigNumberValueThe shipping subtotal of the order.
shipping_subtotal
BigNumberValueshipping_tax_total
BigNumberValueThe shipping tax total of the order.
shipping_tax_total
BigNumberValueoriginal_shipping_total
BigNumberValueThe original shipping total of the order.
original_shipping_total
BigNumberValueoriginal_shipping_subtotal
BigNumberValueThe original shipping subtotal of the order.
original_shipping_subtotal
BigNumberValueoriginal_shipping_tax_total
BigNumberValueThe original shipping tax total of the order.
original_shipping_tax_total
BigNumberValueraw_original_item_total
BigNumberRawValueThe raw original item total of the order.
raw_original_item_total
BigNumberRawValueraw_original_item_subtotal
BigNumberRawValueThe raw original item subtotal of the order.
raw_original_item_subtotal
BigNumberRawValueraw_original_item_tax_total
BigNumberRawValueThe raw original item tax total of the order.
raw_original_item_tax_total
BigNumberRawValueraw_item_total
BigNumberRawValueThe raw item total of the order.
raw_item_total
BigNumberRawValueraw_item_subtotal
BigNumberRawValueThe raw item subtotal of the order.
raw_item_subtotal
BigNumberRawValueraw_item_tax_total
BigNumberRawValueThe raw item tax total of the order.
raw_item_tax_total
BigNumberRawValueraw_original_total
BigNumberRawValueThe raw original total of the order.
raw_original_total
BigNumberRawValueraw_original_subtotal
BigNumberRawValueThe raw original subtotal of the order.
raw_original_subtotal
BigNumberRawValueraw_original_tax_total
BigNumberRawValueThe raw original tax total of the order.
raw_original_tax_total
BigNumberRawValueraw_total
BigNumberRawValueThe raw total of the order.
raw_total
BigNumberRawValueraw_subtotal
BigNumberRawValueThe raw subtotal of the order. (Excluding taxes)
raw_subtotal
BigNumberRawValueraw_tax_total
BigNumberRawValueThe raw tax total of the order.
raw_tax_total
BigNumberRawValueraw_discount_total
BigNumberRawValueThe raw discount total of the order.
raw_discount_total
BigNumberRawValueraw_discount_tax_total
BigNumberRawValueThe raw discount tax total of the order.
raw_discount_tax_total
BigNumberRawValueraw_gift_card_total
BigNumberRawValueThe raw gift card total of the order.
raw_gift_card_total
BigNumberRawValueraw_gift_card_tax_total
BigNumberRawValueThe raw gift card tax total of the order.
raw_gift_card_tax_total
BigNumberRawValueraw_shipping_total
BigNumberRawValueThe raw shipping total of the order.
raw_shipping_total
BigNumberRawValueraw_shipping_subtotal
BigNumberRawValueThe raw shipping subtotal of the order.
raw_shipping_subtotal
BigNumberRawValueraw_shipping_tax_total
BigNumberRawValueThe raw shipping tax total of the order.
raw_shipping_tax_total
BigNumberRawValueraw_original_shipping_total
BigNumberRawValueThe raw original shipping total of the order.
raw_original_shipping_total
BigNumberRawValueraw_original_shipping_subtotal
BigNumberRawValueThe raw original shipping subtotal of the order.
raw_original_shipping_subtotal
BigNumberRawValueraw_original_shipping_tax_total
BigNumberRawValueThe raw original shipping tax total of the order.
raw_original_shipping_tax_total
BigNumberRawValueorder_change
OrderChangeDTOThe details of the changes made on the order.
order_change
OrderChangeDTOitems
OrderLineItemDTO & object[]The items of the order, along with changes on the items.
items
OrderLineItemDTO & object[]shipping_methods
OrderShippingMethodDTO & object[]The shipping methods of the order, along with changes on the shipping methods.
shipping_methods
OrderShippingMethodDTO & object[]return_requested_total
numberThe total amount for the requested return.
return_requested_total
numberregion_id
stringOptionalThe ID of the region the order belongs to.
region_id
stringOptionalcustomer_id
stringOptionalThe ID of the customer on the order.
customer_id
stringOptionalsales_channel_id
stringOptionalThe ID of the sales channel the order belongs to.
sales_channel_id
stringOptionalemail
stringOptionalThe email of the order.
email
stringOptionalThe associated shipping address.
The associated billing address.
The tramsactions associated with the order
The credit lines for an order
The summary of the order totals.
metadata
null | Record<string, unknown>OptionalHolds custom data in key-value pairs.
metadata
null | Record<string, unknown>Optionalcanceled_at
string | DateOptionalWhen the order was canceled.
canceled_at
string | DateOptionalWas this page helpful?