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