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