|
1
|
openapi: 3.0.0 |
|
2
|
info: |
|
3
|
version: 2.0.0 |
|
4
|
title: Medusa Admin API |
|
5
|
license: |
|
6
|
name: MIT |
|
7
|
url: https://github.com/medusajs/medusa/blob/develop/LICENSE |
|
8
|
tags: |
|
9
|
- name: Api Keys |
|
10
|
description: > |
|
11
|
API keys can be used for authentication or resource-scoping. |
|
12
|
|
|
13
|
|
|
14
|
A secret API key can be used to authenticate admin users. A publishable |
|
15
|
API key can be used to scope client requests to one or more sales |
|
16
|
channels. |
|
17
|
|
|
18
|
|
|
19
|
These API routes allow admin users to manage both publishable and secret |
|
20
|
API keys. |
|
21
|
externalDocs: |
|
22
|
description: Learn more about the API Key Module |
|
23
|
url: https://docs.medusajs.com/resources/commerce-modules/api-key |
|
24
|
x-associatedSchema: |
|
25
|
$ref: "#/components/schemas/AdminApiKey" |
|
26
|
- name: Auth |
|
27
|
description: | |
|
28
|
Auth API routes allow you to manage an admin user's authentication. |
|
29
|
- name: Campaigns |
|
30
|
description: > |
|
31
|
A campaign is a group of promotions that have the same conditions, such as |
|
32
|
start and end dates. |
|
33
|
|
|
34
|
|
|
35
|
These API routes allow admin users to manage campaigns, their conditions, |
|
36
|
and promotions that belong to them. |
|
37
|
externalDocs: |
|
38
|
description: Learn more about campaigns. |
|
39
|
url: https://docs.medusajs.com/resources/commerce-modules/promotion/campaign |
|
40
|
x-associatedSchema: |
|
41
|
$ref: "#/components/schemas/AdminCampaign" |
|
42
|
- name: Claims |
|
43
|
description: > |
|
44
|
An admin creates a claim for an order when a customer reports that an item |
|
45
|
is defective or incorrect. |
|
46
|
|
|
47
|
|
|
48
|
Using these API routes, admin users manage order claims, their items, and |
|
49
|
more. |
|
50
|
x-associatedSchema: |
|
51
|
$ref: "#/components/schemas/AdminClaim" |
|
52
|
externalDocs: |
|
53
|
description: Learn more about order claims. |
|
54
|
url: https://docs.medusajs.com/resources/commerce-modules/order/claim |
|
55
|
- name: Collections |
|
56
|
description: > |
|
57
|
A product collection organizes products into a collection for marketing |
|
58
|
purposes. For example, a summer collection. |
|
59
|
|
|
60
|
|
|
61
|
These API routes allow admin users to manage collections and the products |
|
62
|
in them. |
|
63
|
x-associatedSchema: |
|
64
|
$ref: "#/components/schemas/AdminCollection" |
|
65
|
- name: Currencies |
|
66
|
description: > |
|
67
|
A store can use unlimited currencies, and each region must be associated |
|
68
|
with at least one currency. |
|
69
|
|
|
70
|
|
|
71
|
Currencies are defined by the Currency Module. Currency API Routes allow |
|
72
|
admins to list and update currencies. |
|
73
|
externalDocs: |
|
74
|
description: Learn more about the Currency Module |
|
75
|
url: https://docs.medusajs.com/resources/commerce-modules/currency |
|
76
|
x-associatedSchema: |
|
77
|
$ref: "#/components/schemas/AdminCurrency" |
|
78
|
- name: Customer Groups |
|
79
|
description: > |
|
80
|
Customers can be organized into groups. These groups are useful for |
|
81
|
segregation and marketing purposes. |
|
82
|
|
|
83
|
|
|
84
|
For example, you can provide different prices for specific customers by |
|
85
|
creating a price list conditioned to their group. |
|
86
|
|
|
87
|
|
|
88
|
These API routes allow admin users to manage groups and the customers in |
|
89
|
them. |
|
90
|
externalDocs: |
|
91
|
description: Learn more about the Customer Module |
|
92
|
url: https://docs.medusajs.com/resources/commerce-modules/customer |
|
93
|
x-associatedSchema: |
|
94
|
$ref: "#/components/schemas/AdminCustomerGroup" |
|
95
|
- name: Customers |
|
96
|
description: > |
|
97
|
Customers can either be created when they register through the Store APIs, |
|
98
|
or created by the admin using the Admin APIs. |
|
99
|
|
|
100
|
|
|
101
|
These API routes allow admin users to manage customers in their store. |
|
102
|
externalDocs: |
|
103
|
description: Learn more about the Customer Module |
|
104
|
url: https://docs.medusajs.com/resources/commerce-modules/customer |
|
105
|
x-associatedSchema: |
|
106
|
$ref: "#/components/schemas/AdminCustomer" |
|
107
|
- name: Draft Orders |
|
108
|
description: > |
|
109
|
A draft order is an order created by the admin user. This is useful for |
|
110
|
orders created offline or from clients other than a storefront, such as a |
|
111
|
third-party integration. |
|
112
|
|
|
113
|
|
|
114
|
These API routes allow admin users to create and manage draft orders. |
|
115
|
externalDocs: |
|
116
|
description: Learn more about the Order Module |
|
117
|
url: https://docs.medusajs.com/resources/commerce-modules/order |
|
118
|
x-associatedSchema: |
|
119
|
$ref: "#/components/schemas/AdminDraftOrder" |
|
120
|
- name: Exchanges |
|
121
|
description: > |
|
122
|
An exchange is the replacement of an item that the customer ordered with |
|
123
|
another. |
|
124
|
|
|
125
|
|
|
126
|
These API routes allow admin users to create and manage exchanges. |
|
127
|
externalDocs: |
|
128
|
description: Learn more about the order exchanges. |
|
129
|
url: https://docs.medusajs.com/resources/commerce-modules/order/exchange |
|
130
|
x-associatedSchema: |
|
131
|
$ref: "#/components/schemas/AdminExchange" |
|
132
|
- name: Feature Flags |
|
133
|
description: > |
|
134
|
Feature flags are used to enable or disable certain features in your |
|
135
|
Medusa application. |
|
136
|
|
|
137
|
These API routes allow admin users to view feature flags. |
|
138
|
- name: Fulfillment Providers |
|
139
|
description: > |
|
140
|
A fulfillment provider is a third-party integration or custom logic used |
|
141
|
to fulfill an order's items. |
|
142
|
|
|
143
|
|
|
144
|
Fulfillment providers are installed as module providers. |
|
145
|
externalDocs: |
|
146
|
description: Learn more about the fulfillment providers and how to create them. |
|
147
|
url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/fulfillment-provider |
|
148
|
x-associatedSchema: |
|
149
|
$ref: "#/components/schemas/AdminFulfillmentProvider" |
|
150
|
- name: Fulfillment Sets |
|
151
|
description: > |
|
152
|
A fulfillment set is a general form or way of fulfillment, such as |
|
153
|
"shipping" or "pick up". |
|
154
|
|
|
155
|
|
|
156
|
All fulfillment-related configurations in a store are related to a |
|
157
|
fulfillment set. |
|
158
|
|
|
159
|
|
|
160
|
These API routes allow admin users to manage fulfillment sets. |
|
161
|
externalDocs: |
|
162
|
description: Learn more about fulfillment sets. |
|
163
|
url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/concepts |
|
164
|
x-associatedSchema: |
|
165
|
$ref: "#/components/schemas/AdminFulfillmentSet" |
|
166
|
- name: Fulfillments |
|
167
|
description: > |
|
168
|
A fulfillment is created for items in an order, return, exchanges, or |
|
169
|
claims to deliver items to/from the customer. |
|
170
|
|
|
171
|
|
|
172
|
These API routes allow admin users to manage fulfillments. |
|
173
|
externalDocs: |
|
174
|
description: Learn more about fulfillments. |
|
175
|
url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/item-fulfillment |
|
176
|
x-associatedSchema: |
|
177
|
$ref: "#/components/schemas/AdminFulfillment" |
|
178
|
- name: Gift Cards |
|
179
|
description: > |
|
180
|
A gift card is a prepaid card that can be used to pay for items during |
|
181
|
checkout. |
|
182
|
|
|
183
|
Gift cards can be purchased by customers, or created by admin users. When |
|
184
|
a gift card is redeemed, its amount is added to the customer's store |
|
185
|
credit account, which can then be used to pay for items during checkout. |
|
186
|
|
|
187
|
These API routes allow admin users to manage gift cards, transfer gift |
|
188
|
cards between customers, and more. |
|
189
|
|
|
190
|
<Note> |
|
191
|
|
|
192
|
Gift Card routes are only available through the [Loyalty |
|
193
|
Plugin](https://docs.medusajs.com/resources/commerce-modules/loyalty). |
|
194
|
|
|
195
|
</Note> |
|
196
|
x-associatedSchema: |
|
197
|
$ref: "#/components/schemas/AdminGiftCard" |
|
198
|
- name: Index |
|
199
|
description: | |
|
200
|
The Index Module is a tool to perform high-performance queries across modules, for example, to filter linked modules. |
|
201
|
The Index Module is currently experimental and is hidden behind a feature flag. Learn more about it and how to enable it in the [Index Module guide](https://docs.medusajs.com/learn/fundamentals/module-links/index-module). |
|
202
|
- name: Inventory Items |
|
203
|
description: | |
|
204
|
An inventory item is a stock-kept product whose inventory is managed. |
|
205
|
|
|
206
|
These API routes allow admin users to manage inventory items. |
|
207
|
externalDocs: |
|
208
|
description: Learn more about inventory items. |
|
209
|
url: https://docs.medusajs.com/resources/commerce-modules/inventory/concepts |
|
210
|
x-associatedSchema: |
|
211
|
$ref: "#/components/schemas/AdminInventoryItem" |
|
212
|
- name: Invites |
|
213
|
description: > |
|
214
|
An admin can invite new users to manage their team. This allows new users |
|
215
|
to authenticate as admins and perform admin functionalities. |
|
216
|
|
|
217
|
|
|
218
|
These API routes allow admin users to manage invites. |
|
219
|
externalDocs: |
|
220
|
description: Learn more about the User Module |
|
221
|
url: https://docs.medusajs.com/resources/commerce-modules/user |
|
222
|
x-associatedSchema: |
|
223
|
$ref: "#/components/schemas/AdminInvite" |
|
224
|
- name: Layouts |
|
225
|
description: > |
|
226
|
An admin can modify the layout of their admin dashboard. This allows |
|
227
|
admins to customize their dashboard to their preferences and needs. |
|
228
|
|
|
229
|
These API routes allow admin users to manage layouts. |
|
230
|
- name: Locales |
|
231
|
description: > |
|
232
|
A locale is a language that content is translated into for customers to |
|
233
|
view in a storefront. |
|
234
|
|
|
235
|
Medusa installs locales by default. These API routes allow admin users to |
|
236
|
retrieve and view locales. |
|
237
|
externalDocs: |
|
238
|
description: Learn more about locales and translations. |
|
239
|
url: https://docs.medusajs.com/resources/commerce-modules/translation/concepts |
|
240
|
x-associatedSchema: |
|
241
|
$ref: "#/components/schemas/AdminLocale" |
|
242
|
- name: Multi-Factor Authentication |
|
243
|
description: > |
|
244
|
Multi-factor authentication (MFA) adds an extra layer of security to admin |
|
245
|
accounts by requiring additional verification factors during login, such |
|
246
|
as a TOTP code or a recovery code. |
|
247
|
|
|
248
|
These API routes allow admin users to manage their MFA factors, |
|
249
|
challenges, and recovery codes. |
|
250
|
externalDocs: |
|
251
|
description: Learn more about MFA in Medusa |
|
252
|
url: https://docs.medusajs.com/resources/commerce-modules/auth/mfa |
|
253
|
- name: Notifications |
|
254
|
description: > |
|
255
|
A notification informs an admin user of store changes or status changes of |
|
256
|
background tasks. |
|
257
|
|
|
258
|
|
|
259
|
These API routes allow admin users to view and manage notifications. |
|
260
|
x-associatedSchema: |
|
261
|
$ref: "#/components/schemas/AdminNotification" |
|
262
|
- name: Order Changes |
|
263
|
description: > |
|
264
|
An order change is a proposed change to an order, such as adding or |
|
265
|
removing items, changing shipping methods, and more. They can be |
|
266
|
associated with order edits, claims, or exchanges. |
|
267
|
|
|
268
|
These API routes allow admin users to manage order changes. |
|
269
|
externalDocs: |
|
270
|
description: Learn more about order changes. |
|
271
|
url: https://docs.medusajs.com/resources/commerce-modules/order/order-change |
|
272
|
x-associatedSchema: |
|
273
|
$ref: "#/components/schemas/AdminOrderChange" |
|
274
|
- name: Order Edits |
|
275
|
description: > |
|
276
|
An order edit is a change to an order's details, such as items, shipping |
|
277
|
methods, and more. |
|
278
|
|
|
279
|
|
|
280
|
Changes made by an order edit are only applied on the order once they're |
|
281
|
confirmed. |
|
282
|
|
|
283
|
|
|
284
|
The order's previous version is retained due to versioning. |
|
285
|
|
|
286
|
|
|
287
|
These API routes allow admin users to make edits to an order and manage |
|
288
|
those edits. |
|
289
|
externalDocs: |
|
290
|
description: Learn more about the Order Module |
|
291
|
url: https://docs.medusajs.com/resources/commerce-modules/order |
|
292
|
- name: Orders |
|
293
|
description: | |
|
294
|
An order is a purchase made by a customer through a storefront. |
|
295
|
|
|
296
|
Orders can also originally be created as draft orders. |
|
297
|
|
|
298
|
These API routes allow admin users to view and manage orders. |
|
299
|
externalDocs: |
|
300
|
description: Learn more about the orders |
|
301
|
url: https://docs.medusajs.com/resources/commerce-modules/order/concepts |
|
302
|
x-associatedSchema: |
|
303
|
$ref: "#/components/schemas/AdminOrder" |
|
304
|
- name: Payment Collections |
|
305
|
description: > |
|
306
|
A payment collection is one or more payments of an order. They're also |
|
307
|
used for outstanding payments due to order exchanges or claims. |
|
308
|
|
|
309
|
|
|
310
|
Every purchase or request for payment starts with a payment collection. |
|
311
|
|
|
312
|
|
|
313
|
A payment collection holds the payment sessions used to authorize the |
|
314
|
payment amount, and the payments to be captured / refunded. |
|
315
|
|
|
316
|
|
|
317
|
These API routes allow admin users to manage payment collections. |
|
318
|
externalDocs: |
|
319
|
description: Learn more about payment collections. |
|
320
|
url: https://docs.medusajs.com/resources/commerce-modules/payment/payment-collection |
|
321
|
x-associatedSchema: |
|
322
|
$ref: "#/components/schemas/AdminPaymentCollection" |
|
323
|
- name: Payments |
|
324
|
description: > |
|
325
|
A payment is created when a payment amount is authorized. The payment can |
|
326
|
then be captured or refunded. |
|
327
|
|
|
328
|
|
|
329
|
A payment is created from the payment session that was authorized, and it |
|
330
|
belongs to the payment session's collection. |
|
331
|
|
|
332
|
|
|
333
|
These API routes allow admin users to manage payments. |
|
334
|
externalDocs: |
|
335
|
description: Learn more about payments. |
|
336
|
url: https://docs.medusajs.com/resources/commerce-modules/payment/payment |
|
337
|
x-associatedSchema: |
|
338
|
$ref: "#/components/schemas/AdminPayment" |
|
339
|
- name: Plugins |
|
340
|
description: > |
|
341
|
A plugin is a package of reusable Medusa customizations that you can |
|
342
|
install in any Medusa application. |
|
343
|
|
|
344
|
Plugins can be used to add new functionality, such as wishlists, or |
|
345
|
integrate third-party services, such as payment providers. |
|
346
|
|
|
347
|
These API routes allow admin users to retrieve plugins installed in their |
|
348
|
Medusa application. |
|
349
|
externalDocs: |
|
350
|
description: Learn more about plugins. |
|
351
|
url: https://docs.medusajs.com/learn/fundamentals/plugins |
|
352
|
x-associatedSchema: |
|
353
|
$ref: "#/components/schemas/AdminPlugin" |
|
354
|
- name: Price Lists |
|
355
|
description: > |
|
356
|
A price list is a group of prices applied if the specified conditions and |
|
357
|
rules are satisfied. |
|
358
|
|
|
359
|
|
|
360
|
Price lists are useful for sales or special prices for special conditions, |
|
361
|
such as applying prices for a set of customers. |
|
362
|
|
|
363
|
|
|
364
|
These API routes allow admin users to manage price lists. |
|
365
|
externalDocs: |
|
366
|
description: Learn more about price lists. |
|
367
|
url: https://docs.medusajs.com/resources/commerce-modules/pricing/concepts#price-list |
|
368
|
x-associatedSchema: |
|
369
|
$ref: "#/components/schemas/AdminPriceList" |
|
370
|
- name: Price Preferences |
|
371
|
description: > |
|
372
|
A price preference is used to specify whether tax-inclusiveness is enabled |
|
373
|
for a context, such as a region or currency code. |
|
374
|
|
|
375
|
|
|
376
|
These API routes allow admin users to manage whether a region or currency |
|
377
|
is tax inclusive. |
|
378
|
externalDocs: |
|
379
|
description: Learn more about tax-inclusiveness and the role of a price preference. |
|
380
|
url: https://docs.medusajs.com/resources/commerce-modules/pricing/tax-inclusive-pricing |
|
381
|
x-associatedSchema: |
|
382
|
$ref: "#/components/schemas/AdminPricePreference" |
|
383
|
- name: Product Categories |
|
384
|
description: > |
|
385
|
Products can be categorized into categories. |
|
386
|
|
|
387
|
|
|
388
|
Categories are nested and their heirarchy can be managed, giving admin |
|
389
|
users flexibility in how they categorize their products. |
|
390
|
|
|
391
|
|
|
392
|
These API routes allow admin users to manage categories and the products |
|
393
|
in them. |
|
394
|
externalDocs: |
|
395
|
description: Learn more about the Product Module |
|
396
|
url: https://docs.medusajs.com/resources/commerce-modules/product |
|
397
|
x-associatedSchema: |
|
398
|
$ref: "#/components/schemas/AdminProductCategory" |
|
399
|
- name: Product Options |
|
400
|
x-associatedSchema: |
|
401
|
$ref: "#/components/schemas/AdminProductOption" |
|
402
|
description: > |
|
403
|
A product option is a way to define different options for a product, such |
|
404
|
as "Size" or "Color". Product options can be created globally and used by |
|
405
|
multiple products, or they can be exclusive to a specific product. |
|
406
|
|
|
407
|
These API routes allow admin users to manage product options. |
|
408
|
externalDocs: |
|
409
|
description: Learn more about the Product Module |
|
410
|
url: https://docs.medusajs.com/resources/commerce-modules/product |
|
411
|
- name: Product Tags |
|
412
|
description: > |
|
413
|
A tag is another way of organizing a product. Each tag has a name and a |
|
414
|
value. |
|
415
|
|
|
416
|
|
|
417
|
Products are organized into the same tag if they have the same value. |
|
418
|
|
|
419
|
|
|
420
|
These API routes allow admin users to manage product tags. |
|
421
|
externalDocs: |
|
422
|
description: Learn more about the Product Module |
|
423
|
url: https://docs.medusajs.com/resources/commerce-modules/product |
|
424
|
x-associatedSchema: |
|
425
|
$ref: "#/components/schemas/AdminProductTag" |
|
426
|
- name: Product Types |
|
427
|
description: | |
|
428
|
Products can be organized into types. Each type has a name and a value. |
|
429
|
|
|
430
|
Products are organized into the same type if they have the same value. |
|
431
|
|
|
432
|
These API routes allow admin users to manage product types. |
|
433
|
externalDocs: |
|
434
|
description: Learn more about the Product Module |
|
435
|
url: https://docs.medusajs.com/resources/commerce-modules/product |
|
436
|
x-associatedSchema: |
|
437
|
$ref: "#/components/schemas/AdminProductType" |
|
438
|
- name: Product Variants |
|
439
|
description: > |
|
440
|
A product variant is a saleable form of the product. |
|
441
|
|
|
442
|
|
|
443
|
Each variant has different option values. For example, a "Shirt" product |
|
444
|
may have a "Blue" variant and a "Green" variant. Customers choose from |
|
445
|
these variants when they buy the product. |
|
446
|
|
|
447
|
|
|
448
|
These API routes allow admin users to manage product variants. |
|
449
|
externalDocs: |
|
450
|
description: Learn more about the Product Module |
|
451
|
url: https://docs.medusajs.com/resources/commerce-modules/product |
|
452
|
x-associatedSchema: |
|
453
|
$ref: "#/components/schemas/AdminProductVariant" |
|
454
|
- name: Products |
|
455
|
description: > |
|
456
|
A product is a set of variants that the customer chooses from when making |
|
457
|
a purchase. |
|
458
|
|
|
459
|
|
|
460
|
A product can be organized into categories or collections. |
|
461
|
|
|
462
|
|
|
463
|
A product can have many options, and variants for each of these options' |
|
464
|
values. |
|
465
|
|
|
466
|
|
|
467
|
These API routes allow admin users to manage products. |
|
468
|
externalDocs: |
|
469
|
description: Learn more about the Product Module |
|
470
|
url: https://docs.medusajs.com/resources/commerce-modules/product |
|
471
|
x-associatedSchema: |
|
472
|
$ref: "#/components/schemas/AdminProduct" |
|
473
|
- name: Promotions |
|
474
|
description: > |
|
475
|
A promotion discounts an amount or percentage off a cart's items, shipping |
|
476
|
methods, or the entire order. |
|
477
|
|
|
478
|
|
|
479
|
Promotions have different types, such as a `standard` promotion that just |
|
480
|
discounts an amount, or a `buyget` promotion to enforce a "buy X get Y" |
|
481
|
promotion. |
|
482
|
|
|
483
|
|
|
484
|
A promotion has rules to restrict how and when they're applied. |
|
485
|
|
|
486
|
|
|
487
|
Promotions belong to a campaign, which sets conditions on the promotion |
|
488
|
such as when it starts and ends. |
|
489
|
|
|
490
|
|
|
491
|
These API routes allow admin users to manage promotions. |
|
492
|
externalDocs: |
|
493
|
description: Learn more about promotions. |
|
494
|
url: https://docs.medusajs.com/resources/commerce-modules/promotion/concepts |
|
495
|
x-associatedSchema: |
|
496
|
$ref: "#/components/schemas/AdminPromotion" |
|
497
|
- name: Property Labels |
|
498
|
x-associatedSchema: |
|
499
|
$ref: "#/components/schemas/AdminPropertyLabel" |
|
500
|
- name: Refund Reasons |
|
501
|
description: > |
|
502
|
A refund reason is a possible reason used when issuing a refund to the |
|
503
|
customer, such as when returning an item and refunding the customer. |
|
504
|
|
|
505
|
|
|
506
|
These API routes allow admin users to manage refund reasons. |
|
507
|
x-associatedSchema: |
|
508
|
$ref: "#/components/schemas/AdminRefundReason" |
|
509
|
- name: Regions |
|
510
|
description: > |
|
511
|
Regions are different countries or geographical regions that the commerce |
|
512
|
store serves customers in. |
|
513
|
|
|
514
|
|
|
515
|
These API routes allow admin users to manage regions, their providers, and |
|
516
|
more. |
|
517
|
externalDocs: |
|
518
|
description: Learn more about the Region Module. |
|
519
|
url: https://docs.medusajs.com/resources/commerce-modules/region |
|
520
|
x-associatedSchema: |
|
521
|
$ref: "#/components/schemas/AdminRegion" |
|
522
|
- name: Reservations |
|
523
|
description: > |
|
524
|
A reservation is unavailable quantity of an inventory item in a location. |
|
525
|
|
|
526
|
|
|
527
|
A reservation is created automatically for variants in an order whose |
|
528
|
`manage_inventory` is enabled. Admin users can also create reservations |
|
529
|
manually. |
|
530
|
|
|
531
|
|
|
532
|
These API routes allow admin users to manage reservations. |
|
533
|
externalDocs: |
|
534
|
description: Learn more about reservations and other inventory concepts. |
|
535
|
url: https://docs.medusajs.com/resources/commerce-modules/inventory/concepts |
|
536
|
x-associatedSchema: |
|
537
|
$ref: "#/components/schemas/AdminReservation" |
|
538
|
- name: Return Reasons |
|
539
|
description: > |
|
540
|
A return reason is a possible reason that an item is returned from the |
|
541
|
customer, such as when returning an item. |
|
542
|
|
|
543
|
|
|
544
|
These API routes allow admin users to manage return reasons. |
|
545
|
x-associatedSchema: |
|
546
|
$ref: "#/components/schemas/AdminReturnReason" |
|
547
|
- name: Returns |
|
548
|
description: > |
|
549
|
Admin users create a return when a customer returns an item to them. |
|
550
|
|
|
551
|
|
|
552
|
Returns can also be created by customers through the storefront, and |
|
553
|
admins will be able to manage them and make refunds, if necessary. Refunds |
|
554
|
are made through the [Payment API Routes](#payment) |
|
555
|
|
|
556
|
|
|
557
|
These API routes allow admin users to manage returns. |
|
558
|
externalDocs: |
|
559
|
description: Learn more about order returns. |
|
560
|
url: https://docs.medusajs.com/resources/commerce-modules/order/return |
|
561
|
x-associatedSchema: |
|
562
|
$ref: "#/components/schemas/AdminReturn" |
|
563
|
- name: Sales Channels |
|
564
|
description: > |
|
565
|
A sales channel indicates a channel where products can be sold in. For |
|
566
|
example, a webshop or a mobile app. |
|
567
|
|
|
568
|
|
|
569
|
These API routes allow admins to manage sales channels and the products |
|
570
|
available in them. |
|
571
|
externalDocs: |
|
572
|
description: Learn more about the Sales Channel Module. |
|
573
|
url: https://docs.medusajs.com/resources/commerce-modules/sales-channel |
|
574
|
x-associatedSchema: |
|
575
|
$ref: "#/components/schemas/AdminSalesChannel" |
|
576
|
- name: Search |
|
577
|
description: > |
|
578
|
Search the entities that have a search index and are registered as search |
|
579
|
entities in the Medusa Admin dashboard. |
|
580
|
- name: Search Indexes |
|
581
|
description: > |
|
582
|
A search index stores the documents of an entity so they can be searched. |
|
583
|
|
|
584
|
|
|
585
|
These API routes allow admin users to list the registered search indexes, |
|
586
|
rebuild them, and delete them. |
|
587
|
x-associatedSchema: |
|
588
|
$ref: "#/components/schemas/AdminSearchIndex" |
|
589
|
- name: Shipping Option Types |
|
590
|
x-associatedSchema: |
|
591
|
$ref: "#/components/schemas/AdminShippingOptionType" |
|
592
|
description: > |
|
593
|
Shipping option types define a group of shipping options with shared |
|
594
|
shipping characterstics. For example, you may have "Standard" and |
|
595
|
"Express" shipping option types. |
|
596
|
|
|
597
|
These API routes allow admins to manage shipping option types. |
|
598
|
externalDocs: |
|
599
|
description: Learn more about shipping option types. |
|
600
|
url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profiles-and-types |
|
601
|
- name: Shipping Options |
|
602
|
description: > |
|
603
|
A shipping option is a way of shipping an item to or from the customer. |
|
604
|
|
|
605
|
|
|
606
|
Shipping options are associated with the fulfillment provider used to |
|
607
|
handle their fulfillment. |
|
608
|
|
|
609
|
|
|
610
|
Shipping options can be restricted geographically by service zones, and by |
|
611
|
custom rules, such as an item's weight or the customer's group. |
|
612
|
|
|
613
|
|
|
614
|
These API routes allow admins to manage shipping options. |
|
615
|
externalDocs: |
|
616
|
description: Learn more about shipping options. |
|
617
|
url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option |
|
618
|
x-associatedSchema: |
|
619
|
$ref: "#/components/schemas/AdminShippingOption" |
|
620
|
- name: Shipping Profiles |
|
621
|
description: > |
|
622
|
A shipping profile defines a type of items that are shipping in a similar |
|
623
|
manner. For example, digital products may have a `digital` shipping |
|
624
|
profile. |
|
625
|
|
|
626
|
|
|
627
|
These API routes allow admin users to manage shipping profiles. |
|
628
|
externalDocs: |
|
629
|
description: Learn more about shipping profiles and other fulfillment concepts. |
|
630
|
url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/concepts#shipping-profile |
|
631
|
x-associatedSchema: |
|
632
|
$ref: "#/components/schemas/AdminShippingProfile" |
|
633
|
- name: Stock Locations |
|
634
|
description: > |
|
635
|
A stock location is where stock-kept items (products) are kept. |
|
636
|
|
|
637
|
|
|
638
|
Stock locations are linked to fulfillment providers used to fulfill items |
|
639
|
from this location. |
|
640
|
|
|
641
|
|
|
642
|
A stock location is also link to a fulfillment set, indicating where an |
|
643
|
item is fulfilled from when an order is placed. |
|
644
|
|
|
645
|
|
|
646
|
These API routes allow admin users to manage stock locations and their |
|
647
|
linked data. |
|
648
|
externalDocs: |
|
649
|
description: Learn more about stock locations. |
|
650
|
url: https://docs.medusajs.com/resources/commerce-modules/stock-location/concepts |
|
651
|
x-associatedSchema: |
|
652
|
$ref: "#/components/schemas/AdminStockLocation" |
|
653
|
- name: Store Credit Accounts |
|
654
|
description: > |
|
655
|
A store credit account is a ledger of store credit transactions for a |
|
656
|
customer. They hold the customer's store credit balance, including their |
|
657
|
credit and debit amounts. |
|
658
|
|
|
659
|
Store credit accounts allow you to build features that let customers pay |
|
660
|
for items using their store credit balance, such as gift cards or loyalty |
|
661
|
points. |
|
662
|
|
|
663
|
These API routes allow admin users to manage store credit accounts, their |
|
664
|
transactions, and more. |
|
665
|
|
|
666
|
<Note> |
|
667
|
|
|
668
|
Store Credit Account routes are only available for Cloud users using the |
|
669
|
[Loyalty |
|
670
|
Plugin](https://docs.medusajs.com/resources/commerce-modules/loyalty). |
|
671
|
|
|
672
|
</Note> |
|
673
|
x-associatedSchema: |
|
674
|
$ref: "#/components/schemas/AdminStoreCreditAccount" |
|
675
|
- name: Stores |
|
676
|
description: > |
|
677
|
A store holds the main configuration and information of your commerce |
|
678
|
store, such as supported currencies or default sales channel. |
|
679
|
|
|
680
|
|
|
681
|
By default, the Medusa application has one default store. There are no API |
|
682
|
routes to create more stores. Instead, you'd have to handle that |
|
683
|
customization manually. |
|
684
|
|
|
685
|
|
|
686
|
These API routes allow admin users to manage their store. |
|
687
|
externalDocs: |
|
688
|
description: Learn more about the Store Module. |
|
689
|
url: https://docs.medusajs.com/resources/commerce-modules/store |
|
690
|
x-associatedSchema: |
|
691
|
$ref: "#/components/schemas/AdminStore" |
|
692
|
- name: Tax Providers |
|
693
|
description: > |
|
694
|
A tax provider is a third-party integration or custom logic used to |
|
695
|
calculate taxes for a cart or an order. |
|
696
|
|
|
697
|
These API routes allow admin users to manage tax providers installed in |
|
698
|
their Medusa application. |
|
699
|
externalDocs: |
|
700
|
description: Learn more about the Tax Module Providers |
|
701
|
url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-provider |
|
702
|
x-associatedSchema: |
|
703
|
$ref: "#/components/schemas/AdminTaxProvider" |
|
704
|
- name: Tax Rates |
|
705
|
description: > |
|
706
|
A tax rate is a percentage amount used to calculate the tax amount of each |
|
707
|
taxable item's price, such as line items or shipping methods. |
|
708
|
|
|
709
|
|
|
710
|
Each tax region has a default tax rate. You can create tax rates that |
|
711
|
override the default using tax rules. |
|
712
|
|
|
713
|
|
|
714
|
These API routes allow admin users to manage tax rates and their rules. |
|
715
|
externalDocs: |
|
716
|
description: Learn more about tax rates and rules. |
|
717
|
url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-rates-and-rules |
|
718
|
x-associatedSchema: |
|
719
|
$ref: "#/components/schemas/AdminTaxRate" |
|
720
|
- name: Tax Regions |
|
721
|
description: > |
|
722
|
A tax region is a region's tax settings. It has tax rates and rules. So, |
|
723
|
after you create a region, you must create a tax region for it. |
|
724
|
|
|
725
|
|
|
726
|
A tax region can extend settings from a parent tax region. |
|
727
|
|
|
728
|
|
|
729
|
These API routes allow admin users to manage tax regions. |
|
730
|
externalDocs: |
|
731
|
description: Learn more about tax regions. |
|
732
|
url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-region |
|
733
|
x-associatedSchema: |
|
734
|
$ref: "#/components/schemas/AdminTaxRegion" |
|
735
|
- name: Translations |
|
736
|
description: > |
|
737
|
A translation is a localized version of content in a specific locale. For |
|
738
|
example, a product description in French. |
|
739
|
|
|
740
|
These API routes allow admin users to manage translations for different |
|
741
|
locales and resources. |
|
742
|
externalDocs: |
|
743
|
description: Learn more about the Translation Module. |
|
744
|
url: https://docs.medusajs.com/resources/commerce-modules/translation |
|
745
|
x-associatedSchema: |
|
746
|
$ref: "#/components/schemas/AdminTranslation" |
|
747
|
- name: Uploads |
|
748
|
description: > |
|
749
|
Use these API routes to upload files to your Medusa application using the |
|
750
|
installed file module provider. |
|
751
|
|
|
752
|
|
|
753
|
You can upload public files, such as product images, or private files, |
|
754
|
such as CSV files used to import products. |
|
755
|
externalDocs: |
|
756
|
description: Check out available file module providers. |
|
757
|
url: https://docs.medusajs.com/resources/infrastructure-modules/file |
|
758
|
- name: Users |
|
759
|
description: > |
|
760
|
A user is an admin user that can authenticate and perform functionalities |
|
761
|
as an admin user. |
|
762
|
|
|
763
|
|
|
764
|
An admin user can invite other users to join their team. Once they accept |
|
765
|
the invite, they'll become admin users as well. |
|
766
|
|
|
767
|
|
|
768
|
These API routes allow admin users to manage their team. |
|
769
|
externalDocs: |
|
770
|
description: Learn more about the User Module. |
|
771
|
url: https://docs.medusajs.com/resources/commerce-modules/user |
|
772
|
x-associatedSchema: |
|
773
|
$ref: "#/components/schemas/AdminUser" |
|
774
|
- name: Views |
|
775
|
description: > |
|
776
|
A view configuration is a saved data-table view for an entity, such as |
|
777
|
products or orders. It lets admin users customize how a table shows its |
|
778
|
data, then save that customization as a reusable view. |
|
779
|
|
|
780
|
These API routes allow admin users to manage the system default and |
|
781
|
personal views. |
|
782
|
externalDocs: |
|
783
|
description: Learn more about views configurations. |
|
784
|
url: https://docs.medusajs.com/resources/commerce-modules/settings/view-configurations |
|
785
|
x-associatedSchema: |
|
786
|
$ref: "#/components/schemas/AdminViewConfiguration" |
|
787
|
- name: Workflows Executions |
|
788
|
description: > |
|
789
|
These API routes allow you to track workflow executions in your Medusa |
|
790
|
application. |
|
791
|
|
|
792
|
|
|
793
|
Depending on the workflow engine you use, executions may only be retained |
|
794
|
for a short while, or only until the Medusa application is restarted. |
|
795
|
externalDocs: |
|
796
|
description: Check out available Workflow Engine Modules |
|
797
|
url: https://docs.medusajs.com/resources/infrastructure-modules/workflow-engine |
|
798
|
servers: |
|
799
|
- url: http://localhost:9000 |
|
800
|
- url: https://api.medusajs.com |
|
801
|
paths: {} |
|
802
|
components: |
|
803
|
schemas: |
|
804
|
Error: |
|
805
|
title: Response Error |
|
806
|
type: object |
|
807
|
properties: |
|
808
|
code: |
|
809
|
type: string |
|
810
|
description: A slug code to indicate the type of the error. |
|
811
|
enum: |
|
812
|
- invalid_state_error |
|
813
|
- invalid_request_error |
|
814
|
- api_error |
|
815
|
- unknown_error |
|
816
|
message: |
|
817
|
type: string |
|
818
|
description: Description of the error that occurred. |
|
819
|
example: first_name must be a string |
|
820
|
type: |
|
821
|
type: string |
|
822
|
description: A slug indicating the type of the error. |
|
823
|
enum: |
|
824
|
- QueryRunnerAlreadyReleasedError |
|
825
|
- TransactionAlreadyStartedError |
|
826
|
- TransactionNotStartedError |
|
827
|
- conflict |
|
828
|
- unauthorized |
|
829
|
- payment_authorization_error |
|
830
|
- duplicate_error |
|
831
|
- not_allowed |
|
832
|
- invalid_data |
|
833
|
- not_found |
|
834
|
- database_error |
|
835
|
- unexpected_state |
|
836
|
- invalid_argument |
|
837
|
- unknown_error |
|
838
|
responses: |
|
839
|
default_error: |
|
840
|
description: Default Error |
|
841
|
content: |
|
842
|
application/json: |
|
843
|
schema: |
|
844
|
$ref: "#/components/schemas/Error" |
|
845
|
example: |
|
846
|
code: unknown_error |
|
847
|
message: An unknown error occurred. |
|
848
|
type: unknown_error |
|
849
|
invalid_state_error: |
|
850
|
description: Invalid State Error |
|
851
|
content: |
|
852
|
application/json: |
|
853
|
schema: |
|
854
|
$ref: "#/components/schemas/Error" |
|
855
|
example: |
|
856
|
code: unknown_error |
|
857
|
message: The request conflicted with another request. You may retry the request |
|
858
|
with the provided Idempotency-Key. |
|
859
|
type: QueryRunnerAlreadyReleasedError |
|
860
|
invalid_request_error: |
|
861
|
description: Invalid Request Error |
|
862
|
content: |
|
863
|
application/json: |
|
864
|
schema: |
|
865
|
$ref: "#/components/schemas/Error" |
|
866
|
example: |
|
867
|
code: invalid_request_error |
|
868
|
message: Discount with code TEST already exists. |
|
869
|
type: duplicate_error |
|
870
|
not_found_error: |
|
871
|
description: Not Found Error |
|
872
|
content: |
|
873
|
application/json: |
|
874
|
schema: |
|
875
|
$ref: "#/components/schemas/Error" |
|
876
|
example: |
|
877
|
message: Entity with id 1 was not found |
|
878
|
type: not_found |
|
879
|
400_error: |
|
880
|
description: Client Error |
|
881
|
content: |
|
882
|
application/json: |
|
883
|
schema: |
|
884
|
$ref: "#/components/schemas/Error" |
|
885
|
examples: |
|
886
|
not_allowed: |
|
887
|
$ref: "#/components/examples/not_allowed_error" |
|
888
|
invalid_data: |
|
889
|
$ref: "#/components/examples/invalid_data_error" |
|
890
|
500_error: |
|
891
|
description: Server Error |
|
892
|
content: |
|
893
|
application/json: |
|
894
|
schema: |
|
895
|
$ref: "#/components/schemas/Error" |
|
896
|
examples: |
|
897
|
database: |
|
898
|
$ref: "#/components/examples/database_error" |
|
899
|
unexpected_state: |
|
900
|
$ref: "#/components/examples/unexpected_state_error" |
|
901
|
invalid_argument: |
|
902
|
$ref: "#/components/examples/invalid_argument_error" |
|
903
|
default_error: |
|
904
|
$ref: "#/components/examples/default_error" |
|
905
|
unauthorized: |
|
906
|
description: User is not authorized. Must log in first |
|
907
|
content: |
|
908
|
text/plain: |
|
909
|
schema: |
|
910
|
type: string |
|
911
|
default: Unauthorized |
|
912
|
example: Unauthorized |
|
913
|
incorrect_credentials: |
|
914
|
description: User does not exist or incorrect credentials |
|
915
|
content: |
|
916
|
text/plain: |
|
917
|
schema: |
|
918
|
type: string |
|
919
|
default: Unauthorized |
|
920
|
example: Unauthorized |
|
921
|
examples: |
|
922
|
not_allowed_error: |
|
923
|
summary: Not Allowed Error |
|
924
|
value: |
|
925
|
message: Discount must be set to dynamic |
|
926
|
type: not_allowed |
|
927
|
invalid_data_error: |
|
928
|
summary: Invalid Data Error |
|
929
|
value: |
|
930
|
message: first_name must be a string |
|
931
|
type: invalid_data |
|
932
|
multiple_errors: |
|
933
|
summary: Multiple Errors |
|
934
|
value: |
|
935
|
message: Provided request body contains errors. Please check the data and retry |
|
936
|
the request |
|
937
|
errors: |
|
938
|
- message: first_name must be a string |
|
939
|
type: invalid_data |
|
940
|
- message: Discount must be set to dynamic |
|
941
|
type: not_allowed |
|
942
|
database_error: |
|
943
|
summary: Database Error |
|
944
|
value: |
|
945
|
code: api_error |
|
946
|
message: An error occured while hashing password |
|
947
|
type: database_error |
|
948
|
unexpected_state_error: |
|
949
|
summary: Unexpected State Error |
|
950
|
value: |
|
951
|
message: cart.total must be defined |
|
952
|
type: unexpected_state |
|
953
|
invalid_argument_error: |
|
954
|
summary: Invalid Argument Error |
|
955
|
value: |
|
956
|
message: cart.total must be defined |
|
957
|
type: unexpected_state |
|
958
|
default_error: |
|
959
|
summary: Default Error |
|
960
|
value: |
|
961
|
code: unknown_error |
|
962
|
message: An unknown error occurred. |
|
963
|
type: unknown_error |
|
964
|
securitySchemes: |
|
965
|
api_token: |
|
966
|
type: http |
|
967
|
x-displayName: API Token |
|
968
|
scheme: basic |
|
969
|
jwt_token: |
|
970
|
type: http |
|
971
|
x-displayName: JWT Token |
|
972
|
scheme: bearer |
|
973
|
cookie_auth: |
|
974
|
type: apiKey |
|
975
|
in: cookie |
|
976
|
name: connect.sid |
|
977
|
x-displayName: Cookie Session ID |
|
978
|
reset_password: |
|
979
|
type: http |
|
980
|
x-displayName: Reset Password Token |
|
981
|
scheme: bearer |
|
982
|
x-is-auth: false |