1 type: object
2 description: The order change's details.
3 x-schemaName: OrderChange
4 required:
5 - id
6 - version
7 - order_id
8 - return_id
9 - exchange_id
10 - claim_id
11 - order
12 - return_order
13 - exchange
14 - claim
15 - actions
16 - status
17 - requested_by
18 - requested_at
19 - confirmed_by
20 - confirmed_at
21 - declined_by
22 - declined_reason
23 - metadata
24 - declined_at
25 - canceled_by
26 - canceled_at
27 - created_at
28 - updated_at
29 properties:
30 id:
31 type: string
32 title: id
33 description: The order change's ID.
34 version:
35 type: number
36 title: version
37 description: >-
38 The order change's version. This will be the order's version when the
39 change is applied.
40 change_type:
41 type: string
42 description: The order change's type.
43 enum:
44 - return
45 - exchange
46 - claim
47 - edit
48 order_id:
49 type: string
50 title: order_id
51 description: The ID of the order this change applies on.
52 return_id:
53 type: string
54 title: return_id
55 description: The ID of the associated return.
56 exchange_id:
57 type: string
58 title: exchange_id
59 description: The ID of the associated exchange.
60 claim_id:
61 type: string
62 title: claim_id
63 description: The ID of the associated claim.
64 order:
65 type: object
66 return_order:
67 type: object
68 exchange:
69 $ref: ./OrderExchange.yaml
70 claim:
71 $ref: ./OrderClaim.yaml
72 actions:
73 type: array
74 description: The order change's actions.
75 items:
76 $ref: ./OrderChangeAction.yaml
77 status:
78 type: string
79 description: The order change's status.
80 enum:
81 - canceled
82 - requested
83 - pending
84 - confirmed
85 - declined
86 requested_by:
87 type: string
88 title: requested_by
89 description: The ID of the user that requested the change.
90 requested_at:
91 type: string
92 title: requested_at
93 description: The date the order change was requested.
94 format: date-time
95 confirmed_by:
96 type: string
97 title: confirmed_by
98 description: The ID of the user that confirmed the order change.
99 confirmed_at:
100 type: string
101 title: confirmed_at
102 description: The date the order change was confirmed.
103 format: date-time
104 declined_by:
105 type: string
106 title: declined_by
107 description: The ID of the user that declined the order change.
108 declined_reason:
109 type: string
110 title: declined_reason
111 description: The reason the order change was declined.
112 metadata:
113 type: object
114 description: The order change's metadata, can hold custom key-value pairs.
115 externalDocs:
116 url: https://docs.medusajs.com/api/store#manage-metadata
117 description: Learn how to manage metadata
118 declined_at:
119 type: string
120 title: declined_at
121 description: The date the order change was declined.
122 format: date-time
123 canceled_by:
124 type: string
125 title: canceled_by
126 description: The ID of the user that canceled the order change.
127 canceled_at:
128 type: string
129 title: canceled_at
130 description: The date the order change was canceled.
131 format: date-time
132 created_at:
133 type: string
134 format: date-time
135 title: created_at
136 description: The date the order change was created.
137 updated_at:
138 type: string
139 format: date-time
140 title: updated_at
141 description: The date the order change was updated.
142 carry_over_promotions:
143 type: boolean
144 title: carry_over_promotions
145 description: >-
146 Whether promotions from the original order should be carried over to the
147 order change (specifically, exchanges).
148 no_notification:
149 type: boolean
150 title: no_notification
151 description: >-
152 Whether to send notifications to the customer regarding the order change's
153 updates.