1 type: object
2 description: The cart's details.
3 x-schemaName: StoreCart
4 required:
5 - promotions
6 - id
7 - currency_code
8 - original_item_total
9 - original_item_subtotal
10 - original_item_tax_total
11 - item_total
12 - item_subtotal
13 - item_tax_total
14 - original_total
15 - original_subtotal
16 - original_tax_total
17 - total
18 - subtotal
19 - tax_total
20 - discount_total
21 - discount_tax_total
22 - gift_card_total
23 - gift_card_tax_total
24 - shipping_total
25 - shipping_subtotal
26 - shipping_tax_total
27 - original_shipping_total
28 - original_shipping_subtotal
29 - original_shipping_tax_total
30 properties:
31 id:
32 type: string
33 title: id
34 description: The cart's ID.
35 region:
36 $ref: ./StoreRegion.yaml
37 region_id:
38 type: string
39 title: region_id
40 description: The ID of the region the cart belongs to.
41 customer_id:
42 type: string
43 title: customer_id
44 description: The ID of the customer the cart belongs to.
45 sales_channel_id:
46 type: string
47 title: sales_channel_id
48 description: >
49 The ID of the cart's sales channel. The created order is associated with
50 the same sales channel.
51
52
53 A product's availability in a sales channel only filters the products you
54 retrieve. Medusa doesn't reject a variant added to the cart when its
55 product isn't available in the cart's sales channel. Refer to the guide in
56 the external documentation to learn how to enforce that validation.
57 externalDocs:
58 url: >-
59 https://docs.medusajs.com/resources/commerce-modules/cart/sales-channel-availability
60 email:
61 type: string
62 title: email
63 description: The email of the customer the cart belongs to.
64 format: email
65 currency_code:
66 type: string
67 title: currency_code
68 description: The cart's currency code.
69 example: usd
70 shipping_address:
71 $ref: ./StoreCartAddress.yaml
72 billing_address:
73 $ref: ./StoreCartAddress.yaml
74 items:
75 type: array
76 description: The cart's items.
77 items:
78 $ref: ./StoreCartLineItem.yaml
79 shipping_methods:
80 type: array
81 description: The cart's shipping methods.
82 items:
83 $ref: ./StoreCartShippingMethod.yaml
84 payment_collection:
85 $ref: ./StorePaymentCollection.yaml
86 metadata:
87 type: object
88 description: The cart's metadata, can hold custom key-value pairs.
89 externalDocs:
90 url: https://docs.medusajs.com/api/store#manage-metadata
91 description: Learn how to manage metadata
92 created_at:
93 type: string
94 format: date-time
95 title: created_at
96 description: The date the cart was created.
97 updated_at:
98 type: string
99 format: date-time
100 title: updated_at
101 description: The date the cart was updated.
102 original_item_total:
103 type: number
104 title: original_item_total
105 description: >-
106 The sum of all line items' original totals before discounts, including
107 taxes.
108 original_item_subtotal:
109 type: number
110 title: original_item_subtotal
111 description: >-
112 The sum of all line items' original subtotals before discounts, excluding
113 taxes.
114 original_item_tax_total:
115 type: number
116 title: original_item_tax_total
117 description: The sum of all line items' original tax totals before discounts.
118 item_total:
119 type: number
120 title: item_total
121 description: The sum of all line items' totals after discounts, including taxes.
122 item_subtotal:
123 type: number
124 title: item_subtotal
125 description: The sum of all line items' subtotals before discounts, excluding taxes.
126 item_tax_total:
127 type: number
128 title: item_tax_total
129 description: The sum of all line items' tax totals after discounts.
130 original_total:
131 type: number
132 title: original_total
133 description: >-
134 The cart's total before discounts, including taxes. Calculated as the sum
135 of `original_item_total` and `original_shipping_total`.
136 original_subtotal:
137 type: number
138 title: original_subtotal
139 description: >-
140 The cart's subtotal before discounts, excluding taxes. Calculated as the
141 sum of `original_item_subtotal` and `original_shipping_subtotal`.
142 original_tax_total:
143 type: number
144 title: original_tax_total
145 description: >-
146 The cart's tax total before discounts. Calculated as the sum of
147 `original_item_tax_total` and `original_shipping_tax_total`.
148 total:
149 type: number
150 title: total
151 description: The cart's final total after discounts and credit lines, including taxes.
152 subtotal:
153 type: number
154 title: subtotal
155 description: >-
156 The cart's subtotal before discounts, excluding taxes. Calculated as the
157 sum of `item_subtotal` and `shipping_subtotal`.
158 tax_total:
159 type: number
160 title: tax_total
161 description: >-
162 The cart's tax total after discounts. Calculated as the sum of
163 `item_tax_total` and `shipping_tax_total`.
164 discount_total:
165 type: number
166 title: discount_total
167 description: >-
168 The total amount of discounts applied to the cart, including the tax
169 portion of discounts.
170 discount_tax_total:
171 type: number
172 title: discount_tax_total
173 description: >-
174 The total amount of discounts applied to the cart's tax. Represents the
175 tax portion of discounts.
176 gift_card_total:
177 type: number
178 title: gift_card_total
179 description: The total gift card amount applied on the cart.
180 gift_card_tax_total:
181 type: number
182 title: gift_card_tax_total
183 description: The total taxes applied on the gift card amount.
184 shipping_total:
185 type: number
186 title: shipping_total
187 description: The sum of all shipping methods' totals after discounts, including taxes.
188 shipping_subtotal:
189 type: number
190 title: shipping_subtotal
191 description: >-
192 The sum of all shipping methods' subtotals before discounts, excluding
193 taxes.
194 shipping_tax_total:
195 type: number
196 title: shipping_tax_total
197 description: The sum of all shipping methods' tax totals after discounts.
198 original_shipping_total:
199 type: number
200 title: original_shipping_total
201 description: >-
202 The sum of all shipping methods' original totals before discounts,
203 including taxes.
204 original_shipping_subtotal:
205 type: number
206 title: original_shipping_subtotal
207 description: >-
208 The sum of all shipping methods' original subtotals before discounts,
209 excluding taxes.
210 original_shipping_tax_total:
211 type: number
212 title: original_shipping_tax_total
213 description: The sum of all shipping methods' original tax totals before discounts.
214 promotions:
215 type: array
216 description: The cart's promotions.
217 items:
218 $ref: ./StoreCartPromotion.yaml
219 completed_at:
220 type: string
221 title: completed_at
222 description: The date the cart was completed.
223 format: date-time