- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Order Module
The Order Module provides order-related features in your Medusa and Node.js applications.
How to Use Order Module's Service#
You can use the Order Module's main service by resolving from the Medusa container the resource Modules.ORDER
imported from @medusajs/framework/utils
.
For example:
Features#
Order Management#
Store and manage your orders to retrieve, create, cancel, and perform other operations.
Draft Orders#
Allow merchants to create orders on behalf of their customers as draft orders that later are transformed to regular orders.
Apply Promotions#
Apply promotions or discounts to the order's items and shipping methods by adding adjustment lines that are factored into their subtotals.
1const lineAdjustments = await orderModuleService.createOrderLineItemAdjustments({2 item_id: "cali_123",3 code: "50OFF",4 amount: 500,5})6 7const shippingAdjustments =8 await orderModuleService.createOrderShippingMethodAdjustments({9 shipping_method_id: "casm_123",10 code: "FREESHIPPING",11 amount: 1000,12 })
Returns, Exchanges, and Claims#
Return or exchange items, with version-based control over the order's timeline.
Was this page helpful?