Large file — syntax highlighting disabled.
1 openapi: 3.0.0
2 info:
3 version: 2.21.1
4 title: Medusa Admin API
5 license:
6 name: MIT
7 url: https://github.com/medusajs/medusa/blob/develop/LICENSE
8 servers:
9 - url: http://localhost:9000
10 - url: https://api.medusajs.com
11 tags:
12 - name: Api Keys
13 description: |
14 API keys can be used for authentication or resource-scoping.
15
16 A secret API key can be used to authenticate admin users. A publishable API key can be used to scope client requests to one or more sales channels.
17
18 These API routes allow admin users to manage both publishable and secret API keys.
19 externalDocs:
20 description: Learn more about the API Key Module
21 url: https://docs.medusajs.com/resources/commerce-modules/api-key
22 x-associatedSchema:
23 $ref: '#/components/schemas/AdminApiKey'
24 - name: Auth
25 description: |
26 Auth API routes allow you to manage an admin user's authentication.
27 - name: Campaigns
28 description: |
29 A campaign is a group of promotions that have the same conditions, such as start and end dates.
30
31 These API routes allow admin users to manage campaigns, their conditions, and promotions that belong to them.
32 externalDocs:
33 description: Learn more about campaigns.
34 url: https://docs.medusajs.com/resources/commerce-modules/promotion/campaign
35 x-associatedSchema:
36 $ref: '#/components/schemas/AdminCampaign'
37 - name: Claims
38 description: |
39 An admin creates a claim for an order when a customer reports that an item is defective or incorrect.
40
41 Using these API routes, admin users manage order claims, their items, and more.
42 x-associatedSchema:
43 $ref: '#/components/schemas/AdminClaim'
44 externalDocs:
45 description: Learn more about order claims.
46 url: https://docs.medusajs.com/resources/commerce-modules/order/claim
47 - name: Collections
48 description: |
49 A product collection organizes products into a collection for marketing purposes. For example, a summer collection.
50
51 These API routes allow admin users to manage collections and the products in them.
52 x-associatedSchema:
53 $ref: '#/components/schemas/AdminCollection'
54 - name: Currencies
55 description: |
56 A store can use unlimited currencies, and each region must be associated with at least one currency.
57
58 Currencies are defined by the Currency Module. Currency API Routes allow admins to list and update currencies.
59 externalDocs:
60 description: Learn more about the Currency Module
61 url: https://docs.medusajs.com/resources/commerce-modules/currency
62 x-associatedSchema:
63 $ref: '#/components/schemas/AdminCurrency'
64 - name: Customer Groups
65 description: |
66 Customers can be organized into groups. These groups are useful for segregation and marketing purposes.
67
68 For example, you can provide different prices for specific customers by creating a price list conditioned to their group.
69
70 These API routes allow admin users to manage groups and the customers in them.
71 externalDocs:
72 description: Learn more about the Customer Module
73 url: https://docs.medusajs.com/resources/commerce-modules/customer
74 x-associatedSchema:
75 $ref: '#/components/schemas/AdminCustomerGroup'
76 - name: Customers
77 description: |
78 Customers can either be created when they register through the Store APIs, or created by the admin using the Admin APIs.
79
80 These API routes allow admin users to manage customers in their store.
81 externalDocs:
82 description: Learn more about the Customer Module
83 url: https://docs.medusajs.com/resources/commerce-modules/customer
84 x-associatedSchema:
85 $ref: '#/components/schemas/AdminCustomer'
86 - name: Draft Orders
87 description: |
88 A draft order is an order created by the admin user. This is useful for orders created offline or from clients other than a storefront, such as a third-party integration.
89
90 These API routes allow admin users to create and manage draft orders.
91 externalDocs:
92 description: Learn more about the Order Module
93 url: https://docs.medusajs.com/resources/commerce-modules/order
94 x-associatedSchema:
95 $ref: '#/components/schemas/AdminDraftOrder'
96 - name: Exchanges
97 description: |
98 An exchange is the replacement of an item that the customer ordered with another.
99
100 These API routes allow admin users to create and manage exchanges.
101 externalDocs:
102 description: Learn more about the order exchanges.
103 url: https://docs.medusajs.com/resources/commerce-modules/order/exchange
104 x-associatedSchema:
105 $ref: '#/components/schemas/AdminExchange'
106 - name: Feature Flags
107 description: |
108 Feature flags are used to enable or disable certain features in your Medusa application.
109 These API routes allow admin users to view feature flags.
110 - name: Fulfillment Providers
111 description: |
112 A fulfillment provider is a third-party integration or custom logic used to fulfill an order's items.
113
114 Fulfillment providers are installed as module providers.
115 externalDocs:
116 description: Learn more about the fulfillment providers and how to create them.
117 url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/fulfillment-provider
118 x-associatedSchema:
119 $ref: '#/components/schemas/AdminFulfillmentProvider'
120 - name: Fulfillment Sets
121 description: |
122 A fulfillment set is a general form or way of fulfillment, such as "shipping" or "pick up".
123
124 All fulfillment-related configurations in a store are related to a fulfillment set.
125
126 These API routes allow admin users to manage fulfillment sets.
127 externalDocs:
128 description: Learn more about fulfillment sets.
129 url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/concepts
130 x-associatedSchema:
131 $ref: '#/components/schemas/AdminFulfillmentSet'
132 - name: Fulfillments
133 description: |
134 A fulfillment is created for items in an order, return, exchanges, or claims to deliver items to/from the customer.
135
136 These API routes allow admin users to manage fulfillments.
137 externalDocs:
138 description: Learn more about fulfillments.
139 url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/item-fulfillment
140 x-associatedSchema:
141 $ref: '#/components/schemas/AdminFulfillment'
142 - name: Gift Cards
143 description: |
144 A gift card is a prepaid card that can be used to pay for items during checkout.
145 Gift cards can be purchased by customers, or created by admin users. When a gift card is redeemed, its amount is added to the customer's store credit account, which can then be used to pay for items during checkout.
146 These API routes allow admin users to manage gift cards, transfer gift cards between customers, and more.
147 <Note>
148 Gift Card routes are only available through the [Loyalty Plugin](https://docs.medusajs.com/resources/commerce-modules/loyalty).
149 </Note>
150 x-associatedSchema:
151 $ref: '#/components/schemas/AdminGiftCard'
152 - name: Index
153 description: |
154 The Index Module is a tool to perform high-performance queries across modules, for example, to filter linked modules.
155 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).
156 - name: Inventory Items
157 description: |
158 An inventory item is a stock-kept product whose inventory is managed.
159
160 These API routes allow admin users to manage inventory items.
161 externalDocs:
162 description: Learn more about inventory items.
163 url: https://docs.medusajs.com/resources/commerce-modules/inventory/concepts
164 x-associatedSchema:
165 $ref: '#/components/schemas/AdminInventoryItem'
166 - name: Invites
167 description: |
168 An admin can invite new users to manage their team. This allows new users to authenticate as admins and perform admin functionalities.
169
170 These API routes allow admin users to manage invites.
171 externalDocs:
172 description: Learn more about the User Module
173 url: https://docs.medusajs.com/resources/commerce-modules/user
174 x-associatedSchema:
175 $ref: '#/components/schemas/AdminInvite'
176 - name: Layouts
177 description: |
178 An admin can modify the layout of their admin dashboard. This allows admins to customize their dashboard to their preferences and needs.
179 These API routes allow admin users to manage layouts.
180 - name: Locales
181 description: |
182 A locale is a language that content is translated into for customers to view in a storefront.
183 Medusa installs locales by default. These API routes allow admin users to retrieve and view locales.
184 externalDocs:
185 description: Learn more about locales and translations.
186 url: https://docs.medusajs.com/resources/commerce-modules/translation/concepts
187 x-associatedSchema:
188 $ref: '#/components/schemas/AdminLocale'
189 - name: Multi-Factor Authentication
190 description: |
191 Multi-factor authentication (MFA) adds an extra layer of security to admin accounts by requiring additional verification factors during login, such as a TOTP code or a recovery code.
192 These API routes allow admin users to manage their MFA factors, challenges, and recovery codes.
193 externalDocs:
194 description: Learn more about MFA in Medusa
195 url: https://docs.medusajs.com/resources/commerce-modules/auth/mfa
196 - name: Notifications
197 description: |
198 A notification informs an admin user of store changes or status changes of background tasks.
199
200 These API routes allow admin users to view and manage notifications.
201 x-associatedSchema:
202 $ref: '#/components/schemas/AdminNotification'
203 - name: Order Changes
204 description: |
205 An order change is a proposed change to an order, such as adding or removing items, changing shipping methods, and more. They can be associated with order edits, claims, or exchanges.
206 These API routes allow admin users to manage order changes.
207 externalDocs:
208 description: Learn more about order changes.
209 url: https://docs.medusajs.com/resources/commerce-modules/order/order-change
210 x-associatedSchema:
211 $ref: '#/components/schemas/AdminOrderChange'
212 - name: Order Edits
213 description: |
214 An order edit is a change to an order's details, such as items, shipping methods, and more.
215
216 Changes made by an order edit are only applied on the order once they're confirmed.
217
218 The order's previous version is retained due to versioning.
219
220 These API routes allow admin users to make edits to an order and manage those edits.
221 externalDocs:
222 description: Learn more about the Order Module
223 url: https://docs.medusajs.com/resources/commerce-modules/order
224 - name: Orders
225 description: |
226 An order is a purchase made by a customer through a storefront.
227
228 Orders can also originally be created as draft orders.
229
230 These API routes allow admin users to view and manage orders.
231 externalDocs:
232 description: Learn more about the orders
233 url: https://docs.medusajs.com/resources/commerce-modules/order/concepts
234 x-associatedSchema:
235 $ref: '#/components/schemas/AdminOrder'
236 - name: Payment Collections
237 description: |
238 A payment collection is one or more payments of an order. They're also used for outstanding payments due to order exchanges or claims.
239
240 Every purchase or request for payment starts with a payment collection.
241
242 A payment collection holds the payment sessions used to authorize the payment amount, and the payments to be captured / refunded.
243
244 These API routes allow admin users to manage payment collections.
245 externalDocs:
246 description: Learn more about payment collections.
247 url: https://docs.medusajs.com/resources/commerce-modules/payment/payment-collection
248 x-associatedSchema:
249 $ref: '#/components/schemas/AdminPaymentCollection'
250 - name: Payments
251 description: |
252 A payment is created when a payment amount is authorized. The payment can then be captured or refunded.
253
254 A payment is created from the payment session that was authorized, and it belongs to the payment session's collection.
255
256 These API routes allow admin users to manage payments.
257 externalDocs:
258 description: Learn more about payments.
259 url: https://docs.medusajs.com/resources/commerce-modules/payment/payment
260 x-associatedSchema:
261 $ref: '#/components/schemas/AdminPayment'
262 - name: Plugins
263 description: |
264 A plugin is a package of reusable Medusa customizations that you can install in any Medusa application.
265 Plugins can be used to add new functionality, such as wishlists, or integrate third-party services, such as payment providers.
266 These API routes allow admin users to retrieve plugins installed in their Medusa application.
267 externalDocs:
268 description: Learn more about plugins.
269 url: https://docs.medusajs.com/learn/fundamentals/plugins
270 x-associatedSchema:
271 $ref: '#/components/schemas/AdminPlugin'
272 - name: Price Lists
273 description: |
274 A price list is a group of prices applied if the specified conditions and rules are satisfied.
275
276 Price lists are useful for sales or special prices for special conditions, such as applying prices for a set of customers.
277
278 These API routes allow admin users to manage price lists.
279 externalDocs:
280 description: Learn more about price lists.
281 url: https://docs.medusajs.com/resources/commerce-modules/pricing/concepts#price-list
282 x-associatedSchema:
283 $ref: '#/components/schemas/AdminPriceList'
284 - name: Price Preferences
285 description: |
286 A price preference is used to specify whether tax-inclusiveness is enabled for a context, such as a region or currency code.
287
288 These API routes allow admin users to manage whether a region or currency is tax inclusive.
289 externalDocs:
290 description: Learn more about tax-inclusiveness and the role of a price preference.
291 url: https://docs.medusajs.com/resources/commerce-modules/pricing/tax-inclusive-pricing
292 x-associatedSchema:
293 $ref: '#/components/schemas/AdminPricePreference'
294 - name: Product Categories
295 description: |
296 Products can be categorized into categories.
297
298 Categories are nested and their heirarchy can be managed, giving admin users flexibility in how they categorize their products.
299
300 These API routes allow admin users to manage categories and the products in them.
301 externalDocs:
302 description: Learn more about the Product Module
303 url: https://docs.medusajs.com/resources/commerce-modules/product
304 x-associatedSchema:
305 $ref: '#/components/schemas/AdminProductCategory'
306 - name: Product Options
307 x-associatedSchema:
308 $ref: '#/components/schemas/AdminProductOption'
309 description: |
310 A product option is a way to define different options for a product, such as "Size" or "Color". Product options can be created globally and used by multiple products, or they can be exclusive to a specific product.
311 These API routes allow admin users to manage product options.
312 externalDocs:
313 description: Learn more about the Product Module
314 url: https://docs.medusajs.com/resources/commerce-modules/product
315 - name: Product Tags
316 description: |
317 A tag is another way of organizing a product. Each tag has a name and a value.
318
319 Products are organized into the same tag if they have the same value.
320
321 These API routes allow admin users to manage product tags.
322 externalDocs:
323 description: Learn more about the Product Module
324 url: https://docs.medusajs.com/resources/commerce-modules/product
325 x-associatedSchema:
326 $ref: '#/components/schemas/AdminProductTag'
327 - name: Product Types
328 description: |
329 Products can be organized into types. Each type has a name and a value.
330
331 Products are organized into the same type if they have the same value.
332
333 These API routes allow admin users to manage product types.
334 externalDocs:
335 description: Learn more about the Product Module
336 url: https://docs.medusajs.com/resources/commerce-modules/product
337 x-associatedSchema:
338 $ref: '#/components/schemas/AdminProductType'
339 - name: Product Variants
340 description: |
341 A product variant is a saleable form of the product.
342
343 Each variant has different option values. For example, a "Shirt" product may have a "Blue" variant and a "Green" variant. Customers choose from these variants when they buy the product.
344
345 These API routes allow admin users to manage product variants.
346 externalDocs:
347 description: Learn more about the Product Module
348 url: https://docs.medusajs.com/resources/commerce-modules/product
349 x-associatedSchema:
350 $ref: '#/components/schemas/AdminProductVariant'
351 - name: Products
352 description: |
353 A product is a set of variants that the customer chooses from when making a purchase.
354
355 A product can be organized into categories or collections.
356
357 A product can have many options, and variants for each of these options' values.
358
359 These API routes allow admin users to manage products.
360 externalDocs:
361 description: Learn more about the Product Module
362 url: https://docs.medusajs.com/resources/commerce-modules/product
363 x-associatedSchema:
364 $ref: '#/components/schemas/AdminProduct'
365 - name: Promotions
366 description: |
367 A promotion discounts an amount or percentage off a cart's items, shipping methods, or the entire order.
368
369 Promotions have different types, such as a `standard` promotion that just discounts an amount, or a `buyget` promotion to enforce a "buy X get Y" promotion.
370
371 A promotion has rules to restrict how and when they're applied.
372
373 Promotions belong to a campaign, which sets conditions on the promotion such as when it starts and ends.
374
375 These API routes allow admin users to manage promotions.
376 externalDocs:
377 description: Learn more about promotions.
378 url: https://docs.medusajs.com/resources/commerce-modules/promotion/concepts
379 x-associatedSchema:
380 $ref: '#/components/schemas/AdminPromotion'
381 - name: Property Labels
382 x-associatedSchema:
383 $ref: '#/components/schemas/AdminPropertyLabel'
384 - name: Refund Reasons
385 description: |
386 A refund reason is a possible reason used when issuing a refund to the customer, such as when returning an item and refunding the customer.
387
388 These API routes allow admin users to manage refund reasons.
389 x-associatedSchema:
390 $ref: '#/components/schemas/AdminRefundReason'
391 - name: Regions
392 description: |
393 Regions are different countries or geographical regions that the commerce store serves customers in.
394
395 These API routes allow admin users to manage regions, their providers, and more.
396 externalDocs:
397 description: Learn more about the Region Module.
398 url: https://docs.medusajs.com/resources/commerce-modules/region
399 x-associatedSchema:
400 $ref: '#/components/schemas/AdminRegion'
401 - name: Reservations
402 description: |
403 A reservation is unavailable quantity of an inventory item in a location.
404
405 A reservation is created automatically for variants in an order whose `manage_inventory` is enabled. Admin users can also create reservations manually.
406
407 These API routes allow admin users to manage reservations.
408 externalDocs:
409 description: Learn more about reservations and other inventory concepts.
410 url: https://docs.medusajs.com/resources/commerce-modules/inventory/concepts
411 x-associatedSchema:
412 $ref: '#/components/schemas/AdminReservation'
413 - name: Return Reasons
414 description: |
415 A return reason is a possible reason that an item is returned from the customer, such as when returning an item.
416
417 These API routes allow admin users to manage return reasons.
418 x-associatedSchema:
419 $ref: '#/components/schemas/AdminReturnReason'
420 - name: Returns
421 description: |
422 Admin users create a return when a customer returns an item to them.
423
424 Returns can also be created by customers through the storefront, and admins will be able to manage them and make refunds, if necessary. Refunds are made through the [Payment API Routes](#payment)
425
426 These API routes allow admin users to manage returns.
427 externalDocs:
428 description: Learn more about order returns.
429 url: https://docs.medusajs.com/resources/commerce-modules/order/return
430 x-associatedSchema:
431 $ref: '#/components/schemas/AdminReturn'
432 - name: Sales Channels
433 description: |
434 A sales channel indicates a channel where products can be sold in. For example, a webshop or a mobile app.
435
436 These API routes allow admins to manage sales channels and the products available in them.
437 externalDocs:
438 description: Learn more about the Sales Channel Module.
439 url: https://docs.medusajs.com/resources/commerce-modules/sales-channel
440 x-associatedSchema:
441 $ref: '#/components/schemas/AdminSalesChannel'
442 - name: Search
443 description: |
444 Search the entities that have a search index and are registered as search entities in the Medusa Admin dashboard.
445 - name: Search Indexes
446 description: |
447 A search index stores the documents of an entity so they can be searched.
448
449 These API routes allow admin users to list the registered search indexes, rebuild them, and delete them.
450 x-associatedSchema:
451 $ref: '#/components/schemas/AdminSearchIndex'
452 - name: Shipping Option Types
453 x-associatedSchema:
454 $ref: '#/components/schemas/AdminShippingOptionType'
455 description: |
456 Shipping option types define a group of shipping options with shared shipping characterstics. For example, you may have "Standard" and "Express" shipping option types.
457 These API routes allow admins to manage shipping option types.
458 externalDocs:
459 description: Learn more about shipping option types.
460 url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profiles-and-types
461 - name: Shipping Options
462 description: |
463 A shipping option is a way of shipping an item to or from the customer.
464
465 Shipping options are associated with the fulfillment provider used to handle their fulfillment.
466
467 Shipping options can be restricted geographically by service zones, and by custom rules, such as an item's weight or the customer's group.
468
469 These API routes allow admins to manage shipping options.
470 externalDocs:
471 description: Learn more about shipping options.
472 url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option
473 x-associatedSchema:
474 $ref: '#/components/schemas/AdminShippingOption'
475 - name: Shipping Profiles
476 description: |
477 A shipping profile defines a type of items that are shipping in a similar manner. For example, digital products may have a `digital` shipping profile.
478
479 These API routes allow admin users to manage shipping profiles.
480 externalDocs:
481 description: Learn more about shipping profiles and other fulfillment concepts.
482 url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/concepts#shipping-profile
483 x-associatedSchema:
484 $ref: '#/components/schemas/AdminShippingProfile'
485 - name: Stock Locations
486 description: |
487 A stock location is where stock-kept items (products) are kept.
488
489 Stock locations are linked to fulfillment providers used to fulfill items from this location.
490
491 A stock location is also link to a fulfillment set, indicating where an item is fulfilled from when an order is placed.
492
493 These API routes allow admin users to manage stock locations and their linked data.
494 externalDocs:
495 description: Learn more about stock locations.
496 url: https://docs.medusajs.com/resources/commerce-modules/stock-location/concepts
497 x-associatedSchema:
498 $ref: '#/components/schemas/AdminStockLocation'
499 - name: Store Credit Accounts
500 description: |
501 A store credit account is a ledger of store credit transactions for a customer. They hold the customer's store credit balance, including their credit and debit amounts.
502 Store credit accounts allow you to build features that let customers pay for items using their store credit balance, such as gift cards or loyalty points.
503 These API routes allow admin users to manage store credit accounts, their transactions, and more.
504 <Note>
505 Store Credit Account routes are only available for Cloud users using the [Loyalty Plugin](https://docs.medusajs.com/resources/commerce-modules/loyalty).
506 </Note>
507 x-associatedSchema:
508 $ref: '#/components/schemas/AdminStoreCreditAccount'
509 - name: Stores
510 description: |
511 A store holds the main configuration and information of your commerce store, such as supported currencies or default sales channel.
512
513 By default, the Medusa application has one default store. There are no API routes to create more stores. Instead, you'd have to handle that customization manually.
514
515 These API routes allow admin users to manage their store.
516 externalDocs:
517 description: Learn more about the Store Module.
518 url: https://docs.medusajs.com/resources/commerce-modules/store
519 x-associatedSchema:
520 $ref: '#/components/schemas/AdminStore'
521 - name: Tax Providers
522 description: |
523 A tax provider is a third-party integration or custom logic used to calculate taxes for a cart or an order.
524 These API routes allow admin users to manage tax providers installed in their Medusa application.
525 externalDocs:
526 description: Learn more about the Tax Module Providers
527 url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-provider
528 x-associatedSchema:
529 $ref: '#/components/schemas/AdminTaxProvider'
530 - name: Tax Rates
531 description: |
532 A tax rate is a percentage amount used to calculate the tax amount of each taxable item's price, such as line items or shipping methods.
533
534 Each tax region has a default tax rate. You can create tax rates that override the default using tax rules.
535
536 These API routes allow admin users to manage tax rates and their rules.
537 externalDocs:
538 description: Learn more about tax rates and rules.
539 url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-rates-and-rules
540 x-associatedSchema:
541 $ref: '#/components/schemas/AdminTaxRate'
542 - name: Tax Regions
543 description: |
544 A tax region is a region's tax settings. It has tax rates and rules. So, after you create a region, you must create a tax region for it.
545
546 A tax region can extend settings from a parent tax region.
547
548 These API routes allow admin users to manage tax regions.
549 externalDocs:
550 description: Learn more about tax regions.
551 url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-region
552 x-associatedSchema:
553 $ref: '#/components/schemas/AdminTaxRegion'
554 - name: Translations
555 description: |
556 A translation is a localized version of content in a specific locale. For example, a product description in French.
557 These API routes allow admin users to manage translations for different locales and resources.
558 externalDocs:
559 description: Learn more about the Translation Module.
560 url: https://docs.medusajs.com/resources/commerce-modules/translation
561 x-associatedSchema:
562 $ref: '#/components/schemas/AdminTranslation'
563 - name: Uploads
564 description: |
565 Use these API routes to upload files to your Medusa application using the installed file module provider.
566
567 You can upload public files, such as product images, or private files, such as CSV files used to import products.
568 externalDocs:
569 description: Check out available file module providers.
570 url: https://docs.medusajs.com/resources/infrastructure-modules/file
571 - name: Users
572 description: |
573 A user is an admin user that can authenticate and perform functionalities as an admin user.
574
575 An admin user can invite other users to join their team. Once they accept the invite, they'll become admin users as well.
576
577 These API routes allow admin users to manage their team.
578 externalDocs:
579 description: Learn more about the User Module.
580 url: https://docs.medusajs.com/resources/commerce-modules/user
581 x-associatedSchema:
582 $ref: '#/components/schemas/AdminUser'
583 - name: Views
584 description: |
585 A view configuration is a saved data-table view for an entity, such as products or orders. It lets admin users customize how a table shows its data, then save that customization as a reusable view.
586 These API routes allow admin users to manage the system default and personal views.
587 externalDocs:
588 description: Learn more about views configurations.
589 url: https://docs.medusajs.com/resources/commerce-modules/settings/view-configurations
590 x-associatedSchema:
591 $ref: '#/components/schemas/AdminViewConfiguration'
592 - name: Workflows Executions
593 description: |
594 These API routes allow you to track workflow executions in your Medusa application.
595
596 Depending on the workflow engine you use, executions may only be retained for a short while, or only until the Medusa application is restarted.
597 externalDocs:
598 description: Check out available Workflow Engine Modules
599 url: https://docs.medusajs.com/resources/infrastructure-modules/workflow-engine
600 paths:
601 /admin/api-keys:
602 get:
603 operationId: GetApiKeys
604 summary: List API Keys
605 description: Retrieve a list of API keys. The API keys can be filtered by fields such as `id`. The API keys can also be sorted or paginated.
606 x-authenticated: true
607 parameters:
608 - name: fields
609 in: query
610 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
611 required: false
612 schema:
613 type: string
614 title: fields
615 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
616 externalDocs:
617 url: '#select-fields-and-relations'
618 - name: offset
619 in: query
620 description: The number of items to skip when retrieving a list.
621 required: false
622 schema:
623 type: number
624 title: offset
625 description: The number of items to skip when retrieving a list.
626 externalDocs:
627 url: '#pagination'
628 - name: limit
629 in: query
630 description: Limit the number of items returned in the list.
631 required: false
632 schema:
633 type: number
634 title: limit
635 description: Limit the number of items returned in the list.
636 externalDocs:
637 url: '#pagination'
638 - name: order
639 in: query
640 description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
641 required: false
642 schema:
643 type: string
644 title: order
645 description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
646 externalDocs:
647 url: '#pagination'
648 - name: q
649 in: query
650 description: A search term to search the API keys' searchable properties.
651 required: false
652 schema:
653 type: string
654 title: q
655 description: The search term.
656 - name: id
657 in: query
658 required: false
659 schema:
660 oneOf:
661 - type: string
662 title: id
663 description: Filter by an API key's ID.
664 - type: array
665 description: Filter by API key IDs.
666 items:
667 type: string
668 title: id
669 description: The API key ID.
670 - name: title
671 in: query
672 required: false
673 schema:
674 oneOf:
675 - type: string
676 title: title
677 description: Filter by an API key's title.
678 - type: array
679 description: Filter by API key titles.
680 items:
681 type: string
682 title: title
683 description: The API key title.
684 - name: token
685 in: query
686 required: false
687 schema:
688 oneOf:
689 - type: string
690 title: token
691 description: Filter by an API key's token.
692 - type: array
693 description: Filter by API key tokens.
694 items:
695 type: string
696 title: token
697 description: The API key token.
698 - name: type
699 in: query
700 description: Filter by the API key's type.
701 required: false
702 schema:
703 type: string
704 enum:
705 - secret
706 - publishable
707 - name: created_at
708 in: query
709 description: Filter by the API key's creation date.
710 required: false
711 schema:
712 type: object
713 description: Filter by the API key's creation date.
714 properties:
715 $and:
716 type: array
717 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
718 items:
719 type: object
720 title: $and
721 $or:
722 type: array
723 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
724 items:
725 type: object
726 title: $or
727 $eq:
728 oneOf:
729 - type: string
730 title: $eq
731 description: Filter by an exact match.
732 - type: array
733 description: Filter by multiple exact matches.
734 items:
735 type: string
736 title: $eq
737 description: An exact match.
738 $ne:
739 type: string
740 title: $ne
741 description: Filter by values not equal to this parameter.
742 $in:
743 type: array
744 description: Filter by values in this array.
745 items:
746 type: string
747 title: $in
748 description: The value to match.
749 $nin:
750 type: array
751 description: Filter by values not in this array.
752 items:
753 type: string
754 title: $nin
755 description: The value not to match.
756 $not:
757 oneOf:
758 - type: string
759 title: $not
760 description: Filter by values not matching this parameter.
761 - type: object
762 description: Filter by values not matching the conditions in this parameter.
763 properties:
764 $and:
765 type: array
766 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
767 items:
768 type: object
769 title: $and
770 $or:
771 type: array
772 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
773 items:
774 type: object
775 title: $or
776 $eq:
777 oneOf:
778 - type: string
779 title: $eq
780 description: Filter by an exact match.
781 - type: array
782 description: Filter by multiple exact matches.
783 items:
784 type: string
785 title: $eq
786 description: The value to match.
787 $ne:
788 type: string
789 title: $ne
790 description: Filter by values not matching this parameter.
791 $in:
792 type: array
793 description: Filter by values in this array.
794 items:
795 type: string
796 title: $in
797 description: The value to match.
798 $nin:
799 type: array
800 description: Filter by values not in this array.
801 items:
802 type: string
803 title: $nin
804 description: The value to not match
805 $not:
806 oneOf:
807 - type: string
808 title: $not
809 description: Filter by values not matching this parameter
810 - type: object
811 description: Filter by values not matching the conditions in this parameter.
812 - type: array
813 description: Filter by values not matching the values of this parameter.
814 items:
815 type: string
816 title: $not
817 description: The values to not match.
818 $gt:
819 type: string
820 title: $gt
821 description: Filter by values greater than this parameter. Useful for numbers and dates only.
822 $gte:
823 type: string
824 title: $gte
825 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
826 $lt:
827 type: string
828 title: $lt
829 description: Filter by values less than this parameter. Useful for numbers and dates only.
830 $lte:
831 type: string
832 title: $lte
833 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
834 $like:
835 type: string
836 title: $like
837 description: Apply a `like` filter. Useful for strings only.
838 $re:
839 type: string
840 title: $re
841 description: Apply a regex filter. Useful for strings only.
842 $ilike:
843 type: string
844 title: $ilike
845 description: Apply a case-insensitive `like` filter. Useful for strings only.
846 $fulltext:
847 type: string
848 title: $fulltext
849 description: Filter to apply on full-text properties.
850 $overlap:
851 type: array
852 description: Filter arrays that have overlapping values with this parameter.
853 items:
854 type: string
855 title: $overlap
856 description: The value to match.
857 $contains:
858 type: array
859 description: Filter arrays that contain some of the values of this parameter.
860 items:
861 type: string
862 title: $contains
863 description: The values to match.
864 $contained:
865 type: array
866 description: Filter arrays that contain all values of this parameter.
867 items:
868 type: string
869 title: $contained
870 description: The values to match.
871 $exists:
872 type: boolean
873 title: $exists
874 description: Filter by whether a value for this parameter exists (not `null`).
875 - type: array
876 description: Filter by values not matching those in this parameter.
877 items:
878 type: string
879 title: $not
880 description: The values to not match.
881 $gt:
882 type: string
883 title: $gt
884 description: Filter by values greater than this parameter. Useful for numbers and dates only.
885 $gte:
886 type: string
887 title: $gte
888 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
889 $lt:
890 type: string
891 title: $lt
892 description: Filter by values less than this parameter. Useful for numbers and dates only.
893 $lte:
894 type: string
895 title: $lte
896 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
897 $like:
898 type: string
899 title: $like
900 description: Apply a `like` filter. Useful for strings only.
901 $re:
902 type: string
903 title: $re
904 description: Apply a regex filter. Useful for strings only.
905 $ilike:
906 type: string
907 title: $ilike
908 description: Apply a case-insensitive `like` filter. Useful for strings only.
909 $fulltext:
910 type: string
911 title: $fulltext
912 description: Filter to apply on full-text properties.
913 $overlap:
914 type: array
915 description: Filter arrays that have overlapping values with this parameter.
916 items:
917 type: string
918 title: $overlap
919 description: The values to match.
920 $contains:
921 type: array
922 description: Filter arrays that contain some of the values of this parameter.
923 items:
924 type: string
925 title: $contains
926 description: The values to match.
927 $contained:
928 type: array
929 description: Filter arrays that contain all values of this parameter.
930 items:
931 type: string
932 title: $contained
933 description: The values to match.
934 $exists:
935 type: boolean
936 title: $exists
937 description: Filter by whether a value for this parameter exists (not `null`).
938 title: created_at
939 - name: updated_at
940 in: query
941 description: Filter by the API key's update date.
942 required: false
943 schema:
944 type: object
945 description: Filter by the API key's update date.
946 properties:
947 $and:
948 type: array
949 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
950 items:
951 type: object
952 title: $and
953 $or:
954 type: array
955 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
956 items:
957 type: object
958 title: $or
959 $eq:
960 oneOf:
961 - type: string
962 title: $eq
963 description: Filter by an exact match.
964 - type: array
965 description: Filter by multiple exact matches.
966 items:
967 type: string
968 title: $eq
969 description: An exact match.
970 $ne:
971 type: string
972 title: $ne
973 description: Filter by values not equal to this parameter.
974 $in:
975 type: array
976 description: Filter by values in this array.
977 items:
978 type: string
979 title: $in
980 description: The value to match.
981 $nin:
982 type: array
983 description: Filter by values not in this array.
984 items:
985 type: string
986 title: $nin
987 description: The value not to match.
988 $not:
989 oneOf:
990 - type: string
991 title: $not
992 description: Filter by values not matching this parameter.
993 - type: object
994 description: Filter by values not matching the conditions in this parameter.
995 properties:
996 $and:
997 type: array
998 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
999 items:
1000 type: object
1001 title: $and
1002 $or:
1003 type: array
1004 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
1005 items:
1006 type: object
1007 title: $or
1008 $eq:
1009 oneOf:
1010 - type: string
1011 title: $eq
1012 description: Filter by an exact match.
1013 - type: array
1014 description: Filter by multiple exact matches.
1015 items:
1016 type: string
1017 title: $eq
1018 description: The value to match.
1019 $ne:
1020 type: string
1021 title: $ne
1022 description: Filter by values not matching this parameter.
1023 $in:
1024 type: array
1025 description: Filter by values in this array.
1026 items:
1027 type: string
1028 title: $in
1029 description: The value to match.
1030 $nin:
1031 type: array
1032 description: Filter by values not in this array.
1033 items:
1034 type: string
1035 title: $nin
1036 description: The value to not match
1037 $not:
1038 oneOf:
1039 - type: string
1040 title: $not
1041 description: Filter by values not matching this parameter
1042 - type: object
1043 description: Filter by values not matching the conditions in this parameter.
1044 - type: array
1045 description: Filter by values not matching the values of this parameter.
1046 items:
1047 type: string
1048 title: $not
1049 description: The values to not match.
1050 $gt:
1051 type: string
1052 title: $gt
1053 description: Filter by values greater than this parameter. Useful for numbers and dates only.
1054 $gte:
1055 type: string
1056 title: $gte
1057 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
1058 $lt:
1059 type: string
1060 title: $lt
1061 description: Filter by values less than this parameter. Useful for numbers and dates only.
1062 $lte:
1063 type: string
1064 title: $lte
1065 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
1066 $like:
1067 type: string
1068 title: $like
1069 description: Apply a `like` filter. Useful for strings only.
1070 $re:
1071 type: string
1072 title: $re
1073 description: Apply a regex filter. Useful for strings only.
1074 $ilike:
1075 type: string
1076 title: $ilike
1077 description: Apply a case-insensitive `like` filter. Useful for strings only.
1078 $fulltext:
1079 type: string
1080 title: $fulltext
1081 description: Filter to apply on full-text properties.
1082 $overlap:
1083 type: array
1084 description: Filter arrays that have overlapping values with this parameter.
1085 items:
1086 type: string
1087 title: $overlap
1088 description: The value to match.
1089 $contains:
1090 type: array
1091 description: Filter arrays that contain some of the values of this parameter.
1092 items:
1093 type: string
1094 title: $contains
1095 description: The values to match.
1096 $contained:
1097 type: array
1098 description: Filter arrays that contain all values of this parameter.
1099 items:
1100 type: string
1101 title: $contained
1102 description: The values to match.
1103 $exists:
1104 type: boolean
1105 title: $exists
1106 description: Filter by whether a value for this parameter exists (not `null`).
1107 - type: array
1108 description: Filter by values not matching those in this parameter.
1109 items:
1110 type: string
1111 title: $not
1112 description: The values to not match.
1113 $gt:
1114 type: string
1115 title: $gt
1116 description: Filter by values greater than this parameter. Useful for numbers and dates only.
1117 $gte:
1118 type: string
1119 title: $gte
1120 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
1121 $lt:
1122 type: string
1123 title: $lt
1124 description: Filter by values less than this parameter. Useful for numbers and dates only.
1125 $lte:
1126 type: string
1127 title: $lte
1128 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
1129 $like:
1130 type: string
1131 title: $like
1132 description: Apply a `like` filter. Useful for strings only.
1133 $re:
1134 type: string
1135 title: $re
1136 description: Apply a regex filter. Useful for strings only.
1137 $ilike:
1138 type: string
1139 title: $ilike
1140 description: Apply a case-insensitive `like` filter. Useful for strings only.
1141 $fulltext:
1142 type: string
1143 title: $fulltext
1144 description: Filter to apply on full-text properties.
1145 $overlap:
1146 type: array
1147 description: Filter arrays that have overlapping values with this parameter.
1148 items:
1149 type: string
1150 title: $overlap
1151 description: The values to match.
1152 $contains:
1153 type: array
1154 description: Filter arrays that contain some of the values of this parameter.
1155 items:
1156 type: string
1157 title: $contains
1158 description: The values to match.
1159 $contained:
1160 type: array
1161 description: Filter arrays that contain all values of this parameter.
1162 items:
1163 type: string
1164 title: $contained
1165 description: The values to match.
1166 $exists:
1167 type: boolean
1168 title: $exists
1169 description: Filter by whether a value for this parameter exists (not `null`).
1170 title: updated_at
1171 - name: deleted_at
1172 in: query
1173 description: Filter by the API key's deletion date.
1174 required: false
1175 schema:
1176 type: object
1177 description: Filter by the API key's deletion date.
1178 properties:
1179 $and:
1180 type: array
1181 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
1182 items:
1183 type: object
1184 title: $and
1185 $or:
1186 type: array
1187 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
1188 items:
1189 type: object
1190 title: $or
1191 $eq:
1192 oneOf:
1193 - type: string
1194 title: $eq
1195 description: Filter by an exact match.
1196 - type: array
1197 description: Filter by multiple exact matches.
1198 items:
1199 type: string
1200 title: $eq
1201 description: An exact match.
1202 $ne:
1203 type: string
1204 title: $ne
1205 description: Filter by values not equal to this parameter.
1206 $in:
1207 type: array
1208 description: Filter by values in this array.
1209 items:
1210 type: string
1211 title: $in
1212 description: The value to match.
1213 $nin:
1214 type: array
1215 description: Filter by values not in this array.
1216 items:
1217 type: string
1218 title: $nin
1219 description: The value not to match.
1220 $not:
1221 oneOf:
1222 - type: string
1223 title: $not
1224 description: Filter by values not matching this parameter.
1225 - type: object
1226 description: Filter by values not matching the conditions in this parameter.
1227 properties:
1228 $and:
1229 type: array
1230 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
1231 items:
1232 type: object
1233 title: $and
1234 $or:
1235 type: array
1236 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
1237 items:
1238 type: object
1239 title: $or
1240 $eq:
1241 oneOf:
1242 - type: string
1243 title: $eq
1244 description: Filter by an exact match.
1245 - type: array
1246 description: Filter by multiple exact matches.
1247 items:
1248 type: string
1249 title: $eq
1250 description: The value to match.
1251 $ne:
1252 type: string
1253 title: $ne
1254 description: Filter by values not matching this parameter.
1255 $in:
1256 type: array
1257 description: Filter by values in this array.
1258 items:
1259 type: string
1260 title: $in
1261 description: The value to match.
1262 $nin:
1263 type: array
1264 description: Filter by values not in this array.
1265 items:
1266 type: string
1267 title: $nin
1268 description: The value to not match
1269 $not:
1270 oneOf:
1271 - type: string
1272 title: $not
1273 description: Filter by values not matching this parameter
1274 - type: object
1275 description: Filter by values not matching the conditions in this parameter.
1276 - type: array
1277 description: Filter by values not matching the values of this parameter.
1278 items:
1279 type: string
1280 title: $not
1281 description: The values to not match.
1282 $gt:
1283 type: string
1284 title: $gt
1285 description: Filter by values greater than this parameter. Useful for numbers and dates only.
1286 $gte:
1287 type: string
1288 title: $gte
1289 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
1290 $lt:
1291 type: string
1292 title: $lt
1293 description: Filter by values less than this parameter. Useful for numbers and dates only.
1294 $lte:
1295 type: string
1296 title: $lte
1297 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
1298 $like:
1299 type: string
1300 title: $like
1301 description: Apply a `like` filter. Useful for strings only.
1302 $re:
1303 type: string
1304 title: $re
1305 description: Apply a regex filter. Useful for strings only.
1306 $ilike:
1307 type: string
1308 title: $ilike
1309 description: Apply a case-insensitive `like` filter. Useful for strings only.
1310 $fulltext:
1311 type: string
1312 title: $fulltext
1313 description: Filter to apply on full-text properties.
1314 $overlap:
1315 type: array
1316 description: Filter arrays that have overlapping values with this parameter.
1317 items:
1318 type: string
1319 title: $overlap
1320 description: The value to match.
1321 $contains:
1322 type: array
1323 description: Filter arrays that contain some of the values of this parameter.
1324 items:
1325 type: string
1326 title: $contains
1327 description: The values to match.
1328 $contained:
1329 type: array
1330 description: Filter arrays that contain all values of this parameter.
1331 items:
1332 type: string
1333 title: $contained
1334 description: The values to match.
1335 $exists:
1336 type: boolean
1337 title: $exists
1338 description: Filter by whether a value for this parameter exists (not `null`).
1339 - type: array
1340 description: Filter by values not matching those in this parameter.
1341 items:
1342 type: string
1343 title: $not
1344 description: The values to not match.
1345 $gt:
1346 type: string
1347 title: $gt
1348 description: Filter by values greater than this parameter. Useful for numbers and dates only.
1349 $gte:
1350 type: string
1351 title: $gte
1352 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
1353 $lt:
1354 type: string
1355 title: $lt
1356 description: Filter by values less than this parameter. Useful for numbers and dates only.
1357 $lte:
1358 type: string
1359 title: $lte
1360 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
1361 $like:
1362 type: string
1363 title: $like
1364 description: Apply a `like` filter. Useful for strings only.
1365 $re:
1366 type: string
1367 title: $re
1368 description: Apply a regex filter. Useful for strings only.
1369 $ilike:
1370 type: string
1371 title: $ilike
1372 description: Apply a case-insensitive `like` filter. Useful for strings only.
1373 $fulltext:
1374 type: string
1375 title: $fulltext
1376 description: Filter to apply on full-text properties.
1377 $overlap:
1378 type: array
1379 description: Filter arrays that have overlapping values with this parameter.
1380 items:
1381 type: string
1382 title: $overlap
1383 description: The values to match.
1384 $contains:
1385 type: array
1386 description: Filter arrays that contain some of the values of this parameter.
1387 items:
1388 type: string
1389 title: $contains
1390 description: The values to match.
1391 $contained:
1392 type: array
1393 description: Filter arrays that contain all values of this parameter.
1394 items:
1395 type: string
1396 title: $contained
1397 description: The values to match.
1398 $exists:
1399 type: boolean
1400 title: $exists
1401 description: Filter by whether a value for this parameter exists (not `null`).
1402 title: deleted_at
1403 - name: revoked_at
1404 in: query
1405 description: Filter by the API key's revoke date.
1406 required: false
1407 schema:
1408 type: object
1409 description: Filter by the API key's revoke date.
1410 properties:
1411 $and:
1412 type: array
1413 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
1414 items:
1415 type: object
1416 title: $and
1417 $or:
1418 type: array
1419 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
1420 items:
1421 type: object
1422 title: $or
1423 $eq:
1424 oneOf:
1425 - type: string
1426 title: $eq
1427 description: Filter by an exact match.
1428 - type: array
1429 description: Filter by multiple exact matches.
1430 items:
1431 type: string
1432 title: $eq
1433 description: An exact match.
1434 $ne:
1435 type: string
1436 title: $ne
1437 description: Filter by values not equal to this parameter.
1438 $in:
1439 type: array
1440 description: Filter by values in this array.
1441 items:
1442 type: string
1443 title: $in
1444 description: The value to match.
1445 $nin:
1446 type: array
1447 description: Filter by values not in this array.
1448 items:
1449 type: string
1450 title: $nin
1451 description: The value not to match.
1452 $not:
1453 oneOf:
1454 - type: string
1455 title: $not
1456 description: Filter by values not matching this parameter.
1457 - type: object
1458 description: Filter by values not matching the conditions in this parameter.
1459 properties:
1460 $and:
1461 type: array
1462 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
1463 items:
1464 type: object
1465 title: $and
1466 $or:
1467 type: array
1468 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
1469 items:
1470 type: object
1471 title: $or
1472 $eq:
1473 oneOf:
1474 - type: string
1475 title: $eq
1476 description: Filter by an exact match.
1477 - type: array
1478 description: Filter by multiple exact matches.
1479 items:
1480 type: string
1481 title: $eq
1482 description: The value to match.
1483 $ne:
1484 type: string
1485 title: $ne
1486 description: Filter by values not matching this parameter.
1487 $in:
1488 type: array
1489 description: Filter by values in this array.
1490 items:
1491 type: string
1492 title: $in
1493 description: The value to match.
1494 $nin:
1495 type: array
1496 description: Filter by values not in this array.
1497 items:
1498 type: string
1499 title: $nin
1500 description: The value to not match
1501 $not:
1502 oneOf:
1503 - type: string
1504 title: $not
1505 description: Filter by values not matching this parameter
1506 - type: object
1507 description: Filter by values not matching the conditions in this parameter.
1508 - type: array
1509 description: Filter by values not matching the values of this parameter.
1510 items:
1511 type: string
1512 title: $not
1513 description: The values to not match.
1514 $gt:
1515 type: string
1516 title: $gt
1517 description: Filter by values greater than this parameter. Useful for numbers and dates only.
1518 $gte:
1519 type: string
1520 title: $gte
1521 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
1522 $lt:
1523 type: string
1524 title: $lt
1525 description: Filter by values less than this parameter. Useful for numbers and dates only.
1526 $lte:
1527 type: string
1528 title: $lte
1529 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
1530 $like:
1531 type: string
1532 title: $like
1533 description: Apply a `like` filter. Useful for strings only.
1534 $re:
1535 type: string
1536 title: $re
1537 description: Apply a regex filter. Useful for strings only.
1538 $ilike:
1539 type: string
1540 title: $ilike
1541 description: Apply a case-insensitive `like` filter. Useful for strings only.
1542 $fulltext:
1543 type: string
1544 title: $fulltext
1545 description: Filter to apply on full-text properties.
1546 $overlap:
1547 type: array
1548 description: Filter arrays that have overlapping values with this parameter.
1549 items:
1550 type: string
1551 title: $overlap
1552 description: The value to match.
1553 $contains:
1554 type: array
1555 description: Filter arrays that contain some of the values of this parameter.
1556 items:
1557 type: string
1558 title: $contains
1559 description: The values to match.
1560 $contained:
1561 type: array
1562 description: Filter arrays that contain all values of this parameter.
1563 items:
1564 type: string
1565 title: $contained
1566 description: The values to match.
1567 $exists:
1568 type: boolean
1569 title: $exists
1570 description: Filter by whether a value for this parameter exists (not `null`).
1571 - type: array
1572 description: Filter by values not matching those in this parameter.
1573 items:
1574 type: string
1575 title: $not
1576 description: The values to not match.
1577 $gt:
1578 type: string
1579 title: $gt
1580 description: Filter by values greater than this parameter. Useful for numbers and dates only.
1581 $gte:
1582 type: string
1583 title: $gte
1584 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
1585 $lt:
1586 type: string
1587 title: $lt
1588 description: Filter by values less than this parameter. Useful for numbers and dates only.
1589 $lte:
1590 type: string
1591 title: $lte
1592 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
1593 $like:
1594 type: string
1595 title: $like
1596 description: Apply a `like` filter. Useful for strings only.
1597 $re:
1598 type: string
1599 title: $re
1600 description: Apply a regex filter. Useful for strings only.
1601 $ilike:
1602 type: string
1603 title: $ilike
1604 description: Apply a case-insensitive `like` filter. Useful for strings only.
1605 $fulltext:
1606 type: string
1607 title: $fulltext
1608 description: Filter to apply on full-text properties.
1609 $overlap:
1610 type: array
1611 description: Filter arrays that have overlapping values with this parameter.
1612 items:
1613 type: string
1614 title: $overlap
1615 description: The values to match.
1616 $contains:
1617 type: array
1618 description: Filter arrays that contain some of the values of this parameter.
1619 items:
1620 type: string
1621 title: $contains
1622 description: The values to match.
1623 $contained:
1624 type: array
1625 description: Filter arrays that contain all values of this parameter.
1626 items:
1627 type: string
1628 title: $contained
1629 description: The values to match.
1630 $exists:
1631 type: boolean
1632 title: $exists
1633 description: Filter by whether a value for this parameter exists (not `null`).
1634 title: revoked_at
1635 - name: $and
1636 in: query
1637 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
1638 required: false
1639 schema:
1640 type: array
1641 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
1642 items:
1643 type: object
1644 title: $and
1645 - name: $or
1646 in: query
1647 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
1648 required: false
1649 schema:
1650 type: array
1651 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
1652 items:
1653 type: object
1654 title: $or
1655 - name: with_deleted
1656 in: query
1657 description: Whether to include deleted records in the result.
1658 required: false
1659 schema:
1660 type: boolean
1661 title: with_deleted
1662 description: Whether to include deleted records in the result.
1663 security:
1664 - api_token: []
1665 - cookie_auth: []
1666 - jwt_token: []
1667 x-codeSamples:
1668 - lang: JavaScript
1669 label: JS SDK
1670 source: |-
1671 import Medusa from "@medusajs/js-sdk"
1672
1673 export const sdk = new Medusa({
1674 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
1675 debug: import.meta.env.DEV,
1676 auth: {
1677 type: "session",
1678 },
1679 })
1680
1681 sdk.admin.apiKey.list()
1682 .then(({ api_keys, count, limit, offset }) => {
1683 console.log(api_keys)
1684 })
1685 - lang: Shell
1686 label: cURL
1687 source: |-
1688 curl '{backend_url}/admin/api-keys' \
1689 -H 'Authorization: Bearer {jwt_token}'
1690 tags:
1691 - Api Keys
1692 responses:
1693 '200':
1694 description: OK
1695 content:
1696 application/json:
1697 schema:
1698 allOf:
1699 - type: object
1700 required:
1701 - limit
1702 - offset
1703 - count
1704 properties:
1705 limit:
1706 type: number
1707 title: limit
1708 description: The maximum number of items returned in the list.
1709 offset:
1710 type: number
1711 title: offset
1712 description: The number of items skipped before retrieving the returned items.
1713 count:
1714 type: number
1715 title: count
1716 description: The total count of items.
1717 - type: object
1718 required:
1719 - api_keys
1720 properties:
1721 api_keys:
1722 type: array
1723 description: The list of API keys.
1724 items:
1725 $ref: '#/components/schemas/ApiKeyResponse'
1726 '400':
1727 $ref: '#/components/responses/400_error'
1728 '401':
1729 $ref: '#/components/responses/unauthorized'
1730 '404':
1731 $ref: '#/components/responses/not_found_error'
1732 '409':
1733 $ref: '#/components/responses/invalid_state_error'
1734 '422':
1735 $ref: '#/components/responses/invalid_request_error'
1736 '500':
1737 $ref: '#/components/responses/500_error'
1738 post:
1739 operationId: PostApiKeys
1740 summary: Create Api Key
1741 description: |
1742 Create a secret or publishable API key.
1743 A secret API key is used for admin authentication.
1744
1745 A publishable API key is used by client applications to set the scope of the request.
1746 x-authenticated: true
1747 security:
1748 - api_token: []
1749 - cookie_auth: []
1750 - jwt_token: []
1751 requestBody:
1752 content:
1753 application/json:
1754 schema:
1755 $ref: '#/components/schemas/AdminCreateApiKey'
1756 x-codeSamples:
1757 - lang: JavaScript
1758 label: JS SDK
1759 source: |-
1760 import Medusa from "@medusajs/js-sdk"
1761
1762 export const sdk = new Medusa({
1763 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
1764 debug: import.meta.env.DEV,
1765 auth: {
1766 type: "session",
1767 },
1768 })
1769
1770 sdk.admin.apiKey.create({
1771 title: "Development",
1772 type: "publishable"
1773 })
1774 .then(({ api_key }) => {
1775 console.log(api_key)
1776 })
1777 - lang: Shell
1778 label: cURL
1779 source: |-
1780 curl -X POST '{backend_url}/admin/api-keys' \
1781 -H 'Authorization: Bearer {jwt_token}' \
1782 -H 'Content-Type: application/json' \
1783 --data-raw '{
1784 "title": "{value}",
1785 "type": "{value}"
1786 }'
1787 tags:
1788 - Api Keys
1789 responses:
1790 '200':
1791 description: OK
1792 content:
1793 application/json:
1794 schema:
1795 $ref: '#/components/schemas/AdminApiKeyResponse'
1796 '400':
1797 $ref: '#/components/responses/400_error'
1798 '401':
1799 $ref: '#/components/responses/unauthorized'
1800 '404':
1801 $ref: '#/components/responses/not_found_error'
1802 '409':
1803 $ref: '#/components/responses/invalid_state_error'
1804 '422':
1805 $ref: '#/components/responses/invalid_request_error'
1806 '500':
1807 $ref: '#/components/responses/500_error'
1808 x-workflow: createApiKeysWorkflow
1809 x-events: []
1810 /admin/api-keys/{id}:
1811 get:
1812 operationId: GetApiKeysId
1813 summary: Get API Key
1814 description: Retrieve an API key by its ID. You can expand the API key's relations or select the fields that should be returned using the query parameters.
1815 x-authenticated: true
1816 parameters:
1817 - name: id
1818 in: path
1819 description: The API key's ID.
1820 required: true
1821 schema:
1822 type: string
1823 - name: fields
1824 in: query
1825 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
1826 required: false
1827 schema:
1828 type: string
1829 title: fields
1830 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
1831 externalDocs:
1832 url: '#select-fields-and-relations'
1833 security:
1834 - api_token: []
1835 - cookie_auth: []
1836 - jwt_token: []
1837 x-codeSamples:
1838 - lang: JavaScript
1839 label: JS SDK
1840 source: |-
1841 import Medusa from "@medusajs/js-sdk"
1842
1843 export const sdk = new Medusa({
1844 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
1845 debug: import.meta.env.DEV,
1846 auth: {
1847 type: "session",
1848 },
1849 })
1850
1851 sdk.admin.apiKey.retrieve("apk_123")
1852 .then(({ api_key }) => {
1853 console.log(api_key)
1854 })
1855 - lang: Shell
1856 label: cURL
1857 source: |-
1858 curl '{backend_url}/admin/api-keys/{id}' \
1859 -H 'Authorization: Bearer {jwt_token}'
1860 tags:
1861 - Api Keys
1862 responses:
1863 '200':
1864 description: OK
1865 content:
1866 application/json:
1867 schema:
1868 $ref: '#/components/schemas/AdminApiKeyResponse'
1869 '400':
1870 $ref: '#/components/responses/400_error'
1871 '401':
1872 $ref: '#/components/responses/unauthorized'
1873 '404':
1874 $ref: '#/components/responses/not_found_error'
1875 '409':
1876 $ref: '#/components/responses/invalid_state_error'
1877 '422':
1878 $ref: '#/components/responses/invalid_request_error'
1879 '500':
1880 $ref: '#/components/responses/500_error'
1881 post:
1882 operationId: PostApiKeysId
1883 summary: Update an API Key
1884 description: Update an API key's details.
1885 x-authenticated: true
1886 parameters:
1887 - name: id
1888 in: path
1889 description: The API key's ID.
1890 required: true
1891 schema:
1892 type: string
1893 - name: fields
1894 in: query
1895 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
1896 required: false
1897 schema:
1898 type: string
1899 title: fields
1900 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
1901 externalDocs:
1902 url: '#select-fields-and-relations'
1903 security:
1904 - api_token: []
1905 - cookie_auth: []
1906 - jwt_token: []
1907 requestBody:
1908 content:
1909 application/json:
1910 schema:
1911 $ref: '#/components/schemas/AdminUpdateApiKey'
1912 x-codeSamples:
1913 - lang: JavaScript
1914 label: JS SDK
1915 source: |-
1916 import Medusa from "@medusajs/js-sdk"
1917
1918 export const sdk = new Medusa({
1919 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
1920 debug: import.meta.env.DEV,
1921 auth: {
1922 type: "session",
1923 },
1924 })
1925
1926 sdk.admin.apiKey.update("apk_123", {
1927 title: "Development"
1928 })
1929 .then(({ api_key }) => {
1930 console.log(api_key)
1931 })
1932 - lang: Shell
1933 label: cURL
1934 source: |-
1935 curl -X POST '{backend_url}/admin/api-keys/{id}' \
1936 -H 'Authorization: Bearer {jwt_token}' \
1937 -H 'Content-Type: application/json' \
1938 --data-raw '{
1939 "title": "{value}"
1940 }'
1941 tags:
1942 - Api Keys
1943 responses:
1944 '200':
1945 description: OK
1946 content:
1947 application/json:
1948 schema:
1949 $ref: '#/components/schemas/AdminApiKeyResponse'
1950 '400':
1951 $ref: '#/components/responses/400_error'
1952 '401':
1953 $ref: '#/components/responses/unauthorized'
1954 '404':
1955 $ref: '#/components/responses/not_found_error'
1956 '409':
1957 $ref: '#/components/responses/invalid_state_error'
1958 '422':
1959 $ref: '#/components/responses/invalid_request_error'
1960 '500':
1961 $ref: '#/components/responses/500_error'
1962 x-workflow: updateApiKeysWorkflow
1963 x-events: []
1964 delete:
1965 operationId: DeleteApiKeysId
1966 summary: Delete an Api Key
1967 description: |
1968 Delete a publishable or secret API key.
1969 x-authenticated: true
1970 parameters:
1971 - name: id
1972 in: path
1973 description: The API key's ID.
1974 required: true
1975 schema:
1976 type: string
1977 security:
1978 - api_token: []
1979 - cookie_auth: []
1980 - jwt_token: []
1981 x-codeSamples:
1982 - lang: JavaScript
1983 label: JS SDK
1984 source: |-
1985 import Medusa from "@medusajs/js-sdk"
1986
1987 export const sdk = new Medusa({
1988 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
1989 debug: import.meta.env.DEV,
1990 auth: {
1991 type: "session",
1992 },
1993 })
1994
1995 sdk.admin.apiKey.delete("apk_123")
1996 .then(({ deleted }) => {
1997 console.log(deleted)
1998 })
1999 - lang: Shell
2000 label: cURL
2001 source: |-
2002 curl -X DELETE '{backend_url}/admin/api-keys/{id}' \
2003 -H 'Authorization: Bearer {jwt_token}'
2004 tags:
2005 - Api Keys
2006 responses:
2007 '200':
2008 description: OK
2009 content:
2010 application/json:
2011 schema:
2012 type: object
2013 description: The deletion's details.
2014 required:
2015 - id
2016 - object
2017 - deleted
2018 properties:
2019 id:
2020 type: string
2021 title: id
2022 description: The API key's ID.
2023 object:
2024 type: string
2025 title: object
2026 description: The name of the object that was deleted.
2027 default: api_key
2028 deleted:
2029 type: boolean
2030 title: deleted
2031 description: Whether the API key was deleted.
2032 '400':
2033 $ref: '#/components/responses/400_error'
2034 '401':
2035 $ref: '#/components/responses/unauthorized'
2036 '404':
2037 $ref: '#/components/responses/not_found_error'
2038 '409':
2039 $ref: '#/components/responses/invalid_state_error'
2040 '422':
2041 $ref: '#/components/responses/invalid_request_error'
2042 '500':
2043 $ref: '#/components/responses/500_error'
2044 x-workflow: deleteApiKeysWorkflow
2045 x-events: []
2046 /admin/api-keys/{id}/revoke:
2047 post:
2048 operationId: PostApiKeysIdRevoke
2049 summary: Revoke API Key
2050 description: |
2051 Revokes an API key. If the API key is a secret, it can't be used for authentication anymore. If it's publishable, it can't be used by client applications.
2052 x-authenticated: true
2053 parameters:
2054 - name: id
2055 in: path
2056 description: The API key's ID.
2057 required: true
2058 schema:
2059 type: string
2060 - name: fields
2061 in: query
2062 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2063 required: false
2064 schema:
2065 type: string
2066 title: fields
2067 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2068 externalDocs:
2069 url: '#select-fields-and-relations'
2070 security:
2071 - api_token: []
2072 - cookie_auth: []
2073 - jwt_token: []
2074 requestBody:
2075 content:
2076 application/json:
2077 schema:
2078 $ref: '#/components/schemas/AdminRevokeApiKey'
2079 x-codeSamples:
2080 - lang: JavaScript
2081 label: JS SDK
2082 source: |-
2083 import Medusa from "@medusajs/js-sdk"
2084
2085 export const sdk = new Medusa({
2086 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
2087 debug: import.meta.env.DEV,
2088 auth: {
2089 type: "session",
2090 },
2091 })
2092
2093 sdk.admin.apiKey.revoke("apk_123")
2094 .then(({ api_key }) => {
2095 console.log(api_key)
2096 })
2097 - lang: Shell
2098 label: cURL
2099 source: |-
2100 curl -X POST '{backend_url}/admin/api-keys/{id}/revoke' \
2101 -H 'Authorization: Bearer {jwt_token}'
2102 tags:
2103 - Api Keys
2104 responses:
2105 '200':
2106 description: OK
2107 content:
2108 application/json:
2109 schema:
2110 $ref: '#/components/schemas/AdminApiKeyResponse'
2111 '400':
2112 $ref: '#/components/responses/400_error'
2113 '401':
2114 $ref: '#/components/responses/unauthorized'
2115 '404':
2116 $ref: '#/components/responses/not_found_error'
2117 '409':
2118 $ref: '#/components/responses/invalid_state_error'
2119 '422':
2120 $ref: '#/components/responses/invalid_request_error'
2121 '500':
2122 $ref: '#/components/responses/500_error'
2123 x-workflow: revokeApiKeysWorkflow
2124 x-events: []
2125 /admin/api-keys/{id}/sales-channels:
2126 post:
2127 operationId: PostApiKeysIdSalesChannels
2128 summary: Manage Sales Channels of a Publishable API Key
2129 x-sidebar-summary: Manage Sales Channels
2130 description: Manage the sales channels of a publishable API key, either to associate them or remove them from the API key.
2131 x-authenticated: true
2132 parameters:
2133 - name: id
2134 in: path
2135 description: The API key's ID.
2136 required: true
2137 schema:
2138 type: string
2139 - name: fields
2140 in: query
2141 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2142 required: false
2143 schema:
2144 type: string
2145 title: fields
2146 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2147 externalDocs:
2148 url: '#select-fields-and-relations'
2149 security:
2150 - api_token: []
2151 - cookie_auth: []
2152 - jwt_token: []
2153 requestBody:
2154 content:
2155 application/json:
2156 schema:
2157 $ref: '#/components/schemas/AdminBatchLink'
2158 x-codeSamples:
2159 - lang: JavaScript
2160 label: JS SDK
2161 source: |-
2162 import Medusa from "@medusajs/js-sdk"
2163
2164 export const sdk = new Medusa({
2165 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
2166 debug: import.meta.env.DEV,
2167 auth: {
2168 type: "session",
2169 },
2170 })
2171
2172 sdk.admin.apiKey.batchSalesChannels("apk_123", {
2173 add: ["sc_123"],
2174 remove: ["sc_321"]
2175 })
2176 .then(({ api_key }) => {
2177 console.log(api_key)
2178 })
2179 - lang: Shell
2180 label: cURL
2181 source: |-
2182 curl -X POST '{backend_url}/admin/api-keys/{id}/sales-channels' \
2183 -H 'Authorization: Bearer {jwt_token}'
2184 tags:
2185 - Api Keys
2186 responses:
2187 '200':
2188 description: OK
2189 content:
2190 application/json:
2191 schema:
2192 $ref: '#/components/schemas/AdminApiKeyResponse'
2193 '400':
2194 $ref: '#/components/responses/400_error'
2195 '401':
2196 $ref: '#/components/responses/unauthorized'
2197 '404':
2198 $ref: '#/components/responses/not_found_error'
2199 '409':
2200 $ref: '#/components/responses/invalid_state_error'
2201 '422':
2202 $ref: '#/components/responses/invalid_request_error'
2203 '500':
2204 $ref: '#/components/responses/500_error'
2205 x-workflow: linkSalesChannelsToApiKeyWorkflow
2206 x-events: []
2207 /admin/campaigns:
2208 get:
2209 operationId: GetCampaigns
2210 summary: List Campaigns
2211 description: Retrieve a list of campaigns. The campaigns can be filtered by fields such as `id`. The campaigns can also be sorted or paginated.
2212 x-authenticated: true
2213 parameters:
2214 - name: fields
2215 in: query
2216 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2217 required: false
2218 schema:
2219 type: string
2220 title: fields
2221 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2222 externalDocs:
2223 url: '#select-fields-and-relations'
2224 - name: offset
2225 in: query
2226 description: The number of items to skip when retrieving a list.
2227 required: false
2228 schema:
2229 type: number
2230 title: offset
2231 description: The number of items to skip when retrieving a list.
2232 externalDocs:
2233 url: '#pagination'
2234 - name: limit
2235 in: query
2236 description: Limit the number of items returned in the list.
2237 required: false
2238 schema:
2239 type: number
2240 title: limit
2241 description: Limit the number of items returned in the list.
2242 externalDocs:
2243 url: '#pagination'
2244 - name: order
2245 in: query
2246 description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
2247 required: false
2248 schema:
2249 type: string
2250 title: order
2251 description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
2252 - name: with_deleted
2253 in: query
2254 description: Whether to include deleted records in the result.
2255 required: false
2256 schema:
2257 type: boolean
2258 title: with_deleted
2259 description: Whether to include deleted records in the result.
2260 - name: q
2261 in: query
2262 description: Apply a search query to the campaign's searchable properties.
2263 required: false
2264 schema:
2265 type: string
2266 title: q
2267 description: Apply a search query to the campaign's searchable properties.
2268 - name: campaign_identifier
2269 in: query
2270 description: Filter by a campaign identifier.
2271 required: false
2272 schema:
2273 type: string
2274 title: campaign_identifier
2275 description: Filter by a campaign identifier.
2276 - name: budget
2277 in: query
2278 description: Filter by the campaign's budget.
2279 required: false
2280 schema:
2281 type: object
2282 description: Filter by the campaign's budget.
2283 properties:
2284 currency_code:
2285 type: string
2286 title: currency_code
2287 description: The budget's currency code.
2288 example: usd
2289 - name: $and
2290 in: query
2291 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
2292 required: false
2293 schema:
2294 type: array
2295 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
2296 items:
2297 type: object
2298 title: $and
2299 - name: $or
2300 in: query
2301 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
2302 required: false
2303 schema:
2304 type: array
2305 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
2306 items:
2307 type: object
2308 title: $or
2309 security:
2310 - api_token: []
2311 - cookie_auth: []
2312 - jwt_token: []
2313 x-codeSamples:
2314 - lang: JavaScript
2315 label: JS SDK
2316 source: |-
2317 import Medusa from "@medusajs/js-sdk"
2318
2319 export const sdk = new Medusa({
2320 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
2321 debug: import.meta.env.DEV,
2322 auth: {
2323 type: "session",
2324 },
2325 })
2326
2327 sdk.admin.campaign.list()
2328 .then(({ campaigns, count, limit, offset }) => {
2329 console.log(campaigns)
2330 })
2331 - lang: Shell
2332 label: cURL
2333 source: |-
2334 curl '{backend_url}/admin/campaigns' \
2335 -H 'Authorization: Bearer {jwt_token}'
2336 tags:
2337 - Campaigns
2338 responses:
2339 '200':
2340 description: OK
2341 content:
2342 application/json:
2343 schema:
2344 allOf:
2345 - type: object
2346 description: The paginated list of campaigns.
2347 required:
2348 - limit
2349 - offset
2350 - count
2351 properties:
2352 limit:
2353 type: number
2354 title: limit
2355 description: The maximum number of items retrieved.
2356 offset:
2357 type: number
2358 title: offset
2359 description: The number of its skipped before the returned items.
2360 count:
2361 type: number
2362 title: count
2363 description: The total number of items.
2364 - type: object
2365 description: The list of campaigns
2366 required:
2367 - campaigns
2368 properties:
2369 campaigns:
2370 type: array
2371 description: The list of campaigns.
2372 items:
2373 $ref: '#/components/schemas/CampaignResponse'
2374 '400':
2375 $ref: '#/components/responses/400_error'
2376 '401':
2377 $ref: '#/components/responses/unauthorized'
2378 '404':
2379 $ref: '#/components/responses/not_found_error'
2380 '409':
2381 $ref: '#/components/responses/invalid_state_error'
2382 '422':
2383 $ref: '#/components/responses/invalid_request_error'
2384 '500':
2385 $ref: '#/components/responses/500_error'
2386 post:
2387 operationId: PostCampaigns
2388 summary: Create Campaign
2389 description: Create a campaign.
2390 x-authenticated: true
2391 parameters:
2392 - name: fields
2393 in: query
2394 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2395 required: false
2396 schema:
2397 type: string
2398 title: fields
2399 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2400 externalDocs:
2401 url: '#select-fields-and-relations'
2402 security:
2403 - api_token: []
2404 - cookie_auth: []
2405 - jwt_token: []
2406 requestBody:
2407 content:
2408 application/json:
2409 schema:
2410 allOf:
2411 - type: object
2412 description: The campaign's details.
2413 required:
2414 - name
2415 - campaign_identifier
2416 - description
2417 - budget
2418 - starts_at
2419 - ends_at
2420 properties:
2421 name:
2422 type: string
2423 title: name
2424 description: The campaign's name.
2425 campaign_identifier:
2426 type: string
2427 title: campaign_identifier
2428 description: The campaign's identifier.
2429 description:
2430 type: string
2431 title: description
2432 description: The campaign's description.
2433 budget:
2434 type: object
2435 description: The campaign's budget which, when crossed, ends the campaign.
2436 required:
2437 - type
2438 - limit
2439 - currency_code
2440 properties:
2441 type:
2442 type: string
2443 title: type
2444 description: |
2445 The budget's type. This can't be edited later. Use `spend` to set a limit on the total amount discounted by the campaign's promotions. Use `usage` to set a limit on the total number of times the campaign's promotions can be used.
2446 enum:
2447 - spend
2448 - usage
2449 limit:
2450 type: number
2451 title: limit
2452 description: The campaign budget's limit.
2453 currency_code:
2454 type: string
2455 title: currency_code
2456 description: The campaign budget's currency code. This can't be edited later.
2457 starts_at:
2458 type: string
2459 title: starts_at
2460 description: The campaign's start date.
2461 format: date-time
2462 ends_at:
2463 type: string
2464 title: ends_at
2465 description: The campaign's end date.
2466 format: date-time
2467 promotions:
2468 type: array
2469 description: The campaign's promotions.
2470 items:
2471 type: object
2472 description: The promotions to add to the campaign.
2473 required:
2474 - id
2475 properties:
2476 id:
2477 type: string
2478 title: id
2479 description: A promotion's ID.
2480 - type: object
2481 description: The campaign's details.
2482 properties:
2483 additional_data:
2484 type: object
2485 description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter.
2486 description: The campaign's details.
2487 x-codeSamples:
2488 - lang: JavaScript
2489 label: JS SDK
2490 source: |-
2491 import Medusa from "@medusajs/js-sdk"
2492
2493 export const sdk = new Medusa({
2494 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
2495 debug: import.meta.env.DEV,
2496 auth: {
2497 type: "session",
2498 },
2499 })
2500
2501 sdk.admin.campaign.create({
2502 name: "Summer Campaign"
2503 })
2504 .then(({ campaign }) => {
2505 console.log(campaign)
2506 })
2507 - lang: Shell
2508 label: cURL
2509 source: |-
2510 curl -X POST '{backend_url}/admin/campaigns' \
2511 -H 'Authorization: Bearer {jwt_token}' \
2512 -H 'Content-Type: application/json' \
2513 --data-raw '{
2514 "name": "Gunner",
2515 "campaign_identifier": "{value}",
2516 "description": "{value}",
2517 "starts_at": "2024-08-24T00:19:14.144Z",
2518 "ends_at": "2024-10-01T06:47:50.133Z"
2519 }'
2520 tags:
2521 - Campaigns
2522 responses:
2523 '200':
2524 description: OK
2525 content:
2526 application/json:
2527 schema:
2528 $ref: '#/components/schemas/AdminCampaignResponse'
2529 '400':
2530 $ref: '#/components/responses/400_error'
2531 '401':
2532 $ref: '#/components/responses/unauthorized'
2533 '404':
2534 $ref: '#/components/responses/not_found_error'
2535 '409':
2536 $ref: '#/components/responses/invalid_state_error'
2537 '422':
2538 $ref: '#/components/responses/invalid_request_error'
2539 '500':
2540 $ref: '#/components/responses/500_error'
2541 x-workflow: createCampaignsWorkflow
2542 x-events: []
2543 /admin/campaigns/{id}:
2544 get:
2545 operationId: GetCampaignsId
2546 summary: Get a Campaign
2547 description: Retrieve a campaign by its ID. You can expand the campaign's relations or select the fields that should be returned using the query parameters.
2548 x-authenticated: true
2549 parameters:
2550 - name: id
2551 in: path
2552 description: The campaign's ID.
2553 required: true
2554 schema:
2555 type: string
2556 - name: fields
2557 in: query
2558 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2559 required: false
2560 schema:
2561 type: string
2562 title: fields
2563 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2564 externalDocs:
2565 url: '#select-fields-and-relations'
2566 security:
2567 - api_token: []
2568 - cookie_auth: []
2569 - jwt_token: []
2570 x-codeSamples:
2571 - lang: JavaScript
2572 label: JS SDK
2573 source: |-
2574 import Medusa from "@medusajs/js-sdk"
2575
2576 export const sdk = new Medusa({
2577 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
2578 debug: import.meta.env.DEV,
2579 auth: {
2580 type: "session",
2581 },
2582 })
2583
2584 sdk.admin.campaign.retrieve("procamp_123")
2585 .then(({ campaign }) => {
2586 console.log(campaign)
2587 })
2588 - lang: Shell
2589 label: cURL
2590 source: |-
2591 curl '{backend_url}/admin/campaigns/{id}' \
2592 -H 'Authorization: Bearer {jwt_token}'
2593 tags:
2594 - Campaigns
2595 responses:
2596 '200':
2597 description: OK
2598 content:
2599 application/json:
2600 schema:
2601 $ref: '#/components/schemas/AdminCampaignResponse'
2602 '400':
2603 $ref: '#/components/responses/400_error'
2604 '401':
2605 $ref: '#/components/responses/unauthorized'
2606 '404':
2607 $ref: '#/components/responses/not_found_error'
2608 '409':
2609 $ref: '#/components/responses/invalid_state_error'
2610 '422':
2611 $ref: '#/components/responses/invalid_request_error'
2612 '500':
2613 $ref: '#/components/responses/500_error'
2614 post:
2615 operationId: PostCampaignsId
2616 summary: Update a Campaign
2617 description: Update a campaign's details.
2618 x-authenticated: true
2619 parameters:
2620 - name: id
2621 in: path
2622 description: The campaign's ID.
2623 required: true
2624 schema:
2625 type: string
2626 - name: fields
2627 in: query
2628 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2629 required: false
2630 schema:
2631 type: string
2632 title: fields
2633 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2634 externalDocs:
2635 url: '#select-fields-and-relations'
2636 security:
2637 - api_token: []
2638 - cookie_auth: []
2639 - jwt_token: []
2640 requestBody:
2641 content:
2642 application/json:
2643 schema:
2644 allOf:
2645 - type: object
2646 description: The campaign's details.
2647 required:
2648 - description
2649 - starts_at
2650 - ends_at
2651 properties:
2652 name:
2653 type: string
2654 title: name
2655 description: The campaign's name.
2656 campaign_identifier:
2657 type: string
2658 title: campaign_identifier
2659 description: The campaign's identifier.
2660 description:
2661 type: string
2662 title: description
2663 description: The campaign's description.
2664 budget:
2665 type: object
2666 description: The campaign's budget.
2667 required:
2668 - limit
2669 properties:
2670 limit:
2671 type: number
2672 title: limit
2673 description: The campaign budget's limit.
2674 starts_at:
2675 type: string
2676 title: starts_at
2677 description: The campaign's start date.
2678 format: date-time
2679 ends_at:
2680 type: string
2681 title: ends_at
2682 description: The campaign's end date.
2683 format: date-time
2684 promotions:
2685 type: array
2686 description: The campaign's promotions.
2687 items:
2688 type: object
2689 description: The promotions to add to the campaign.
2690 required:
2691 - id
2692 properties:
2693 id:
2694 type: string
2695 title: id
2696 description: A promotion's ID.
2697 - type: object
2698 description: The campaign's details.
2699 properties:
2700 additional_data:
2701 type: object
2702 description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter.
2703 description: The campaign's details.
2704 x-codeSamples:
2705 - lang: JavaScript
2706 label: JS SDK
2707 source: |-
2708 import Medusa from "@medusajs/js-sdk"
2709
2710 export const sdk = new Medusa({
2711 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
2712 debug: import.meta.env.DEV,
2713 auth: {
2714 type: "session",
2715 },
2716 })
2717
2718 sdk.admin.campaign.update("procamp_123", {
2719 name: "Summer Campaign"
2720 })
2721 .then(({ campaign }) => {
2722 console.log(campaign)
2723 })
2724 - lang: Shell
2725 label: cURL
2726 source: |-
2727 curl -X POST '{backend_url}/admin/campaigns/{id}' \
2728 -H 'Authorization: Bearer {jwt_token}' \
2729 -H 'Content-Type: application/json' \
2730 --data-raw '{
2731 "description": "{value}",
2732 "starts_at": "2024-08-10T14:44:10.530Z",
2733 "ends_at": "2024-07-13T17:45:37.462Z"
2734 }'
2735 tags:
2736 - Campaigns
2737 responses:
2738 '200':
2739 description: OK
2740 content:
2741 application/json:
2742 schema:
2743 $ref: '#/components/schemas/AdminCampaignResponse'
2744 '400':
2745 $ref: '#/components/responses/400_error'
2746 '401':
2747 $ref: '#/components/responses/unauthorized'
2748 '404':
2749 $ref: '#/components/responses/not_found_error'
2750 '409':
2751 $ref: '#/components/responses/invalid_state_error'
2752 '422':
2753 $ref: '#/components/responses/invalid_request_error'
2754 '500':
2755 $ref: '#/components/responses/500_error'
2756 x-workflow: updateCampaignsWorkflow
2757 x-events: []
2758 delete:
2759 operationId: DeleteCampaignsId
2760 summary: Delete a Campaign
2761 description: |
2762 Delete a campaign by its ID. This doesn't delete promotions that belong to this campaign.
2763 x-authenticated: true
2764 parameters:
2765 - name: id
2766 in: path
2767 description: The campaign's ID.
2768 required: true
2769 schema:
2770 type: string
2771 security:
2772 - api_token: []
2773 - cookie_auth: []
2774 - jwt_token: []
2775 x-codeSamples:
2776 - lang: JavaScript
2777 label: JS SDK
2778 source: |-
2779 import Medusa from "@medusajs/js-sdk"
2780
2781 export const sdk = new Medusa({
2782 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
2783 debug: import.meta.env.DEV,
2784 auth: {
2785 type: "session",
2786 },
2787 })
2788
2789 sdk.admin.campaign.delete("procamp_123")
2790 .then(({ deleted }) => {
2791 console.log(deleted)
2792 })
2793 - lang: Shell
2794 label: cURL
2795 source: |-
2796 curl -X DELETE '{backend_url}/admin/campaigns/{id}' \
2797 -H 'Authorization: Bearer {jwt_token}'
2798 tags:
2799 - Campaigns
2800 responses:
2801 '200':
2802 description: OK
2803 content:
2804 application/json:
2805 schema:
2806 type: object
2807 description: The deletion's details.
2808 required:
2809 - id
2810 - object
2811 - deleted
2812 properties:
2813 id:
2814 type: string
2815 title: id
2816 description: The campaign's ID.
2817 object:
2818 type: string
2819 title: object
2820 description: The name of the object that was deleted.
2821 default: campaign
2822 deleted:
2823 type: boolean
2824 title: deleted
2825 description: Whether the campaign was deleted.
2826 '400':
2827 $ref: '#/components/responses/400_error'
2828 '401':
2829 $ref: '#/components/responses/unauthorized'
2830 '404':
2831 $ref: '#/components/responses/not_found_error'
2832 '409':
2833 $ref: '#/components/responses/invalid_state_error'
2834 '422':
2835 $ref: '#/components/responses/invalid_request_error'
2836 '500':
2837 $ref: '#/components/responses/500_error'
2838 x-workflow: deleteCampaignsWorkflow
2839 x-events: []
2840 /admin/campaigns/{id}/promotions:
2841 post:
2842 operationId: PostCampaignsIdPromotions
2843 summary: Manage the Promotions of a Campaign
2844 x-sidebar-summary: Manage Promotions
2845 description: Manage the promotions of a campaign, either by adding them or removing them from the campaign.
2846 x-authenticated: true
2847 parameters:
2848 - name: id
2849 in: path
2850 description: The campaign's ID.
2851 required: true
2852 schema:
2853 type: string
2854 - name: fields
2855 in: query
2856 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2857 required: false
2858 schema:
2859 type: string
2860 title: fields
2861 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2862 externalDocs:
2863 url: '#select-fields-and-relations'
2864 security:
2865 - api_token: []
2866 - cookie_auth: []
2867 - jwt_token: []
2868 requestBody:
2869 content:
2870 application/json:
2871 schema:
2872 $ref: '#/components/schemas/AdminBatchLink'
2873 x-codeSamples:
2874 - lang: JavaScript
2875 label: JS SDK
2876 source: |-
2877 import Medusa from "@medusajs/js-sdk"
2878
2879 export const sdk = new Medusa({
2880 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
2881 debug: import.meta.env.DEV,
2882 auth: {
2883 type: "session",
2884 },
2885 })
2886
2887 sdk.admin.campaign.batchPromotions("procamp_123", {
2888 add: ["prom_123", "prom_456"],
2889 remove: ["prom_789"]
2890 })
2891 .then(({ campaign }) => {
2892 console.log(campaign)
2893 })
2894 - lang: Shell
2895 label: cURL
2896 source: |-
2897 curl -X POST '{backend_url}/admin/campaigns/{id}/promotions' \
2898 -H 'Authorization: Bearer {jwt_token}'
2899 tags:
2900 - Campaigns
2901 responses:
2902 '200':
2903 description: OK
2904 content:
2905 application/json:
2906 schema:
2907 $ref: '#/components/schemas/AdminCampaignResponse'
2908 '400':
2909 $ref: '#/components/responses/400_error'
2910 '401':
2911 $ref: '#/components/responses/unauthorized'
2912 '404':
2913 $ref: '#/components/responses/not_found_error'
2914 '409':
2915 $ref: '#/components/responses/invalid_state_error'
2916 '422':
2917 $ref: '#/components/responses/invalid_request_error'
2918 '500':
2919 $ref: '#/components/responses/500_error'
2920 x-workflow: addOrRemoveCampaignPromotionsWorkflow
2921 x-events: []
2922 /admin/claims:
2923 get:
2924 operationId: GetClaims
2925 summary: List Claims
2926 description: Retrieve a list of claims. The claims can be filtered by fields such as `id`. The claims can also be sorted or paginated.
2927 x-authenticated: true
2928 parameters:
2929 - name: fields
2930 in: query
2931 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2932 required: false
2933 schema:
2934 type: string
2935 title: fields
2936 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
2937 externalDocs:
2938 url: '#select-fields-and-relations'
2939 - name: offset
2940 in: query
2941 description: The number of items to skip when retrieving a list.
2942 required: false
2943 schema:
2944 type: number
2945 title: offset
2946 description: The number of items to skip when retrieving a list.
2947 externalDocs:
2948 url: '#pagination'
2949 - name: limit
2950 in: query
2951 description: Limit the number of items returned in the list.
2952 required: false
2953 schema:
2954 type: number
2955 title: limit
2956 description: Limit the number of items returned in the list.
2957 externalDocs:
2958 url: '#pagination'
2959 - name: order
2960 in: query
2961 description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
2962 required: false
2963 schema:
2964 type: string
2965 title: order
2966 description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
2967 - name: deleted_at
2968 in: query
2969 description: Filter by the claim's deletion date.
2970 required: false
2971 schema:
2972 type: object
2973 description: The claim's deletion date.
2974 properties:
2975 $and:
2976 type: array
2977 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
2978 items:
2979 type: object
2980 title: $and
2981 $or:
2982 type: array
2983 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
2984 items:
2985 type: object
2986 title: $or
2987 $eq:
2988 oneOf:
2989 - type: string
2990 title: $eq
2991 description: Filter by an exact match.
2992 - type: array
2993 description: Filter by an exact match.
2994 items:
2995 type: string
2996 title: $eq
2997 description: Filter by an exact match.
2998 $ne:
2999 type: string
3000 title: $ne
3001 description: Filter by values not equal to this parameter.
3002 $in:
3003 type: array
3004 description: Filter by values in this array.
3005 items:
3006 type: string
3007 title: $in
3008 description: Filter by values in this array.
3009 $nin:
3010 type: array
3011 description: Filter by values not in this array.
3012 items:
3013 type: string
3014 title: $nin
3015 description: Filter by values not in this array.
3016 $not:
3017 oneOf:
3018 - type: string
3019 title: $not
3020 description: Filter by values not matching the conditions in this parameter.
3021 - type: object
3022 description: Filter by values not matching the conditions in this parameter.
3023 properties:
3024 $and:
3025 type: array
3026 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
3027 items:
3028 type: object
3029 title: $and
3030 $or:
3031 type: array
3032 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
3033 items:
3034 type: object
3035 title: $or
3036 $eq:
3037 oneOf:
3038 - type: string
3039 title: $eq
3040 description: Filter by an exact match.
3041 - type: array
3042 description: Filter by an exact match.
3043 items:
3044 type: string
3045 title: $eq
3046 description: Filter by an exact match.
3047 $ne:
3048 type: string
3049 title: $ne
3050 description: Filter by values not equal to this parameter.
3051 $in:
3052 type: array
3053 description: Filter by values in this array.
3054 items:
3055 type: string
3056 title: $in
3057 description: Filter by values in this array.
3058 $nin:
3059 type: array
3060 description: Filter by values not in this array.
3061 items:
3062 type: string
3063 title: $nin
3064 description: Filter by values not in this array.
3065 $not:
3066 oneOf:
3067 - type: string
3068 title: $not
3069 description: Filter by values not matching the conditions in this parameter.
3070 - type: object
3071 description: Filter by values not matching the conditions in this parameter.
3072 - type: array
3073 description: Filter by values not matching the conditions in this parameter.
3074 items:
3075 type: string
3076 title: $not
3077 description: Filter by values not matching the conditions in this parameter.
3078 $gt:
3079 type: string
3080 title: $gt
3081 description: Filter by values greater than this parameter. Useful for numbers and dates only.
3082 $gte:
3083 type: string
3084 title: $gte
3085 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
3086 $lt:
3087 type: string
3088 title: $lt
3089 description: Filter by values less than this parameter. Useful for numbers and dates only.
3090 $lte:
3091 type: string
3092 title: $lte
3093 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
3094 $like:
3095 type: string
3096 title: $like
3097 description: Apply a `like` filter. Useful for strings only.
3098 $re:
3099 type: string
3100 title: $re
3101 description: Apply a regex filter. Useful for strings only.
3102 $ilike:
3103 type: string
3104 title: $ilike
3105 description: Apply a case-insensitive `like` filter. Useful for strings only.
3106 $fulltext:
3107 type: string
3108 title: $fulltext
3109 description: Filter to apply on full-text properties.
3110 $overlap:
3111 type: array
3112 description: Filter arrays that have overlapping values with this parameter.
3113 items:
3114 type: string
3115 title: $overlap
3116 description: Filter arrays that have overlapping values with this parameter.
3117 $contains:
3118 type: array
3119 description: Filter arrays that contain some of the values of this parameter.
3120 items:
3121 type: string
3122 title: $contains
3123 description: Filter arrays that contain some of the values of this parameter.
3124 $contained:
3125 type: array
3126 description: Filter arrays that contain all values of this parameter.
3127 items:
3128 type: string
3129 title: $contained
3130 description: Filter arrays that contain all values of this parameter.
3131 $exists:
3132 type: boolean
3133 title: $exists
3134 description: Filter by whether a value for this parameter exists (not `null`).
3135 - type: array
3136 description: Filter by values not matching the conditions in this parameter.
3137 items:
3138 type: string
3139 title: $not
3140 description: Filter by values not matching the conditions in this parameter.
3141 $gt:
3142 type: string
3143 title: $gt
3144 description: Filter by values greater than this parameter. Useful for numbers and dates only.
3145 $gte:
3146 type: string
3147 title: $gte
3148 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
3149 $lt:
3150 type: string
3151 title: $lt
3152 description: Filter by values less than this parameter. Useful for numbers and dates only.
3153 $lte:
3154 type: string
3155 title: $lte
3156 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
3157 $like:
3158 type: string
3159 title: $like
3160 description: Apply a `like` filter. Useful for strings only.
3161 $re:
3162 type: string
3163 title: $re
3164 description: Apply a regex filter. Useful for strings only.
3165 $ilike:
3166 type: string
3167 title: $ilike
3168 description: Apply a case-insensitive `like` filter. Useful for strings only.
3169 $fulltext:
3170 type: string
3171 title: $fulltext
3172 description: Filter to apply on full-text properties.
3173 $overlap:
3174 type: array
3175 description: Filter arrays that have overlapping values with this parameter.
3176 items:
3177 type: string
3178 title: $overlap
3179 description: Filter arrays that have overlapping values with this parameter.
3180 $contains:
3181 type: array
3182 description: Filter arrays that contain some of the values of this parameter.
3183 items:
3184 type: string
3185 title: $contains
3186 description: Filter arrays that contain some of the values of this parameter.
3187 $contained:
3188 type: array
3189 description: Filter arrays that contain all values of this parameter.
3190 items:
3191 type: string
3192 title: $contained
3193 description: Filter arrays that contain all values of this parameter.
3194 $exists:
3195 type: boolean
3196 title: $exists
3197 description: Filter by whether a value for this parameter exists (not `null`).
3198 title: deleted_at
3199 - name: id
3200 in: query
3201 required: false
3202 schema:
3203 oneOf:
3204 - type: string
3205 title: id
3206 description: The claim's ID.
3207 - type: array
3208 description: The claim's ID.
3209 items:
3210 type: string
3211 title: id
3212 description: The id's ID.
3213 - name: order_id
3214 in: query
3215 required: false
3216 schema:
3217 oneOf:
3218 - type: string
3219 title: order_id
3220 description: The claim's order id.
3221 - type: array
3222 description: The claim's order id.
3223 items:
3224 type: string
3225 title: order_id
3226 description: The order id's details.
3227 - name: status
3228 in: query
3229 required: false
3230 schema:
3231 oneOf:
3232 - type: string
3233 title: status
3234 description: Filter by the claim's status.
3235 - type: array
3236 description: Filter by the claim's status.
3237 items:
3238 type: string
3239 title: status
3240 description: The claim's status.
3241 - name: created_at
3242 in: query
3243 description: Filter by the claim's creation date.
3244 required: false
3245 schema:
3246 type: object
3247 description: The claim's creation date.
3248 properties:
3249 $and:
3250 type: array
3251 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
3252 items:
3253 type: object
3254 title: $and
3255 $or:
3256 type: array
3257 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
3258 items:
3259 type: object
3260 title: $or
3261 $eq:
3262 oneOf:
3263 - type: string
3264 title: $eq
3265 description: Filter by an exact match.
3266 - type: array
3267 description: Filter by an exact match.
3268 items:
3269 type: string
3270 title: $eq
3271 description: Filter by an exact match.
3272 $ne:
3273 type: string
3274 title: $ne
3275 description: Filter by values not equal to this parameter.
3276 $in:
3277 type: array
3278 description: Filter by values in this array.
3279 items:
3280 type: string
3281 title: $in
3282 description: Filter by values in this array.
3283 $nin:
3284 type: array
3285 description: Filter by values not in this array.
3286 items:
3287 type: string
3288 title: $nin
3289 description: Filter by values not in this array.
3290 $not:
3291 oneOf:
3292 - type: string
3293 title: $not
3294 description: Filter by values not matching the conditions in this parameter.
3295 - type: object
3296 description: Filter by values not matching the conditions in this parameter.
3297 properties:
3298 $and:
3299 type: array
3300 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
3301 items:
3302 type: object
3303 title: $and
3304 $or:
3305 type: array
3306 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
3307 items:
3308 type: object
3309 title: $or
3310 $eq:
3311 oneOf:
3312 - type: string
3313 title: $eq
3314 description: Filter by an exact match.
3315 - type: array
3316 description: Filter by an exact match.
3317 items:
3318 type: string
3319 title: $eq
3320 description: Filter by an exact match.
3321 $ne:
3322 type: string
3323 title: $ne
3324 description: Filter by values not equal to this parameter.
3325 $in:
3326 type: array
3327 description: Filter by values in this array.
3328 items:
3329 type: string
3330 title: $in
3331 description: Filter by values in this array.
3332 $nin:
3333 type: array
3334 description: Filter by values not in this array.
3335 items:
3336 type: string
3337 title: $nin
3338 description: Filter by values not in this array.
3339 $not:
3340 oneOf:
3341 - type: string
3342 title: $not
3343 description: Filter by values not matching the conditions in this parameter.
3344 - type: object
3345 description: Filter by values not matching the conditions in this parameter.
3346 - type: array
3347 description: Filter by values not matching the conditions in this parameter.
3348 items:
3349 type: string
3350 title: $not
3351 description: Filter by values not matching the conditions in this parameter.
3352 $gt:
3353 type: string
3354 title: $gt
3355 description: Filter by values greater than this parameter. Useful for numbers and dates only.
3356 $gte:
3357 type: string
3358 title: $gte
3359 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
3360 $lt:
3361 type: string
3362 title: $lt
3363 description: Filter by values less than this parameter. Useful for numbers and dates only.
3364 $lte:
3365 type: string
3366 title: $lte
3367 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
3368 $like:
3369 type: string
3370 title: $like
3371 description: Apply a `like` filter. Useful for strings only.
3372 $re:
3373 type: string
3374 title: $re
3375 description: Apply a regex filter. Useful for strings only.
3376 $ilike:
3377 type: string
3378 title: $ilike
3379 description: Apply a case-insensitive `like` filter. Useful for strings only.
3380 $fulltext:
3381 type: string
3382 title: $fulltext
3383 description: Filter to apply on full-text properties.
3384 $overlap:
3385 type: array
3386 description: Filter arrays that have overlapping values with this parameter.
3387 items:
3388 type: string
3389 title: $overlap
3390 description: Filter arrays that have overlapping values with this parameter.
3391 $contains:
3392 type: array
3393 description: Filter arrays that contain some of the values of this parameter.
3394 items:
3395 type: string
3396 title: $contains
3397 description: Filter arrays that contain some of the values of this parameter.
3398 $contained:
3399 type: array
3400 description: Filter arrays that contain all values of this parameter.
3401 items:
3402 type: string
3403 title: $contained
3404 description: Filter arrays that contain all values of this parameter.
3405 $exists:
3406 type: boolean
3407 title: $exists
3408 description: Filter by whether a value for this parameter exists (not `null`).
3409 - type: array
3410 description: Filter by values not matching the conditions in this parameter.
3411 items:
3412 type: string
3413 title: $not
3414 description: Filter by values not matching the conditions in this parameter.
3415 $gt:
3416 type: string
3417 title: $gt
3418 description: Filter by values greater than this parameter. Useful for numbers and dates only.
3419 $gte:
3420 type: string
3421 title: $gte
3422 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
3423 $lt:
3424 type: string
3425 title: $lt
3426 description: Filter by values less than this parameter. Useful for numbers and dates only.
3427 $lte:
3428 type: string
3429 title: $lte
3430 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
3431 $like:
3432 type: string
3433 title: $like
3434 description: Apply a `like` filter. Useful for strings only.
3435 $re:
3436 type: string
3437 title: $re
3438 description: Apply a regex filter. Useful for strings only.
3439 $ilike:
3440 type: string
3441 title: $ilike
3442 description: Apply a case-insensitive `like` filter. Useful for strings only.
3443 $fulltext:
3444 type: string
3445 title: $fulltext
3446 description: Filter to apply on full-text properties.
3447 $overlap:
3448 type: array
3449 description: Filter arrays that have overlapping values with this parameter.
3450 items:
3451 type: string
3452 title: $overlap
3453 description: Filter arrays that have overlapping values with this parameter.
3454 $contains:
3455 type: array
3456 description: Filter arrays that contain some of the values of this parameter.
3457 items:
3458 type: string
3459 title: $contains
3460 description: Filter arrays that contain some of the values of this parameter.
3461 $contained:
3462 type: array
3463 description: Filter arrays that contain all values of this parameter.
3464 items:
3465 type: string
3466 title: $contained
3467 description: Filter arrays that contain all values of this parameter.
3468 $exists:
3469 type: boolean
3470 title: $exists
3471 description: Filter by whether a value for this parameter exists (not `null`).
3472 title: created_at
3473 - name: updated_at
3474 in: query
3475 description: Filter by the claim's update date.
3476 required: false
3477 schema:
3478 type: object
3479 description: The claim's update date.
3480 properties:
3481 $and:
3482 type: array
3483 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
3484 items:
3485 type: object
3486 title: $and
3487 $or:
3488 type: array
3489 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
3490 items:
3491 type: object
3492 title: $or
3493 $eq:
3494 oneOf:
3495 - type: string
3496 title: $eq
3497 description: Filter by an exact match.
3498 - type: array
3499 description: Filter by an exact match.
3500 items:
3501 type: string
3502 title: $eq
3503 description: Filter by an exact match.
3504 $ne:
3505 type: string
3506 title: $ne
3507 description: Filter by values not equal to this parameter.
3508 $in:
3509 type: array
3510 description: Filter by values in this array.
3511 items:
3512 type: string
3513 title: $in
3514 description: Filter by values in this array.
3515 $nin:
3516 type: array
3517 description: Filter by values not in this array.
3518 items:
3519 type: string
3520 title: $nin
3521 description: Filter by values not in this array.
3522 $not:
3523 oneOf:
3524 - type: string
3525 title: $not
3526 description: Filter by values not matching the conditions in this parameter.
3527 - type: object
3528 description: Filter by values not matching the conditions in this parameter.
3529 properties:
3530 $and:
3531 type: array
3532 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
3533 items:
3534 type: object
3535 title: $and
3536 $or:
3537 type: array
3538 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
3539 items:
3540 type: object
3541 title: $or
3542 $eq:
3543 oneOf:
3544 - type: string
3545 title: $eq
3546 description: Filter by an exact match.
3547 - type: array
3548 description: Filter by an exact match.
3549 items:
3550 type: string
3551 title: $eq
3552 description: Filter by an exact match.
3553 $ne:
3554 type: string
3555 title: $ne
3556 description: Filter by values not equal to this parameter.
3557 $in:
3558 type: array
3559 description: Filter by values in this array.
3560 items:
3561 type: string
3562 title: $in
3563 description: Filter by values in this array.
3564 $nin:
3565 type: array
3566 description: Filter by values not in this array.
3567 items:
3568 type: string
3569 title: $nin
3570 description: Filter by values not in this array.
3571 $not:
3572 oneOf:
3573 - type: string
3574 title: $not
3575 description: Filter by values not matching the conditions in this parameter.
3576 - type: object
3577 description: Filter by values not matching the conditions in this parameter.
3578 - type: array
3579 description: Filter by values not matching the conditions in this parameter.
3580 items:
3581 type: string
3582 title: $not
3583 description: Filter by values not matching the conditions in this parameter.
3584 $gt:
3585 type: string
3586 title: $gt
3587 description: Filter by values greater than this parameter. Useful for numbers and dates only.
3588 $gte:
3589 type: string
3590 title: $gte
3591 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
3592 $lt:
3593 type: string
3594 title: $lt
3595 description: Filter by values less than this parameter. Useful for numbers and dates only.
3596 $lte:
3597 type: string
3598 title: $lte
3599 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
3600 $like:
3601 type: string
3602 title: $like
3603 description: Apply a `like` filter. Useful for strings only.
3604 $re:
3605 type: string
3606 title: $re
3607 description: Apply a regex filter. Useful for strings only.
3608 $ilike:
3609 type: string
3610 title: $ilike
3611 description: Apply a case-insensitive `like` filter. Useful for strings only.
3612 $fulltext:
3613 type: string
3614 title: $fulltext
3615 description: Filter to apply on full-text properties.
3616 $overlap:
3617 type: array
3618 description: Filter arrays that have overlapping values with this parameter.
3619 items:
3620 type: string
3621 title: $overlap
3622 description: Filter arrays that have overlapping values with this parameter.
3623 $contains:
3624 type: array
3625 description: Filter arrays that contain some of the values of this parameter.
3626 items:
3627 type: string
3628 title: $contains
3629 description: Filter arrays that contain some of the values of this parameter.
3630 $contained:
3631 type: array
3632 description: Filter arrays that contain all values of this parameter.
3633 items:
3634 type: string
3635 title: $contained
3636 description: Filter arrays that contain all values of this parameter.
3637 $exists:
3638 type: boolean
3639 title: $exists
3640 description: Filter by whether a value for this parameter exists (not `null`).
3641 - type: array
3642 description: Filter by values not matching the conditions in this parameter.
3643 items:
3644 type: string
3645 title: $not
3646 description: Filter by values not matching the conditions in this parameter.
3647 $gt:
3648 type: string
3649 title: $gt
3650 description: Filter by values greater than this parameter. Useful for numbers and dates only.
3651 $gte:
3652 type: string
3653 title: $gte
3654 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
3655 $lt:
3656 type: string
3657 title: $lt
3658 description: Filter by values less than this parameter. Useful for numbers and dates only.
3659 $lte:
3660 type: string
3661 title: $lte
3662 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
3663 $like:
3664 type: string
3665 title: $like
3666 description: Apply a `like` filter. Useful for strings only.
3667 $re:
3668 type: string
3669 title: $re
3670 description: Apply a regex filter. Useful for strings only.
3671 $ilike:
3672 type: string
3673 title: $ilike
3674 description: Apply a case-insensitive `like` filter. Useful for strings only.
3675 $fulltext:
3676 type: string
3677 title: $fulltext
3678 description: Filter to apply on full-text properties.
3679 $overlap:
3680 type: array
3681 description: Filter arrays that have overlapping values with this parameter.
3682 items:
3683 type: string
3684 title: $overlap
3685 description: Filter arrays that have overlapping values with this parameter.
3686 $contains:
3687 type: array
3688 description: Filter arrays that contain some of the values of this parameter.
3689 items:
3690 type: string
3691 title: $contains
3692 description: Filter arrays that contain some of the values of this parameter.
3693 $contained:
3694 type: array
3695 description: Filter arrays that contain all values of this parameter.
3696 items:
3697 type: string
3698 title: $contained
3699 description: Filter arrays that contain all values of this parameter.
3700 $exists:
3701 type: boolean
3702 title: $exists
3703 description: Filter by whether a value for this parameter exists (not `null`).
3704 title: updated_at
3705 - name: $and
3706 in: query
3707 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
3708 required: false
3709 schema:
3710 type: array
3711 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
3712 items:
3713 type: object
3714 title: $and
3715 - name: $or
3716 in: query
3717 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
3718 required: false
3719 schema:
3720 type: array
3721 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
3722 items:
3723 type: object
3724 title: $or
3725 - name: with_deleted
3726 in: query
3727 description: Whether to include deleted records in the result.
3728 required: false
3729 schema:
3730 type: boolean
3731 title: with_deleted
3732 description: Whether to include deleted records in the result.
3733 security:
3734 - api_token: []
3735 - cookie_auth: []
3736 - jwt_token: []
3737 x-codeSamples:
3738 - lang: JavaScript
3739 label: JS SDK
3740 source: |-
3741 import Medusa from "@medusajs/js-sdk"
3742
3743 export const sdk = new Medusa({
3744 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
3745 debug: import.meta.env.DEV,
3746 auth: {
3747 type: "session",
3748 },
3749 })
3750
3751 sdk.admin.claim.list()
3752 .then(({ claims, count, limit, offset }) => {
3753 console.log(claims)
3754 })
3755 - lang: Shell
3756 label: cURL
3757 source: |-
3758 curl '{backend_url}/admin/claims' \
3759 -H 'Authorization: Bearer {jwt_token}'
3760 tags:
3761 - Claims
3762 responses:
3763 '200':
3764 description: OK
3765 content:
3766 application/json:
3767 schema:
3768 $ref: '#/components/schemas/AdminClaimListResponse'
3769 '400':
3770 $ref: '#/components/responses/400_error'
3771 '401':
3772 $ref: '#/components/responses/unauthorized'
3773 '404':
3774 $ref: '#/components/responses/not_found_error'
3775 '409':
3776 $ref: '#/components/responses/invalid_state_error'
3777 '422':
3778 $ref: '#/components/responses/invalid_request_error'
3779 '500':
3780 $ref: '#/components/responses/500_error'
3781 post:
3782 operationId: PostClaims
3783 summary: Create a Claim
3784 description: Create a claim. The claim is still in the request state, and the changes are only applied on the order once the claim is confirmed.
3785 x-authenticated: true
3786 parameters:
3787 - name: fields
3788 in: query
3789 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
3790 required: false
3791 schema:
3792 type: string
3793 title: fields
3794 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
3795 externalDocs:
3796 url: '#select-fields-and-relations'
3797 - name: id
3798 in: query
3799 required: false
3800 schema:
3801 oneOf:
3802 - type: string
3803 title: id
3804 description: Filter by the claim's ID.
3805 - type: array
3806 description: Filter by multiple claim IDs.
3807 items:
3808 type: string
3809 title: id
3810 description: A claim ID.
3811 - name: status
3812 in: query
3813 required: false
3814 schema:
3815 oneOf:
3816 - type: string
3817 title: status
3818 description: Filter by the claim's status.
3819 - type: array
3820 description: Filter by multiple claim statuses.
3821 items:
3822 type: string
3823 title: status
3824 description: A claim status.
3825 - name: created_at
3826 in: query
3827 description: Filter by a claim's creation date.
3828 required: false
3829 schema:
3830 type: object
3831 description: Filter by a claim's creation date.
3832 properties:
3833 $and:
3834 type: array
3835 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
3836 items:
3837 type: object
3838 title: $and
3839 $or:
3840 type: array
3841 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
3842 items:
3843 type: object
3844 title: $or
3845 $eq:
3846 oneOf:
3847 - type: string
3848 title: $eq
3849 description: Filter by an exact match.
3850 - type: array
3851 description: Filter by an exact match.
3852 items:
3853 type: string
3854 title: $eq
3855 description: Filter by an exact match.
3856 $ne:
3857 type: string
3858 title: $ne
3859 description: Filter by values not equal to this parameter.
3860 $in:
3861 type: array
3862 description: Filter by values in this array.
3863 items:
3864 type: string
3865 title: $in
3866 description: Filter by values in this array.
3867 $nin:
3868 type: array
3869 description: Filter by values not in this array.
3870 items:
3871 type: string
3872 title: $nin
3873 description: Filter by values not in this array.
3874 $not:
3875 oneOf:
3876 - type: string
3877 title: $not
3878 description: Filter by values not matching the conditions in this parameter.
3879 - type: object
3880 description: Filter by values not matching the conditions in this parameter.
3881 - type: array
3882 description: Filter by values not matching the conditions in this parameter.
3883 items:
3884 type: string
3885 title: $not
3886 description: Filter by values not matching the conditions in this parameter.
3887 $gt:
3888 type: string
3889 title: $gt
3890 description: Filter by values greater than this parameter. Useful for numbers and dates only.
3891 $gte:
3892 type: string
3893 title: $gte
3894 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
3895 $lt:
3896 type: string
3897 title: $lt
3898 description: Filter by values less than this parameter. Useful for numbers and dates only.
3899 $lte:
3900 type: string
3901 title: $lte
3902 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
3903 $like:
3904 type: string
3905 title: $like
3906 description: Apply a `like` filter. Useful for strings only.
3907 $re:
3908 type: string
3909 title: $re
3910 description: Apply a regex filter. Useful for strings only.
3911 $ilike:
3912 type: string
3913 title: $ilike
3914 description: Apply a case-insensitive `like` filter. Useful for strings only.
3915 $fulltext:
3916 type: string
3917 title: $fulltext
3918 description: Filter to apply on full-text properties.
3919 $overlap:
3920 type: array
3921 description: Filter arrays that have overlapping values with this parameter.
3922 items:
3923 type: string
3924 title: $overlap
3925 description: Filter arrays that have overlapping values with this parameter.
3926 $contains:
3927 type: array
3928 description: Filter arrays that contain some of the values of this parameter.
3929 items:
3930 type: string
3931 title: $contains
3932 description: Filter arrays that contain some of the values of this parameter.
3933 $contained:
3934 type: array
3935 description: Filter arrays that contain all values of this parameter.
3936 items:
3937 type: string
3938 title: $contained
3939 description: Filter arrays that contain all values of this parameter.
3940 $exists:
3941 type: boolean
3942 title: $exists
3943 description: Filter by whether a value for this parameter exists (not `null`).
3944 title: created_at
3945 - name: updated_at
3946 in: query
3947 description: Filter by a claim's update date.
3948 required: false
3949 schema:
3950 type: object
3951 description: Filter by a claim's update date.
3952 properties:
3953 $and:
3954 type: array
3955 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
3956 items:
3957 type: object
3958 title: $and
3959 $or:
3960 type: array
3961 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
3962 items:
3963 type: object
3964 title: $or
3965 $eq:
3966 oneOf:
3967 - type: string
3968 title: $eq
3969 description: Filter by an exact match.
3970 - type: array
3971 description: Filter by an exact match.
3972 items:
3973 type: string
3974 title: $eq
3975 description: Filter by an exact match.
3976 $ne:
3977 type: string
3978 title: $ne
3979 description: Filter by values not equal to this parameter.
3980 $in:
3981 type: array
3982 description: Filter by values in this array.
3983 items:
3984 type: string
3985 title: $in
3986 description: Filter by values in this array.
3987 $nin:
3988 type: array
3989 description: Filter by values not in this array.
3990 items:
3991 type: string
3992 title: $nin
3993 description: Filter by values not in this array.
3994 $not:
3995 oneOf:
3996 - type: string
3997 title: $not
3998 description: Filter by values not matching the conditions in this parameter.
3999 - type: object
4000 description: Filter by values not matching the conditions in this parameter.
4001 - type: array
4002 description: Filter by values not matching the conditions in this parameter.
4003 items:
4004 type: string
4005 title: $not
4006 description: Filter by values not matching the conditions in this parameter.
4007 $gt:
4008 type: string
4009 title: $gt
4010 description: Filter by values greater than this parameter. Useful for numbers and dates only.
4011 $gte:
4012 type: string
4013 title: $gte
4014 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
4015 $lt:
4016 type: string
4017 title: $lt
4018 description: Filter by values less than this parameter. Useful for numbers and dates only.
4019 $lte:
4020 type: string
4021 title: $lte
4022 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
4023 $like:
4024 type: string
4025 title: $like
4026 description: Apply a `like` filter. Useful for strings only.
4027 $re:
4028 type: string
4029 title: $re
4030 description: Apply a regex filter. Useful for strings only.
4031 $ilike:
4032 type: string
4033 title: $ilike
4034 description: Apply a case-insensitive `like` filter. Useful for strings only.
4035 $fulltext:
4036 type: string
4037 title: $fulltext
4038 description: Filter to apply on full-text properties.
4039 $overlap:
4040 type: array
4041 description: Filter arrays that have overlapping values with this parameter.
4042 items:
4043 type: string
4044 title: $overlap
4045 description: Filter arrays that have overlapping values with this parameter.
4046 $contains:
4047 type: array
4048 description: Filter arrays that contain some of the values of this parameter.
4049 items:
4050 type: string
4051 title: $contains
4052 description: Filter arrays that contain some of the values of this parameter.
4053 $contained:
4054 type: array
4055 description: Filter arrays that contain all values of this parameter.
4056 items:
4057 type: string
4058 title: $contained
4059 description: Filter arrays that contain all values of this parameter.
4060 $exists:
4061 type: boolean
4062 title: $exists
4063 description: Filter by whether a value for this parameter exists (not `null`).
4064 title: updated_at
4065 - name: deleted_at
4066 in: query
4067 description: Filter by a claim's deletion date.
4068 required: false
4069 schema:
4070 type: object
4071 description: Filter by a claim's deletion date.
4072 properties:
4073 $and:
4074 type: array
4075 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
4076 items:
4077 type: object
4078 title: $and
4079 $or:
4080 type: array
4081 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
4082 items:
4083 type: object
4084 title: $or
4085 $eq:
4086 oneOf:
4087 - type: string
4088 title: $eq
4089 description: Filter by an exact match.
4090 - type: array
4091 description: Filter by an exact match.
4092 items:
4093 type: string
4094 title: $eq
4095 description: Filter by an exact match.
4096 $ne:
4097 type: string
4098 title: $ne
4099 description: Filter by values not equal to this parameter.
4100 $in:
4101 type: array
4102 description: Filter by values in this array.
4103 items:
4104 type: string
4105 title: $in
4106 description: Filter by values in this array.
4107 $nin:
4108 type: array
4109 description: Filter by values not in this array.
4110 items:
4111 type: string
4112 title: $nin
4113 description: Filter by values not in this array.
4114 $not:
4115 oneOf:
4116 - type: string
4117 title: $not
4118 description: Filter by values not matching the conditions in this parameter.
4119 - type: object
4120 description: Filter by values not matching the conditions in this parameter.
4121 - type: array
4122 description: Filter by values not matching the conditions in this parameter.
4123 items:
4124 type: string
4125 title: $not
4126 description: Filter by values not matching the conditions in this parameter.
4127 $gt:
4128 type: string
4129 title: $gt
4130 description: Filter by values greater than this parameter. Useful for numbers and dates only.
4131 $gte:
4132 type: string
4133 title: $gte
4134 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
4135 $lt:
4136 type: string
4137 title: $lt
4138 description: Filter by values less than this parameter. Useful for numbers and dates only.
4139 $lte:
4140 type: string
4141 title: $lte
4142 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
4143 $like:
4144 type: string
4145 title: $like
4146 description: Apply a `like` filter. Useful for strings only.
4147 $re:
4148 type: string
4149 title: $re
4150 description: Apply a regex filter. Useful for strings only.
4151 $ilike:
4152 type: string
4153 title: $ilike
4154 description: Apply a case-insensitive `like` filter. Useful for strings only.
4155 $fulltext:
4156 type: string
4157 title: $fulltext
4158 description: Filter to apply on full-text properties.
4159 $overlap:
4160 type: array
4161 description: Filter arrays that have overlapping values with this parameter.
4162 items:
4163 type: string
4164 title: $overlap
4165 description: Filter arrays that have overlapping values with this parameter.
4166 $contains:
4167 type: array
4168 description: Filter arrays that contain some of the values of this parameter.
4169 items:
4170 type: string
4171 title: $contains
4172 description: Filter arrays that contain some of the values of this parameter.
4173 $contained:
4174 type: array
4175 description: Filter arrays that contain all values of this parameter.
4176 items:
4177 type: string
4178 title: $contained
4179 description: Filter arrays that contain all values of this parameter.
4180 $exists:
4181 type: boolean
4182 title: $exists
4183 description: Filter by whether a value for this parameter exists (not `null`).
4184 title: deleted_at
4185 security:
4186 - api_token: []
4187 - cookie_auth: []
4188 - jwt_token: []
4189 requestBody:
4190 content:
4191 application/json:
4192 schema:
4193 $ref: '#/components/schemas/AdminCreateClaim'
4194 x-codeSamples:
4195 - lang: JavaScript
4196 label: JS SDK
4197 source: |-
4198 import Medusa from "@medusajs/js-sdk"
4199
4200 export const sdk = new Medusa({
4201 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
4202 debug: import.meta.env.DEV,
4203 auth: {
4204 type: "session",
4205 },
4206 })
4207
4208 sdk.admin.claim.create({
4209 type: "refund",
4210 order_id: "order_123",
4211 })
4212 .then(({ claim }) => {
4213 console.log(claim)
4214 })
4215 - lang: Shell
4216 label: cURL
4217 source: |-
4218 curl -X POST '{backend_url}/admin/claims' \
4219 -H 'Authorization: Bearer {jwt_token}' \
4220 -H 'Content-Type: application/json' \
4221 --data-raw '{
4222 "type": "{value}",
4223 "order_id": "{value}",
4224 "metadata": {}
4225 }'
4226 tags:
4227 - Claims
4228 responses:
4229 '200':
4230 description: OK
4231 content:
4232 application/json:
4233 schema:
4234 $ref: '#/components/schemas/AdminClaimOrderResponse'
4235 '400':
4236 $ref: '#/components/responses/400_error'
4237 '401':
4238 $ref: '#/components/responses/unauthorized'
4239 '404':
4240 $ref: '#/components/responses/not_found_error'
4241 '409':
4242 $ref: '#/components/responses/invalid_state_error'
4243 '422':
4244 $ref: '#/components/responses/invalid_request_error'
4245 '500':
4246 $ref: '#/components/responses/500_error'
4247 x-workflow: beginClaimOrderWorkflow
4248 x-events: []
4249 /admin/claims/{id}:
4250 get:
4251 operationId: GetClaimsId
4252 summary: Get a Claim
4253 description: Retrieve a claim by its ID. You can expand the claim's relations or select the fields that should be returned using the query parameters.
4254 x-authenticated: true
4255 parameters:
4256 - name: id
4257 in: path
4258 description: The claim's ID.
4259 required: true
4260 schema:
4261 type: string
4262 - name: fields
4263 in: query
4264 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
4265 required: false
4266 schema:
4267 type: string
4268 title: fields
4269 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
4270 externalDocs:
4271 url: '#select-fields-and-relations'
4272 security:
4273 - api_token: []
4274 - cookie_auth: []
4275 - jwt_token: []
4276 x-codeSamples:
4277 - lang: JavaScript
4278 label: JS SDK
4279 source: |-
4280 import Medusa from "@medusajs/js-sdk"
4281
4282 export const sdk = new Medusa({
4283 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
4284 debug: import.meta.env.DEV,
4285 auth: {
4286 type: "session",
4287 },
4288 })
4289
4290 sdk.admin.claim.retrieve("claim_123")
4291 .then(({ claim }) => {
4292 console.log(claim)
4293 })
4294 - lang: Shell
4295 label: cURL
4296 source: |-
4297 curl '{backend_url}/admin/claims/{id}' \
4298 -H 'Authorization: Bearer {jwt_token}'
4299 tags:
4300 - Claims
4301 responses:
4302 '200':
4303 description: OK
4304 content:
4305 application/json:
4306 schema:
4307 $ref: '#/components/schemas/AdminClaimResponse'
4308 '400':
4309 $ref: '#/components/responses/400_error'
4310 '401':
4311 $ref: '#/components/responses/unauthorized'
4312 '404':
4313 $ref: '#/components/responses/not_found_error'
4314 '409':
4315 $ref: '#/components/responses/invalid_state_error'
4316 '422':
4317 $ref: '#/components/responses/invalid_request_error'
4318 '500':
4319 $ref: '#/components/responses/500_error'
4320 /admin/claims/{id}/cancel:
4321 post:
4322 operationId: PostClaimsIdCancel
4323 summary: Cancel a Claim
4324 description: Cancel a claim and its associated return.
4325 x-authenticated: true
4326 parameters:
4327 - name: id
4328 in: path
4329 description: The claim's ID.
4330 required: true
4331 schema:
4332 type: string
4333 security:
4334 - api_token: []
4335 - cookie_auth: []
4336 - jwt_token: []
4337 requestBody:
4338 content:
4339 application/json:
4340 schema:
4341 $ref: '#/components/schemas/AdminPostCancelClaimReqSchema'
4342 x-codeSamples:
4343 - lang: JavaScript
4344 label: JS SDK
4345 source: |-
4346 import Medusa from "@medusajs/js-sdk"
4347
4348 export const sdk = new Medusa({
4349 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
4350 debug: import.meta.env.DEV,
4351 auth: {
4352 type: "session",
4353 },
4354 })
4355
4356 sdk.admin.claim.cancel("claim_123")
4357 .then(({ claim }) => {
4358 console.log(claim)
4359 })
4360 - lang: Shell
4361 label: cURL
4362 source: |-
4363 curl -X POST '{backend_url}/admin/claims/{id}/cancel' \
4364 -H 'Authorization: Bearer {jwt_token}'
4365 tags:
4366 - Claims
4367 responses:
4368 '200':
4369 description: OK
4370 content:
4371 application/json:
4372 schema:
4373 $ref: '#/components/schemas/AdminClaimResponse'
4374 '400':
4375 $ref: '#/components/responses/400_error'
4376 '401':
4377 $ref: '#/components/responses/unauthorized'
4378 '404':
4379 $ref: '#/components/responses/not_found_error'
4380 '409':
4381 $ref: '#/components/responses/invalid_state_error'
4382 '422':
4383 $ref: '#/components/responses/invalid_request_error'
4384 '500':
4385 $ref: '#/components/responses/500_error'
4386 x-workflow: cancelOrderClaimWorkflow
4387 x-events:
4388 - name: reservation-item.deleted
4389 payload: |-
4390 ```ts
4391 {
4392 id, // The ID of the reservation
4393 order_id, // (optional) The ID of the order, if the reservation was deleted by an order flow
4394 }
4395 ```
4396 description: Emitted when reservations are deleted.
4397 deprecated: false
4398 since: 2.18.0
4399 /admin/claims/{id}/claim-items:
4400 post:
4401 operationId: PostClaimsIdClaimItems
4402 summary: Add Claim Items to a Claim
4403 x-sidebar-summary: Add Claim Items
4404 description: Add order items to a claim as claim items. These claim items will have the action `WRITE_OFF_ITEM`.
4405 x-authenticated: true
4406 parameters:
4407 - name: id
4408 in: path
4409 description: The claim's ID.
4410 required: true
4411 schema:
4412 type: string
4413 - name: fields
4414 in: query
4415 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
4416 required: false
4417 schema:
4418 type: string
4419 title: fields
4420 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
4421 externalDocs:
4422 url: '#select-fields-and-relations'
4423 - name: id
4424 in: query
4425 required: false
4426 schema:
4427 oneOf:
4428 - type: string
4429 title: id
4430 description: Filter by the claim's ID.
4431 - type: array
4432 description: Filter by claim IDs.
4433 items:
4434 type: string
4435 title: id
4436 description: A claim's ID.
4437 - name: status
4438 in: query
4439 required: false
4440 schema:
4441 oneOf:
4442 - type: string
4443 title: status
4444 description: Filter by the claim's status.
4445 - type: array
4446 description: Filter by claim statuses.
4447 items:
4448 type: string
4449 title: status
4450 description: A claim status.
4451 - name: created_at
4452 in: query
4453 description: Filter by a claim's creation date.
4454 required: false
4455 schema:
4456 type: object
4457 description: Filter by a claim's creation date.
4458 properties:
4459 $and:
4460 type: array
4461 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
4462 items:
4463 type: object
4464 title: $and
4465 $or:
4466 type: array
4467 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
4468 items:
4469 type: object
4470 title: $or
4471 $eq:
4472 oneOf:
4473 - type: string
4474 title: $eq
4475 description: Filter by an exact match.
4476 - type: array
4477 description: Filter by an exact match.
4478 items:
4479 type: string
4480 title: $eq
4481 description: Filter by an exact match.
4482 $ne:
4483 type: string
4484 title: $ne
4485 description: Filter by values not equal to this parameter.
4486 $in:
4487 type: array
4488 description: Filter by values in this array.
4489 items:
4490 type: string
4491 title: $in
4492 description: Filter by values in this array.
4493 $nin:
4494 type: array
4495 description: Filter by values not in this array.
4496 items:
4497 type: string
4498 title: $nin
4499 description: Filter by values not in this array.
4500 $not:
4501 oneOf:
4502 - type: string
4503 title: $not
4504 description: Filter by values not matching the conditions in this parameter.
4505 - type: object
4506 description: Filter by values not matching the conditions in this parameter.
4507 - type: array
4508 description: Filter by values not matching the conditions in this parameter.
4509 items:
4510 type: string
4511 title: $not
4512 description: Filter by values not matching the conditions in this parameter.
4513 $gt:
4514 type: string
4515 title: $gt
4516 description: Filter by values greater than this parameter. Useful for numbers and dates only.
4517 $gte:
4518 type: string
4519 title: $gte
4520 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
4521 $lt:
4522 type: string
4523 title: $lt
4524 description: Filter by values less than this parameter. Useful for numbers and dates only.
4525 $lte:
4526 type: string
4527 title: $lte
4528 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
4529 $like:
4530 type: string
4531 title: $like
4532 description: Apply a `like` filter. Useful for strings only.
4533 $re:
4534 type: string
4535 title: $re
4536 description: Apply a regex filter. Useful for strings only.
4537 $ilike:
4538 type: string
4539 title: $ilike
4540 description: Apply a case-insensitive `like` filter. Useful for strings only.
4541 $fulltext:
4542 type: string
4543 title: $fulltext
4544 description: Filter to apply on full-text properties.
4545 $overlap:
4546 type: array
4547 description: Filter arrays that have overlapping values with this parameter.
4548 items:
4549 type: string
4550 title: $overlap
4551 description: Filter arrays that have overlapping values with this parameter.
4552 $contains:
4553 type: array
4554 description: Filter arrays that contain some of the values of this parameter.
4555 items:
4556 type: string
4557 title: $contains
4558 description: Filter arrays that contain some of the values of this parameter.
4559 $contained:
4560 type: array
4561 description: Filter arrays that contain all values of this parameter.
4562 items:
4563 type: string
4564 title: $contained
4565 description: Filter arrays that contain all values of this parameter.
4566 $exists:
4567 type: boolean
4568 title: $exists
4569 description: Filter by whether a value for this parameter exists (not `null`).
4570 title: created_at
4571 - name: updated_at
4572 in: query
4573 description: Filter by a claim's update date.
4574 required: false
4575 schema:
4576 type: object
4577 description: Filter by a claim's update date.
4578 properties:
4579 $and:
4580 type: array
4581 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
4582 items:
4583 type: object
4584 title: $and
4585 $or:
4586 type: array
4587 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
4588 items:
4589 type: object
4590 title: $or
4591 $eq:
4592 oneOf:
4593 - type: string
4594 title: $eq
4595 description: Filter by an exact match.
4596 - type: array
4597 description: Filter by an exact match.
4598 items:
4599 type: string
4600 title: $eq
4601 description: Filter by an exact match.
4602 $ne:
4603 type: string
4604 title: $ne
4605 description: Filter by values not equal to this parameter.
4606 $in:
4607 type: array
4608 description: Filter by values in this array.
4609 items:
4610 type: string
4611 title: $in
4612 description: Filter by values in this array.
4613 $nin:
4614 type: array
4615 description: Filter by values not in this array.
4616 items:
4617 type: string
4618 title: $nin
4619 description: Filter by values not in this array.
4620 $not:
4621 oneOf:
4622 - type: string
4623 title: $not
4624 description: Filter by values not matching the conditions in this parameter.
4625 - type: object
4626 description: Filter by values not matching the conditions in this parameter.
4627 - type: array
4628 description: Filter by values not matching the conditions in this parameter.
4629 items:
4630 type: string
4631 title: $not
4632 description: Filter by values not matching the conditions in this parameter.
4633 $gt:
4634 type: string
4635 title: $gt
4636 description: Filter by values greater than this parameter. Useful for numbers and dates only.
4637 $gte:
4638 type: string
4639 title: $gte
4640 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
4641 $lt:
4642 type: string
4643 title: $lt
4644 description: Filter by values less than this parameter. Useful for numbers and dates only.
4645 $lte:
4646 type: string
4647 title: $lte
4648 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
4649 $like:
4650 type: string
4651 title: $like
4652 description: Apply a `like` filter. Useful for strings only.
4653 $re:
4654 type: string
4655 title: $re
4656 description: Apply a regex filter. Useful for strings only.
4657 $ilike:
4658 type: string
4659 title: $ilike
4660 description: Apply a case-insensitive `like` filter. Useful for strings only.
4661 $fulltext:
4662 type: string
4663 title: $fulltext
4664 description: Filter to apply on full-text properties.
4665 $overlap:
4666 type: array
4667 description: Filter arrays that have overlapping values with this parameter.
4668 items:
4669 type: string
4670 title: $overlap
4671 description: Filter arrays that have overlapping values with this parameter.
4672 $contains:
4673 type: array
4674 description: Filter arrays that contain some of the values of this parameter.
4675 items:
4676 type: string
4677 title: $contains
4678 description: Filter arrays that contain some of the values of this parameter.
4679 $contained:
4680 type: array
4681 description: Filter arrays that contain all values of this parameter.
4682 items:
4683 type: string
4684 title: $contained
4685 description: Filter arrays that contain all values of this parameter.
4686 $exists:
4687 type: boolean
4688 title: $exists
4689 description: Filter by whether a value for this parameter exists (not `null`).
4690 title: updated_at
4691 - name: deleted_at
4692 in: query
4693 description: Filter by a claim's deletion date.
4694 required: false
4695 schema:
4696 type: object
4697 description: Filter by a claim's deletion date.
4698 properties:
4699 $and:
4700 type: array
4701 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
4702 items:
4703 type: object
4704 title: $and
4705 $or:
4706 type: array
4707 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
4708 items:
4709 type: object
4710 title: $or
4711 $eq:
4712 oneOf:
4713 - type: string
4714 title: $eq
4715 description: Filter by an exact match.
4716 - type: array
4717 description: Filter by an exact match.
4718 items:
4719 type: string
4720 title: $eq
4721 description: Filter by an exact match.
4722 $ne:
4723 type: string
4724 title: $ne
4725 description: Filter by values not equal to this parameter.
4726 $in:
4727 type: array
4728 description: Filter by values in this array.
4729 items:
4730 type: string
4731 title: $in
4732 description: Filter by values in this array.
4733 $nin:
4734 type: array
4735 description: Filter by values not in this array.
4736 items:
4737 type: string
4738 title: $nin
4739 description: Filter by values not in this array.
4740 $not:
4741 oneOf:
4742 - type: string
4743 title: $not
4744 description: Filter by values not matching the conditions in this parameter.
4745 - type: object
4746 description: Filter by values not matching the conditions in this parameter.
4747 - type: array
4748 description: Filter by values not matching the conditions in this parameter.
4749 items:
4750 type: string
4751 title: $not
4752 description: Filter by values not matching the conditions in this parameter.
4753 $gt:
4754 type: string
4755 title: $gt
4756 description: Filter by values greater than this parameter. Useful for numbers and dates only.
4757 $gte:
4758 type: string
4759 title: $gte
4760 description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
4761 $lt:
4762 type: string
4763 title: $lt
4764 description: Filter by values less than this parameter. Useful for numbers and dates only.
4765 $lte:
4766 type: string
4767 title: $lte
4768 description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
4769 $like:
4770 type: string
4771 title: $like
4772 description: Apply a `like` filter. Useful for strings only.
4773 $re:
4774 type: string
4775 title: $re
4776 description: Apply a regex filter. Useful for strings only.
4777 $ilike:
4778 type: string
4779 title: $ilike
4780 description: Apply a case-insensitive `like` filter. Useful for strings only.
4781 $fulltext:
4782 type: string
4783 title: $fulltext
4784 description: Filter to apply on full-text properties.
4785 $overlap:
4786 type: array
4787 description: Filter arrays that have overlapping values with this parameter.
4788 items:
4789 type: string
4790 title: $overlap
4791 description: Filter arrays that have overlapping values with this parameter.
4792 $contains:
4793 type: array
4794 description: Filter arrays that contain some of the values of this parameter.
4795 items:
4796 type: string
4797 title: $contains
4798 description: Filter arrays that contain some of the values of this parameter.
4799 $contained:
4800 type: array
4801 description: Filter arrays that contain all values of this parameter.
4802 items:
4803 type: string
4804 title: $contained
4805 description: Filter arrays that contain all values of this parameter.
4806 $exists:
4807 type: boolean
4808 title: $exists
4809 description: Filter by whether a value for this parameter exists (not `null`).
4810 title: deleted_at
4811 security:
4812 - api_token: []
4813 - cookie_auth: []
4814 - jwt_token: []
4815 requestBody:
4816 content:
4817 application/json:
4818 schema:
4819 $ref: '#/components/schemas/AdminAddClaimItems'
4820 x-codeSamples:
4821 - lang: JavaScript
4822 label: JS SDK
4823 source: |-
4824 import Medusa from "@medusajs/js-sdk"
4825
4826 export const sdk = new Medusa({
4827 baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
4828 debug: import.meta.env.DEV,
4829 auth: {
4830 type: "session",
4831 },
4832 })
4833
4834 sdk.admin.claim.addItems("claim_123", {
4835 items: [
4836 {
4837 id: "orli_123",
4838 quantity: 1
4839 }
4840 ]
4841 })
4842 .then(({ claim }) => {
4843 console.log(claim)
4844 })
4845 - lang: Shell
4846 label: cURL
4847 source: |-
4848 curl -X POST '{backend_url}/admin/claims/{id}/claim-items' \
4849 -H 'Authorization: Bearer {jwt_token}'
4850 tags:
4851 - Claims
4852 responses:
4853 '200':
4854 description: OK
4855 content:
4856 application/json:
4857 schema:
4858 $ref: '#/components/schemas/AdminClaimPreviewResponse'
4859 '400':
4860 $ref: '#/components/responses/400_error'
4861 '401':
4862 $ref: '#/components/responses/unauthorized'
4863 '404':
4864 $ref: '#/components/responses/not_found_error'
4865 '409':
4866 $ref: '#/components/responses/invalid_state_error'
4867 '422':
4868 $ref: '#/components/responses/invalid_request_error'
4869 '500':
4870 $ref: '#/components/responses/500_error'
4871 x-workflow: orderClaimItemWorkflow
4872 x-events: []
4873 /admin/claims/{id}/claim-items/{action_id}:
4874 post:
4875 operationId: PostClaimsIdClaimItemsAction_id
4876 summary: Update a Claim Item
4877 description: |
4878 Update an order item in a claim by the ID of the item's `WRITE_OFF_ITEM` action.
4879
4880 Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
4881 x-authenticated: true
4882 parameters:
4883 - name: id
4884 in: path
4885 description: The claim's ID.
4886 required: true
4887 schema:
4888 type: string
4889 - name: action_id
4890 in: path
4891 description: The ID of the order item's `WRITE_OFF_ITEM` action.
4892 required: true
4893 schema:
4894 type: string
4895 - name: fields
4896 in: query
4897 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
4898 required: false
4899 schema:
4900 type: string
4901 title: fields
4902 description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
4903 externalDocs:
4904 url: '#select-fields-and-relations'
4905 - name: id
4906 in: query
4907 required: false
4908 schema:
4909 oneOf:
4910 - type: string
4911 title: id
4912 description: Filter by the claim's ID.
4913 - type: array
4914 description: Filter by claim IDs.
4915 items:
4916 type: string
4917 title: id
4918 description: A claim's ID.
4919 - name: status
4920 in: query
4921 required: false
4922 schema:
4923 oneOf:
4924 - type: string
4925 title: status
4926 description: Filter by the claim's status.
4927 - type: array
4928 description: Filter by claim statuses.
4929 items:
4930 type: string
4931 title: status
4932 description: A claim status.
4933 - name: created_at
4934 in: query
4935 description: Filter by a claim's creation date.
4936 required: false
4937 schema:
4938 type: object
4939 description: Filter by a claim's creation date.
4940 properties:
4941 $and:
4942 type: array
4943 description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
4944 items:
4945 type: object
4946 title: $and
4947 $or:
4948 type: array
4949 description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
4950 items:
4951 type: object
4952 title: $or
4953 $eq:
4954 oneOf:
4955 - type: string
4956 title: $eq
4957 description: Filter by an exact match.
4958 - type: array
4959 description: Filter by an exact match.
4960 items:
4961 type: string
4962 title: $eq
4963 description: Filter by an exact match.
4964 $ne:
4965 type: string
4966 title: $ne
4967 description: Filter by values not equal to this parameter.
4968 $in:
4969 type: array
4970 description: Filter by values in this array.
4971 items:
4972 type: string
4973 title: $in
4974 description: Filter by values in this array.
4975 $nin:
4976 type: array
4977 description: Filter by values not in this array.
4978 items:
4979 type: string
4980 title: $nin
4981 description: Filter by values not in this array.
4982 $not:
4983 oneOf:
4984 - type: string
4985 title: $not
4986 description: Filter by values not matching the conditions in this parameter.
4987 - type: object
4988 description: Filter by values not matching the conditions in this parameter.
4989 - type: array
4990 description: Filter by values not matching the conditions in this parameter.
4991 items:
4992 type: string
4993 title: $not
4994 description: Filter by values not matching the conditions in this parameter.
4995 $gt:
4996 type: string
4997 title: $gt
4998 description: Filter by values greater than this parameter. Useful for numbers and dates only.
4999 $gte:
5000 type: string
Showing first 5,000 of 100,531 lines. View raw