Raw
1 openapi: 3.0.0
2 info:
3 version: 2.21.2
4 title: Medusa Storefront API
5 license:
6 name: MIT
7 url: https://github.com/medusajs/medusa/blob/master/LICENSE
8 servers:
9 - url: http://localhost:9000
10 - url: https://api.medusajs.com
11 tags:
12 - name: Auth
13 description: |
14 Auth API routes allow you to manage a customer's authentication.
15 - name: Carts
16 description: >
17 A cart is a virtual shopping bag that customers can use to add items they
18 want to purchase.
19
20
21 A cart is then used to checkout and place an order.
22
23
24 These API routes allow customers to create and manage their cart, and
25 place an order.
26 externalDocs:
27 description: How to implement cart functionality in a storefront.
28 url: https://docs.medusajs.com/resources/storefront-development/cart
29 x-associatedSchema:
30 $ref: ./components/schemas/StoreCart.yaml
31 - name: Collections
32 description: >
33 A product collection organizes products into a collection for marketing
34 purposes. For example, a summer collection.
35
36
37 These API routes allow customers to browse collections and their products.
38 externalDocs:
39 description: How to list product collections in a storefront.
40 url: >-
41 https://docs.medusajs.com/resources/storefront-development/products/collections/list
42 x-associatedSchema:
43 $ref: ./components/schemas/StoreCollection.yaml
44 - name: Currencies
45 description: >
46 A store has multiple currencies, and product prices can be different for
47 each currency.
48
49
50 When retrieving product variant prices, you specify either the ID of a
51 region or a currency that the customer selected.
52
53
54 These API routes allow customers to browse currencies.
55 externalDocs:
56 description: How to retrieve product variant prices in a storefront.
57 url: >-
58 https://docs.medusajs.com/resources/storefront-development/products/price
59 x-associatedSchema:
60 $ref: ./components/schemas/StoreCurrency.yaml
61 - name: Customers
62 description: >
63 Customers can place orders as guest customers or register.
64
65
66 When a customer registers, they can manage their profile, save addresses
67 for later usage, and more.
68
69
70 These API routes allow customers to create and manage their accounts.
71 externalDocs:
72 description: How to implement customer account functionalities in a storefront.
73 url: https://docs.medusajs.com/resources/storefront-development/customers
74 x-associatedSchema:
75 $ref: ./components/schemas/StoreCustomer.yaml
76 - name: Gift Cards
77 description: >
78 A gift card is a prepaid card that customers can use to purchase products
79 in the store.
80
81 Customers can purchase gift cards for themselves or others, and then use
82 them to pay for their orders.
83
84 These API routes allow logged-in customers to create and manage their gift
85 cards.
86
87 <Note>
88
89 Gift Cards are available through the [Loyalty
90 Plugin](https://docs.medusajs.com/resources/commerce-modules/loyalty).
91
92 </Note>
93 x-associatedSchema:
94 $ref: ./components/schemas/StoreGiftCard.yaml
95 - name: Locales
96 description: >
97 A locale is a language that content is translated into for customers to
98 view in a storefront.
99
100 Medusa installs locales by default. These API routes allow you to retrieve
101 supported locales in the store.
102 externalDocs:
103 description: Learn more about locales and translations.
104 url: >-
105 https://docs.medusajs.com/resources/commerce-modules/translation/concepts
106 x-associatedSchema:
107 $ref: ./components/schemas/StoreLocale.yaml
108 - name: Multi-Factor Authentication (MFA) Factors
109 description: >
110 Multi-factor authentication (MFA) factors are additional ways to verify a
111 customer's identity during login, in addition to their password. Examples
112 of MFA factors include authenticator apps, SMS messages, and email.
113
114 These API routes allow customers to manage their MFA factors, such as
115 enabling an authenticator app or generating recovery codes.
116 externalDocs:
117 description: Learn more about MFA in Medusa
118 url: https://docs.medusajs.com/resources/commerce-modules/auth/mfa
119 - name: Orders
120 description: |
121 Guest and registered customers can view orders they placed.
122
123 These API routes allow customers to view their orders.
124 x-associatedSchema:
125 $ref: ./components/schemas/StoreOrder.yaml
126 - name: Payment Collections
127 description: >
128 A cart must have a payment collection with an authorized payment session.
129
130
131 Use these API routes during checkout to set the cart's payment provider
132 and authorize its payment session.
133 externalDocs:
134 description: How to implement payment during checkout.
135 url: >-
136 https://docs.medusajs.com/resources/storefront-development/checkout/payment
137 x-associatedSchema:
138 $ref: ./components/schemas/StorePaymentCollection.yaml
139 - name: Payment Providers
140 description: >
141 Each region has a set of payment providers enabled.
142
143
144 During checkout, you retrieve the available payment providers in the
145 customer's region to show them to the customer. Customers then choose
146 their preferred provider to authorize their payment and place their order.
147
148
149 These API routes allow customers to view available payment providers in
150 their region.
151 externalDocs:
152 description: How to implement payment during checkout.
153 url: >-
154 https://docs.medusajs.com/resources/storefront-development/checkout/payment
155 x-associatedSchema:
156 $ref: ./components/schemas/StorePaymentProvider.yaml
157 - name: Product Categories
158 description: |
159 Products can be categorized into categories.
160
161 These API routes allow customers to browse categories and their products.
162 externalDocs:
163 description: How to list product categories in a storefront.
164 url: >-
165 https://docs.medusajs.com/resources/storefront-development/products/categories/list
166 x-associatedSchema:
167 $ref: ./components/schemas/StoreProductCategory.yaml
168 - name: Product Options
169 x-associatedSchema:
170 $ref: ./components/schemas/StoreProductOption.yaml
171 description: >
172 A product option is a way to define different options for a product, such
173 as "Size" or "Color". Product options can be created globally and used by
174 multiple products, or they can be exclusive to a specific product.
175
176 These API routes allow customers to view product options.
177 externalDocs:
178 description: Use Product Options in a Storefront
179 url: >-
180 https://docs.medusajs.com/resources/storefront-development/products/options
181 - name: Product Tags
182 x-associatedSchema:
183 $ref: ./components/schemas/StoreProductTag.yaml
184 - name: Product Types
185 x-associatedSchema:
186 $ref: ./components/schemas/StoreProductType.yaml
187 - name: Product Variants
188 x-associatedSchema:
189 $ref: ./components/schemas/StoreProductVariant.yaml
190 - name: Products
191 description: >
192 Customers browse products for their purchase.
193
194
195 A product has variants for different option values. The customer chooses
196 from these variants before adding it to the cart.
197
198
199 These API routes allow customers to browse products.
200 externalDocs:
201 description: How to list products, get their prices, and more in a storefront.
202 url: https://docs.medusajs.com/resources/storefront-development/products
203 x-associatedSchema:
204 $ref: ./components/schemas/StoreProduct.yaml
205 - name: Regions
206 description: >
207 Regions are different countries or geographical regions that the commerce
208 store serves customers in.
209
210
211 Customers can choose what region they're in to view prices of that
212 region's currency.
213
214
215 Use these API routes to retrieve available regions in the store.
216 externalDocs:
217 description: How to retrieve and store selected region in a storefront.
218 url: https://docs.medusajs.com/resources/storefront-development/regions
219 x-associatedSchema:
220 $ref: ./components/schemas/StoreRegion.yaml
221 - name: Return Reasons
222 description: >
223 A return reason is a possible reason a customer wants to return an item.
224
225
226 Use these API routes when implementing return creation flow in your
227 storefront to allow customers to select their return reason.
228 x-associatedSchema:
229 $ref: ./components/schemas/StoreReturnReason.yaml
230 - name: Returns
231 description: >
232 Customers can request to return items in their order. The admin user then
233 receives and handles the return.
234
235
236 These API routes allows customers to create a return.
237 x-associatedSchema:
238 $ref: ./components/schemas/StoreReturn.yaml
239 - name: Search
240 description: >
241 Search the indexes that your application exposes to the storefront.
242
243
244 An index is only searchable through these API routes once it's allowed
245 with the `configureStoreSearch` middleware.
246 - name: Shipping Options
247 description: >
248 A shipping option is a way of shipping an item to or from the customer.
249
250
251 During the checkout flow, the customer selects their preferred shipping
252 option to receive their order.
253
254
255 These API routes allow customers to retrieve available shipping options
256 for their context.
257 externalDocs:
258 description: How to implement shipping during checkout.
259 url: >-
260 https://docs.medusajs.com/resources/storefront-development/checkout/shipping
261 x-associatedSchema:
262 $ref: ./components/schemas/StoreShippingOption.yaml
263 - name: Store Credit Accounts
264 x-associatedSchema:
265 description: >
266 A store credit account is a way for customers to manage their store
267 credit balance. Customers can use their store credit to pay for orders,
268 and view their store credit balance.
269
270 These API routes allow customers to view their store credit accounts.
271
272 <Note>
273
274 Store Credit Accounts are only available through the [Loyalty
275 Plugin](https://docs.medusajs.com/resources/commerce-modules/loyalty).
276
277 </Note>
278 $ref: ./components/schemas/StoreStoreCreditAccount.yaml
279 paths:
280 /auth/customer/emailpass/verification/confirm:
281 $ref: paths/auth_customer_emailpass_verification_confirm.yaml
282 /auth/customer/providers:
283 $ref: paths/auth_customer_providers.yaml
284 /auth/customer/{auth_provider}:
285 $ref: paths/auth_customer_{auth_provider}.yaml
286 /auth/customer/{auth_provider}/callback:
287 $ref: paths/auth_customer_{auth_provider}_callback.yaml
288 /auth/customer/{auth_provider}/register:
289 $ref: paths/auth_customer_{auth_provider}_register.yaml
290 /auth/customer/{auth_provider}/reset-password:
291 $ref: paths/auth_customer_{auth_provider}_reset-password.yaml
292 /auth/customer/{auth_provider}/update:
293 $ref: paths/auth_customer_{auth_provider}_update.yaml
294 /auth/mfa/challenges/{id}/verify:
295 $ref: paths/auth_mfa_challenges_{id}_verify.yaml
296 /auth/mfa/factors:
297 $ref: paths/auth_mfa_factors.yaml
298 /auth/mfa/factors/{id}:
299 $ref: paths/auth_mfa_factors_{id}.yaml
300 /auth/mfa/factors/{id}/verify:
301 $ref: paths/auth_mfa_factors_{id}_verify.yaml
302 /auth/mfa/recovery-codes:
303 $ref: paths/auth_mfa_recovery-codes.yaml
304 /auth/session:
305 $ref: paths/auth_session.yaml
306 /auth/token/refresh:
307 $ref: paths/auth_token_refresh.yaml
308 /auth/verification/confirm:
309 $ref: paths/auth_verification_confirm.yaml
310 /auth/verification/request:
311 $ref: paths/auth_verification_request.yaml
312 /store/carts:
313 $ref: paths/store_carts.yaml
314 /store/carts/{id}:
315 $ref: paths/store_carts_{id}.yaml
316 /store/carts/{id}/complete:
317 $ref: paths/store_carts_{id}_complete.yaml
318 /store/carts/{id}/customer:
319 $ref: paths/store_carts_{id}_customer.yaml
320 /store/carts/{id}/gift-cards:
321 $ref: paths/store_carts_{id}_gift-cards.yaml
322 /store/carts/{id}/line-items:
323 $ref: paths/store_carts_{id}_line-items.yaml
324 /store/carts/{id}/line-items/{line_id}:
325 $ref: paths/store_carts_{id}_line-items_{line_id}.yaml
326 /store/carts/{id}/promotions:
327 $ref: paths/store_carts_{id}_promotions.yaml
328 /store/carts/{id}/shipping-methods:
329 $ref: paths/store_carts_{id}_shipping-methods.yaml
330 /store/carts/{id}/store-credits:
331 $ref: paths/store_carts_{id}_store-credits.yaml
332 /store/carts/{id}/taxes:
333 $ref: paths/store_carts_{id}_taxes.yaml
334 /store/collections:
335 $ref: paths/store_collections.yaml
336 /store/collections/{id}:
337 $ref: paths/store_collections_{id}.yaml
338 /store/currencies:
339 $ref: paths/store_currencies.yaml
340 /store/currencies/{code}:
341 $ref: paths/store_currencies_{code}.yaml
342 /store/customers:
343 $ref: paths/store_customers.yaml
344 /store/customers/me:
345 $ref: paths/store_customers_me.yaml
346 /store/customers/me/addresses:
347 $ref: paths/store_customers_me_addresses.yaml
348 /store/customers/me/addresses/{address_id}:
349 $ref: paths/store_customers_me_addresses_{address_id}.yaml
350 /store/gift-cards/{idOrCode}:
351 $ref: paths/store_gift-cards_{idOrCode}.yaml
352 /store/locales:
353 $ref: paths/store_locales.yaml
354 /store/orders:
355 $ref: paths/store_orders.yaml
356 /store/orders/{id}:
357 $ref: paths/store_orders_{id}.yaml
358 /store/orders/{id}/transfer/accept:
359 $ref: paths/store_orders_{id}_transfer_accept.yaml
360 /store/orders/{id}/transfer/cancel:
361 $ref: paths/store_orders_{id}_transfer_cancel.yaml
362 /store/orders/{id}/transfer/decline:
363 $ref: paths/store_orders_{id}_transfer_decline.yaml
364 /store/orders/{id}/transfer/request:
365 $ref: paths/store_orders_{id}_transfer_request.yaml
366 /store/payment-collections:
367 $ref: paths/store_payment-collections.yaml
368 /store/payment-collections/{id}/payment-sessions:
369 $ref: paths/store_payment-collections_{id}_payment-sessions.yaml
370 /store/payment-providers:
371 $ref: paths/store_payment-providers.yaml
372 /store/product-categories:
373 $ref: paths/store_product-categories.yaml
374 /store/product-categories/{id}:
375 $ref: paths/store_product-categories_{id}.yaml
376 /store/product-options:
377 $ref: paths/store_product-options.yaml
378 /store/product-options/{id}:
379 $ref: paths/store_product-options_{id}.yaml
380 /store/product-tags:
381 $ref: paths/store_product-tags.yaml
382 /store/product-tags/{id}:
383 $ref: paths/store_product-tags_{id}.yaml
384 /store/product-types:
385 $ref: paths/store_product-types.yaml
386 /store/product-types/{id}:
387 $ref: paths/store_product-types_{id}.yaml
388 /store/product-variants:
389 $ref: paths/store_product-variants.yaml
390 /store/products:
391 $ref: paths/store_products.yaml
392 /store/products/{id}:
393 $ref: paths/store_products_{id}.yaml
394 /store/regions:
395 $ref: paths/store_regions.yaml
396 /store/regions/{id}:
397 $ref: paths/store_regions_{id}.yaml
398 /store/return-reasons:
399 $ref: paths/store_return-reasons.yaml
400 /store/return-reasons/{id}:
401 $ref: paths/store_return-reasons_{id}.yaml
402 /store/returns:
403 $ref: paths/store_returns.yaml
404 /store/search:
405 $ref: paths/store_search.yaml
406 /store/shipping-options:
407 $ref: paths/store_shipping-options.yaml
408 /store/shipping-options/{id}/calculate:
409 $ref: paths/store_shipping-options_{id}_calculate.yaml
410 /store/store-credit-accounts:
411 $ref: paths/store_store-credit-accounts.yaml
412 /store/store-credit-accounts/claim:
413 $ref: paths/store_store-credit-accounts_claim.yaml
414 /store/store-credit-accounts/{id}:
415 $ref: paths/store_store-credit-accounts_{id}.yaml
416 components:
417 securitySchemes:
418 jwt_token:
419 type: http
420 x-displayName: JWT Token
421 scheme: bearer
422 cookie_auth:
423 type: apiKey
424 x-displayName: Cookie Session ID
425 in: cookie
426 name: connect.sid
427 reset_password:
428 type: http
429 x-displayName: Reset Password Token
430 scheme: bearer
431 x-is-auth: false