- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
createReturnFulfillmentStep - Medusa Core Workflows Reference
This documentation provides a reference to the createReturnFulfillmentStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step creates a fulfillment for a return.
Example#
1const data = createReturnFulfillmentStep({2 location_id: "sloc_123",3 provider_id: "provider_123",4 delivery_address: {5 first_name: "John",6 last_name: "Doe",7 address_1: "Test Street 1",8 city: "Test City",9 postal_code: "12345",10 country_code: "US",11 phone: "123456789",12 },13 items: [14 {15 title: "Shirt",16 sku: "shirt",17 quantity: 1,18 barcode: "123456789",19 }20 ]21})
Input#
CreateFulfillmentDTO
CreateFulfillmentDTOThe fulfillment to be created.
CreateFulfillmentDTO
CreateFulfillmentDTOlocation_id
stringThe associated location's ID.
location_id
stringprovider_id
stringThe associated fulfillment provider's ID.
provider_id
stringdelivery_address
Omit<CreateFulfillmentAddressDTO, "fulfillment_id">The address associated with the fulfillment. It's used for delivery.
delivery_address
Omit<CreateFulfillmentAddressDTO, "fulfillment_id">items
Omit<CreateFulfillmentItemDTO, "fulfillment_id">[]The items associated with the fulfillment.
items
Omit<CreateFulfillmentItemDTO, "fulfillment_id">[]The associated location's data.
packed_at
null | DateOptionalThe date the fulfillment was packed.
packed_at
null | DateOptionalshipped_at
null | DateOptionalThe date the fulfillment was shipped.
shipped_at
null | DateOptionalcreated_by
null | stringOptionalThe id of the user that created the fulfillment
created_by
null | stringOptionaldelivered_at
null | DateOptionalThe date the fulfillment was delivered.
delivered_at
null | DateOptionalcanceled_at
null | DateOptionalThe date the fulfillment was canceled.
canceled_at
null | DateOptionaldata
null | Record<string, unknown>OptionalThe data necessary for the associated fulfillment provider to process the fulfillment.
data
null | Record<string, unknown>Optionalshipping_option_id
null | stringOptionalThe associated shipping option's ID.
shipping_option_id
null | stringOptionalrequires_shipping
booleanOptionalFlag to indicate whether shipping is required
requires_shipping
booleanOptionalmetadata
null | Record<string, unknown>OptionalHolds custom data in key-value pairs.
metadata
null | Record<string, unknown>OptionalThe labels associated with the fulfillment.
The associated 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?