acceptOrderTransferValidationStep - Medusa Core Workflows Reference

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

This step validates that an order transfer can be accepted. If the order doesn't have an existing transfer request, the step throws an error.

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

Example#

Code
1const data = acceptOrderTransferValidationStep({2  token: "sk_123456",3  order: {4    id: "order_123",5    // other order details...6  },7  orderChange: {8    id: "order_change_123",9    // other order change details...10  }11})

Input#

tokenstring
The order details.
idstring
The ID of the order.
versionnumber
The version of the order.
display_idnumber
The order's display ID.
The status of the order.
currency_codestring
The currency of the order
created_atstring | Date
When the order was created.
updated_atstring | Date
When the order was updated.
original_item_totalBigNumberValue
The original item total of the order.
original_item_subtotalBigNumberValue
The original item subtotal of the order.
original_item_tax_totalBigNumberValue
The original item tax total of the order.
item_totalBigNumberValue
The item total of the order.
item_subtotalBigNumberValue
The item subtotal of the order.
item_tax_totalBigNumberValue
The item tax total of the order.
original_totalBigNumberValue
The original total of the order.
original_subtotalBigNumberValue
The original subtotal of the order.
original_tax_totalBigNumberValue
The original tax total of the order.
The total of the order.
The subtotal of the order. (Excluding taxes)
The tax total of the order.
discount_subtotalBigNumberValue
The discount subtotal of the order.
discount_totalBigNumberValue
The discount total of the order.
discount_tax_totalBigNumberValue
The discount tax total of the order.
gift_card_totalBigNumberValue
The gift card total of the order.
gift_card_tax_totalBigNumberValue
The gift card tax total of the order.
shipping_totalBigNumberValue
The shipping total of the order.
shipping_subtotalBigNumberValue
The shipping subtotal of the order.
shipping_tax_totalBigNumberValue
The shipping tax total of the order.
original_shipping_totalBigNumberValue
The original shipping total of the order.
original_shipping_subtotalBigNumberValue
The original shipping subtotal of the order.
original_shipping_tax_totalBigNumberValue
The original shipping tax total of the order.
order_changeOrderChangeDTOOptional
The active order change, if any.
region_idstringOptional
The ID of the region the order belongs to.
customer_idstringOptional
The ID of the customer on the order.
sales_channel_idstringOptional
The ID of the sales channel the order belongs to.
emailstringOptional
The email of the order.
shipping_addressOrderAddressDTOOptional
The associated shipping address.
billing_addressOrderAddressDTOOptional
The associated billing address.
itemsOrderLineItemDTO[]Optional
The associated order details / line items.
shipping_methodsOrderShippingMethodDTO[]Optional
The associated shipping methods
transactionsOrderTransactionDTO[]Optional
The tramsactions associated with the order
credit_linesOrderCreditLineDTO[]Optional
The credit lines for an order
summaryOrderSummaryDTOOptional
The summary of the order totals.
metadatanull | Record<string, unknown>Optional
Holds custom data in key-value pairs.
canceled_atstring | DateOptional
When the order was canceled.
orderChangeOrderChangeDTO
The order change details.
idstring
The ID of the order change
versionnumber
The version of the order change
order_idstring
The ID of the associated order
return_idstring
The ID of the associated return order
exchange_idstring
The ID of the associated exchange order
claim_idstring
The ID of the associated claim order
The associated order
return_orderReturnDTO
The associated return order
The associated exchange order
The associated claim order
The actions of the order change
The status of the order change
requested_bynull | string
The requested by of the order change
requested_atnull | string | Date
When the order change was requested
confirmed_bynull | string
The confirmed by of the order change
confirmed_atnull | string | Date
When the order change was confirmed
declined_bynull | string
The declined by of the order change
declined_reasonnull | string
The declined reason of the order change
metadatanull | Record<string, unknown>
The metadata of the order change
declined_atnull | string | Date
When the order change was declined
canceled_bynull | string
The canceled by of the order change
canceled_atnull | string | Date
When the order change was canceled
created_atstring | Date
When the order change was created
updated_atstring | Date
When the order change was updated
change_type"return" | "exchange" | "claim" | "edit" | "transfer"Optional
The type of the order change
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