1 type: object
2 description: The order change's exchange.
3 x-schemaName: OrderExchange
4 required:
5 - id
6 - order_id
7 - order_version
8 - display_id
9 - additional_items
10 - metadata
11 properties:
12 order_id:
13 type: string
14 title: order_id
15 description: The ID of the order the exchange is created for.
16 additional_items:
17 type: array
18 description: The new items (outbound) sent by the exchange.
19 items:
20 $ref: ./BaseExchangeItem.yaml
21 no_notification:
22 type: boolean
23 title: no_notification
24 description: Whether to send the customer notifications when the exchange is updated.
25 difference_due:
26 type: number
27 title: difference_due
28 description: >-
29 The amount to be exchanged or refunded. If the amount is negative, it must
30 be refunded. If positive, additional payment is required from the
31 customer.
32 return:
33 $ref: ./Return.yaml
34 return_id:
35 type: string
36 title: return_id
37 description: The ID of the associated exchange.
38 id:
39 type: string
40 title: id
41 description: The exchange's ID.
42 display_id:
43 type: number
44 title: display_id
45 description: The exchange's display ID.
46 shipping_methods:
47 type: array
48 description: The shipping methods used to send the new (outbound) items.
49 items:
50 $ref: ./OrderShippingMethod.yaml
51 transactions:
52 type: array
53 description: The exchange's transactions.
54 externalDocs:
55 url: https://docs.medusajs.com/resources/commerce-modules/order/transactions
56 items:
57 $ref: ./OrderTransaction.yaml
58 metadata:
59 type: object
60 description: The exchange's metadata, can hold custom key-value pairs.
61 externalDocs:
62 url: https://docs.medusajs.com/api/store#manage-metadata
63 description: Learn how to manage metadata
64 created_at:
65 type: string
66 format: date-time
67 title: created_at
68 description: The date that the exchange was created.
69 updated_at:
70 type: string
71 format: date-time
72 title: updated_at
73 description: The date that the exchange was updated.
74 order:
75 $ref: ./Order.yaml
76 order_version:
77 type: number
78 title: order_version
79 description: The version of the order when the exchange is applied.
80 raw_difference_due:
81 oneOf:
82 - type: string
83 title: raw_difference_due
84 description: The exchange's raw difference due.
85 - type: number
86 title: raw_difference_due
87 description: The exchange's raw difference due.
88 - type: string
89 title: raw_difference_due
90 description: The exchange's raw difference due.
91 - type: number
92 title: raw_difference_due
93 description: The exchange's raw difference due.
94 allow_backorder:
95 type: boolean
96 title: allow_backorder
97 description: >-
98 Whether variants that are out of stock can be added to the exchange as
99 outbound items.
100 created_by:
101 type: string
102 title: created_by
103 description: The ID of the user that created the exchange.
104 deleted_at:
105 type: string
106 format: date-time
107 title: deleted_at
108 description: The date the exchange was deleted.
109 canceled_at:
110 type: string
111 title: canceled_at
112 description: The date the exchange was canceled.
113 format: date-time