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