FAQWhat 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?
RecipesHow 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 updateOrders - Order Module Reference - Medusa DocumentationupdateOrders - Order Module Reference
This documentation provides a reference to the updateOrders
method. This belongs to the Order Module.
Note: You should only use this methods when implementing complex customizations. For common cases, check out
available workflows instead.
updateOrders(data, sharedContext?): Promise<OrderDTO[]>#
This method updates existing orders. The order IDs are specified in each order object.
Example#
1const orders = await orderModuleService.updateOrders([{2 id: "123",3 email: "example@gmail.com"4}])
Parameters#
The attributes to update in the order.
A context used to share resources, such as transaction manager, between the application and the module.
Returns#
updateOrders(orderId, data, sharedContext?): Promise<OrderDTO>#
This method updates existing orders.
Example#
1const order = await orderModuleService.updateOrders(2 "123",3 {4 email: "example@gmail.com"5 }6)
Parameters#
The ID of the order to update.
The attributes to update in the order.
A context used to share resources, such as transaction manager, between the application and the module.
Returns#
This method updates existing orders matching the specified filters.
Example#
1const orders = await orderModuleService.updateOrders({2 id: ["123", "321"]3}, {4 email: "example@gmail.com"5})
Parameters#
The filters specifying which orders to update.
The attributes to update in the orders.
A context used to share resources, such as transaction manager, between the application and the module.
Returns#