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