- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
createReturnFulfillmentWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the createReturnFulfillmentWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates a fulfillment for a return. It's used by other return-related workflows, such as createAndCompleteReturnOrderWorkflow.
You can use this workflow within your own customizations or custom workflows, allowing you to create a fulfillment for a return within your custom flows.
Examples#
Steps#
Input#
CreateFulfillmentWorkflowInput
CreateFulfillmentWorkflowInput
CreateFulfillmentWorkflowInput
CreateFulfillmentWorkflowInputlocation_id
stringThe associated location's ID.
location_id
stringprovider_id
stringThe associated fulfillment provider's ID.
provider_id
stringdelivery_address
CreateFulfillmentAddressWorkflowDTOThe address associated with the fulfillment. It's used for delivery.
delivery_address
CreateFulfillmentAddressWorkflowDTOThe items associated with the fulfillment.
packed_at
Date | nullOptionalThe date the fulfillment was packed.
packed_at
Date | nullOptionalshipped_at
Date | nullOptionalThe date the fulfillment was shipped.
shipped_at
Date | nullOptionalcreated_by
string | nullOptionalThe id of the user that creates the fulfillment
created_by
string | nullOptionaldelivered_at
Date | nullOptionalThe date the fulfillment was delivered.
delivered_at
Date | nullOptionalcanceled_at
Date | nullOptionalThe date the fulfillment was canceled.
canceled_at
Date | nullOptionaldata
Record<string, unknown> | nullOptionalThe data necessary for the associated fulfillment provider to process the fulfillment.
data
Record<string, unknown> | nullOptionalshipping_option_id
string | nullOptionalThe associated shipping option's ID.
shipping_option_id
string | nullOptionalmetadata
Record<string, unknown> | nullOptionalHolds custom data in key-value pairs.
metadata
Record<string, unknown> | nullOptionalThe labels associated with the fulfillment.
The associated fulfillment order to be sent to the provider.
Output#
FulfillmentDTO
FulfillmentDTOThe fulfillment details.
FulfillmentDTO
FulfillmentDTOid
stringThe ID of the fulfillment.
id
stringlocation_id
stringThe associated location's ID.
location_id
stringpacked_at
null | DateThe date the fulfillment was packed.
packed_at
null | Dateshipped_at
null | DateThe date the fulfillment was shipped.
shipped_at
null | Datedelivered_at
null | DateThe date the fulfillment was delivered.
delivered_at
null | Datecanceled_at
null | DateThe date the fulfillment was canceled.
canceled_at
null | Datedata
null | Record<string, unknown>The data necessary for the fulfillment provider to process
the fulfillment.
data
null | Record<string, unknown>provider_id
stringThe associated fulfillment provider's ID.
provider_id
stringshipping_option_id
null | stringThe associated shipping option's ID.
shipping_option_id
null | stringmetadata
null | Record<string, unknown>Holds custom data in key-value pairs.
metadata
null | Record<string, unknown>shipping_option
null | ShippingOptionDTOThe associated shipping option.
shipping_option
null | ShippingOptionDTOrequires_shipping
booleanFlag to indidcate whether shipping is required
requires_shipping
booleanprovider
FulfillmentProviderDTOThe associated fulfillment provider.
provider
FulfillmentProviderDTOdelivery_address
FulfillmentAddressDTOThe associated fulfillment address used for delivery.
delivery_address
FulfillmentAddressDTOitems
FulfillmentItemDTO[]The items of the fulfillment.
items
FulfillmentItemDTO[]labels
FulfillmentLabelDTO[]The labels of the fulfillment.
labels
FulfillmentLabelDTO[]created_at
DateThe creation date of the fulfillment.
created_at
Dateupdated_at
DateThe update date of the fulfillment.
updated_at
Datedeleted_at
null | DateThe deletion date of the fulfillment.
deleted_at
null | Datemarked_shipped_by
null | stringOptionalThe id of the user that marked fulfillment as shipped
marked_shipped_by
null | stringOptionalcreated_by
null | stringOptionalThe id of the user that created the fulfillment
created_by
null | stringOptionalWas this page helpful?