- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Order Change
In this document, you'll learn about the Order Change data model and possible actions in it.
OrderChange Data Model#
The OrderChange data model represents any kind of change to an order, such as a return, exchange, or edit.
Its change_type
property indicates what the order change is created for:
edit
: The order change is making edits to the order, as explained in this guide.exchange
: The order change is associated with an exchange, which you can learn about in this guide.claim
: The order change is associated with a claim, which you can learn about in this guide.return_request
orreturn_receive
: The order change is associated with a return, which you can learn about in this guide.
Once the order change is confirmed, its changes are applied on the order.
Order Change Actions#
The actions to perform on the original order by a change, such as adding an item, are represented by the OrderChangeAction data model.
The OrderChangeAction
has an action
property that indicates the type of action to perform on the order, and a details
property that holds more details related to the action.
The following table lists the possible action
values that Medusa uses and what details
they carry.
Action | Description | Details |
---|---|---|
| Add an item to the order. |
|
| Update an item in the order. |
|
| Set an item to be returned. |
|
| Mark a return item as received. |
|
| Mark a return item that's damaged as received. |
|
| Add a shipping method for new or returned items. | No details added. The ID to the shipping method is added in the |
| Add a shipping method for new or returned items. | No details added. The ID to the shipping method is added in the |
| Remove an item's quantity as part of the claim, without adding the quantity back to the item variant's inventory. |
|