diff --git a/www/apps/api-reference/.env.sample b/www/apps/api-reference/.env.sample index 8431f8b0f8..bfa84af2aa 100644 --- a/www/apps/api-reference/.env.sample +++ b/www/apps/api-reference/.env.sample @@ -10,10 +10,10 @@ NEXT_PUBLIC_DOCS_URL= NEXT_PUBLIC_UI_URL= NEXT_PUBLIC_RESOURCES_URL= NEXT_PUBLIC_USER_GUIDE_URL= +NEXT_PUBLIC_DOCS_V1_URL= +NEXT_PUBLIC_API_V1_URL= ALGOLIA_WRITE_API_KEY= ANALYZE_BUNDLE= NEXT_PUBLIC_AI_ASSISTANT_URL= NEXT_PUBLIC_AI_WEBSITE_ID= -NEXT_PUBLIC_AI_API_ASSISTANT_RECAPTCHA_SITE_KEY= -NEXT_PUBLIC_VERSIONING= -NEXT_PUBLIC_SHOW_V2= \ No newline at end of file +NEXT_PUBLIC_AI_API_ASSISTANT_RECAPTCHA_SITE_KEY= \ No newline at end of file diff --git a/www/apps/api-reference/app/_mdx/v2/admin.mdx b/www/apps/api-reference/app/_mdx/admin.mdx similarity index 100% rename from www/apps/api-reference/app/_mdx/v2/admin.mdx rename to www/apps/api-reference/app/_mdx/admin.mdx diff --git a/www/apps/api-reference/app/_mdx/v2/client-libraries.mdx b/www/apps/api-reference/app/_mdx/client-libraries.mdx similarity index 100% rename from www/apps/api-reference/app/_mdx/v2/client-libraries.mdx rename to www/apps/api-reference/app/_mdx/client-libraries.mdx diff --git a/www/apps/api-reference/app/_mdx/v2/store.mdx b/www/apps/api-reference/app/_mdx/store.mdx similarity index 100% rename from www/apps/api-reference/app/_mdx/v2/store.mdx rename to www/apps/api-reference/app/_mdx/store.mdx diff --git a/www/apps/api-reference/app/_mdx/v1/admin.mdx b/www/apps/api-reference/app/_mdx/v1/admin.mdx deleted file mode 100644 index 958a9d43b0..0000000000 --- a/www/apps/api-reference/app/_mdx/v1/admin.mdx +++ /dev/null @@ -1,1224 +0,0 @@ -import { Feedback, CodeTabs, CodeTab } from "docs-ui" -import SectionContainer from "@/components/Section/Container" -import formatReportLink from "@/utils/format-report-link" - - - -This API reference includes Medusa's Admin APIs, which are REST APIs exposed by the Medusa backend. They are typically used to perform admin functionalities or create an admin dashboard to access and manipulate your commerce store's data. - -All API Routes are prefixed with `/admin`. So, during development, the API Routes will be available under the path `http://localhost:9000/admin`. For production, replace `http://localhost:9000` with your Medusa backend URL. - -There are different ways you can send requests to these API Routes, including: - -- Using Medusa's [JavaScript Client](https://docs.medusajs.com/js-client/overview) -- Using the [Medusa React](https://docs.medusajs.com/medusa-react/overview) library -- Using cURL - -Aside from this API reference, check out the [Commerce Modules](https://docs.medusajs.com/modules/overview) section of the documentation for guides on how to use these APIs in different scenarios. - - - - - - - -## Authentication - -There are three ways to send authenticated requests to the Medusa server: Using a user's API token, using a JWT token or using a Cookie Session ID. - -### API Token - -Use a user's API Token to send authenticated requests. - -#### How to Add API Token to a User - -You can use the Update User API Route to add or update the user's API token: - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.users.update(userId, { - api_token - }) - .then(({ user }) => { - console.log(user.api_token) - }) - ``` - - - - - ```tsx - import { useAdminUpdateUser } from "medusa-react" - - const UpdateUser = () => { - const updateUser = useAdminUpdateUser(userId) - // ... - - const handleUpdateUser = () => { - updateUser.mutate({ - api_token - }) - } - - // ... - } - - export default UpdateUser - ``` - - - - - ```bash - curl -L -X POST '/admin/users/' \\ - -H 'Cookie: connect.sid={sid}' \\ - -H 'Content-Type: application/json' \\ - --data-raw '{ - "api_token": "{api_token}" - }' - ``` - - - - - -#### How to Use the API Token - - -The API token can be used by providing it in `x-medusa-access-token` header: - -```bash -x-medusa-access-token: {api_token} -``` - -You can also pass it to client libraries: - - - - - ```ts - const medusa = new Medusa({ - baseUrl: MEDUSA_BACKEND_URL, - maxRetries: 3, - apiKey: '{api_token}' - }) - ``` - - - - - ```tsx - - {/* ... */} - - ``` - - - - -### JWT Token - -Use a JWT token to send authenticated requests. Authentication state is managed by the client, which is ideal for Jamstack applications and mobile applications. - -#### How to Obtain the JWT Token - -JWT tokens are obtained by sending a request to the [User Login (JWT) API Route](#auth_posttoken) passing it the user's email and password in the request body. For example: - -```bash -curl -X POST 'https://medusa-url.com/admin/auth/token' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "password": "supersecret" -}' -``` - -If authenticated successfully, an object is returned in the response with the property `access_token` being the JWT token. - -#### How to Use the JWT Token - -The JWT token can be used for Bearer Authentication. It's passed in the -`Authorization` header as the following: - - -```bash -Authorization: Bearer {jwt_token} -``` - -### Cookie Session ID - -Use a cookie session to send authenticated requests. - -### How to Obtain the Cookie Session - - -If you're sending requests through a browser, using Medusa's JS and Medusa React clients, or using -tools like Postman, the cookie session should be automatically set when -the admin user is logged in. - - -If you're sending requests using cURL, you must set the Session ID in -the cookie manually. - - -To do that, send a request to [authenticate the -user](#tag/Auth/operation/PostAuth) and pass the cURL option `-v`: - - -```bash -curl -v -X POST 'https://medusa-url.com/admin/auth' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "password": "supersecret" -}' - -``` - - -The headers will be logged in the terminal as well as the response. You -should find in the headers a Cookie header similar to this: - - -```bash -Set-Cookie: connect.sid=s%3A2Bu8BkaP9JUfHu9rG59G16Ma0QZf6Gj1.WT549XqX37PN8n0OecqnMCq798eLjZC5IT7yiDCBHPM; -``` - - -Copy the value after `connect.sid` (without the `;` at the end) and pass -it as a cookie in subsequent requests as the following: - - -```bash -curl 'https://medusa-url.com/admin/products' \ --H 'Cookie: connect.sid={sid}' -``` - - -Where `{sid}` is the value of `connect.sid` that you copied. - -If you're sending requests using JavaScript's Fetch API, you must pass the `credentials` option -with the value `include` to all the requests you're sending. For example: - -```js -fetch(`/admin/products`, { - credentials: "include", -}) -``` - - - - - - - -## HTTP Compression - -If you've enabled HTTP Compression in your Medusa configurations, and you -want to disable it for some requests, you can pass the `x-no-compression` -header in your requests: - -```bash -x-no-compression: true -``` - -If you're using the Medusa JS Client, you can pass custom headers in the -last parameter of a method. For example: - -```ts -medusa.products.list({}, { - "x-no-compression": true -}) -.then(({ products, limit, offset, count }) => { - console.log(products.length) -}) -``` - -You can also pass the header when you first initialize the Medusa client: - -```ts -const medusa = new Medusa({ - maxRetries: 3, - baseUrl: "https://api.example.com", - customHeaders: { - "x-no-compression": true - } -}) -``` - -For Medusa React, it's not possible to pass custom headers for a query or mutation, but -you can pass the header to the `MedusaProvider` and it will be added to all subsequent requests: - -```tsx -import { MedusaProvider } from "medusa-react" - -// define query client... - -const App = () => { - return ( - - - - ) -} -``` - - - - - - - -## Expanding Relations - -Many API Routes accept an `expand` that unpacks an -entity's relations and return them in the response. - - - - -The relations you pass to `expand` replace any relations -that are expanded by default in the request. - - - - -### Expanding One Relation - - -For example, when you retrieve products, retrieve their collection -by passing to the `expand` query parameter the value `collection`: - - - - - ```bash - curl "http://localhost:9000/admin/products?expand=collection" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - expand: "collection" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - expand: "collection" - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- - -### Expanding Multiple Relations - - -Expand more than one relation by separating the relations in the -`expand` query parameter with a comma. - - -For example, to retrieve both the variants and the collection of products, -pass to the `expand` query parameter the value `variants,collection`: - - - - - ```bash - curl "http://localhost:9000/admin/products?expand=variants,collection" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - expand: "variants,collection" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - expand: "variants,collection" - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- -### Expanding Nested Relations - - -Expand nested relations (the relations of a relation) using dot notation. - - -For example, to retrieve the variants of a product along with its option values, -pass to the `expand` query parameter `variants.options`: - - - - - ```bash - curl "http://localhost:9000/admin/products?expand=variants.options" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - expand: "variants.options" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - expand: "variants.options" - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- - -### Prevent Expanding Relations - - -Some requests expand relations by default. You can prevent that by passing -an empty expand value to retrieve an entity without any extra relations. - - -For example: - - - - - ```bash - curl "http://localhost:9000/admin/products?expand" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - expand: "" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - expand: "" - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- - -This would retrieve each product with only its properties, without any -relations like `collection`. - - - -
- - - -## Selecting Fields - - -In many API Routes you'll find a `fields` query parameter that can be passed -to the API Route. You can use the `fields` query parameter to specify which -fields in the entity should be returned in the response. - - -Please note that if you pass a `fields` query parameter, only the fields you -pass in the value along with the `id` of the entity will be returned in the -response. - - -Also, the `fields` query parameter does not affect the expanded relations. -You'll have to use the `expand` parameter instead. - - -### Selecting One Field - - -For example, when you retrieve a list of products, you can retrieve only the -titles of the products by passing `title` as a value to the `fields` query -parameter: - - - - - ```bash - curl "http://localhost:9000/admin/products?fields=title" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - fields: "title" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - fields: "title" - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- - -As mentioned above, the expanded relations such as `variants` will still be -returned as they're not affected by the `fields` parameter. - - -You can ensure that only the `title` field is returned by passing an empty -value to the `expand` query parameter. For example: - - - - - ```bash - curl "http://localhost:9000/admin/products?fields=title&expand" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - fields: "title", - expand: "" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - fields: "title", - expand: "" - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- - -### Selecting Multiple Fields - - -You can pass more than one field by seperating the field names in the -`fields` query parameter with a comma. - - -For example, to select the `title` and `handle` of products: - - - - - ```bash - curl "http://localhost:9000/admin/products?fields=title,handle" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - fields: "title,handle" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - fields: "title,handle" - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- - -### Retrieve Only the ID - - -You can pass an empty `fields` query parameter to return only the ID of an -entity. For example: - - - - - ```bash - curl "http://localhost:9000/admin/products?fields" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - fields: "" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - fields: "" - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- - -You can also pair with an empty `expand` query parameter to ensure that the -relations aren't retrieved as well. For example: - - - - - ```bash - curl "http://localhost:9000/admin/products?fields&expand" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - fields: "", - expand: "" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - fields: "", - expand: "" - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- - - -
- - - -## Query Parameter Types - - -This section covers how to pass some common data types as query parameters. -This is useful if you're sending requests to the API routes and not using -the JS Client. For example, when using cURL or Postman. - - -### Strings - - -You can pass a string value in the form of `=`. - - -For example: - - -```bash -curl "http://localhost:9000/admin/products?title=Shirt" \ --H 'x-medusa-access-token: {api_token}' -``` - - -If the string has any characters other than letters and numbers, you must -encode them. - - -For example, if the string has spaces, you can encode the space with `+` or -`%20`: - - -```bash -curl "http://localhost:9000/admin/products?title=Blue%20Shirt" \ --H 'x-medusa-access-token: {api_token}' -``` - - -You can use tools like [this one](https://www.urlencoder.org/) to learn how -a value can be encoded. - - -### Integers - - -You can pass an integer value in the form of `=`. - - -For example: - - -```bash -curl "http://localhost:9000/admin/products?offset=1" \ --H 'x-medusa-access-token: {api_token}' -``` - - -### Boolean - - -You can pass a boolean value in the form of `=`. - - -For example: - - -```bash -curl "http://localhost:9000/admin/products?is_giftcard=true" \ --H 'x-medusa-access-token: {api_token}' -``` - - -### Date and DateTime - - -You can pass a date value in the form `=`. The date -must be in the format `YYYY-MM-DD`. - - -For example: - - -```bash -curl -g "http://localhost:9000/admin/products?created_at[lt]=2023-02-17" \ --H 'x-medusa-access-token: {api_token}' -``` - - -You can also pass the time using the format `YYYY-MM-DDTHH:MM:SSZ`. Please -note that the `T` and `Z` here are fixed. - - -For example: - - -```bash -curl -g "http://localhost:9000/admin/products?created_at[lt]=2023-02-17T07:22:30Z" \ --H 'x-medusa-access-token: {api_token}' -``` - - -### Array - - -Each array value must be passed as a separate query parameter in the form -`[]=`. You can also specify the index of each -parameter in the brackets `[0]=`. - - -For example: - - -```bash -curl -g "http://localhost:9000/admin/products?sales_channel_id[]=sc_01GPGVB42PZ7N3YQEP2WDM7PC7&sales_channel_id[]=sc_234PGVB42PZ7N3YQEP2WDM7PC7" \ --H 'x-medusa-access-token: {api_token}' -``` - - -Note that the `-g` parameter passed to `curl` disables errors being thrown -for using the brackets. Read more -[here](https://curl.se/docs/manpage.html#-g). - - -### Object - - -Object parameters must be passed as separate query parameters in the form -`[]=`. - - -For example: - - -```bash -curl -g "http://localhost:9000/admin/products?created_at[lt]=2023-02-17&created_at[gt]=2022-09-17" \ --H 'x-medusa-access-token: {api_token}' -``` - - - - - - - -## Pagination - -### Query Parameters - - -In listing API Routes, such as list customers or list products, you can control the pagination using the query parameters `limit` and `offset`. - - -`limit` is used to specify the maximum number of items that can be return in the response. `offset` is used to specify how many items to skip before returning the resulting entities. - - -You can use the `offset` query parameter to change between pages. For example, if the limit is `50`, at page 1 the offset should be 0; at page 2 the offset should be 50, and so on. - - -For example, to limit the number of products returned in the List Products API Route: - - - - - ```bash - curl "http://localhost:9000/admin/products?limit=5" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - limit: 5 - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - limit: 5 - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- - -### Response Fields - - -In the response of listing API Routes, aside from the entities retrieved, -there are three pagination-related fields returned: - - -- `limit`: the maximum number of items that can be returned in the response. -- `offset`: the number of items that were skipped before the entities in the result. -- `count`: the total number of available items of this entity. It can be used to determine how many pages are there. - - -For example, if the `count` is 100 and the `limit` is 50, you can divide the -`count` by the `limit` to get the number of pages: `100/50 = 2 pages`. - - -### Sort Order - - -The `order` field available on API Routes supporting pagination allows you to -sort the retrieved items by an attribute of that item. For example, you can -sort products by their `created_at` attribute by setting `order` to -`created_at`: - - - - - ```bash - curl "http://localhost:9000/admin/products?order=created_at" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - order: "created_at" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - order: "created_at" - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- - -By default, the sort direction will be ascending. To change it to -descending, pass a dash (`-`) before the attribute name. For example: - - - - - ```bash - curl "http://localhost:9000/admin/products?order=-created_at" \ - -H 'x-medusa-access-token: {api_token}' - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list({ - order: "-created_at" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts({ - order: "-created_at" - }) - - return ( -
- {/** ... **/} -
- ) - } - - export default Products - ``` - -
-
- - -This sorts the products by their `created_at` attribute in the descending -order. - - - -
\ No newline at end of file diff --git a/www/apps/api-reference/app/_mdx/v1/client-libraries.mdx b/www/apps/api-reference/app/_mdx/v1/client-libraries.mdx deleted file mode 100644 index bbaa99b23d..0000000000 --- a/www/apps/api-reference/app/_mdx/v1/client-libraries.mdx +++ /dev/null @@ -1,34 +0,0 @@ -import { CodeTabs, CodeTab } from "docs-ui" -import Space from "@/components/Space" -import DownloadFull from "@/components/DownloadFull" - -### Just Getting Started? - -Check out the [quickstart guide](https://docs.medusajs.com/create-medusa-app). - - - -### Client Libraries - - - - - ```bash - npm install @medusajs/medusa-js - ``` - - - - - ```bash - npm install medusa-react @tanstack/react-query @medusajs/medusa - ``` - - - - -### Download Full Reference - -Download this reference as an OpenApi YAML file. You can import this file to tools like Postman and start sending requests directly to your Medusa backend. - - \ No newline at end of file diff --git a/www/apps/api-reference/app/_mdx/v1/store.mdx b/www/apps/api-reference/app/_mdx/v1/store.mdx deleted file mode 100644 index b5ef864b71..0000000000 --- a/www/apps/api-reference/app/_mdx/v1/store.mdx +++ /dev/null @@ -1,1177 +0,0 @@ - -import { Feedback, CodeTabs, CodeTab } from "docs-ui" -import SectionContainer from "@/components/Section/Container" -import formatReportLink from "@/utils/format-report-link" - - - -This API reference includes Medusa's Store APIs, which are REST APIs exposed by the Medusa backend. They are typically used to create a storefront for your commerce store, such as a webshop or a commerce mobile app. - -All API Routes are prefixed with `/store`. So, during development, the API Routes will be available under the path `http://localhost:9000/store`. For production, replace `http://localhost:9000` with your Medusa backend URL. - -There are different ways you can send requests to these API Routes, including: - -- Using Medusa's [JavaScript Client](https://docs.medusajs.com/js-client/overview) -- Using the [Medusa React](https://docs.medusajs.com/medusa-react/overview) library -- Using cURL - -Aside from this API reference, check out the [Commerce Modules](https://docs.medusajs.com/modules/overview) section of the documentation for guides on how to use these APIs in different scenarios. - - - - - - - -## Authentication - -There are two ways to send authenticated requests to the Medusa server: Using a JWT token or using a Cookie Session ID. - -### JWT Token - -Use a JWT token to send authenticated requests. Authentication state is managed by the client, which is ideal for Jamstack applications and mobile applications. - -#### How to Obtain the JWT Token - -JWT tokens are obtained by sending a request to the [Customer Login (JWT) API Route](#auth_authtoken) passing it the customer's email and password in the request body. For example: - -```bash -curl -X POST 'https://medusa-url.com/store/auth/token' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "password": "supersecret" -}' - -``` - -If authenticated successfully, an object is returned in the response with the property `access_token` being the JWT token. - -#### How to Use the JWT Token - -The JWT token can be used for Bearer Authentication. It's passed in the -`Authorization` header as the following: - - -```bash -Authorization: Bearer {jwt_token} -``` - -### Cookie Session ID - -Use a cookie session to send authenticated requests. - -#### How to Obtain the Cookie Session - - -If you're sending requests through a browser, using Medusa's JS and Medusa React clients, or using -tools like Postman, the cookie session should be automatically set when -the customer is logged in. - - -If you're sending requests using cURL, you must set the Session ID in -the cookie manually. - - -To do that, send a request to [authenticate the -customer](#tag/Auth/operation/PostAuth) and pass the cURL option `-v`: - - -```bash -curl -v -X POST 'https://medusa-url.com/store/auth' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "password": "supersecret" -}' -``` - - -The headers will be logged in the terminal as well as the response. You -should find in the headers a Cookie header similar to this: - - -```bash -Set-Cookie: connect.sid=s%3A2Bu8BkaP9JUfHu9rG59G16Ma0QZf6Gj1.WT549XqX37PN8n0OecqnMCq798eLjZC5IT7yiDCBHPM; -``` - - -Copy the value after `connect.sid` (without the `;` at the end) and pass -it as a cookie in subsequent requests as the following: - - -```bash -curl 'https://medusa-url.com/store/customers/me/orders' \ --H 'Cookie: connect.sid={sid}' -``` - -Where `{sid}` is the value of `connect.sid` that you copied. - -If you're sending requests using JavaScript's Fetch API, you must pass the `credentials` option -with the value `include` to all the requests you're sending. For example: - -```js -fetch(`/admin/products`, { - credentials: "include", -}) -``` - - - - - - - -## Publishable API Key - -Publishable API Keys allow you to send a request with a pre-defined scope. You can associate the -publishable API key with one or more resources, such as sales channels, then include the publishable -API key in the header of your requests. - -The Medusa backend will infer the scope of the current -request based on the publishable API key. At the moment, publishable API keys only work with sales channels. - -It's highly recommended to create a publishable API key and pass it in the header of all your requests to the -store APIs. - -You can learn more about publishable API keys and how to use them in [this documentation](https://docs.medusajs.com/development/publishable-api-keys/). - -### How to Create a Publishable API Key - -You can create a publishable API key either using the [admin REST APIs](https://docs.medusajs.com/development/publishable-api-keys/admin/manage-publishable-api-keys), -or using the [Medusa Admin](https://docs.medusajs.com/user-guide/settings/publishable-api-keys). - -### How to Use a Publishable API Key - -You can pass the publishable API key in the header `x-publishable-api-key` in all your requests to the store APIs: - -```bash -x-publishable-api-key: {your_publishable_api_key} -``` - -If you're using Medusa's JS or Medusa React clients, you can pass the publishable API key when you first -initialize either clients. Then, the publishable API key will be automatically included in all your requests: - - - - - ```ts - const medusa = new Medusa({ - maxRetries: 3, - baseUrl: "https://api.example.com", - publishableApiKey, - }) - ``` - - - - - ```tsx - import { MedusaProvider } from "medusa-react" - - // define query client... - - const App = () => { - return ( - - - - ) - } - ``` - - - - - - - - - - -## HTTP Compression - -If you've enabled HTTP Compression in your Medusa configurations, and you -want to disable it for some requests, you can pass the `x-no-compression` -header in your requests: - -```bash -x-no-compression: true -``` - -If you're using the Medusa JS Client, you can pass custom headers in the -last parameter of a method. For example: - -```ts -medusa.products.list({}, { - "x-no-compression": true -}) -.then(({ products, limit, offset, count }) => { - console.log(products.length) -}) -``` - -You can also pass the header when you first initialize the Medusa client: - -```ts -const medusa = new Medusa({ - maxRetries: 3, - baseUrl: "https://api.example.com", - customHeaders: { - "x-no-compression": true - } -}) -``` - -For Medusa React, it's not possible to pass custom headers for a query or mutation, but -you can pass the header to the `MedusaProvider` and it will be added to all subsequent requests: - -```tsx -import { MedusaProvider } from "medusa-react" - -// define query client... - -const App = () => { - return ( - - - - ) -} -``` - - - - - - - -## Expanding Relations - - -Many API Routes accept an `expand` that unpacks an -entity's relations and return them in the response. - - - - -The relations you pass to `expand` replace any relations -that are expanded by default in the request. - - - - -### Expanding One Relation - - -For example, when you retrieve a list of products, retrieve their collections by -passing to the `expand` query parameter the value `collection`: - - - - - ```bash - curl "http://localhost:9000/store/products?expand=collection" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - expand: "collection" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - expand: "collection" - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- -### Expanding Multiple Relations - -Expand more than one relation by separating the relations in the -`expand` query parameter with a comma. - - -For example, to retrieve both the variants and the collection of the products, -pass to the `expand` query parameter the value `variants,collection`: - - - - - ```bash - curl "http://localhost:9000/store/products?expand=variants,collection" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - expand: "variants,collection" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - expand: "variants,collection" - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- -### Expanding Nested Relations - - -Expand nested relations (the relations of a relation) using dot notation. - - -For example, to retrieve the variants of a product along with its option values, -pass to the `expand` query parameter `variants.options`: - - - - - ```bash - curl "http://localhost:9000/store/products?expand=variants.options" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - expand: "variants.options" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - expand: "variants.options" - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- - -### Prevent Expanding Relations - - -Some requests expand relations by default. You can prevent that by passing -an empty expand value to retrieve an entity without any extra relations. - -For example: - - - - - ```bash - curl "http://localhost:9000/store/products?expand" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - expand: "" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - expand: "" - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- - -This would retrieve the products with only their properties, without any -relations like `collection`. - - - -
- - - -## Selecting Fields - - -In many API Routes you'll find a `fields` query parameter that can be passed -to the API Route. You can use the `fields` query parameter to specify which -fields in the entity should be returned in the response. - - -Please note that if you pass a `fields` query parameter, only the fields you -pass in the value along with the `id` of the entity will be returned in the -response. - - -Also, the `fields` query parameter does not affect the expanded relations. -You'll have to use the `expand` parameter instead. - - -### Selecting One Field - - -For example, when you retrieve a list of products, you can retrieve only the -titles of the products by passing `title` as a value to the `fields` query -parameter: - - - - - ```bash - curl "http://localhost:9000/store/products?fields=title" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - fields: "title" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - fields: "title" - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- - -As mentioned above, the expanded relations such as `variants` will still be -returned as they're not affected by the `fields` parameter. - - -You can ensure that only the `title` field is returned by passing an empty -value to the `expand` query parameter. For example: - - - - - ```bash - curl "http://localhost:9000/store/products?fields=title&expand" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - fields: "title", - expand: "" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - fields: "title", - expand: "" - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- - -### Selecting Multiple Fields - - -You can pass more than one field by seperating the field names in the -`fields` query parameter with a comma. - - -For example, to select the `title` and `handle` of the products: - - - - - ```bash - curl "http://localhost:9000/store/products?fields=title,handle" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - fields: "title,handle" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - fields: "title,handle" - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- - -### Retrieve Only the ID - - -You can pass an empty `fields` query parameter to return only the ID of an -entity. For example: - - - - - ```bash - curl "http://localhost:9000/store/products?fields" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - fields: "" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - fields: "" - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- - -You can also pair with an empty `expand` query parameter to ensure that the -relations aren't retrieved as well. For example: - - - - - ```bash - curl "http://localhost:9000/store/products?fields" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - fields: "", - expand: "" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - fields: "", - expand: "" - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- - - -
- - - -## Query Parameter Types - - -This section covers how to pass some common data types as query parameters. -This is useful if you're sending requests to the API Routes and not using -our JS Client. For example, when using cURL or Postman. - - -### Strings - - -You can pass a string value in the form of `=`. - - -For example: - - -```bash -curl "http://localhost:9000/store/products?title=Shirt" -``` - - -If the string has any characters other than letters and numbers, you must -encode them. - - -For example, if the string has spaces, you can encode the space with `+` or -`%20`: - - -```bash -curl "http://localhost:9000/store/products?title=Blue%20Shirt" -``` - - -You can use tools like [this one](https://www.urlencoder.org/) to learn how -a value can be encoded. - -### Integers - -You can pass an integer value in the form of `=`. - - -For example: - - -```bash -curl "http://localhost:9000/store/products?offset=1" -``` - - -### Boolean - - -You can pass a boolean value in the form of `=`. - - -For example: - - -```bash -curl "http://localhost:9000/store/products?is_giftcard=true" -``` - - -### Date and DateTime - - -You can pass a date value in the form `=`. The date -must be in the format `YYYY-MM-DD`. - - -For example: - - -```bash -curl -g "http://localhost:9000/store/products?created_at[lt]=2023-02-17" -``` - - -You can also pass the time using the format `YYYY-MM-DDTHH:MM:SSZ`. Please -note that the `T` and `Z` here are fixed. - - -For example: - - -```bash -curl -g "http://localhost:9000/store/products?created_at[lt]=2023-02-17T07:22:30Z" -``` - - -### Array - - -Each array value must be passed as a separate query parameter in the form -`[]=`. You can also specify the index of each -parameter in the brackets `[0]=`. - - -For example: - - -```bash -curl -g "http://localhost:9000/store/products?sales_channel_id[]=sc_01GPGVB42PZ7N3YQEP2WDM7PC7&sales_channel_id[]=sc_234PGVB42PZ7N3YQEP2WDM7PC7" -``` - - -Note that the `-g` parameter passed to `curl` disables errors being thrown -for using the brackets. Read more -[here](https://curl.se/docs/manpage.html#-g). - - -### Object - - -Object parameters must be passed as separate query parameters in the form -`[]=`. - - -For example: - - -```bash -curl -g "http://localhost:9000/store/products?created_at[lt]=2023-02-17&created_at[gt]=2022-09-17" -``` - - - - - - - -## Pagination - - -### Query Parameters - - -In listing API Routes, such as list customers or list products, you can -control the pagination using the query parameters `limit` and `offset`. - - -`limit` is used to specify the maximum number of items that can be return in -the response. `offset` is used to specify how many items to skip before -returning the resulting entities. - - -You can use the `offset` query parameter to change between pages. For -example, if the limit is `50`, at page `1` the offset should be `0`; at page `2` the -offset should be `50`, and so on. - - -For example, to limit the number of products returned in the List Products -API Route: - - - - - ```bash - curl "http://localhost:9000/store/products?limit=5" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - limit: 5 - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - limit: 5 - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- - -### Response Fields - - -In the response of listing API Routes, aside from the entities retrieved, -there are three pagination-related fields returned: - - -- `limit`: the maximum number of items that can be returned in the response. -- `offset`: the number of items that were skipped before the entities in the result. -- `count`: the total number of available items of this entity. It can be used to determine how many pages are there. - - -For example, if the `count` is 100 and the `limit` is 50, you can divide the -`count` by the `limit` to get the number of pages: `100/50 = 2 pages`. - - -### Sort Order - - -The `order` field available on API Routes supporting pagination allows you to -sort the retrieved items by an attribute of that item. For example, you can -sort products by their `created_at` attribute by setting `order` to -`created_at`: - - - - - ```bash - curl "http://localhost:9000/store/products?order=created_at" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - order: "created_at" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - order: "created_at" - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- - -By default, the sort direction will be ascending. To change it to -descending, pass a dash (`-`) before the attribute name. For example: - - - - - ```bash - curl "http://localhost:9000/store/products?order=-created_at" - ``` - - - - - ```ts - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list({ - order: "-created_at" - }) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }); - ``` - - - - - ```tsx - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts({ - order: "-created_at" - }) - - return ( -
- {/* ... */} -
- ) - } - - export default Products - ``` - -
-
- - -This sorts the products by their `created_at` attribute in the descending -order. - - - -
\ No newline at end of file diff --git a/www/apps/api-reference/app/api/[area]/page.tsx b/www/apps/api-reference/app/api/[area]/page.tsx index d8dba1ece4..428ab2ace2 100644 --- a/www/apps/api-reference/app/api/[area]/page.tsx +++ b/www/apps/api-reference/app/api/[area]/page.tsx @@ -1,14 +1,13 @@ import AreaProvider from "@/providers/area" -import AdminContentV1 from "../../_mdx/v1/admin.mdx" -import StoreContentV1 from "../../_mdx/v1/store.mdx" -import ClientLibrariesV1 from "../../_mdx/v1/client-libraries.mdx" +import AdminContentV2 from "../../_mdx/admin.mdx" +import StoreContentV2 from "../../_mdx/store.mdx" +import ClientLibrariesV2 from "../../_mdx/client-libraries.mdx" import Section from "@/components/Section" import Tags from "@/components/Tags" import type { Area } from "@/types/openapi" import DividedLayout from "@/layouts/Divided" import { capitalize } from "docs-ui" -import PageTitleProvider from "../../../providers/page-title" -import PageHeading from "../../../components/PageHeading" +import PageTitleProvider from "@/providers/page-title" type ReferencePageProps = { params: { @@ -20,16 +19,20 @@ const ReferencePage = async ({ params: { area } }: ReferencePageProps) => { return ( - +

+ Medusa V2 {capitalize(area)} API Reference +

- - {area.includes("admin") && } - {area.includes("store") && } +

+ Medusa V2 {capitalize(area)} API Reference +

+ {area.includes("admin") && } + {area.includes("store") && } } - codeContent={} + codeContent={} className="flex-col-reverse" /> diff --git a/www/apps/api-reference/app/api/[area]/v2/opengraph-image.jpg b/www/apps/api-reference/app/api/[area]/v2/opengraph-image.jpg deleted file mode 100644 index c56693dc37..0000000000 Binary files a/www/apps/api-reference/app/api/[area]/v2/opengraph-image.jpg and /dev/null differ diff --git a/www/apps/api-reference/app/api/[area]/v2/page.tsx b/www/apps/api-reference/app/api/[area]/v2/page.tsx deleted file mode 100644 index e042634ea4..0000000000 --- a/www/apps/api-reference/app/api/[area]/v2/page.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import AreaProvider from "@/providers/area" -import AdminContentV2 from "../../../_mdx/v2/admin.mdx" -import StoreContentV2 from "../../../_mdx/v2/store.mdx" -import ClientLibrariesV2 from "../../../_mdx/v2/client-libraries.mdx" -import Section from "@/components/Section" -import Tags from "@/components/Tags" -import type { Area } from "@/types/openapi" -import DividedLayout from "@/layouts/Divided" -import { capitalize } from "docs-ui" -import PageTitleProvider from "@/providers/page-title" -import PageHeading from "@/components/PageHeading" - -type ReferencePageProps = { - params: { - area: Area - } -} - -const ReferencePage = async ({ params: { area } }: ReferencePageProps) => { - return ( - - - - - - {area.includes("admin") && } - {area.includes("store") && } - - } - codeContent={} - className="flex-col-reverse" - /> - - - - ) -} - -export default ReferencePage - -export function generateMetadata({ params: { area } }: ReferencePageProps) { - return { - title: `Medusa ${capitalize(area)} API Reference`, - description: `REST API reference for the Medusa ${area} API. This reference includes code snippets and examples for Medusa JS Client and cURL.`, - metadataBase: process.env.NEXT_PUBLIC_BASE_URL, - } -} - -export const dynamicParams = false - -export async function generateStaticParams() { - return [ - { - area: "admin", - }, - { - area: "store", - }, - ] -} diff --git a/www/apps/api-reference/app/api/[area]/v2/twitter-image.jpg b/www/apps/api-reference/app/api/[area]/v2/twitter-image.jpg deleted file mode 100644 index c56693dc37..0000000000 Binary files a/www/apps/api-reference/app/api/[area]/v2/twitter-image.jpg and /dev/null differ diff --git a/www/apps/api-reference/app/api/algolia/route.ts b/www/apps/api-reference/app/api/algolia/route.ts index 6723fe19d3..c4897c6266 100644 --- a/www/apps/api-reference/app/api/algolia/route.ts +++ b/www/apps/api-reference/app/api/algolia/route.ts @@ -24,7 +24,7 @@ export async function GET() { const defaultIndexData = { version: ["current"], lang: "en", - _tags: ["api", area], + _tags: ["api", `${area}-v2`], } // find and parse static headers from pages const dom = await JSDOM.fromURL(getUrl(area)) diff --git a/www/apps/api-reference/app/api/base-specs/route.ts b/www/apps/api-reference/app/api/base-specs/route.ts index 10715be769..fb527b93e7 100644 --- a/www/apps/api-reference/app/api/base-specs/route.ts +++ b/www/apps/api-reference/app/api/base-specs/route.ts @@ -2,12 +2,11 @@ import { NextResponse } from "next/server" import path from "path" import OpenAPIParser from "@readme/openapi-parser" import getPathsOfTag from "@/utils/get-paths-of-tag" -import type { ExpandedDocument, Version } from "@/types/openapi" +import type { ExpandedDocument } from "@/types/openapi" export async function GET(request: Request) { const { searchParams } = new URL(request.url) const area = searchParams.get("area") - const version = (searchParams.get("version") as Version) || "1" const expand = searchParams.get("expand") if (area !== "admin" && area !== "store") { return NextResponse.json( @@ -21,11 +20,7 @@ export async function GET(request: Request) { ) } const baseSpecs = (await OpenAPIParser.parse( - path.join( - process.cwd(), - version === "1" ? "specs" : "specs-v2", - `${area}/openapi.yaml` - ) + path.join(process.cwd(), "specs", area, "openapi.yaml") )) as ExpandedDocument if (expand) { diff --git a/www/apps/api-reference/app/api/download/[area]/route.ts b/www/apps/api-reference/app/api/download/[area]/route.ts index 2f8eccda34..ccf60196e8 100644 --- a/www/apps/api-reference/app/api/download/[area]/route.ts +++ b/www/apps/api-reference/app/api/download/[area]/route.ts @@ -1,7 +1,6 @@ import { existsSync, readFileSync } from "fs" import { NextResponse } from "next/server" import path from "path" -import { Version } from "../../../../types/openapi" type DownloadParams = { params: { @@ -10,16 +9,8 @@ type DownloadParams = { } export function GET(request: Request, { params }: DownloadParams) { - const { searchParams } = new URL(request.url) const { area } = params - const version = - process.env.NEXT_PUBLIC_VERSIONING === "true" - ? (searchParams.get("version") as Version) || "1" - : "1" - const filePath = path.join( - process.cwd(), - `${version === "1" ? "specs" : "specs-v2"}/${area}/openapi.full.yaml` - ) + const filePath = path.join(process.cwd(), "specs", area, "openapi.full.yaml") if (!existsSync(filePath)) { return new NextResponse(null, { diff --git a/www/apps/api-reference/app/api/schema/route.ts b/www/apps/api-reference/app/api/schema/route.ts index 719eb3f336..5b53e635b9 100644 --- a/www/apps/api-reference/app/api/schema/route.ts +++ b/www/apps/api-reference/app/api/schema/route.ts @@ -1,5 +1,5 @@ import { NextResponse } from "next/server" -import { SchemaObject, Version } from "../../../types/openapi" +import { SchemaObject } from "../../../types/openapi" import path from "path" import { existsSync, promises as fs } from "fs" import { parseDocument } from "yaml" @@ -8,7 +8,6 @@ export async function GET(request: Request) { const { searchParams } = new URL(request.url) let name = searchParams.get("name") const area = searchParams.get("area") - const version = (searchParams.get("version") as Version) || "1" if (!name) { return NextResponse.json( @@ -40,7 +39,7 @@ export async function GET(request: Request) { const schemaPath = path.join( process.cwd(), - version === "1" ? "specs" : "specs-v2", + "specs", area, "components", "schemas", diff --git a/www/apps/api-reference/app/api/tag/route.ts b/www/apps/api-reference/app/api/tag/route.ts index df31facbf3..7c4afd5125 100644 --- a/www/apps/api-reference/app/api/tag/route.ts +++ b/www/apps/api-reference/app/api/tag/route.ts @@ -1,13 +1,11 @@ import { NextResponse } from "next/server" import path from "path" import getPathsOfTag from "@/utils/get-paths-of-tag" -import { Version } from "../../../types/openapi" export async function GET(request: Request) { const { searchParams } = new URL(request.url) const tagName = searchParams.get("tagName") || "" const area = searchParams.get("area") - const version = (searchParams.get("version") as Version) || "1" if (area !== "admin" && area !== "store") { return NextResponse.json( @@ -23,10 +21,9 @@ export async function GET(request: Request) { // this is just to ensure that vercel picks up these files on build path.join(process.cwd(), "specs") - path.join(process.cwd(), "specs-v2") // get path files - const paths = await getPathsOfTag(tagName, area, version) + const paths = await getPathsOfTag(tagName, area) return NextResponse.json( { diff --git a/www/apps/api-reference/components/Navbar/index.tsx b/www/apps/api-reference/components/Navbar/index.tsx index c910b23ac0..4d23a33937 100644 --- a/www/apps/api-reference/components/Navbar/index.tsx +++ b/www/apps/api-reference/components/Navbar/index.tsx @@ -11,20 +11,19 @@ import { useMemo } from "react" import { config } from "../../config" import { usePathname } from "next/navigation" import VersionSwitcher from "../VersionSwitcher" -import { useVersion } from "../../providers/version" +import basePathUrl from "../../utils/base-path-url" const Navbar = () => { const { setMobileSidebarOpen, mobileSidebarOpen } = useSidebar() const pathname = usePathname() const { isLoading } = usePageLoading() - const { isVersioningEnabled } = useVersion() const navbarItems = useMemo( () => getNavbarItems({ basePath: config.baseUrl, activePath: pathname, - version: process.env.NEXT_PUBLIC_SHOW_V2 ? "v1" : "legacy", + version: "v2", }), [pathname] ) @@ -32,17 +31,15 @@ const Navbar = () => { return ( {isVersioningEnabled && } - } + additionalActionsBefore={} additionalActionsAfter={} isLoading={isLoading} /> diff --git a/www/apps/api-reference/components/PageHeading/index.tsx b/www/apps/api-reference/components/PageHeading/index.tsx deleted file mode 100644 index 5af3c61c24..0000000000 --- a/www/apps/api-reference/components/PageHeading/index.tsx +++ /dev/null @@ -1,24 +0,0 @@ -"use client" - -import { capitalize } from "docs-ui" -import { useArea } from "../../providers/area" -import { useVersion } from "../../providers/version" - -type PageHeadingProps = { - className?: string -} - -const PageHeading = ({ className }: PageHeadingProps) => { - const { area } = useArea() - const { version, isVersioningEnabled } = useVersion() - - const versionText = isVersioningEnabled ? ` V${version}` : "" - - return ( -

- Medusa{versionText} {capitalize(area)} API Reference -

- ) -} - -export default PageHeading diff --git a/www/apps/api-reference/components/Tags/Paths/index.tsx b/www/apps/api-reference/components/Tags/Paths/index.tsx index c71b6a55c1..aa363747c7 100644 --- a/www/apps/api-reference/components/Tags/Paths/index.tsx +++ b/www/apps/api-reference/components/Tags/Paths/index.tsx @@ -4,7 +4,7 @@ import getSectionId from "@/utils/get-section-id" import type { OpenAPIV3 } from "openapi-types" import useSWR from "swr" import type { Operation, PathsObject } from "@/types/openapi" -import { useSidebar, swrFetcher, getLinkWithBasePath } from "docs-ui" +import { useSidebar, swrFetcher } from "docs-ui" import { Fragment, useEffect, useMemo } from "react" import dynamic from "next/dynamic" import type { TagOperationProps } from "../Operation" @@ -15,7 +15,7 @@ import getTagChildSidebarItems from "@/utils/get-tag-child-sidebar-items" import { useLoading } from "@/providers/loading" import DividedLoading from "@/components/DividedLoading" import { SidebarItemSections, SidebarItemType } from "types" -import { useVersion } from "../../../providers/version" +import basePathUrl from "../../../utils/base-path-url" const TagOperation = dynamic( async () => import("../Operation") @@ -28,7 +28,6 @@ export type TagPathsProps = { const TagPaths = ({ tag, className }: TagPathsProps) => { const tagSlugName = useMemo(() => getSectionId([tag.name]), [tag]) const { area } = useArea() - const { version } = useVersion() const { items, addItems, findItemInSection } = useSidebar() const { baseSpecs } = useBaseSpecs() const { loading } = useLoading() @@ -44,10 +43,7 @@ const TagPaths = ({ tag, className }: TagPathsProps) => { paths: PathsObject }>( !Object.keys(paths).length - ? getLinkWithBasePath( - `/tag?tagName=${tagSlugName}&area=${area}&version=${version}`, - process.env.NEXT_PUBLIC_BASE_PATH - ) + ? basePathUrl(`/api/tag?tagName=${tagSlugName}&area=${area}`) : null, swrFetcher, { diff --git a/www/apps/api-reference/components/Tags/Section/index.tsx b/www/apps/api-reference/components/Tags/Section/index.tsx index d0d82461d4..e11d160efc 100644 --- a/www/apps/api-reference/components/Tags/Section/index.tsx +++ b/www/apps/api-reference/components/Tags/Section/index.tsx @@ -4,7 +4,6 @@ import getSectionId from "@/utils/get-section-id" import { useInView } from "react-intersection-observer" import { useEffect, useMemo, useState } from "react" import { - getLinkWithBasePath, isElmWindow, swrFetcher, useScrollController, @@ -25,8 +24,8 @@ import { usePathname } from "next/navigation" import formatReportLink from "@/utils/format-report-link" import { SchemaObject, TagObject } from "@/types/openapi" import useSWR from "swr" -import { useVersion } from "@/providers/version" import { TagSectionSchemaProps } from "./Schema" +import basePathUrl from "../../../utils/base-path-url" export type TagSectionProps = { tag: TagObject @@ -54,14 +53,12 @@ const TagSection = ({ tag }: TagSectionProps) => { const { area } = useArea() const pathname = usePathname() const { scrollableElement } = useScrollController() - const { version } = useVersion() const { data } = useSWR<{ schema: SchemaObject }>( tag["x-associatedSchema"] - ? getLinkWithBasePath( - `/schema?name=${tag["x-associatedSchema"].$ref}&area=${area}&version=${version}`, - process.env.NEXT_PUBLIC_BASE_PATH + ? basePathUrl( + `/api/schema?name=${tag["x-associatedSchema"].$ref}&area=${area}` ) : null, swrFetcher, diff --git a/www/apps/api-reference/components/Tags/index.tsx b/www/apps/api-reference/components/Tags/index.tsx index c927667bf0..d558fe8bc6 100644 --- a/www/apps/api-reference/components/Tags/index.tsx +++ b/www/apps/api-reference/components/Tags/index.tsx @@ -7,12 +7,12 @@ import { useBaseSpecs } from "@/providers/base-specs" import dynamic from "next/dynamic" import type { TagSectionProps } from "./Section" import { useArea } from "@/providers/area" -import { swrFetcher, useSidebar, getLinkWithBasePath } from "docs-ui" +import { swrFetcher, useSidebar } from "docs-ui" import getSectionId from "@/utils/get-section-id" import { ExpandedDocument } from "@/types/openapi" import getTagChildSidebarItems from "@/utils/get-tag-child-sidebar-items" import { SidebarItemSections } from "types" -import { useVersion } from "../../providers/version" +import basePathUrl from "../../utils/base-path-url" const TagSection = dynamic( async () => import("./Section") @@ -33,14 +33,10 @@ const Tags = () => { const { baseSpecs, setBaseSpecs } = useBaseSpecs() const { addItems } = useSidebar() const { area } = useArea() - const { version } = useVersion() const { data } = useSWR( loadData && !baseSpecs - ? getLinkWithBasePath( - `/base-specs?area=${area}&expand=${expand}&version=${version}`, - process.env.NEXT_PUBLIC_BASE_PATH - ) + ? basePathUrl(`/api/base-specs?area=${area}&expand=${expand}`) : null, swrFetcher, { diff --git a/www/apps/api-reference/components/VersionSwitcher/index.tsx b/www/apps/api-reference/components/VersionSwitcher/index.tsx index 29dc2fd3c7..980a4e6760 100644 --- a/www/apps/api-reference/components/VersionSwitcher/index.tsx +++ b/www/apps/api-reference/components/VersionSwitcher/index.tsx @@ -3,41 +3,20 @@ import { Toggle } from "docs-ui" import clsx from "clsx" import { usePathname } from "next/navigation" -import { useVersion } from "../../providers/version" const VersionSwitcher = () => { const pathname = usePathname() - const { version } = useVersion() return (
- - V1 - + V1 { - let newPath = pathname.replace("/v2", "") - if (checked) { - newPath += `/v2` - } - - location.href = location.href.replace(pathname, newPath) + checked={true} + onCheckedChange={() => { + location.href = process.env.NEXT_PUBLIC_API_V1_URL + pathname }} /> - - V2 - + V2
) } diff --git a/www/apps/api-reference/config/index.ts b/www/apps/api-reference/config/index.ts index f0bf29ba10..aaf1087012 100644 --- a/www/apps/api-reference/config/index.ts +++ b/www/apps/api-reference/config/index.ts @@ -1,8 +1,9 @@ import { DocsConfig } from "types" -import { mobileSidebarItemsV1, legacyMobileSidebarItems } from "docs-ui" +import { mobileSidebarItemsV2 } from "docs-ui" export const config: DocsConfig = { baseUrl: process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000", + basePath: process.env.NEXT_PUBLIC_BASE_PATH, // sidebar is auto generated sidebar: { top: [ @@ -13,6 +14,6 @@ export const config: DocsConfig = { }, ], bottom: [], - mobile: process.env.NEXT_PUBLIC_SHOW_V2 ? mobileSidebarItemsV1 : legacyMobileSidebarItems, + mobile: mobileSidebarItemsV2, }, } diff --git a/www/apps/api-reference/middleware.ts b/www/apps/api-reference/middleware.ts deleted file mode 100644 index 804c640307..0000000000 --- a/www/apps/api-reference/middleware.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { NextResponse } from "next/server" -import type { NextRequest } from "next/server" - -export function middleware(request: NextRequest) { - if ( - process.env.NEXT_PUBLIC_VERSIONING !== "true" && - request.url.includes("/v2") - ) { - const url = new URL(request.url) - return NextResponse.redirect( - new URL(url.pathname.replace("/v2", ""), request.url) - ) - } -} - -export const config = { - matcher: "/api/:path*", -} diff --git a/www/apps/api-reference/next.config.mjs b/www/apps/api-reference/next.config.mjs index a91e74502e..98453f84fe 100644 --- a/www/apps/api-reference/next.config.mjs +++ b/www/apps/api-reference/next.config.mjs @@ -3,45 +3,17 @@ import bundleAnalyzer from "@next/bundle-analyzer" /** @type {import('next').NextConfig} */ const nextConfig = { + basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/v2", async rewrites() { - const fallbacks = [ - { - source: "/ui", - destination: `${process.env.NEXT_PUBLIC_UI_URL}/ui`, - }, - { - source: "/ui/:path*", - destination: `${process.env.NEXT_PUBLIC_UI_URL}/ui/:path*`, - }, - { - source: "/:path*", - destination: `${process.env.NEXT_PUBLIC_DOCS_URL}/:path*`, - }, - ] - - if (process.env.NEXT_PUBLIC_SHOW_V2) { - fallbacks.push( - { - source: "/v2/resources", - destination: `${process.env.NEXT_PUBLIC_DOCS_V2_URL}/v2/resources`, - }, - { - source: "/v2/resources/:path*", - destination: `${process.env.NEXT_PUBLIC_DOCS_V2_URL}/v2/resources/:path*`, - }, - { - source: "/v2", - destination: `${process.env.NEXT_PUBLIC_DOCS_V2_URL}/v2`, - }, - { - source: "/v2/:path*", - destination: `${process.env.NEXT_PUBLIC_DOCS_V2_URL}/v2/:path*`, - } - ) - } - return { - fallback: fallbacks, + fallback: [ + { + source: "/:path*", + destination: `${ + process.env.NEXT_PUBLIC_DOCS_URL || "https://localhost:3001" + }/:path*`, + }, + ], } }, webpack: (config) => { diff --git a/www/apps/api-reference/providers/area.tsx b/www/apps/api-reference/providers/area.tsx index 6ec7c624ad..f6fe678dcc 100644 --- a/www/apps/api-reference/providers/area.tsx +++ b/www/apps/api-reference/providers/area.tsx @@ -21,8 +21,8 @@ const AreaProvider = ({ area: passedArea, children }: AreaProviderProps) => { const { defaultFilters, setDefaultFilters } = useSearch() useEffect(() => { - if (!defaultFilters.includes(area)) { - setDefaultFilters([area]) + if (!defaultFilters.includes(`${area}-v2`)) { + setDefaultFilters([`${area}-v2`]) } }, [area, defaultFilters, setDefaultFilters]) diff --git a/www/apps/api-reference/providers/index.tsx b/www/apps/api-reference/providers/index.tsx index 9ee0cd6545..48c160d131 100644 --- a/www/apps/api-reference/providers/index.tsx +++ b/www/apps/api-reference/providers/index.tsx @@ -12,7 +12,6 @@ import { import BaseSpecsProvider from "./base-specs" import SidebarProvider from "./sidebar" import SearchProvider from "./search" -import VersionProvider from "./version" import { config } from "../config" type ProvidersProps = { @@ -30,9 +29,7 @@ const Providers = ({ children }: ProvidersProps) => { - - {children} - + {children} diff --git a/www/apps/api-reference/providers/search.tsx b/www/apps/api-reference/providers/search.tsx index 1c3a2c20e7..e43906e5c6 100644 --- a/www/apps/api-reference/providers/search.tsx +++ b/www/apps/api-reference/providers/search.tsx @@ -3,11 +3,10 @@ import { usePageLoading, SearchProvider as UiSearchProvider, - AiAssistantCommandIcon, - AiAssistantProvider, - searchFiltersV1, + searchFiltersV2, } from "docs-ui" import { config } from "../config" +import basePathUrl from "../utils/base-path-url" type SearchProviderProps = { children: React.ReactNode @@ -33,49 +32,26 @@ const SearchProvider = ({ children }: SearchProviderProps) => { title: "Getting started? Try one of the following terms.", items: [ "Install Medusa with create-medusa-app", - "Next.js quickstart", - "Admin dashboard quickstart", - "Commerce modules", - "Medusa architecture", + "What is an API route?", + "What is a Module?", + "What is a Workflow?", ], }, { title: "Developing with Medusa", items: [ - "Recipes", - "How to create API routes", - "How to create an entity", - "How to create a plugin", + "How to create a Module", + "How to create an API route", + "How to create a data model", "How to create an admin widget", ], }, ], checkInternalPattern: new RegExp( - `^${config.baseUrl}/api/(admin|store)` + `^${config.baseUrl}${basePathUrl("/api/(admin|store)")}` ), - filterOptions: searchFiltersV1, + filterOptions: searchFiltersV2, }} - commands={[ - { - name: "ai-assistant", - icon: , - component: ( - - ), - title: "AI Assistant", - badge: { - variant: "purple", - children: "Beta", - }, - }, - ]} > {children} diff --git a/www/apps/api-reference/providers/version.tsx b/www/apps/api-reference/providers/version.tsx deleted file mode 100644 index 6eddf2196b..0000000000 --- a/www/apps/api-reference/providers/version.tsx +++ /dev/null @@ -1,47 +0,0 @@ -"use client" - -import { createContext, useContext, useMemo } from "react" -import { Version } from "../types/openapi" -import { usePathname } from "next/navigation" - -type VersionContextType = { - version: Version - isVersioningEnabled: boolean -} - -const VersionContext = createContext(null) - -type VersionProviderProps = { - children: React.ReactNode -} - -const VersionProvider = ({ children }: VersionProviderProps) => { - const pathname = usePathname() - - const version = useMemo(() => { - return pathname.includes("v2") ? "2" : "1" - }, [pathname]) - - return ( - - {children} - - ) -} - -export default VersionProvider - -export const useVersion = (): VersionContextType => { - const context = useContext(VersionContext) - - if (!context) { - throw new Error("useVersion must be used inside an VersionProvider") - } - - return context -} diff --git a/www/apps/api-reference/specs-v2/admin.oas.json b/www/apps/api-reference/specs-v2/admin.oas.json deleted file mode 100644 index 72ce6f063a..0000000000 --- a/www/apps/api-reference/specs-v2/admin.oas.json +++ /dev/null @@ -1,11658 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "version": "2.0.0", - "title": "Medusa Admin API", - "license": { - "name": "MIT", - "url": "https://github.com/medusajs/medusa/blob/master/LICENSE" - } - }, - "tags": [ - { - "name": "Api Keys" - }, - { - "name": "Campaigns" - }, - { - "name": "Collections" - }, - { - "name": "Currencies", - "description": "A store can use unlimited currencies, and each region must be associated with at least one currency.\nCurrencies are defined within the Medusa backend. Currency API Routes allow admins to list and update currencies.\n", - "externalDocs": { - "description": "How to manage currencies", - "url": "https://docs.medusajs.com/modules/regions-and-currencies/admin/manage-currencies" - } - }, - { - "name": "Customer Groups", - "description": "Customer Groups can be used to organize customers that share similar data or attributes into dedicated groups.\nThis can be useful for different purposes such as setting a different price for a specific customer group.\n", - "externalDocs": { - "description": "How to manage customer groups", - "url": "https://docs.medusajs.com/modules/customers/admin/manage-customer-groups" - } - }, - { - "name": "Customers", - "description": "Customers can either be created when they register through the Store APIs, or created by the admin using the Admin APIs.\n", - "externalDocs": { - "description": "How to manage customers", - "url": "https://docs.medusajs.com/modules/customers/admin/manage-customers" - } - }, - { - "name": "Fulfillment" - }, - { - "name": "Inventory Items", - "description": "Inventory items, provided by the [Inventory Module](https://docs.medusajs.com/modules/multiwarehouse/inventory-module), can be used to manage the inventory of saleable items in your store.\n", - "externalDocs": { - "description": "How to manage inventory items", - "url": "https://docs.medusajs.com/modules/multiwarehouse/admin/manage-inventory-items" - } - }, - { - "name": "Invites", - "description": "An admin can invite new users to manage their team. This would allow new users to authenticate as admins and perform admin functionalities.\n", - "externalDocs": { - "description": "How to manage invites", - "url": "https://docs.medusajs.com/modules/users/admin/manage-invites" - } - }, - { - "name": "Payments", - "description": "A payment can be related to an order, swap, return, or more. It can be captured or refunded.\n" - }, - { - "name": "Price Lists", - "description": "A price list are special prices applied to products based on a set of conditions, such as customer group.\n", - "externalDocs": { - "description": "How to manage price lists", - "url": "https://docs.medusajs.com/modules/price-lists/admin/manage-price-lists" - } - }, - { - "name": "Pricing" - }, - { - "name": "Products", - "description": "Products are saleable items in a store. This also includes [saleable gift cards](https://docs.medusajs.com/modules/gift-cards/admin/manage-gift-cards#manage-gift-card-product) in a store.\n", - "externalDocs": { - "description": "How to manage products", - "url": "https://docs.medusajs.com/modules/products/admin/manage-products" - } - }, - { - "name": "Promotions" - }, - { - "name": "Regions", - "description": "Regions are different countries or geographical regions that the commerce store serves customers in.\nAdmins can manage these regions, their providers, and more.\n", - "externalDocs": { - "description": "How to manage regions", - "url": "https://docs.medusajs.com/modules/regions-and-currencies/admin/manage-regions" - } - }, - { - "name": "Sales Channels", - "description": "A sales channel indicates a channel where products can be sold in. For example, a webshop or a mobile app.\nAdmins can manage sales channels and the products available in them.\n", - "externalDocs": { - "description": "How to manage sales channels", - "url": "https://docs.medusajs.com/modules/sales-channels/admin/manage" - } - }, - { - "name": "Stock Locations" - }, - { - "name": "Stores" - }, - { - "name": "Tax Rates", - "description": "Each region has at least a default tax rate. Admins can create and manage additional tax rates that can be applied for certain conditions, such as for specific product types.\n", - "externalDocs": { - "description": "How to manage tax rates", - "url": "https://docs.medusajs.com/modules/taxes/admin/manage-tax-rates" - } - }, - { - "name": "Tax Regions" - }, - { - "name": "Users", - "description": "A store can have more than one user, each having the same privileges. Admins can manage users, their passwords, and more.\n", - "externalDocs": { - "description": "How to manage users", - "url": "https://docs.medusajs.com/modules/users/admin/manage-users" - } - }, - { - "name": "Workflows Executions" - } - ], - "servers": [ - { - "url": "http://localhost:9000" - }, - { - "url": "https://api.medusa-commerce.com" - } - ], - "paths": { - "/admin/api-keys": { - "get": { - "operationId": "GetApiKeys", - "summary": "List Api Keys", - "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.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/api-keys' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Api Keys" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostApiKeys", - "summary": "Create Api Key", - "description": "Create a api key.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/api-keys' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Api Keys" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/api-keys/{id}": { - "get": { - "operationId": "GetApiKeysId", - "summary": "Get a Api Key", - "description": "Retrieve a api key by its ID. You can expand the api key's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The api key's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/api-keys/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Api Keys" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostApiKeysId", - "summary": "Update a Api Key", - "description": "Update a api key's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The api key's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/api-keys/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Api Keys" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteApiKeysId", - "summary": "Delete a Api Key", - "description": "Delete a api key.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The api key's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/api-keys/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Api Keys" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/api-keys/{id}/revoke": { - "post": { - "operationId": "PostApiKeysIdRevoke", - "summary": "Add Revokes to Api Key", - "description": "Add a list of revokes to a api key.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The api key's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/api-keys/{id}/revoke' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Api Keys" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/campaigns": { - "get": { - "operationId": "GetCampaigns", - "summary": "List Campaigns", - "description": "Retrieve a list of campaigns. The campaigns can be filtered by fields such as `id`. The campaigns can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/campaigns' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Campaigns" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCampaigns", - "summary": "Create Campaign", - "description": "Create a campaign.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/campaigns' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Campaigns" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/campaigns/{id}": { - "get": { - "operationId": "GetCampaignsId", - "summary": "Get a Campaign", - "description": "Retrieve a campaign by its ID. You can expand the campaign's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The campaign's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/campaigns/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Campaigns" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCampaignsId", - "summary": "Update a Campaign", - "description": "Update a campaign's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The campaign's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostCampaignsReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/campaigns/{id}' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"name\": \"Moriah\"\n}'" - } - ], - "tags": [ - "Campaigns" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "delete": { - "operationId": "DeleteCampaignsId", - "summary": "Delete a Campaign", - "description": "Delete a campaign.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The campaign's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/campaigns/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Campaigns" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/collections": { - "get": { - "operationId": "GetCollections", - "summary": "List Collections", - "description": "Retrieve a list of collections. The collections can be filtered by fields such as `id`. The collections can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/collections' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Collections" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCollections", - "summary": "Create Collection", - "description": "Create a collection.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/collections' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Collections" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/collections/{id}": { - "get": { - "operationId": "GetCollectionsId", - "summary": "Get a Collection", - "description": "Retrieve a collection by its ID. You can expand the collection's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The collection's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/collections/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Collections" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCollectionsId", - "summary": "Update a Collection", - "description": "Update a collection's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The collection's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/collections/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Collections" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteCollectionsId", - "summary": "Delete a Collection", - "description": "Delete a collection.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The collection's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/collections/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Collections" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/currencies": { - "get": { - "operationId": "GetCurrencies", - "summary": "List Currencies", - "description": "Retrieve a list of currencies. The currencies can be filtered by fields such as `id`. The currencies can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/currencies' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Currencies" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/currencies/{code}": { - "get": { - "operationId": "GetCurrenciesCode", - "summary": "Get a Currency", - "description": "Retrieve a currency by its ID. You can expand the currency's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "code", - "in": "path", - "description": "The currency's code.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/currencies/{code}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Currencies" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/customer-groups": { - "get": { - "operationId": "GetCustomerGroups", - "summary": "List Customer Groups", - "description": "Retrieve a list of customer groups. The customer groups can be filtered by fields such as `id`. The customer groups can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/customer-groups' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customer Groups" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCustomerGroups", - "summary": "Create Customer Group", - "description": "Create a customer group.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/customer-groups' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customer Groups" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/customer-groups/{id}": { - "get": { - "operationId": "GetCustomerGroupsId", - "summary": "Get a Customer Group", - "description": "Retrieve a customer group by its ID. You can expand the customer group's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer group's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/customer-groups/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customer Groups" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCustomerGroupsId", - "summary": "Update a Customer Group", - "description": "Update a customer group's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer group's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/customer-groups/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customer Groups" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteCustomerGroupsId", - "summary": "Delete a Customer Group", - "description": "Delete a customer group.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer group's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/customer-groups/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customer Groups" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/customer-groups/{id}/customers": { - "get": { - "operationId": "GetCustomerGroupsIdCustomers", - "summary": "List Customers", - "description": "Retrieve a list of customers in a customer group. The customers can be filtered by fields like FILTER FIELDS. The customers can also be paginated.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer group's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/customer-groups/{id}/customers' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customer Groups" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/customer-groups/{id}/customers/batch": { - "post": { - "operationId": "PostCustomerGroupsIdCustomersBatch", - "summary": "Add Customers to Customer Group", - "description": "Add a list of customers to a customer group.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer group's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/customer-groups/{id}/customers/batch' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"customer_ids\": [\n {\n \"id\": \"id_dx2Wieq4uGG\"\n }\n ]\n}'" - } - ], - "tags": [ - "Customer Groups" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/customer-groups/{id}/customers/remove": { - "post": { - "operationId": "PostCustomerGroupsIdCustomersRemove", - "summary": "Add Removes to Customer Group", - "description": "Add a list of removes to a customer group.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer group's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/customer-groups/{id}/customers/remove' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"customer_ids\": [\n {\n \"id\": \"id_oAhMZi39hsjIOqPA6\"\n }\n ]\n}'" - } - ], - "tags": [ - "Customer Groups" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/customers": { - "get": { - "operationId": "GetCustomers", - "summary": "List Customers", - "description": "Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/customers' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCustomers", - "summary": "Create Customer", - "description": "Create a customer.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/customers' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/customers/{id}": { - "get": { - "operationId": "GetCustomersId", - "summary": "Get a Customer", - "description": "Retrieve a customer by its ID. You can expand the customer's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/customers/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCustomersId", - "summary": "Update a Customer", - "description": "Update a customer's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/customers/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteCustomersId", - "summary": "Delete a Customer", - "description": "Delete a customer.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/customers/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/customers/{id}/addresses": { - "get": { - "operationId": "GetCustomersIdAddresses", - "summary": "List Addresses", - "description": "Retrieve a list of addresses in a customer. The addresses can be filtered by fields like FILTER FIELDS. The addresses can also be paginated.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/customers/{id}/addresses' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCustomersIdAddresses", - "summary": "Add Addresses to Customer", - "description": "Add a list of addresses to a customer.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/customers/{id}/addresses' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/customers/{id}/addresses/{address_id}": { - "get": { - "operationId": "GetCustomersIdAddressesAddress_id", - "summary": "List Addresses", - "description": "Retrieve a list of addresses in a customer. The addresses can be filtered by fields like FILTER FIELDS. The addresses can also be paginated.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "address_id", - "in": "path", - "description": "The customer's address id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/customers/{id}/addresses/{address_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCustomersIdAddressesAddress_id", - "summary": "Add Addresses to Customer", - "description": "Add a list of addresses to a customer.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "address_id", - "in": "path", - "description": "The customer's address id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/customers/{id}/addresses/{address_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteCustomersIdAddressesAddress_id", - "summary": "Remove Addresses from Customer", - "description": "Remove a list of addresses from a customer. This doesn't delete the Address, only the association between the Address and the customer.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "address_id", - "in": "path", - "description": "The customer's address id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/customers/{id}/addresses/{address_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/fulfillment/shipping-options/{id}/rules/batch/add": { - "post": { - "operationId": "PostFulfillmentShippingOptionsIdRulesBatchAdd", - "summary": "Add Adds to Fulfillment", - "description": "Add a list of adds to a fulfillment.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The fulfillment's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchAddReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/fulfillment/shipping-options/{id}/rules/batch/add' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"rules\": [\n {\n \"attribute\": \"{value}\"\n }\n ]\n}'" - } - ], - "tags": [ - "Fulfillment" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/fulfillment/shipping-options/{id}/rules/batch/remove": { - "post": { - "operationId": "PostFulfillmentShippingOptionsIdRulesBatchRemove", - "summary": "Add Removes to Fulfillment", - "description": "Add a list of removes to a fulfillment.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The fulfillment's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/fulfillment/shipping-options/{id}/rules/batch/remove' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"rule_ids\": [\n \"{value}\"\n ]\n}'" - } - ], - "tags": [ - "Fulfillment" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/inventory-items": { - "get": { - "operationId": "GetInventoryItems", - "summary": "List Inventory Items", - "description": "Retrieve a list of inventory items. The inventory items can be filtered by fields such as `id`. The inventory items can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/inventory-items' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Inventory Items" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostInventoryItems", - "summary": "Create Inventory Item", - "description": "Create a inventory item.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostInventoryItemsReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/inventory-items' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Inventory Items" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/inventory-items/{id}": { - "get": { - "operationId": "GetInventoryItemsId", - "summary": "Get a Inventory Item", - "description": "Retrieve a inventory item by its ID. You can expand the inventory item's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The inventory item's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/inventory-items/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Inventory Items" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostInventoryItemsId", - "summary": "Update a Inventory Item", - "description": "Update a inventory item's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The inventory item's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostInventoryItemsInventoryItemReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/inventory-items/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Inventory Items" - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "delete": { - "operationId": "DeleteInventoryItemsId", - "summary": "Delete a Inventory Item", - "description": "Delete a inventory item.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The inventory item's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/inventory-items/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Inventory Items" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/inventory-items/{id}/location-levels": { - "post": { - "operationId": "PostInventoryItemsIdLocationLevels", - "summary": "Add Location Levels to Inventory Item", - "description": "Add a list of location levels to a inventory item.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The inventory item's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"location_id\": \"{value}\",\n \"stocked_quantity\": 1506469662949376\n}'" - } - ], - "tags": [ - "Inventory Items" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/inventory-items/{id}/location-levels/{location_id}": { - "post": { - "operationId": "PostInventoryItemsIdLocationLevelsLocation_id", - "summary": "Add Location Levels to Inventory Item", - "description": "Add a list of location levels to a inventory item.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The inventory item's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location_id", - "in": "path", - "description": "The inventory item's location id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Inventory Items" - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "delete": { - "operationId": "DeleteInventoryItemsIdLocationLevelsLocation_id", - "summary": "Remove Location Levels from Inventory Item", - "description": "Remove a list of location levels from a inventory item. This doesn't delete the Location Level, only the association between the Location Level and the inventory item.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The inventory item's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location_id", - "in": "path", - "description": "The inventory item's location id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Inventory Items" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/invites": { - "get": { - "operationId": "GetInvites", - "summary": "List Invites", - "description": "Retrieve a list of invites. The invites can be filtered by fields such as `id`. The invites can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/invites' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Invites" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostInvites", - "summary": "Create Invite", - "description": "Create a invite.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/invites' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Invites" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/invites/accept": { - "post": { - "operationId": "PostInvitesAccept", - "summary": "Create Invite", - "description": "Create a invite.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostInvitesInviteAcceptReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/invites/accept' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"first_name\": \"{value}\",\n \"last_name\": \"{value}\"\n}'" - } - ], - "tags": [ - "Invites" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/invites/{id}": { - "get": { - "operationId": "GetInvitesId", - "summary": "Get a Invite", - "description": "Retrieve a invite by its ID. You can expand the invite's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The invite's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/invites/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Invites" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteInvitesId", - "summary": "Delete a Invite", - "description": "Delete a invite.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The invite's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/invites/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Invites" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/invites/{id}/resend": { - "post": { - "operationId": "PostInvitesIdResend", - "summary": "Add Resends to Invite", - "description": "Add a list of resends to a invite.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The invite's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/invites/{id}/resend' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Invites" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/payments": { - "get": { - "operationId": "GetPayments", - "summary": "List Payments", - "description": "Retrieve a list of payments. The payments can be filtered by fields such as `id`. The payments can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/payments' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Payments" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/payments/{id}": { - "get": { - "operationId": "GetPaymentsId", - "summary": "Get a Payment", - "description": "Retrieve a payment by its ID. You can expand the payment's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The payment's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/payments/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Payments" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/payments/{id}/capture": { - "post": { - "operationId": "PostPaymentsIdCapture", - "summary": "Add Captures to Payment", - "description": "Add a list of captures to a payment.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The payment's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPaymentsCapturesReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/payments/{id}/capture' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Payments" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/payments/{id}/refund": { - "post": { - "operationId": "PostPaymentsIdRefund", - "summary": "Add Refunds to Payment", - "description": "Add a list of refunds to a payment.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The payment's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPaymentsRefundsReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/payments/{id}/refund' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Payments" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/price-lists": { - "get": { - "operationId": "GetPriceLists", - "summary": "List Price Lists", - "description": "Retrieve a list of price lists. The price lists can be filtered by fields such as `id`. The price lists can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/price-lists' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Price Lists" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostPriceLists", - "summary": "Create Price List", - "description": "Create a price list.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPriceListsReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/price-lists' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"title\": \"{value}\",\n \"description\": \"{value}\",\n \"prices\": [\n {\n \"currency_code\": \"{value}\",\n \"amount\": 1270314195484672,\n \"variant_id\": \"{value}\"\n }\n ]\n}'" - } - ], - "tags": [ - "Price Lists" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/price-lists/{id}": { - "get": { - "operationId": "GetPriceListsId", - "summary": "Get a Price List", - "description": "Retrieve a price list by its ID. You can expand the price list's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The price list's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/price-lists/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Price Lists" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostPriceListsId", - "summary": "Update a Price List", - "description": "Update a price list's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The price list's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPriceListsPriceListReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/price-lists/{id}' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"prices\": [\n {\n \"currency_code\": \"{value}\",\n \"amount\": 1670236243755008,\n \"variant_id\": \"{value}\"\n }\n ]\n}'" - } - ], - "tags": [ - "Price Lists" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "delete": { - "operationId": "DeletePriceListsId", - "summary": "Delete a Price List", - "description": "Delete a price list.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The price list's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/price-lists/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Price Lists" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/price-lists/{id}/prices/batch/add": { - "post": { - "operationId": "PostPriceListsIdPricesBatchAdd", - "summary": "Add Adds to Price List", - "description": "Add a list of adds to a price list.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The price list's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPriceListsPriceListPricesBatchAddReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/price-lists/{id}/prices/batch/add' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"prices\": [\n {\n \"currency_code\": \"{value}\",\n \"amount\": 6595965345595392,\n \"variant_id\": \"{value}\"\n }\n ]\n}'" - } - ], - "tags": [ - "Price Lists" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/price-lists/{id}/prices/batch/remove": { - "post": { - "operationId": "PostPriceListsIdPricesBatchRemove", - "summary": "Add Removes to Price List", - "description": "Add a list of removes to a price list.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The price list's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPriceListsPriceListPricesBatchRemoveReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/price-lists/{id}/prices/batch/remove' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"ids\": [\n \"{value}\"\n ]\n}'" - } - ], - "tags": [ - "Price Lists" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/pricing/rule-types": { - "get": { - "operationId": "GetPricingRuleTypes", - "summary": "List Pricing", - "description": "Retrieve a list of pricing. The pricing can be filtered by fields such as `id`. The pricing can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminGetPricingRuleTypesParams" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/pricing/rule-types' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Pricing" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "post": { - "operationId": "PostPricingRuleTypes", - "summary": "Create Pricing", - "description": "Create a pricing.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPricingRuleTypesReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/pricing/rule-types' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"name\": \"Thurman\",\n \"rule_attribute\": \"{value}\",\n \"default_priority\": 4640267816665088\n}'" - } - ], - "tags": [ - "Pricing" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/pricing/rule-types/{id}": { - "get": { - "operationId": "GetPricingRuleTypesId", - "summary": "List Rule Types", - "description": "Retrieve a list of rule types in a pricing. The rule types can be filtered by fields like FILTER FIELDS. The rule types can also be paginated.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The pricing's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminGetPricingRuleTypesRuleTypeParams" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/pricing/rule-types/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Pricing" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "post": { - "operationId": "PostPricingRuleTypesId", - "summary": "Add Rule Types to Pricing", - "description": "Add a list of rule types to a pricing.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The pricing's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPricingRuleTypesRuleTypeReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/pricing/rule-types/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Pricing" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "delete": { - "operationId": "DeletePricingRuleTypesId", - "summary": "Remove Rule Types from Pricing", - "description": "Remove a list of rule types from a pricing. This doesn't delete the Rule Type, only the association between the Rule Type and the pricing.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The pricing's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminDeletePricingRuleTypesRuleTypeReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/pricing/rule-types/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Pricing" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/products": { - "get": { - "operationId": "GetProducts", - "summary": "List Products", - "description": "Retrieve a list of products. The products can be filtered by fields such as `id`. The products can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminGetProductsParams" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/products' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "post": { - "operationId": "PostProducts", - "summary": "Create Product", - "description": "Create a product.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/products' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/products/{id}": { - "get": { - "operationId": "GetProductsId", - "summary": "Get a Product", - "description": "Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/products/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostProductsId", - "summary": "Update a Product", - "description": "Update a product's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/products/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteProductsId", - "summary": "Delete a Product", - "description": "Delete a product.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/products/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/products/{id}/options": { - "get": { - "operationId": "GetProductsIdOptions", - "summary": "List Options", - "description": "Retrieve a list of options in a product. The options can be filtered by fields like FILTER FIELDS. The options can also be paginated.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/products/{id}/options' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostProductsIdOptions", - "summary": "Add Options to Product", - "description": "Add a list of options to a product.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/products/{id}/options' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/products/{id}/options/{option_id}": { - "get": { - "operationId": "GetProductsIdOptionsOption_id", - "summary": "List Options", - "description": "Retrieve a list of options in a product. The options can be filtered by fields like FILTER FIELDS. The options can also be paginated.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "option_id", - "in": "path", - "description": "The product's option id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/products/{id}/options/{option_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostProductsIdOptionsOption_id", - "summary": "Add Options to Product", - "description": "Add a list of options to a product.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "option_id", - "in": "path", - "description": "The product's option id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/products/{id}/options/{option_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteProductsIdOptionsOption_id", - "summary": "Remove Options from Product", - "description": "Remove a list of options from a product. This doesn't delete the Option, only the association between the Option and the product.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "option_id", - "in": "path", - "description": "The product's option id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/products/{id}/options/{option_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/products/{id}/variants": { - "get": { - "operationId": "GetProductsIdVariants", - "summary": "List Variants", - "description": "Retrieve a list of variants in a product. The variants can be filtered by fields like FILTER FIELDS. The variants can also be paginated.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/products/{id}/variants' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostProductsIdVariants", - "summary": "Add Variants to Product", - "description": "Add a list of variants to a product.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/products/{id}/variants' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/products/{id}/variants/{variant_id}": { - "get": { - "operationId": "GetProductsIdVariantsVariant_id", - "summary": "List Variants", - "description": "Retrieve a list of variants in a product. The variants can be filtered by fields like FILTER FIELDS. The variants can also be paginated.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "variant_id", - "in": "path", - "description": "The product's variant id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/products/{id}/variants/{variant_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostProductsIdVariantsVariant_id", - "summary": "Add Variants to Product", - "description": "Add a list of variants to a product.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "variant_id", - "in": "path", - "description": "The product's variant id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/products/{id}/variants/{variant_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteProductsIdVariantsVariant_id", - "summary": "Remove Variants from Product", - "description": "Remove a list of variants from a product. This doesn't delete the Variant, only the association between the Variant and the product.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "variant_id", - "in": "path", - "description": "The product's variant id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/products/{id}/variants/{variant_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Products" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/promotions": { - "get": { - "operationId": "GetPromotions", - "summary": "List Promotions", - "description": "Retrieve a list of promotions. The promotions can be filtered by fields such as `id`. The promotions can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/promotions' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostPromotions", - "summary": "Create Promotion", - "description": "Create a promotion.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/promotions' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/promotions/{id}": { - "get": { - "operationId": "GetPromotionsId", - "summary": "Get a Promotion", - "description": "Retrieve a promotion by its ID. You can expand the promotion's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The promotion's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminGetPromotionsParams" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/promotions/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "post": { - "operationId": "PostPromotionsId", - "summary": "Update a Promotion", - "description": "Update a promotion's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The promotion's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPromotionsPromotionReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/promotions/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "delete": { - "operationId": "DeletePromotionsId", - "summary": "Delete a Promotion", - "description": "Delete a promotion.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The promotion's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/promotions/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/promotions/{id}/buy-rules/batch/add": { - "post": { - "operationId": "PostPromotionsIdBuyRulesBatchAdd", - "summary": "Add Adds to Promotion", - "description": "Add a list of adds to a promotion.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The promotion's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/promotions/{id}/buy-rules/batch/add' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"rules\": [\n {\n \"attribute\": \"{value}\",\n \"values\": [\n \"{value}\"\n ]\n }\n ]\n}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/promotions/{id}/buy-rules/batch/remove": { - "post": { - "operationId": "PostPromotionsIdBuyRulesBatchRemove", - "summary": "Add Removes to Promotion", - "description": "Add a list of removes to a promotion.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The promotion's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/promotions/{id}/buy-rules/batch/remove' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"rule_ids\": [\n \"{value}\"\n ]\n}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/promotions/{id}/rules/batch/add": { - "post": { - "operationId": "PostPromotionsIdRulesBatchAdd", - "summary": "Add Adds to Promotion", - "description": "Add a list of adds to a promotion.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The promotion's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/promotions/{id}/rules/batch/add' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"rules\": [\n {\n \"attribute\": \"{value}\",\n \"values\": [\n \"{value}\"\n ]\n }\n ]\n}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/promotions/{id}/rules/batch/remove": { - "post": { - "operationId": "PostPromotionsIdRulesBatchRemove", - "summary": "Add Removes to Promotion", - "description": "Add a list of removes to a promotion.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The promotion's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/promotions/{id}/rules/batch/remove' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"rule_ids\": [\n \"{value}\"\n ]\n}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/promotions/{id}/rules/batch/update": { - "post": { - "operationId": "PostPromotionsIdRulesBatchUpdate", - "summary": "Add Updates to Promotion", - "description": "Add a list of updates to a promotion.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The promotion's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPromotionsPromotionRulesBatchUpdateReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/promotions/{id}/rules/batch/update' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"rules\": [\n {\n \"id\": \"id_orjnxCxIQlJAp4\",\n \"attribute\": \"{value}\",\n \"values\": [\n \"{value}\"\n ]\n }\n ]\n}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/promotions/{id}/target-rules/batch/add": { - "post": { - "operationId": "PostPromotionsIdTargetRulesBatchAdd", - "summary": "Add Adds to Promotion", - "description": "Add a list of adds to a promotion.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The promotion's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/promotions/{id}/target-rules/batch/add' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"rules\": [\n {\n \"attribute\": \"{value}\",\n \"values\": [\n \"{value}\"\n ]\n }\n ]\n}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/promotions/{id}/target-rules/batch/remove": { - "post": { - "operationId": "PostPromotionsIdTargetRulesBatchRemove", - "summary": "Add Removes to Promotion", - "description": "Add a list of removes to a promotion.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The promotion's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/promotions/{id}/target-rules/batch/remove' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"rule_ids\": [\n \"{value}\"\n ]\n}'" - } - ], - "tags": [ - "Promotions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/regions": { - "get": { - "operationId": "GetRegions", - "summary": "List Regions", - "description": "Retrieve a list of regions. The regions can be filtered by fields such as `id`. The regions can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/regions' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Regions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostRegions", - "summary": "Create Region", - "description": "Create a region.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/regions' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Regions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/regions/{id}": { - "get": { - "operationId": "GetRegionsId", - "summary": "Get a Region", - "description": "Retrieve a region by its ID. You can expand the region's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The region's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/regions/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Regions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostRegionsId", - "summary": "Update a Region", - "description": "Update a region's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The region's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/regions/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Regions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteRegionsId", - "summary": "Delete a Region", - "description": "Delete a region.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The region's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/regions/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Regions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/sales-channels": { - "get": { - "operationId": "GetSalesChannels", - "summary": "List Sales Channels", - "description": "Retrieve a list of sales channels. The sales channels can be filtered by fields such as `id`. The sales channels can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/sales-channels' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Sales Channels" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostSalesChannels", - "summary": "Create Sales Channel", - "description": "Create a sales channel.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/sales-channels' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Sales Channels" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/sales-channels/{id}": { - "get": { - "operationId": "GetSalesChannelsId", - "summary": "Get a Sales Channel", - "description": "Retrieve a sales channel by its ID. You can expand the sales channel's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The sales channel's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/sales-channels/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Sales Channels" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostSalesChannelsId", - "summary": "Update a Sales Channel", - "description": "Update a sales channel's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The sales channel's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/sales-channels/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Sales Channels" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteSalesChannelsId", - "summary": "Delete a Sales Channel", - "description": "Delete a sales channel.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The sales channel's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/sales-channels/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Sales Channels" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/sales-channels/{id}/products/batch/add": { - "post": { - "operationId": "PostSalesChannelsIdProductsBatchAdd", - "summary": "Add Adds to Sales Channel", - "description": "Add a list of adds to a sales channel.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The sales channel's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/sales-channels/{id}/products/batch/add' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Sales Channels" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/stock-locations": { - "post": { - "operationId": "PostStockLocations", - "summary": "Create Stock Location", - "description": "Create a stock location.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostStockLocationsReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/stock-locations' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"name\": \"Dorthy\"\n}'" - } - ], - "tags": [ - "Stock Locations" - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/stock-locations/{id}": { - "get": { - "operationId": "GetStockLocationsId", - "summary": "Get a Stock Location", - "description": "Retrieve a stock location by its ID. You can expand the stock location's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The stock location's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/stock-locations/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Stock Locations" - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "delete": { - "operationId": "DeleteStockLocationsId", - "summary": "Delete a Stock Location", - "description": "Delete a stock location.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The stock location's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/stock-locations/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Stock Locations" - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/stores": { - "get": { - "operationId": "GetStores", - "summary": "List Stores", - "description": "Retrieve a list of stores. The stores can be filtered by fields such as `id`. The stores can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/stores' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Stores" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/stores/{id}": { - "get": { - "operationId": "GetStoresId", - "summary": "Get a Store", - "description": "Retrieve a store by its ID. You can expand the store's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The store's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/stores/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Stores" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostStoresId", - "summary": "Update a Store", - "description": "Update a store's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The store's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/stores/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Stores" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/tax-rates": { - "get": { - "operationId": "GetTaxRates", - "summary": "List Tax Rates", - "description": "Retrieve a list of tax rates. The tax rates can be filtered by fields such as `id`. The tax rates can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/tax-rates' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Tax Rates" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostTaxRates", - "summary": "Create Tax Rate", - "description": "Create a tax rate.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostTaxRatesReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/tax-rates' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"name\": \"Emilio\",\n \"tax_region_id\": \"{value}\"\n}'" - } - ], - "tags": [ - "Tax Rates" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/tax-rates/{id}": { - "get": { - "operationId": "GetTaxRatesId", - "summary": "Get a Tax Rate", - "description": "Retrieve a tax rate by its ID. You can expand the tax rate's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The tax rate's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/tax-rates/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Tax Rates" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostTaxRatesId", - "summary": "Update a Tax Rate", - "description": "Update a tax rate's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The tax rate's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostTaxRatesTaxRateReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/tax-rates/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Tax Rates" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "delete": { - "operationId": "DeleteTaxRatesId", - "summary": "Delete a Tax Rate", - "description": "Delete a tax rate.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The tax rate's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/tax-rates/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Tax Rates" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/tax-rates/{id}/rules": { - "post": { - "operationId": "PostTaxRatesIdRules", - "summary": "Add Rules to Tax Rate", - "description": "Add a list of rules to a tax rate.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The tax rate's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostTaxRatesTaxRateRulesReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/tax-rates/{id}/rules' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"reference\": \"{value}\",\n \"reference_id\": \"{value}\"\n}'" - } - ], - "tags": [ - "Tax Rates" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/tax-rates/{id}/rules/{rule_id}": { - "delete": { - "operationId": "DeleteTaxRatesIdRulesRule_id", - "summary": "Remove Rules from Tax Rate", - "description": "Remove a list of rules from a tax rate. This doesn't delete the Rule, only the association between the Rule and the tax rate.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The tax rate's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "rule_id", - "in": "path", - "description": "The tax rate's rule id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/tax-rates/{id}/rules/{rule_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Tax Rates" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/tax-regions": { - "post": { - "operationId": "PostTaxRegions", - "summary": "Create Tax Region", - "description": "Create a tax region.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostTaxRegionsReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/tax-regions' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"country_code\": \"{value}\"\n}'" - } - ], - "tags": [ - "Tax Regions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/tax-regions/{id}": { - "delete": { - "operationId": "DeleteTaxRegionsId", - "summary": "Delete a Tax Region", - "description": "Delete a tax region.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The tax region's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/tax-regions/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Tax Regions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/users": { - "get": { - "operationId": "GetUsers", - "summary": "List Users", - "description": "Retrieve a list of users. The users can be filtered by fields such as `id`. The users can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/users' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Users" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostUsers", - "summary": "Create User", - "description": "Create a user.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/users' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Users" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/users/me": { - "get": { - "operationId": "GetUsersMe", - "summary": "List Users", - "description": "Retrieve a list of users. The users can be filtered by fields such as `id`. The users can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/users/me' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Users" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/users/{id}": { - "get": { - "operationId": "GetUsersId", - "summary": "Get a User", - "description": "Retrieve a user by its ID. You can expand the user's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The user's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/users/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Users" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostUsersId", - "summary": "Update a User", - "description": "Update a user's details.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The user's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminUpdateUserRequest" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/users/{id}' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"avatar_url\": \"{value}\"\n}'" - } - ], - "tags": [ - "Users" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - }, - "delete": { - "operationId": "DeleteUsersId", - "summary": "Delete a User", - "description": "Delete a user.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The user's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/admin/users/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Users" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/workflows-executions": { - "get": { - "operationId": "GetWorkflowsExecutions", - "summary": "List Workflows Executions", - "description": "Retrieve a list of workflows executions. The workflows executions can be filtered by fields such as `id`. The workflows executions can also be sorted or paginated.", - "x-authenticated": true, - "parameters": [], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/workflows-executions' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Workflows Executions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/workflows-executions/{id}": { - "get": { - "operationId": "GetWorkflowsExecutionsId", - "summary": "Get a Workflows Execution", - "description": "Retrieve a workflows execution by its ID. You can expand the workflows execution's relations or select the fields that should be returned.", - "x-authenticated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The workflows execution's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/workflows-executions/{id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Workflows Executions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/workflows-executions/{workflow_id}/run": { - "post": { - "operationId": "PostWorkflowsExecutionsWorkflow_idRun", - "summary": "Add Runs to Workflows Execution", - "description": "Add a list of runs to a workflows execution.", - "x-authenticated": true, - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "description": "The workflows execution's workflow id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostWorkflowsRunReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/run' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Workflows Executions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/workflows-executions/{workflow_id}/steps/failure": { - "post": { - "operationId": "PostWorkflowsExecutionsWorkflow_idStepsFailure", - "summary": "Add Failures to Workflows Execution", - "description": "Add a list of failures to a workflows execution.", - "x-authenticated": true, - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "description": "The workflows execution's workflow id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostWorkflowsAsyncResponseReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/steps/failure' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"transaction_id\": \"{value}\",\n \"step_id\": \"{value}\"\n}'" - } - ], - "tags": [ - "Workflows Executions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/workflows-executions/{workflow_id}/steps/success": { - "post": { - "operationId": "PostWorkflowsExecutionsWorkflow_idStepsSuccess", - "summary": "Add Successes to Workflows Execution", - "description": "Add a list of successes to a workflows execution.", - "x-authenticated": true, - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "description": "The workflows execution's workflow id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminPostWorkflowsAsyncResponseReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/steps/success' \\\n-H 'x-medusa-access-token: {api_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"transaction_id\": \"{value}\",\n \"step_id\": \"{value}\"\n}'" - } - ], - "tags": [ - "Workflows Executions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/admin/workflows-executions/{workflow_id}/subscribe": { - "get": { - "operationId": "GetWorkflowsExecutionsWorkflow_idSubscribe", - "summary": "List Subscribes", - "description": "Retrieve a list of subscribes in a workflows execution. The subscribes can be filtered by fields like FILTER FIELDS. The subscribes can also be paginated.", - "x-authenticated": true, - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "description": "The workflows execution's workflow id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/workflows-executions/{workflow_id}/subscribe' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Workflows Executions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/workflows-executions/{workflow_id}/{transaction_id}": { - "get": { - "operationId": "GetWorkflowsExecutionsWorkflow_idTransaction_id", - "summary": "List ", - "description": "Retrieve a list of in a workflows execution. The can be filtered by fields like FILTER FIELDS. The can also be paginated.", - "x-authenticated": true, - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "description": "The workflows execution's workflow id.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "transaction_id", - "in": "path", - "description": "The workflows execution's transaction id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/workflows-executions/{workflow_id}/{transaction_id}' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Workflows Executions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/admin/workflows-executions/{workflow_id}/{transaction_id}/{step_id}/subscribe": { - "get": { - "operationId": "GetWorkflowsExecutionsWorkflow_idTransaction_idStep_idSubscribe", - "summary": "List Subscribes", - "description": "Retrieve a list of subscribes in a workflows execution. The subscribes can be filtered by fields like FILTER FIELDS. The subscribes can also be paginated.", - "x-authenticated": true, - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "description": "The workflows execution's workflow id.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "transaction_id", - "in": "path", - "description": "The workflows execution's transaction id.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "step_id", - "in": "path", - "description": "The workflows execution's step id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "api_token": [] - }, - { - "cookie_auth": [] - }, - { - "jwt_token": [] - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/admin/workflows-executions/{workflow_id}/{transaction_id}/{step_id}/subscribe' \\\n-H 'x-medusa-access-token: {api_token}'" - } - ], - "tags": [ - "Workflows Executions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "components": { - "responses": { - "default_error": { - "description": "Default Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "example": { - "code": "unknown_error", - "message": "An unknown error occurred.", - "type": "unknown_error" - } - } - } - }, - "invalid_state_error": { - "description": "Invalid State Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "example": { - "code": "unknown_error", - "message": "The request conflicted with another request. You may retry the request with the provided Idempotency-Key.", - "type": "QueryRunnerAlreadyReleasedError" - } - } - } - }, - "invalid_request_error": { - "description": "Invalid Request Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "example": { - "code": "invalid_request_error", - "message": "Discount with code TEST already exists.", - "type": "duplicate_error" - } - } - } - }, - "not_found_error": { - "description": "Not Found Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "example": { - "message": "Entity with id 1 was not found", - "type": "not_found" - } - } - } - }, - "400_error": { - "description": "Client Error or Multiple Errors", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Error" - }, - { - "$ref": "#/components/schemas/MultipleErrors" - } - ] - }, - "examples": { - "not_allowed": { - "$ref": "#/components/examples/not_allowed_error" - }, - "invalid_data": { - "$ref": "#/components/examples/invalid_data_error" - }, - "MultipleErrors": { - "$ref": "#/components/examples/multiple_errors" - } - } - } - } - }, - "500_error": { - "description": "Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "database": { - "$ref": "#/components/examples/database_error" - }, - "unexpected_state": { - "$ref": "#/components/examples/unexpected_state_error" - }, - "invalid_argument": { - "$ref": "#/components/examples/invalid_argument_error" - }, - "default_error": { - "$ref": "#/components/examples/default_error" - } - } - } - } - }, - "unauthorized": { - "description": "User is not authorized. Must log in first", - "content": { - "text/plain": { - "schema": { - "type": "string", - "default": "Unauthorized", - "example": "Unauthorized" - } - } - } - }, - "incorrect_credentials": { - "description": "User does not exist or incorrect credentials", - "content": { - "text/plain": { - "schema": { - "type": "string", - "default": "Unauthorized", - "example": "Unauthorized" - } - } - } - } - }, - "examples": { - "not_allowed_error": { - "summary": "Not Allowed Error", - "value": { - "message": "Discount must be set to dynamic", - "type": "not_allowed" - } - }, - "invalid_data_error": { - "summary": "Invalid Data Error", - "value": { - "message": "first_name must be a string", - "type": "invalid_data" - } - }, - "multiple_errors": { - "summary": "Multiple Errors", - "value": { - "message": "Provided request body contains errors. Please check the data and retry the request", - "errors": [ - { - "message": "first_name must be a string", - "type": "invalid_data" - }, - { - "message": "Discount must be set to dynamic", - "type": "not_allowed" - } - ] - } - }, - "database_error": { - "summary": "Database Error", - "value": { - "code": "api_error", - "message": "An error occured while hashing password", - "type": "database_error" - } - }, - "unexpected_state_error": { - "summary": "Unexpected State Error", - "value": { - "message": "cart.total must be defined", - "type": "unexpected_state" - } - }, - "invalid_argument_error": { - "summary": "Invalid Argument Error", - "value": { - "message": "cart.total must be defined", - "type": "unexpected_state" - } - }, - "default_error": { - "summary": "Default Error", - "value": { - "code": "unknown_error", - "message": "An unknown error occurred.", - "type": "unknown_error" - } - } - }, - "securitySchemes": { - "api_token": { - "type": "apiKey", - "x-displayName": "API Token", - "in": "header", - "name": "x-medusa-access-token" - }, - "jwt_token": { - "type": "http", - "x-displayName": "JWT Token", - "scheme": "bearer" - }, - "cookie_auth": { - "type": "apiKey", - "in": "cookie", - "name": "connect.sid", - "x-displayName": "Cookie Session ID" - } - }, - "schemas": { - "AdminDeletePricingRuleTypesRuleTypeReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminDeletePricingRuleTypesRuleTypeReq", - "properties": {} - }, - "AdminGetPricingRuleTypesParams": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminGetPricingRuleTypesParams", - "properties": { - "rule_attribute": { - "type": "array", - "description": "The pricing's rule attribute.", - "items": { - "type": "string", - "title": "rule_attribute", - "description": "The rule attribute's details." - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The pricing's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The pricing's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The pricing's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The pricing's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The pricing's order." - } - } - }, - "AdminGetPricingRuleTypesRuleTypeParams": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminGetPricingRuleTypesRuleTypeParams", - "properties": { - "expand": { - "type": "string", - "title": "expand", - "description": "The pricing's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The pricing's fields." - } - } - }, - "AdminGetProductsParams": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The product's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The product's ID." - }, - { - "type": "array", - "description": "The product's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The product's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The product's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The product's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The product's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The product's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The product's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The product's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The product's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The product's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The product's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The product's $and.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $and's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $and's ID." - }, - { - "type": "array", - "description": "The $and's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $and's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $and's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $and's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $and's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $and's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $and's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $and's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $and's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $and's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $and's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $and's details.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $and's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $and's ID." - }, - { - "type": "array", - "description": "The $and's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $and's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $and's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $and's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $and's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $and's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $and's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $and's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $and's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $and's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $and's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $and's details.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "$or": { - "type": "array", - "description": "The $and's $or.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $and's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $and's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $and's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $and's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $and's order." - } - } - } - }, - "$or": { - "type": "array", - "description": "The $and's $or.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $or's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $or's ID." - }, - { - "type": "array", - "description": "The $or's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $or's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $or's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $or's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $or's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $or's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $or's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $or's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $or's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $or's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $or's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $or's $and.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "$or": { - "type": "array", - "description": "The $or's details.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $or's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $or's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $or's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $or's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $or's order." - } - } - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $and's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $and's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $and's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $and's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $and's order." - } - } - } - }, - "$or": { - "type": "array", - "description": "The product's $or.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $or's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $or's ID." - }, - { - "type": "array", - "description": "The $or's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $or's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $or's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $or's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $or's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $or's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $or's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $or's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $or's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $or's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $or's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $or's $and.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $and's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $and's ID." - }, - { - "type": "array", - "description": "The $and's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $and's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $and's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $and's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $and's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $and's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $and's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $and's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $and's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $and's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $and's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $and's details.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "$or": { - "type": "array", - "description": "The $and's $or.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $and's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $and's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $and's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $and's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $and's order." - } - } - } - }, - "$or": { - "type": "array", - "description": "The $or's details.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $or's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $or's ID." - }, - { - "type": "array", - "description": "The $or's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $or's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $or's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $or's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $or's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $or's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $or's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $or's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $or's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $or's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $or's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $or's $and.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "$or": { - "type": "array", - "description": "The $or's details.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $or's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $or's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $or's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $or's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $or's order." - } - } - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $or's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $or's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $or's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $or's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $or's order." - } - } - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The product's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The product's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The product's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The product's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The product's order." - } - } - }, - "AdminGetPromotionsParams": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminGetPromotionsParams", - "properties": { - "code": { - "type": "string", - "title": "code", - "description": "The promotion's code." - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The promotion's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The promotion's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The promotion's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The promotion's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The promotion's order." - } - } - }, - "AdminPostCampaignsReq": { - "type": "object", - "description": "The promotion's campaign.", - "x-schemaName": "AdminPostCampaignsReq", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "title": "name", - "description": "The campaign's name." - }, - "campaign_identifier": { - "type": "string", - "title": "campaign_identifier", - "description": "The campaign's campaign identifier." - }, - "description": { - "type": "string", - "title": "description", - "description": "The campaign's description." - }, - "currency": { - "type": "string", - "title": "currency", - "description": "The campaign's currency." - }, - "budget": { - "$ref": "#/components/schemas/CampaignBudget" - }, - "starts_at": { - "type": "string", - "title": "starts_at", - "description": "The campaign's starts at." - }, - "ends_at": { - "type": "string", - "title": "ends_at", - "description": "The campaign's ends at." - }, - "promotions": { - "type": "array", - "description": "The campaign's promotions.", - "items": { - "type": "object", - "description": "The promotion's promotions.", - "x-schemaName": "IdObject", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "title": "id", - "description": "The promotion's ID." - } - } - } - } - } - }, - "AdminPostCustomerGroupsGroupCustomersBatchReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostCustomerGroupsGroupCustomersBatchReq", - "required": [ - "customer_ids" - ], - "properties": { - "customer_ids": { - "type": "array", - "description": "The customer group's customer ids.", - "items": { - "type": "object", - "description": "The customer id's customer ids.", - "x-schemaName": "CustomerGroupsBatchCustomer", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "title": "id", - "description": "The customer id's ID." - } - } - } - } - } - }, - "AdminPostFulfillmentShippingOptionsRulesBatchAddReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostFulfillmentShippingOptionsRulesBatchAddReq", - "required": [ - "rules" - ], - "properties": { - "rules": { - "type": "array", - "description": "The fulfillment's rules.", - "items": { - "type": "object", - "description": "The rule's rules.", - "x-schemaName": "FulfillmentRuleCreate", - "required": [ - "operator", - "attribute", - "value" - ], - "properties": { - "operator": {}, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The rule's attribute." - }, - "value": { - "oneOf": [ - { - "type": "string", - "title": "value", - "description": "The rule's value." - }, - { - "type": "array", - "description": "The rule's value.", - "items": { - "type": "string", - "title": "value", - "description": "The value's details." - } - } - ] - } - } - } - } - } - }, - "AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq", - "required": [ - "rule_ids" - ], - "properties": { - "rule_ids": { - "type": "array", - "description": "The fulfillment's rule ids.", - "items": { - "type": "string", - "title": "rule_ids", - "description": "The rule id's rule ids." - } - } - } - }, - "AdminPostInventoryItemsInventoryItemReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostInventoryItemsInventoryItemReq", - "properties": { - "sku": { - "type": "string", - "title": "sku", - "description": "The inventory item's sku." - }, - "origin_country": { - "type": "string", - "title": "origin_country", - "description": "The inventory item's origin country." - }, - "hs_code": { - "type": "string", - "title": "hs_code", - "description": "The inventory item's hs code." - }, - "mid_code": { - "type": "string", - "title": "mid_code", - "description": "The inventory item's mid code." - }, - "material": { - "type": "string", - "title": "material", - "description": "The inventory item's material." - }, - "weight": { - "type": "number", - "title": "weight", - "description": "The inventory item's weight." - }, - "height": { - "type": "number", - "title": "height", - "description": "The inventory item's height." - }, - "length": { - "type": "number", - "title": "length", - "description": "The inventory item's length." - }, - "width": { - "type": "number", - "title": "width", - "description": "The inventory item's width." - }, - "title": { - "type": "string", - "title": "title", - "description": "The inventory item's title." - }, - "description": { - "type": "string", - "title": "description", - "description": "The inventory item's description." - }, - "thumbnail": { - "type": "string", - "title": "thumbnail", - "description": "The inventory item's thumbnail." - }, - "requires_shipping": { - "type": "boolean", - "title": "requires_shipping", - "description": "The inventory item's requires shipping." - } - } - }, - "AdminPostInventoryItemsItemLocationLevelsLevelReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostInventoryItemsItemLocationLevelsLevelReq", - "properties": { - "incoming_quantity": { - "type": "number", - "title": "incoming_quantity", - "description": "The inventory item's incoming quantity." - }, - "stocked_quantity": { - "type": "number", - "title": "stocked_quantity", - "description": "The inventory item's stocked quantity." - } - } - }, - "AdminPostInventoryItemsItemLocationLevelsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostInventoryItemsItemLocationLevelsReq", - "required": [ - "location_id", - "stocked_quantity" - ], - "properties": { - "location_id": { - "type": "string", - "title": "location_id", - "description": "The inventory item's location id." - }, - "stocked_quantity": { - "type": "number", - "title": "stocked_quantity", - "description": "The inventory item's stocked quantity." - }, - "incoming_quantity": { - "type": "number", - "title": "incoming_quantity", - "description": "The inventory item's incoming quantity." - } - } - }, - "AdminPostInventoryItemsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostInventoryItemsReq", - "properties": { - "sku": { - "type": "string", - "title": "sku", - "description": "The inventory item's sku." - }, - "hs_code": { - "type": "string", - "title": "hs_code", - "description": "The inventory item's hs code." - }, - "weight": { - "type": "number", - "title": "weight", - "description": "The inventory item's weight." - }, - "length": { - "type": "number", - "title": "length", - "description": "The inventory item's length." - }, - "height": { - "type": "number", - "title": "height", - "description": "The inventory item's height." - }, - "width": { - "type": "number", - "title": "width", - "description": "The inventory item's width." - }, - "origin_country": { - "type": "string", - "title": "origin_country", - "description": "The inventory item's origin country." - }, - "mid_code": { - "type": "string", - "title": "mid_code", - "description": "The inventory item's mid code." - }, - "material": { - "type": "string", - "title": "material", - "description": "The inventory item's material." - }, - "title": { - "type": "string", - "title": "title", - "description": "The inventory item's title." - }, - "description": { - "type": "string", - "title": "description", - "description": "The inventory item's description." - }, - "thumbnail": { - "type": "string", - "title": "thumbnail", - "description": "The inventory item's thumbnail." - }, - "metadata": { - "type": "object", - "description": "The inventory item's metadata.", - "properties": {} - } - } - }, - "AdminPostInvitesInviteAcceptReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostInvitesInviteAcceptReq", - "required": [ - "first_name", - "last_name" - ], - "properties": { - "first_name": { - "type": "string", - "title": "first_name", - "description": "The invite's first name." - }, - "last_name": { - "type": "string", - "title": "last_name", - "description": "The invite's last name." - } - } - }, - "AdminPostPaymentsCapturesReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPaymentsCapturesReq", - "properties": { - "amount": { - "type": "number", - "title": "amount", - "description": "The payment's amount." - } - } - }, - "AdminPostPaymentsRefundsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPaymentsRefundsReq", - "properties": { - "amount": { - "type": "number", - "title": "amount", - "description": "The payment's amount." - } - } - }, - "AdminPostPriceListsPriceListPricesBatchAddReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPriceListsPriceListPricesBatchAddReq", - "required": [ - "prices" - ], - "properties": { - "prices": { - "type": "array", - "description": "The price list's prices.", - "items": { - "type": "object", - "description": "The price's prices.", - "x-schemaName": "AdminPriceListPricesCreateReq", - "required": [ - "currency_code", - "amount", - "variant_id" - ], - "properties": { - "currency_code": { - "type": "string", - "title": "currency_code", - "description": "The price's currency code." - }, - "amount": { - "type": "number", - "title": "amount", - "description": "The price's amount." - }, - "variant_id": { - "type": "string", - "title": "variant_id", - "description": "The price's variant id." - }, - "min_quantity": { - "type": "number", - "title": "min_quantity", - "description": "The price's min quantity." - }, - "max_quantity": { - "type": "number", - "title": "max_quantity", - "description": "The price's max quantity." - }, - "rules": { - "type": "object", - "description": "The price's rules.", - "properties": {} - } - } - } - } - } - }, - "AdminPostPriceListsPriceListPricesBatchRemoveReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPriceListsPriceListPricesBatchRemoveReq", - "required": [ - "ids" - ], - "properties": { - "ids": { - "type": "array", - "description": "The price list's ids.", - "items": { - "type": "string", - "title": "ids", - "description": "The id's ids." - } - } - } - }, - "AdminPostPriceListsPriceListReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPriceListsPriceListReq", - "required": [ - "prices" - ], - "properties": { - "title": { - "type": "string", - "title": "title", - "description": "The price list's title." - }, - "description": { - "type": "string", - "title": "description", - "description": "The price list's description." - }, - "starts_at": { - "type": "string", - "title": "starts_at", - "description": "The price list's starts at." - }, - "ends_at": { - "type": "string", - "title": "ends_at", - "description": "The price list's ends at." - }, - "status": {}, - "type": {}, - "prices": { - "type": "array", - "description": "The price list's prices.", - "items": { - "type": "object", - "description": "The price's prices.", - "x-schemaName": "AdminPriceListPricesCreateReq", - "required": [ - "currency_code", - "amount", - "variant_id" - ], - "properties": { - "currency_code": { - "type": "string", - "title": "currency_code", - "description": "The price's currency code." - }, - "amount": { - "type": "number", - "title": "amount", - "description": "The price's amount." - }, - "variant_id": { - "type": "string", - "title": "variant_id", - "description": "The price's variant id." - }, - "min_quantity": { - "type": "number", - "title": "min_quantity", - "description": "The price's min quantity." - }, - "max_quantity": { - "type": "number", - "title": "max_quantity", - "description": "The price's max quantity." - }, - "rules": { - "type": "object", - "description": "The price's rules.", - "properties": {} - } - } - } - }, - "rules": { - "type": "object", - "description": "The price list's rules.", - "properties": {} - } - } - }, - "AdminPostPriceListsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPriceListsReq", - "required": [ - "title", - "description", - "type", - "prices" - ], - "properties": { - "title": { - "type": "string", - "title": "title", - "description": "The price list's title." - }, - "description": { - "type": "string", - "title": "description", - "description": "The price list's description." - }, - "starts_at": { - "type": "string", - "title": "starts_at", - "description": "The price list's starts at." - }, - "ends_at": { - "type": "string", - "title": "ends_at", - "description": "The price list's ends at." - }, - "status": {}, - "type": {}, - "prices": { - "type": "array", - "description": "The price list's prices.", - "items": { - "type": "object", - "description": "The price's prices.", - "x-schemaName": "AdminPriceListPricesCreateReq", - "required": [ - "currency_code", - "amount", - "variant_id" - ], - "properties": { - "currency_code": { - "type": "string", - "title": "currency_code", - "description": "The price's currency code." - }, - "amount": { - "type": "number", - "title": "amount", - "description": "The price's amount." - }, - "variant_id": { - "type": "string", - "title": "variant_id", - "description": "The price's variant id." - }, - "min_quantity": { - "type": "number", - "title": "min_quantity", - "description": "The price's min quantity." - }, - "max_quantity": { - "type": "number", - "title": "max_quantity", - "description": "The price's max quantity." - }, - "rules": { - "type": "object", - "description": "The price's rules.", - "properties": {} - } - } - } - }, - "rules": { - "type": "object", - "description": "The price list's rules.", - "properties": {} - } - } - }, - "AdminPostPricingRuleTypesReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPricingRuleTypesReq", - "required": [ - "name", - "rule_attribute", - "default_priority" - ], - "properties": { - "name": { - "type": "string", - "title": "name", - "description": "The pricing's name." - }, - "rule_attribute": { - "type": "string", - "title": "rule_attribute", - "description": "The pricing's rule attribute." - }, - "default_priority": { - "type": "number", - "title": "default_priority", - "description": "The pricing's default priority." - } - } - }, - "AdminPostPricingRuleTypesRuleTypeReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPricingRuleTypesRuleTypeReq", - "properties": { - "name": { - "type": "string", - "title": "name", - "description": "The pricing's name." - }, - "rule_attribute": { - "type": "string", - "title": "rule_attribute", - "description": "The pricing's rule attribute." - }, - "default_priority": { - "type": "number", - "title": "default_priority", - "description": "The pricing's default priority." - } - } - }, - "AdminPostPromotionsPromotionReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPromotionsPromotionReq", - "properties": { - "code": { - "type": "string", - "title": "code", - "description": "The promotion's code." - }, - "is_automatic": { - "type": "boolean", - "title": "is_automatic", - "description": "The promotion's is automatic." - }, - "type": {}, - "campaign_id": { - "type": "string", - "title": "campaign_id", - "description": "The promotion's campaign id." - }, - "campaign": { - "$ref": "#/components/schemas/AdminPostCampaignsReq" - }, - "application_method": { - "$ref": "#/components/schemas/ApplicationMethodsMethodPostReq" - }, - "rules": { - "type": "array", - "description": "The promotion's rules.", - "items": { - "type": "object", - "description": "The rule's rules.", - "x-schemaName": "PromotionRule", - "required": [ - "operator", - "attribute", - "values" - ], - "properties": { - "operator": {}, - "description": { - "type": "string", - "title": "description", - "description": "The rule's description." - }, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The rule's attribute." - }, - "values": { - "type": "array", - "description": "The rule's values.", - "items": { - "type": "string", - "title": "values", - "description": "The value's values." - } - } - } - } - } - } - }, - "AdminPostPromotionsPromotionRulesBatchAddReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPromotionsPromotionRulesBatchAddReq", - "required": [ - "rules" - ], - "properties": { - "rules": { - "type": "array", - "description": "The promotion's rules.", - "items": { - "type": "object", - "description": "The rule's rules.", - "x-schemaName": "PromotionRule", - "required": [ - "operator", - "attribute", - "values" - ], - "properties": { - "operator": {}, - "description": { - "type": "string", - "title": "description", - "description": "The rule's description." - }, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The rule's attribute." - }, - "values": { - "type": "array", - "description": "The rule's values.", - "items": { - "type": "string", - "title": "values", - "description": "The value's values." - } - } - } - } - } - } - }, - "AdminPostPromotionsPromotionRulesBatchRemoveReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPromotionsPromotionRulesBatchRemoveReq", - "required": [ - "rule_ids" - ], - "properties": { - "rule_ids": { - "type": "array", - "description": "The promotion's rule ids.", - "items": { - "type": "string", - "title": "rule_ids", - "description": "The rule id's rule ids." - } - } - } - }, - "AdminPostPromotionsPromotionRulesBatchUpdateReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPromotionsPromotionRulesBatchUpdateReq", - "required": [ - "rules" - ], - "properties": { - "rules": { - "type": "array", - "description": "The promotion's rules.", - "items": { - "type": "object", - "description": "The rule's rules.", - "x-schemaName": "UpdatePromotionRule", - "required": [ - "id", - "attribute", - "values" - ], - "properties": { - "id": { - "type": "string", - "title": "id", - "description": "The rule's ID." - }, - "operator": {}, - "description": { - "type": "string", - "title": "description", - "description": "The rule's description." - }, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The rule's attribute." - }, - "values": { - "type": "array", - "description": "The rule's values.", - "items": { - "type": "string", - "title": "values", - "description": "The value's values." - } - } - } - } - } - } - }, - "AdminPostStockLocationsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostStockLocationsReq", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "title": "name", - "description": "The stock location's name." - }, - "address": { - "$ref": "#/components/schemas/StockLocationAddress" - }, - "address_id": { - "type": "string", - "title": "address_id", - "description": "The stock location's address id." - }, - "metadata": { - "type": "object", - "description": "The stock location's metadata.", - "properties": {} - } - } - }, - "AdminPostTaxRatesReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostTaxRatesReq", - "required": [ - "name", - "tax_region_id" - ], - "properties": { - "rate": { - "type": "number", - "title": "rate", - "description": "The tax rate's rate." - }, - "code": { - "type": "string", - "title": "code", - "description": "The tax rate's code." - }, - "rules": { - "type": "array", - "description": "The tax rate's rules.", - "items": { - "type": "object", - "description": "The rule's rules.", - "x-schemaName": "CreateTaxRateRule", - "required": [ - "reference", - "reference_id" - ], - "properties": { - "reference": { - "type": "string", - "title": "reference", - "description": "The rule's reference." - }, - "reference_id": { - "type": "string", - "title": "reference_id", - "description": "The rule's reference id." - } - } - } - }, - "name": { - "type": "string", - "title": "name", - "description": "The tax rate's name." - }, - "is_default": { - "type": "boolean", - "title": "is_default", - "description": "The tax rate's is default." - }, - "is_combinable": { - "type": "boolean", - "title": "is_combinable", - "description": "The tax rate's is combinable." - }, - "tax_region_id": { - "type": "string", - "title": "tax_region_id", - "description": "The tax rate's tax region id." - }, - "metadata": { - "type": "object", - "description": "The tax rate's metadata.", - "properties": {} - } - } - }, - "AdminPostTaxRatesTaxRateReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostTaxRatesTaxRateReq", - "properties": { - "code": { - "type": "string", - "title": "code", - "description": "The tax rate's code." - }, - "name": { - "type": "string", - "title": "name", - "description": "The tax rate's name." - }, - "region_id": { - "type": "string", - "title": "region_id", - "description": "The tax rate's region id." - }, - "rate": { - "type": "number", - "title": "rate", - "description": "The tax rate's rate." - }, - "products": { - "type": "array", - "description": "The tax rate's products.", - "items": { - "type": "string", - "title": "products", - "description": "The product's products." - } - }, - "shipping_options": { - "type": "array", - "description": "The tax rate's shipping options.", - "items": { - "type": "string", - "title": "shipping_options", - "description": "The shipping option's shipping options." - } - }, - "product_types": { - "type": "array", - "description": "The tax rate's product types.", - "items": { - "type": "string", - "title": "product_types", - "description": "The product type's product types." - } - } - } - }, - "AdminPostTaxRatesTaxRateRulesReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostTaxRatesTaxRateRulesReq", - "required": [ - "reference", - "reference_id" - ], - "properties": { - "reference": { - "type": "string", - "title": "reference", - "description": "The tax rate's reference." - }, - "reference_id": { - "type": "string", - "title": "reference_id", - "description": "The tax rate's reference id." - } - } - }, - "AdminPostTaxRegionsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostTaxRegionsReq", - "required": [ - "country_code" - ], - "properties": { - "country_code": { - "type": "string", - "title": "country_code", - "description": "The tax region's country code." - }, - "province_code": { - "type": "string", - "title": "province_code", - "description": "The tax region's province code." - }, - "parent_id": { - "type": "string", - "title": "parent_id", - "description": "The tax region's parent id." - }, - "default_tax_rate": { - "$ref": "#/components/schemas/CreateDefaultTaxRate" - }, - "metadata": { - "type": "object", - "description": "The tax region's metadata.", - "properties": {} - } - } - }, - "AdminPostWorkflowsAsyncResponseReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostWorkflowsAsyncResponseReq", - "required": [ - "transaction_id", - "step_id" - ], - "properties": { - "transaction_id": { - "type": "string", - "title": "transaction_id", - "description": "The workflows execution's transaction id." - }, - "step_id": { - "type": "string", - "title": "step_id", - "description": "The workflows execution's step id." - }, - "response": {}, - "compensate_input": {}, - "action": {} - } - }, - "AdminPostWorkflowsRunReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostWorkflowsRunReq", - "properties": { - "input": {}, - "transaction_id": { - "type": "string", - "title": "transaction_id", - "description": "The workflows execution's transaction id." - } - } - }, - "AdminUpdateUserRequest": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminUpdateUserRequest", - "required": [ - "avatar_url" - ], - "properties": { - "first_name": { - "type": "string", - "title": "first_name", - "description": "The user's first name." - }, - "last_name": { - "type": "string", - "title": "last_name", - "description": "The user's last name." - }, - "avatar_url": { - "type": "string", - "title": "avatar_url", - "description": "The user's avatar url." - } - } - }, - "ApplicationMethodsMethodPostReq": { - "type": "object", - "description": "The promotion's application method.", - "x-schemaName": "ApplicationMethodsMethodPostReq", - "properties": { - "description": { - "type": "string", - "title": "description", - "description": "The application method's description." - }, - "value": { - "type": "string", - "title": "value", - "description": "The application method's value." - }, - "max_quantity": { - "type": "number", - "title": "max_quantity", - "description": "The application method's max quantity." - }, - "type": {}, - "target_type": {}, - "allocation": {}, - "target_rules": { - "type": "array", - "description": "The application method's target rules.", - "items": { - "type": "object", - "description": "The target rule's target rules.", - "x-schemaName": "PromotionRule", - "required": [ - "operator", - "attribute", - "values" - ], - "properties": { - "operator": {}, - "description": { - "type": "string", - "title": "description", - "description": "The target rule's description." - }, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The target rule's attribute." - }, - "values": { - "type": "array", - "description": "The target rule's values.", - "items": { - "type": "string", - "title": "values", - "description": "The value's values." - } - } - } - } - }, - "buy_rules": { - "type": "array", - "description": "The application method's buy rules.", - "items": { - "type": "object", - "description": "The buy rule's buy rules.", - "x-schemaName": "PromotionRule", - "required": [ - "operator", - "attribute", - "values" - ], - "properties": { - "operator": {}, - "description": { - "type": "string", - "title": "description", - "description": "The buy rule's description." - }, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The buy rule's attribute." - }, - "values": { - "type": "array", - "description": "The buy rule's values.", - "items": { - "type": "string", - "title": "values", - "description": "The value's values." - } - } - } - } - }, - "apply_to_quantity": { - "type": "number", - "title": "apply_to_quantity", - "description": "The application method's apply to quantity." - }, - "buy_rules_min_quantity": { - "type": "number", - "title": "buy_rules_min_quantity", - "description": "The application method's buy rules min quantity." - } - } - }, - "CampaignBudget": { - "type": "object", - "description": "The campaign's budget.", - "x-schemaName": "CampaignBudget", - "properties": { - "type": {}, - "limit": { - "type": "number", - "title": "limit", - "description": "The budget's limit." - } - } - }, - "CreateDefaultTaxRate": { - "type": "object", - "description": "The tax region's default tax rate.", - "x-schemaName": "CreateDefaultTaxRate", - "required": [ - "name" - ], - "properties": { - "rate": { - "type": "number", - "title": "rate", - "description": "The default tax rate's rate." - }, - "code": { - "type": "string", - "title": "code", - "description": "The default tax rate's code." - }, - "name": { - "type": "string", - "title": "name", - "description": "The default tax rate's name." - }, - "metadata": { - "type": "object", - "description": "The default tax rate's metadata.", - "properties": {} - } - } - }, - "Error": { - "title": "Response Error", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "A slug code to indicate the type of the error.", - "enum": [ - "invalid_state_error", - "invalid_request_error", - "api_error", - "unknown_error" - ] - }, - "message": { - "type": "string", - "description": "Description of the error that occurred.", - "example": "first_name must be a string" - }, - "type": { - "type": "string", - "description": "A slug indicating the type of the error.", - "enum": [ - "QueryRunnerAlreadyReleasedError", - "TransactionAlreadyStartedError", - "TransactionNotStartedError", - "conflict", - "unauthorized", - "payment_authorization_error", - "duplicate_error", - "not_allowed", - "invalid_data", - "not_found", - "database_error", - "unexpected_state", - "invalid_argument", - "unknown_error" - ] - } - } - }, - "MultipleErrors": { - "title": "Multiple Errors", - "type": "object", - "properties": { - "errors": { - "type": "array", - "description": "Array of errors", - "items": { - "$ref": "#/components/schemas/Error" - } - }, - "message": { - "type": "string", - "default": "Provided request body contains errors. Please check the data and retry the request" - } - } - }, - "StockLocationAddress": { - "type": "object", - "description": "The stock location's address.", - "x-schemaName": "StockLocationAddress", - "required": [ - "address_1", - "country_code" - ], - "properties": { - "address_1": { - "type": "string", - "title": "address_1", - "description": "The address's address 1." - }, - "address_2": { - "type": "string", - "title": "address_2", - "description": "The address's address 2." - }, - "company": { - "type": "string", - "title": "company", - "description": "The address's company." - }, - "city": { - "type": "string", - "title": "city", - "description": "The address's city." - }, - "country_code": { - "type": "string", - "title": "country_code", - "description": "The address's country code." - }, - "phone": { - "type": "string", - "title": "phone", - "description": "The address's phone." - }, - "postal_code": { - "type": "string", - "title": "postal_code", - "description": "The address's postal code." - }, - "province": { - "type": "string", - "title": "province", - "description": "The address's province." - } - } - }, - "StorePostCartsCartTaxesReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "StorePostCartsCartTaxesReq", - "properties": {} - }, - "StorePostPaymentCollectionsPaymentSessionReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "StorePostPaymentCollectionsPaymentSessionReq", - "required": [ - "provider_id" - ], - "properties": { - "provider_id": { - "type": "string", - "title": "provider_id", - "description": "The payment collection's provider id." - }, - "context": {}, - "data": { - "type": "object", - "description": "The payment collection's data.", - "properties": {} - } - } - } - } - } -} \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections/get.sh deleted file mode 100644 index ad6a8611a1..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/collections' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections/post.sh deleted file mode 100644 index 564406d2c8..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/collections' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections_{id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections_{id}/delete.sh deleted file mode 100644 index ac6ab81926..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/collections/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections_{id}/get.sh deleted file mode 100644 index d5e3ac9901..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/collections/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections_{id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections_{id}/post.sh deleted file mode 100644 index 1ed3078733..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_collections_{id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/collections/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_currencies/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_currencies/get.sh deleted file mode 100644 index 98bde5a28f..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_currencies/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/currencies' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups/get.sh deleted file mode 100644 index a1e09a1830..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/customer-groups' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups/post.sh deleted file mode 100644 index 5dc5d9806f..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/customer-groups' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}/delete.sh deleted file mode 100644 index fb76fec5a4..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/customer-groups/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}/get.sh deleted file mode 100644 index 775aa665b6..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/customer-groups/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}/post.sh deleted file mode 100644 index 2f19abfcce..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/customer-groups/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}_customers/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}_customers/get.sh deleted file mode 100644 index 07089b3972..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}_customers/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/customer-groups/{id}/customers' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}_customers_batch/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}_customers_batch/post.sh deleted file mode 100644 index 34c79ef48e..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}_customers_batch/post.sh +++ /dev/null @@ -1,10 +0,0 @@ -curl -X POST '{backend_url}/admin/customer-groups/{id}/customers/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "customer_ids": [ - { - "id": "id_dx2Wieq4uGG" - } - ] -}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers/get.sh deleted file mode 100644 index a3cb447f4d..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/customers' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers/post.sh deleted file mode 100644 index ea92b85acf..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/customers' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}/get.sh deleted file mode 100644 index 84b7af171c..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/customers/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}/post.sh deleted file mode 100644 index 867aa617b0..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/customers/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items/get.sh deleted file mode 100644 index 474b73d170..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/inventory-items' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items/post.sh deleted file mode 100644 index 6c92c8d0e0..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/inventory-items' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}/delete.sh deleted file mode 100644 index 1361e6d32f..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/inventory-items/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}/get.sh deleted file mode 100644 index ec7499af1d..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/inventory-items/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}/post.sh deleted file mode 100644 index 7de420fdea..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/inventory-items/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels/post.sh deleted file mode 100644 index 0e1ca69def..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels/post.sh +++ /dev/null @@ -1,7 +0,0 @@ -curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "location_id": "{value}", - "stocked_quantity": 1506469662949376 -}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/delete.sh deleted file mode 100644 index d8ca96677f..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/post.sh deleted file mode 100644 index 1487c477f9..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites/get.sh deleted file mode 100644 index 248ec00ebb..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/invites' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites/post.sh deleted file mode 100644 index 55871d44bb..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/invites' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites_accept/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites_accept/post.sh deleted file mode 100644 index 6fcd4de1a5..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites_accept/post.sh +++ /dev/null @@ -1,7 +0,0 @@ -curl -X POST '{backend_url}/admin/invites/accept' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "first_name": "{value}", - "last_name": "{value}" -}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_payments_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_payments_{id}/get.sh deleted file mode 100644 index 3d63a30b19..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_payments_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/payments/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_payments_{id}_capture/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_payments_{id}_capture/post.sh deleted file mode 100644 index dd1ae194e3..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_payments_{id}_capture/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/payments/{id}/capture' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_payments_{id}_refund/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_payments_{id}_refund/post.sh deleted file mode 100644 index fc1d105267..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_payments_{id}_refund/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/payments/{id}/refund' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists/get.sh deleted file mode 100644 index 912c4350b5..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/price-lists' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists/post.sh deleted file mode 100644 index 1efe400afe..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists/post.sh +++ /dev/null @@ -1,14 +0,0 @@ -curl -X POST '{backend_url}/admin/price-lists' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "title": "{value}", - "description": "{value}", - "prices": [ - { - "currency_code": "{value}", - "amount": 1270314195484672, - "variant_id": "{value}" - } - ] -}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}/delete.sh deleted file mode 100644 index d1e910883d..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/price-lists/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}/get.sh deleted file mode 100644 index dd174647af..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/price-lists/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}/post.sh deleted file mode 100644 index d9ac4ad542..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}/post.sh +++ /dev/null @@ -1,12 +0,0 @@ -curl -X POST '{backend_url}/admin/price-lists/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "prices": [ - { - "currency_code": "{value}", - "amount": 1670236243755008, - "variant_id": "{value}" - } - ] -}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products/get.sh deleted file mode 100644 index f7b343e7bc..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/products' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products/post.sh deleted file mode 100644 index 631af544f9..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/products' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}/delete.sh deleted file mode 100644 index 1f5383aa7a..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/products/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}/get.sh deleted file mode 100644 index ca6c6a0a93..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/products/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}/post.sh deleted file mode 100644 index 99441e36d4..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/products/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options/post.sh deleted file mode 100644 index 9b8dac7ef3..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/products/{id}/options' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/delete.sh deleted file mode 100644 index 568d959752..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/products/{id}/options/{option_id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/post.sh deleted file mode 100644 index ca930ee9af..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/products/{id}/options/{option_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants/get.sh deleted file mode 100644 index c0dec3e252..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/products/{id}/variants' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants/post.sh deleted file mode 100644 index 1315966d84..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/products/{id}/variants' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/delete.sh deleted file mode 100644 index 6ed61d5122..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/products/{id}/variants/{variant_id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/post.sh deleted file mode 100644 index b456242794..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/products/{id}/variants/{variant_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions/get.sh deleted file mode 100644 index d867926ab3..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/regions' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions/post.sh deleted file mode 100644 index 5904a7d833..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/regions' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions_{id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions_{id}/delete.sh deleted file mode 100644 index c1a1e78e1f..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/regions/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions_{id}/get.sh deleted file mode 100644 index abd55fc993..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/regions/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions_{id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions_{id}/post.sh deleted file mode 100644 index 7af660e7ef..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_regions_{id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/regions/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels/get.sh deleted file mode 100644 index 3fb86e9166..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/sales-channels' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels/post.sh deleted file mode 100644 index 3f31f0b065..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/sales-channels' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels_{id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels_{id}/delete.sh deleted file mode 100644 index 9650bf9aca..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/sales-channels/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels_{id}/get.sh deleted file mode 100644 index b28d3e3ad8..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/sales-channels/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels_{id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels_{id}/post.sh deleted file mode 100644 index 9705aca3aa..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels_{id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/sales-channels/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stock-locations/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stock-locations/post.sh deleted file mode 100644 index 9e40419982..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stock-locations/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/stock-locations' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "Dorthy" -}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stock-locations_{id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stock-locations_{id}/delete.sh deleted file mode 100644 index ad7c82955d..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stock-locations_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/stock-locations/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stock-locations_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stock-locations_{id}/get.sh deleted file mode 100644 index 27fe59d04e..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stock-locations_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/stock-locations/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates/get.sh deleted file mode 100644 index 7be7a1d650..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/tax-rates' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates/post.sh deleted file mode 100644 index 741f31d081..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates/post.sh +++ /dev/null @@ -1,7 +0,0 @@ -curl -X POST '{backend_url}/admin/tax-rates' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "Emilio", - "tax_region_id": "{value}" -}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}/delete.sh deleted file mode 100644 index bc3e9c0401..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/tax-rates/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}/get.sh deleted file mode 100644 index cb8de3d3c9..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/tax-rates/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}/post.sh deleted file mode 100644 index f85107c680..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/tax-rates/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users/get.sh deleted file mode 100644 index 6bdef51bd1..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/users' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users/post.sh deleted file mode 100644 index 054dc2e9f9..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/users' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users_{id}/delete.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users_{id}/delete.sh deleted file mode 100644 index d89b51ae7b..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/users/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users_{id}/get.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users_{id}/get.sh deleted file mode 100644 index a30ecf3e5c..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/users/{id}' \ --H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users_{id}/post.sh b/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users_{id}/post.sh deleted file mode 100644 index 7e0ec197ef..0000000000 --- a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/users/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "avatar_url": "{value}" -}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/components/examples/database_error.yaml b/www/apps/api-reference/specs-v2/admin/components/examples/database_error.yaml deleted file mode 100644 index 07f4ce82cb..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/examples/database_error.yaml +++ /dev/null @@ -1,5 +0,0 @@ -summary: Database Error -value: - code: api_error - message: An error occured while hashing password - type: database_error diff --git a/www/apps/api-reference/specs-v2/admin/components/examples/default_error.yaml b/www/apps/api-reference/specs-v2/admin/components/examples/default_error.yaml deleted file mode 100644 index b24cde7cd9..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/examples/default_error.yaml +++ /dev/null @@ -1,5 +0,0 @@ -summary: Default Error -value: - code: unknown_error - message: An unknown error occurred. - type: unknown_error diff --git a/www/apps/api-reference/specs-v2/admin/components/examples/invalid_argument_error.yaml b/www/apps/api-reference/specs-v2/admin/components/examples/invalid_argument_error.yaml deleted file mode 100644 index 364d93fde8..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/examples/invalid_argument_error.yaml +++ /dev/null @@ -1,4 +0,0 @@ -summary: Invalid Argument Error -value: - message: cart.total must be defined - type: unexpected_state diff --git a/www/apps/api-reference/specs-v2/admin/components/examples/invalid_data_error.yaml b/www/apps/api-reference/specs-v2/admin/components/examples/invalid_data_error.yaml deleted file mode 100644 index 62ea2f6f71..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/examples/invalid_data_error.yaml +++ /dev/null @@ -1,4 +0,0 @@ -summary: Invalid Data Error -value: - message: first_name must be a string - type: invalid_data diff --git a/www/apps/api-reference/specs-v2/admin/components/examples/multiple_errors.yaml b/www/apps/api-reference/specs-v2/admin/components/examples/multiple_errors.yaml deleted file mode 100644 index 044e062400..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/examples/multiple_errors.yaml +++ /dev/null @@ -1,10 +0,0 @@ -summary: Multiple Errors -value: - message: >- - Provided request body contains errors. Please check the data and retry the - request - errors: - - message: first_name must be a string - type: invalid_data - - message: Discount must be set to dynamic - type: not_allowed diff --git a/www/apps/api-reference/specs-v2/admin/components/examples/not_allowed_error.yaml b/www/apps/api-reference/specs-v2/admin/components/examples/not_allowed_error.yaml deleted file mode 100644 index 5388080633..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/examples/not_allowed_error.yaml +++ /dev/null @@ -1,4 +0,0 @@ -summary: Not Allowed Error -value: - message: Discount must be set to dynamic - type: not_allowed diff --git a/www/apps/api-reference/specs-v2/admin/components/examples/unexpected_state_error.yaml b/www/apps/api-reference/specs-v2/admin/components/examples/unexpected_state_error.yaml deleted file mode 100644 index 297e630dee..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/examples/unexpected_state_error.yaml +++ /dev/null @@ -1,4 +0,0 @@ -summary: Unexpected State Error -value: - message: cart.total must be defined - type: unexpected_state diff --git a/www/apps/api-reference/specs-v2/admin/components/responses/400_error.yaml b/www/apps/api-reference/specs-v2/admin/components/responses/400_error.yaml deleted file mode 100644 index b960f05fb4..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/responses/400_error.yaml +++ /dev/null @@ -1,14 +0,0 @@ -description: Client Error or Multiple Errors -content: - application/json: - schema: - oneOf: - - $ref: ../schemas/Error.yaml - - $ref: ../schemas/MultipleErrors.yaml - examples: - not_allowed: - $ref: ../examples/not_allowed_error.yaml - invalid_data: - $ref: ../examples/invalid_data_error.yaml - MultipleErrors: - $ref: ../examples/multiple_errors.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/responses/500_error.yaml b/www/apps/api-reference/specs-v2/admin/components/responses/500_error.yaml deleted file mode 100644 index 5da1a171e5..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/responses/500_error.yaml +++ /dev/null @@ -1,14 +0,0 @@ -description: Server Error -content: - application/json: - schema: - $ref: ../schemas/Error.yaml - examples: - database: - $ref: ../examples/database_error.yaml - unexpected_state: - $ref: ../examples/unexpected_state_error.yaml - invalid_argument: - $ref: ../examples/invalid_argument_error.yaml - default_error: - $ref: ../examples/default_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/responses/default_error.yaml b/www/apps/api-reference/specs-v2/admin/components/responses/default_error.yaml deleted file mode 100644 index 5591502a6c..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/responses/default_error.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Default Error -content: - application/json: - schema: - $ref: ../schemas/Error.yaml - example: - code: unknown_error - message: An unknown error occurred. - type: unknown_error diff --git a/www/apps/api-reference/specs-v2/admin/components/responses/incorrect_credentials.yaml b/www/apps/api-reference/specs-v2/admin/components/responses/incorrect_credentials.yaml deleted file mode 100644 index c1537623ba..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/responses/incorrect_credentials.yaml +++ /dev/null @@ -1,7 +0,0 @@ -description: User does not exist or incorrect credentials -content: - text/plain: - schema: - type: string - default: Unauthorized - example: Unauthorized diff --git a/www/apps/api-reference/specs-v2/admin/components/responses/invalid_request_error.yaml b/www/apps/api-reference/specs-v2/admin/components/responses/invalid_request_error.yaml deleted file mode 100644 index c70a32b01f..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/responses/invalid_request_error.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Invalid Request Error -content: - application/json: - schema: - $ref: ../schemas/Error.yaml - example: - code: invalid_request_error - message: Discount with code TEST already exists. - type: duplicate_error diff --git a/www/apps/api-reference/specs-v2/admin/components/responses/invalid_state_error.yaml b/www/apps/api-reference/specs-v2/admin/components/responses/invalid_state_error.yaml deleted file mode 100644 index 479206bab5..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/responses/invalid_state_error.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Invalid State Error -content: - application/json: - schema: - $ref: ../schemas/Error.yaml - example: - code: unknown_error - message: >- - The request conflicted with another request. You may retry the request - with the provided Idempotency-Key. - type: QueryRunnerAlreadyReleasedError diff --git a/www/apps/api-reference/specs-v2/admin/components/responses/not_found_error.yaml b/www/apps/api-reference/specs-v2/admin/components/responses/not_found_error.yaml deleted file mode 100644 index c6fea98d05..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/responses/not_found_error.yaml +++ /dev/null @@ -1,8 +0,0 @@ -description: Not Found Error -content: - application/json: - schema: - $ref: ../schemas/Error.yaml - example: - message: Entity with id 1 was not found - type: not_found diff --git a/www/apps/api-reference/specs-v2/admin/components/responses/unauthorized.yaml b/www/apps/api-reference/specs-v2/admin/components/responses/unauthorized.yaml deleted file mode 100644 index 6e59a0886a..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/responses/unauthorized.yaml +++ /dev/null @@ -1,7 +0,0 @@ -description: User is not authorized. Must log in first -content: - text/plain: - schema: - type: string - default: Unauthorized - example: Unauthorized diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/Customer.yaml b/www/apps/api-reference/specs-v2/admin/components/schemas/Customer.yaml deleted file mode 100644 index 063a4ff87a..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/schemas/Customer.yaml +++ /dev/null @@ -1,87 +0,0 @@ -type: object -description: The context's customer. -x-schemaName: Customer -properties: - id: - type: string - title: id - description: The customer's ID. - email: - type: string - title: email - description: The customer's email. - format: email - default_billing_address_id: - type: string - title: default_billing_address_id - description: The customer's default billing address id. - default_shipping_address_id: - type: string - title: default_shipping_address_id - description: The customer's default shipping address id. - company_name: - type: string - title: company_name - description: The customer's company name. - first_name: - type: string - title: first_name - description: The customer's first name. - last_name: - type: string - title: last_name - description: The customer's last name. - addresses: - type: array - description: The customer's addresses. - items: - type: object - description: The address's addresses. - x-schemaName: CustomerAddress - properties: {} - phone: - type: string - title: phone - description: The customer's phone. - groups: - type: array - description: The customer's groups. - items: - type: object - description: The group's groups. - properties: {} - metadata: - type: object - description: The customer's metadata. - properties: {} - created_by: - type: string - title: created_by - description: The customer's created by. - deleted_at: - oneOf: - - type: string - title: deleted_at - description: The customer's deleted at. - - type: string - title: deleted_at - description: The customer's deleted at. - format: date-time - created_at: - oneOf: - - type: string - title: created_at - description: The customer's created at. - - type: string - title: created_at - description: The customer's created at. - format: date-time - updated_at: - oneOf: - - type: string - title: updated_at - description: The customer's updated at. - - type: string - title: updated_at - description: The customer's updated at. - format: date-time diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/Error.yaml b/www/apps/api-reference/specs-v2/admin/components/schemas/Error.yaml deleted file mode 100644 index dbbde56a51..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/schemas/Error.yaml +++ /dev/null @@ -1,33 +0,0 @@ -title: Response Error -type: object -properties: - code: - type: string - description: A slug code to indicate the type of the error. - enum: - - invalid_state_error - - invalid_request_error - - api_error - - unknown_error - message: - type: string - description: Description of the error that occurred. - example: first_name must be a string - type: - type: string - description: A slug indicating the type of the error. - enum: - - QueryRunnerAlreadyReleasedError - - TransactionAlreadyStartedError - - TransactionNotStartedError - - conflict - - unauthorized - - payment_authorization_error - - duplicate_error - - not_allowed - - invalid_data - - not_found - - database_error - - unexpected_state - - invalid_argument - - unknown_error diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/MultipleErrors.yaml b/www/apps/api-reference/specs-v2/admin/components/schemas/MultipleErrors.yaml deleted file mode 100644 index 7ca18cda3b..0000000000 --- a/www/apps/api-reference/specs-v2/admin/components/schemas/MultipleErrors.yaml +++ /dev/null @@ -1,13 +0,0 @@ -title: Multiple Errors -type: object -properties: - errors: - type: array - description: Array of errors - items: - $ref: ./Error.yaml - message: - type: string - default: >- - Provided request body contains errors. Please check the data and retry the - request diff --git a/www/apps/api-reference/specs-v2/admin/openapi.full.yaml b/www/apps/api-reference/specs-v2/admin/openapi.full.yaml deleted file mode 100644 index bdf80faa33..0000000000 --- a/www/apps/api-reference/specs-v2/admin/openapi.full.yaml +++ /dev/null @@ -1,7883 +0,0 @@ -openapi: 3.0.0 -info: - version: 2.0.0 - title: Medusa Admin API - license: - name: MIT - url: https://github.com/medusajs/medusa/blob/master/LICENSE -servers: - - url: http://localhost:9000 - - url: https://api.medusa-commerce.com -tags: - - name: Api Keys - - name: Campaigns - - name: Collections - - name: Currencies - description: | - A store can use unlimited currencies, and each region must be associated with at least one currency. - Currencies are defined within the Medusa backend. Currency API Routes allow admins to list and update currencies. - externalDocs: - description: How to manage currencies - url: https://docs.medusajs.com/modules/regions-and-currencies/admin/manage-currencies - - name: Customer Groups - description: | - Customer Groups can be used to organize customers that share similar data or attributes into dedicated groups. - This can be useful for different purposes such as setting a different price for a specific customer group. - externalDocs: - description: How to manage customer groups - url: https://docs.medusajs.com/modules/customers/admin/manage-customer-groups - - name: Customers - description: | - Customers can either be created when they register through the Store APIs, or created by the admin using the Admin APIs. - externalDocs: - description: How to manage customers - url: https://docs.medusajs.com/modules/customers/admin/manage-customers - - name: Fulfillment - - name: Inventory Items - description: | - Inventory items, provided by the [Inventory Module](https://docs.medusajs.com/modules/multiwarehouse/inventory-module), can be used to manage the inventory of saleable items in your store. - externalDocs: - description: How to manage inventory items - url: https://docs.medusajs.com/modules/multiwarehouse/admin/manage-inventory-items - - name: Invites - description: | - An admin can invite new users to manage their team. This would allow new users to authenticate as admins and perform admin functionalities. - externalDocs: - description: How to manage invites - url: https://docs.medusajs.com/modules/users/admin/manage-invites - - name: Payments - description: | - A payment can be related to an order, swap, return, or more. It can be captured or refunded. - - name: Price Lists - description: | - A price list are special prices applied to products based on a set of conditions, such as customer group. - externalDocs: - description: How to manage price lists - url: https://docs.medusajs.com/modules/price-lists/admin/manage-price-lists - - name: Pricing - - name: Products - description: | - Products are saleable items in a store. This also includes [saleable gift cards](https://docs.medusajs.com/modules/gift-cards/admin/manage-gift-cards#manage-gift-card-product) in a store. - externalDocs: - description: How to manage products - url: https://docs.medusajs.com/modules/products/admin/manage-products - - name: Promotions - - name: Regions - description: | - Regions are different countries or geographical regions that the commerce store serves customers in. - Admins can manage these regions, their providers, and more. - externalDocs: - description: How to manage regions - url: https://docs.medusajs.com/modules/regions-and-currencies/admin/manage-regions - - name: Sales Channels - description: | - A sales channel indicates a channel where products can be sold in. For example, a webshop or a mobile app. - Admins can manage sales channels and the products available in them. - externalDocs: - description: How to manage sales channels - url: https://docs.medusajs.com/modules/sales-channels/admin/manage - - name: Stock Locations - - name: Stores - - name: Tax Rates - description: | - Each region has at least a default tax rate. Admins can create and manage additional tax rates that can be applied for certain conditions, such as for specific product types. - externalDocs: - description: How to manage tax rates - url: https://docs.medusajs.com/modules/taxes/admin/manage-tax-rates - - name: Tax Regions - - name: Users - description: | - A store can have more than one user, each having the same privileges. Admins can manage users, their passwords, and more. - externalDocs: - description: How to manage users - url: https://docs.medusajs.com/modules/users/admin/manage-users - - name: Workflows Executions -paths: - /admin/api-keys: - get: - operationId: GetApiKeys - summary: List Api Keys - 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. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/api-keys' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Api Keys - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostApiKeys - summary: Create Api Key - description: Create a api key. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/api-keys' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Api Keys - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/api-keys/{id}: - get: - operationId: GetApiKeysId - summary: Get a Api Key - description: Retrieve a api key by its ID. You can expand the api key's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The api key's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/api-keys/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Api Keys - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostApiKeysId - summary: Update a Api Key - description: Update a api key's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The api key's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/api-keys/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Api Keys - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteApiKeysId - summary: Delete a Api Key - description: Delete a api key. - x-authenticated: true - parameters: - - name: id - in: path - description: The api key's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/api-keys/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Api Keys - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/api-keys/{id}/revoke: - post: - operationId: PostApiKeysIdRevoke - summary: Add Revokes to Api Key - description: Add a list of revokes to a api key. - x-authenticated: true - parameters: - - name: id - in: path - description: The api key's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/api-keys/{id}/revoke' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Api Keys - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/campaigns: - get: - operationId: GetCampaigns - summary: List Campaigns - description: Retrieve a list of campaigns. The campaigns can be filtered by fields such as `id`. The campaigns can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/campaigns' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Campaigns - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCampaigns - summary: Create Campaign - description: Create a campaign. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/campaigns' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Campaigns - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/campaigns/{id}: - get: - operationId: GetCampaignsId - summary: Get a Campaign - description: Retrieve a campaign by its ID. You can expand the campaign's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The campaign's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/campaigns/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Campaigns - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCampaignsId - summary: Update a Campaign - description: Update a campaign's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The campaign's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostCampaignsReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/campaigns/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Moriah" - }' - tags: - - Campaigns - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteCampaignsId - summary: Delete a Campaign - description: Delete a campaign. - x-authenticated: true - parameters: - - name: id - in: path - description: The campaign's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/campaigns/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Campaigns - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/collections: - get: - operationId: GetCollections - summary: List Collections - description: Retrieve a list of collections. The collections can be filtered by fields such as `id`. The collections can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/collections' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Collections - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCollections - summary: Create Collection - description: Create a collection. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/collections' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Collections - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/collections/{id}: - get: - operationId: GetCollectionsId - summary: Get a Collection - description: Retrieve a collection by its ID. You can expand the collection's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The collection's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/collections/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Collections - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCollectionsId - summary: Update a Collection - description: Update a collection's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The collection's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/collections/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Collections - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteCollectionsId - summary: Delete a Collection - description: Delete a collection. - x-authenticated: true - parameters: - - name: id - in: path - description: The collection's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/collections/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Collections - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/currencies: - get: - operationId: GetCurrencies - summary: List Currencies - description: Retrieve a list of currencies. The currencies can be filtered by fields such as `id`. The currencies can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/currencies' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Currencies - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/currencies/{code}: - get: - operationId: GetCurrenciesCode - summary: Get a Currency - description: Retrieve a currency by its ID. You can expand the currency's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: code - in: path - description: The currency's code. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/currencies/{code}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Currencies - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/customer-groups: - get: - operationId: GetCustomerGroups - summary: List Customer Groups - description: Retrieve a list of customer groups. The customer groups can be filtered by fields such as `id`. The customer groups can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/customer-groups' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customer Groups - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCustomerGroups - summary: Create Customer Group - description: Create a customer group. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/customer-groups' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customer Groups - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/customer-groups/{id}: - get: - operationId: GetCustomerGroupsId - summary: Get a Customer Group - description: Retrieve a customer group by its ID. You can expand the customer group's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer group's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/customer-groups/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customer Groups - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCustomerGroupsId - summary: Update a Customer Group - description: Update a customer group's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer group's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/customer-groups/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customer Groups - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteCustomerGroupsId - summary: Delete a Customer Group - description: Delete a customer group. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer group's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/customer-groups/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customer Groups - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/customer-groups/{id}/customers: - get: - operationId: GetCustomerGroupsIdCustomers - summary: List Customers - description: Retrieve a list of customers in a customer group. The customers can be filtered by fields like FILTER FIELDS. The customers can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer group's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/customer-groups/{id}/customers' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customer Groups - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/customer-groups/{id}/customers/batch: - post: - operationId: PostCustomerGroupsIdCustomersBatch - summary: Add Customers to Customer Group - description: Add a list of customers to a customer group. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer group's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/customer-groups/{id}/customers/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "customer_ids": [ - { - "id": "id_dx2Wieq4uGG" - } - ] - }' - tags: - - Customer Groups - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/customer-groups/{id}/customers/remove: - post: - operationId: PostCustomerGroupsIdCustomersRemove - summary: Add Removes to Customer Group - description: Add a list of removes to a customer group. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer group's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/customer-groups/{id}/customers/remove' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "customer_ids": [ - { - "id": "id_oAhMZi39hsjIOqPA6" - } - ] - }' - tags: - - Customer Groups - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/customers: - get: - operationId: GetCustomers - summary: List Customers - description: Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/customers' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCustomers - summary: Create Customer - description: Create a customer. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/customers' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/customers/{id}: - get: - operationId: GetCustomersId - summary: Get a Customer - description: Retrieve a customer by its ID. You can expand the customer's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/customers/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCustomersId - summary: Update a Customer - description: Update a customer's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/customers/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteCustomersId - summary: Delete a Customer - description: Delete a customer. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/customers/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/customers/{id}/addresses: - get: - operationId: GetCustomersIdAddresses - summary: List Addresses - description: Retrieve a list of addresses in a customer. The addresses can be filtered by fields like FILTER FIELDS. The addresses can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/customers/{id}/addresses' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCustomersIdAddresses - summary: Add Addresses to Customer - description: Add a list of addresses to a customer. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/customers/{id}/addresses' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/customers/{id}/addresses/{address_id}: - get: - operationId: GetCustomersIdAddressesAddress_id - summary: List Addresses - description: Retrieve a list of addresses in a customer. The addresses can be filtered by fields like FILTER FIELDS. The addresses can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer's ID. - required: true - schema: - type: string - - name: address_id - in: path - description: The customer's address id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/customers/{id}/addresses/{address_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCustomersIdAddressesAddress_id - summary: Add Addresses to Customer - description: Add a list of addresses to a customer. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer's ID. - required: true - schema: - type: string - - name: address_id - in: path - description: The customer's address id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/customers/{id}/addresses/{address_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteCustomersIdAddressesAddress_id - summary: Remove Addresses from Customer - description: Remove a list of addresses from a customer. This doesn't delete the Address, only the association between the Address and the customer. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer's ID. - required: true - schema: - type: string - - name: address_id - in: path - description: The customer's address id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/customers/{id}/addresses/{address_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/fulfillment/shipping-options/{id}/rules/batch/add: - post: - operationId: PostFulfillmentShippingOptionsIdRulesBatchAdd - summary: Add Adds to Fulfillment - description: Add a list of adds to a fulfillment. - x-authenticated: true - parameters: - - name: id - in: path - description: The fulfillment's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchAddReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/fulfillment/shipping-options/{id}/rules/batch/add' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "rules": [ - { - "attribute": "{value}" - } - ] - }' - tags: - - Fulfillment - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/fulfillment/shipping-options/{id}/rules/batch/remove: - post: - operationId: PostFulfillmentShippingOptionsIdRulesBatchRemove - summary: Add Removes to Fulfillment - description: Add a list of removes to a fulfillment. - x-authenticated: true - parameters: - - name: id - in: path - description: The fulfillment's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/fulfillment/shipping-options/{id}/rules/batch/remove' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "rule_ids": [ - "{value}" - ] - }' - tags: - - Fulfillment - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/inventory-items: - get: - operationId: GetInventoryItems - summary: List Inventory Items - description: Retrieve a list of inventory items. The inventory items can be filtered by fields such as `id`. The inventory items can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/inventory-items' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Inventory Items - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostInventoryItems - summary: Create Inventory Item - description: Create a inventory item. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostInventoryItemsReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/inventory-items' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Inventory Items - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/inventory-items/{id}: - get: - operationId: GetInventoryItemsId - summary: Get a Inventory Item - description: Retrieve a inventory item by its ID. You can expand the inventory item's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/inventory-items/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Inventory Items - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostInventoryItemsId - summary: Update a Inventory Item - description: Update a inventory item's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostInventoryItemsInventoryItemReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/inventory-items/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Inventory Items - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteInventoryItemsId - summary: Delete a Inventory Item - description: Delete a inventory item. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/inventory-items/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Inventory Items - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/inventory-items/{id}/location-levels: - post: - operationId: PostInventoryItemsIdLocationLevels - summary: Add Location Levels to Inventory Item - description: Add a list of location levels to a inventory item. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "location_id": "{value}", - "stocked_quantity": 1506469662949376 - }' - tags: - - Inventory Items - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/inventory-items/{id}/location-levels/{location_id}: - post: - operationId: PostInventoryItemsIdLocationLevelsLocation_id - summary: Add Location Levels to Inventory Item - description: Add a list of location levels to a inventory item. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - - name: location_id - in: path - description: The inventory item's location id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Inventory Items - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteInventoryItemsIdLocationLevelsLocation_id - summary: Remove Location Levels from Inventory Item - description: Remove a list of location levels from a inventory item. This doesn't delete the Location Level, only the association between the Location Level and the inventory item. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - - name: location_id - in: path - description: The inventory item's location id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Inventory Items - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/invites: - get: - operationId: GetInvites - summary: List Invites - description: Retrieve a list of invites. The invites can be filtered by fields such as `id`. The invites can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/invites' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Invites - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostInvites - summary: Create Invite - description: Create a invite. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/invites' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Invites - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/invites/accept: - post: - operationId: PostInvitesAccept - summary: Create Invite - description: Create a invite. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostInvitesInviteAcceptReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/invites/accept' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "first_name": "{value}", - "last_name": "{value}" - }' - tags: - - Invites - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/invites/{id}: - get: - operationId: GetInvitesId - summary: Get a Invite - description: Retrieve a invite by its ID. You can expand the invite's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The invite's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/invites/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Invites - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteInvitesId - summary: Delete a Invite - description: Delete a invite. - x-authenticated: true - parameters: - - name: id - in: path - description: The invite's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/invites/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Invites - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/invites/{id}/resend: - post: - operationId: PostInvitesIdResend - summary: Add Resends to Invite - description: Add a list of resends to a invite. - x-authenticated: true - parameters: - - name: id - in: path - description: The invite's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/invites/{id}/resend' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Invites - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/payments: - get: - operationId: GetPayments - summary: List Payments - description: Retrieve a list of payments. The payments can be filtered by fields such as `id`. The payments can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/payments' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Payments - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/payments/{id}: - get: - operationId: GetPaymentsId - summary: Get a Payment - description: Retrieve a payment by its ID. You can expand the payment's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The payment's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/payments/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Payments - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/payments/{id}/capture: - post: - operationId: PostPaymentsIdCapture - summary: Add Captures to Payment - description: Add a list of captures to a payment. - x-authenticated: true - parameters: - - name: id - in: path - description: The payment's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPaymentsCapturesReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/payments/{id}/capture' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Payments - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/payments/{id}/refund: - post: - operationId: PostPaymentsIdRefund - summary: Add Refunds to Payment - description: Add a list of refunds to a payment. - x-authenticated: true - parameters: - - name: id - in: path - description: The payment's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPaymentsRefundsReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/payments/{id}/refund' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Payments - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/price-lists: - get: - operationId: GetPriceLists - summary: List Price Lists - description: Retrieve a list of price lists. The price lists can be filtered by fields such as `id`. The price lists can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/price-lists' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Price Lists - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostPriceLists - summary: Create Price List - description: Create a price list. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPriceListsReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/price-lists' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "title": "{value}", - "description": "{value}", - "prices": [ - { - "currency_code": "{value}", - "amount": 1270314195484672, - "variant_id": "{value}" - } - ] - }' - tags: - - Price Lists - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/price-lists/{id}: - get: - operationId: GetPriceListsId - summary: Get a Price List - description: Retrieve a price list by its ID. You can expand the price list's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The price list's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/price-lists/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Price Lists - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostPriceListsId - summary: Update a Price List - description: Update a price list's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The price list's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPriceListsPriceListReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/price-lists/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "prices": [ - { - "currency_code": "{value}", - "amount": 1670236243755008, - "variant_id": "{value}" - } - ] - }' - tags: - - Price Lists - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeletePriceListsId - summary: Delete a Price List - description: Delete a price list. - x-authenticated: true - parameters: - - name: id - in: path - description: The price list's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/price-lists/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Price Lists - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/price-lists/{id}/prices/batch/add: - post: - operationId: PostPriceListsIdPricesBatchAdd - summary: Add Adds to Price List - description: Add a list of adds to a price list. - x-authenticated: true - parameters: - - name: id - in: path - description: The price list's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPriceListsPriceListPricesBatchAddReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/price-lists/{id}/prices/batch/add' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "prices": [ - { - "currency_code": "{value}", - "amount": 6595965345595392, - "variant_id": "{value}" - } - ] - }' - tags: - - Price Lists - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/price-lists/{id}/prices/batch/remove: - post: - operationId: PostPriceListsIdPricesBatchRemove - summary: Add Removes to Price List - description: Add a list of removes to a price list. - x-authenticated: true - parameters: - - name: id - in: path - description: The price list's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPriceListsPriceListPricesBatchRemoveReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/price-lists/{id}/prices/batch/remove' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "ids": [ - "{value}" - ] - }' - tags: - - Price Lists - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/pricing/rule-types: - get: - operationId: GetPricingRuleTypes - summary: List Pricing - description: Retrieve a list of pricing. The pricing can be filtered by fields such as `id`. The pricing can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminGetPricingRuleTypesParams' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/pricing/rule-types' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Pricing - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostPricingRuleTypes - summary: Create Pricing - description: Create a pricing. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPricingRuleTypesReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/pricing/rule-types' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Thurman", - "rule_attribute": "{value}", - "default_priority": 4640267816665088 - }' - tags: - - Pricing - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/pricing/rule-types/{id}: - get: - operationId: GetPricingRuleTypesId - summary: List Rule Types - description: Retrieve a list of rule types in a pricing. The rule types can be filtered by fields like FILTER FIELDS. The rule types can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The pricing's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminGetPricingRuleTypesRuleTypeParams' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/pricing/rule-types/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Pricing - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostPricingRuleTypesId - summary: Add Rule Types to Pricing - description: Add a list of rule types to a pricing. - x-authenticated: true - parameters: - - name: id - in: path - description: The pricing's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPricingRuleTypesRuleTypeReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/pricing/rule-types/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Pricing - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeletePricingRuleTypesId - summary: Remove Rule Types from Pricing - description: Remove a list of rule types from a pricing. This doesn't delete the Rule Type, only the association between the Rule Type and the pricing. - x-authenticated: true - parameters: - - name: id - in: path - description: The pricing's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeletePricingRuleTypesRuleTypeReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/pricing/rule-types/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Pricing - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/products: - get: - operationId: GetProducts - summary: List Products - description: Retrieve a list of products. The products can be filtered by fields such as `id`. The products can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminGetProductsParams' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/products' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostProducts - summary: Create Product - description: Create a product. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/products' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/products/{id}: - get: - operationId: GetProductsId - summary: Get a Product - description: Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/products/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostProductsId - summary: Update a Product - description: Update a product's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/products/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteProductsId - summary: Delete a Product - description: Delete a product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/products/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/products/{id}/options: - get: - operationId: GetProductsIdOptions - summary: List Options - description: Retrieve a list of options in a product. The options can be filtered by fields like FILTER FIELDS. The options can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/products/{id}/options' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostProductsIdOptions - summary: Add Options to Product - description: Add a list of options to a product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/products/{id}/options' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/products/{id}/options/{option_id}: - get: - operationId: GetProductsIdOptionsOption_id - summary: List Options - description: Retrieve a list of options in a product. The options can be filtered by fields like FILTER FIELDS. The options can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: option_id - in: path - description: The product's option id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/products/{id}/options/{option_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostProductsIdOptionsOption_id - summary: Add Options to Product - description: Add a list of options to a product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: option_id - in: path - description: The product's option id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/products/{id}/options/{option_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteProductsIdOptionsOption_id - summary: Remove Options from Product - description: Remove a list of options from a product. This doesn't delete the Option, only the association between the Option and the product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: option_id - in: path - description: The product's option id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/products/{id}/options/{option_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/products/{id}/variants: - get: - operationId: GetProductsIdVariants - summary: List Variants - description: Retrieve a list of variants in a product. The variants can be filtered by fields like FILTER FIELDS. The variants can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/products/{id}/variants' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostProductsIdVariants - summary: Add Variants to Product - description: Add a list of variants to a product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/products/{id}/variants' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/products/{id}/variants/{variant_id}: - get: - operationId: GetProductsIdVariantsVariant_id - summary: List Variants - description: Retrieve a list of variants in a product. The variants can be filtered by fields like FILTER FIELDS. The variants can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: variant_id - in: path - description: The product's variant id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/products/{id}/variants/{variant_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostProductsIdVariantsVariant_id - summary: Add Variants to Product - description: Add a list of variants to a product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: variant_id - in: path - description: The product's variant id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/products/{id}/variants/{variant_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteProductsIdVariantsVariant_id - summary: Remove Variants from Product - description: Remove a list of variants from a product. This doesn't delete the Variant, only the association between the Variant and the product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: variant_id - in: path - description: The product's variant id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/products/{id}/variants/{variant_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Products - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/promotions: - get: - operationId: GetPromotions - summary: List Promotions - description: Retrieve a list of promotions. The promotions can be filtered by fields such as `id`. The promotions can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/promotions' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostPromotions - summary: Create Promotion - description: Create a promotion. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/promotions' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/promotions/{id}: - get: - operationId: GetPromotionsId - summary: Get a Promotion - description: Retrieve a promotion by its ID. You can expand the promotion's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The promotion's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminGetPromotionsParams' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/promotions/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostPromotionsId - summary: Update a Promotion - description: Update a promotion's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The promotion's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPromotionsPromotionReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/promotions/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeletePromotionsId - summary: Delete a Promotion - description: Delete a promotion. - x-authenticated: true - parameters: - - name: id - in: path - description: The promotion's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/promotions/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/promotions/{id}/buy-rules/batch/add: - post: - operationId: PostPromotionsIdBuyRulesBatchAdd - summary: Add Adds to Promotion - description: Add a list of adds to a promotion. - x-authenticated: true - parameters: - - name: id - in: path - description: The promotion's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/promotions/{id}/buy-rules/batch/add' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "rules": [ - { - "attribute": "{value}", - "values": [ - "{value}" - ] - } - ] - }' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/promotions/{id}/buy-rules/batch/remove: - post: - operationId: PostPromotionsIdBuyRulesBatchRemove - summary: Add Removes to Promotion - description: Add a list of removes to a promotion. - x-authenticated: true - parameters: - - name: id - in: path - description: The promotion's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/promotions/{id}/buy-rules/batch/remove' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "rule_ids": [ - "{value}" - ] - }' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/promotions/{id}/rules/batch/add: - post: - operationId: PostPromotionsIdRulesBatchAdd - summary: Add Adds to Promotion - description: Add a list of adds to a promotion. - x-authenticated: true - parameters: - - name: id - in: path - description: The promotion's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/promotions/{id}/rules/batch/add' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "rules": [ - { - "attribute": "{value}", - "values": [ - "{value}" - ] - } - ] - }' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/promotions/{id}/rules/batch/remove: - post: - operationId: PostPromotionsIdRulesBatchRemove - summary: Add Removes to Promotion - description: Add a list of removes to a promotion. - x-authenticated: true - parameters: - - name: id - in: path - description: The promotion's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/promotions/{id}/rules/batch/remove' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "rule_ids": [ - "{value}" - ] - }' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/promotions/{id}/rules/batch/update: - post: - operationId: PostPromotionsIdRulesBatchUpdate - summary: Add Updates to Promotion - description: Add a list of updates to a promotion. - x-authenticated: true - parameters: - - name: id - in: path - description: The promotion's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchUpdateReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/promotions/{id}/rules/batch/update' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "rules": [ - { - "id": "id_orjnxCxIQlJAp4", - "attribute": "{value}", - "values": [ - "{value}" - ] - } - ] - }' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/promotions/{id}/target-rules/batch/add: - post: - operationId: PostPromotionsIdTargetRulesBatchAdd - summary: Add Adds to Promotion - description: Add a list of adds to a promotion. - x-authenticated: true - parameters: - - name: id - in: path - description: The promotion's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/promotions/{id}/target-rules/batch/add' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "rules": [ - { - "attribute": "{value}", - "values": [ - "{value}" - ] - } - ] - }' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/promotions/{id}/target-rules/batch/remove: - post: - operationId: PostPromotionsIdTargetRulesBatchRemove - summary: Add Removes to Promotion - description: Add a list of removes to a promotion. - x-authenticated: true - parameters: - - name: id - in: path - description: The promotion's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/promotions/{id}/target-rules/batch/remove' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "rule_ids": [ - "{value}" - ] - }' - tags: - - Promotions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/regions: - get: - operationId: GetRegions - summary: List Regions - description: Retrieve a list of regions. The regions can be filtered by fields such as `id`. The regions can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/regions' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Regions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostRegions - summary: Create Region - description: Create a region. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/regions' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Regions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/regions/{id}: - get: - operationId: GetRegionsId - summary: Get a Region - description: Retrieve a region by its ID. You can expand the region's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The region's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/regions/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Regions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostRegionsId - summary: Update a Region - description: Update a region's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The region's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/regions/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Regions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteRegionsId - summary: Delete a Region - description: Delete a region. - x-authenticated: true - parameters: - - name: id - in: path - description: The region's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/regions/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Regions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/sales-channels: - get: - operationId: GetSalesChannels - summary: List Sales Channels - description: Retrieve a list of sales channels. The sales channels can be filtered by fields such as `id`. The sales channels can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/sales-channels' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Sales Channels - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostSalesChannels - summary: Create Sales Channel - description: Create a sales channel. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/sales-channels' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Sales Channels - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/sales-channels/{id}: - get: - operationId: GetSalesChannelsId - summary: Get a Sales Channel - description: Retrieve a sales channel by its ID. You can expand the sales channel's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The sales channel's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/sales-channels/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Sales Channels - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostSalesChannelsId - summary: Update a Sales Channel - description: Update a sales channel's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The sales channel's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/sales-channels/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Sales Channels - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteSalesChannelsId - summary: Delete a Sales Channel - description: Delete a sales channel. - x-authenticated: true - parameters: - - name: id - in: path - description: The sales channel's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/sales-channels/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Sales Channels - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/sales-channels/{id}/products/batch/add: - post: - operationId: PostSalesChannelsIdProductsBatchAdd - summary: Add Adds to Sales Channel - description: Add a list of adds to a sales channel. - x-authenticated: true - parameters: - - name: id - in: path - description: The sales channel's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/sales-channels/{id}/products/batch/add' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Sales Channels - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/stock-locations: - post: - operationId: PostStockLocations - summary: Create Stock Location - description: Create a stock location. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostStockLocationsReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/stock-locations' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Dorthy" - }' - tags: - - Stock Locations - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/stock-locations/{id}: - get: - operationId: GetStockLocationsId - summary: Get a Stock Location - description: Retrieve a stock location by its ID. You can expand the stock location's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The stock location's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/stock-locations/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Stock Locations - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteStockLocationsId - summary: Delete a Stock Location - description: Delete a stock location. - x-authenticated: true - parameters: - - name: id - in: path - description: The stock location's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/stock-locations/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Stock Locations - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/stores: - get: - operationId: GetStores - summary: List Stores - description: Retrieve a list of stores. The stores can be filtered by fields such as `id`. The stores can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/stores' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Stores - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/stores/{id}: - get: - operationId: GetStoresId - summary: Get a Store - description: Retrieve a store by its ID. You can expand the store's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The store's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/stores/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Stores - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostStoresId - summary: Update a Store - description: Update a store's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The store's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/stores/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Stores - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/tax-rates: - get: - operationId: GetTaxRates - summary: List Tax Rates - description: Retrieve a list of tax rates. The tax rates can be filtered by fields such as `id`. The tax rates can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/tax-rates' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Tax Rates - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostTaxRates - summary: Create Tax Rate - description: Create a tax rate. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostTaxRatesReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/tax-rates' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Emilio", - "tax_region_id": "{value}" - }' - tags: - - Tax Rates - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/tax-rates/{id}: - get: - operationId: GetTaxRatesId - summary: Get a Tax Rate - description: Retrieve a tax rate by its ID. You can expand the tax rate's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The tax rate's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/tax-rates/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Tax Rates - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostTaxRatesId - summary: Update a Tax Rate - description: Update a tax rate's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The tax rate's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostTaxRatesTaxRateReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/tax-rates/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Tax Rates - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteTaxRatesId - summary: Delete a Tax Rate - description: Delete a tax rate. - x-authenticated: true - parameters: - - name: id - in: path - description: The tax rate's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/tax-rates/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Tax Rates - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/tax-rates/{id}/rules: - post: - operationId: PostTaxRatesIdRules - summary: Add Rules to Tax Rate - description: Add a list of rules to a tax rate. - x-authenticated: true - parameters: - - name: id - in: path - description: The tax rate's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostTaxRatesTaxRateRulesReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/tax-rates/{id}/rules' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "reference": "{value}", - "reference_id": "{value}" - }' - tags: - - Tax Rates - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/tax-rates/{id}/rules/{rule_id}: - delete: - operationId: DeleteTaxRatesIdRulesRule_id - summary: Remove Rules from Tax Rate - description: Remove a list of rules from a tax rate. This doesn't delete the Rule, only the association between the Rule and the tax rate. - x-authenticated: true - parameters: - - name: id - in: path - description: The tax rate's ID. - required: true - schema: - type: string - - name: rule_id - in: path - description: The tax rate's rule id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/tax-rates/{id}/rules/{rule_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Tax Rates - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/tax-regions: - post: - operationId: PostTaxRegions - summary: Create Tax Region - description: Create a tax region. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostTaxRegionsReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/tax-regions' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "country_code": "{value}" - }' - tags: - - Tax Regions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/tax-regions/{id}: - delete: - operationId: DeleteTaxRegionsId - summary: Delete a Tax Region - description: Delete a tax region. - x-authenticated: true - parameters: - - name: id - in: path - description: The tax region's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/tax-regions/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Tax Regions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/users: - get: - operationId: GetUsers - summary: List Users - description: Retrieve a list of users. The users can be filtered by fields such as `id`. The users can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/users' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Users - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostUsers - summary: Create User - description: Create a user. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/users' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Users - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/users/me: - get: - operationId: GetUsersMe - summary: List Users - description: Retrieve a list of users. The users can be filtered by fields such as `id`. The users can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/users/me' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Users - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/users/{id}: - get: - operationId: GetUsersId - summary: Get a User - description: Retrieve a user by its ID. You can expand the user's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The user's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/users/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Users - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostUsersId - summary: Update a User - description: Update a user's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The user's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminUpdateUserRequest' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/users/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "avatar_url": "{value}" - }' - tags: - - Users - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteUsersId - summary: Delete a User - description: Delete a user. - x-authenticated: true - parameters: - - name: id - in: path - description: The user's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X DELETE '{backend_url}/admin/users/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Users - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/workflows-executions: - get: - operationId: GetWorkflowsExecutions - summary: List Workflows Executions - description: Retrieve a list of workflows executions. The workflows executions can be filtered by fields such as `id`. The workflows executions can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/workflows-executions' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Workflows Executions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/workflows-executions/{id}: - get: - operationId: GetWorkflowsExecutionsId - summary: Get a Workflows Execution - description: Retrieve a workflows execution by its ID. You can expand the workflows execution's relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The workflows execution's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/workflows-executions/{id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Workflows Executions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/workflows-executions/{workflow_id}/run: - post: - operationId: PostWorkflowsExecutionsWorkflow_idRun - summary: Add Runs to Workflows Execution - description: Add a list of runs to a workflows execution. - x-authenticated: true - parameters: - - name: workflow_id - in: path - description: The workflows execution's workflow id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostWorkflowsRunReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/run' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Workflows Executions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/workflows-executions/{workflow_id}/steps/failure: - post: - operationId: PostWorkflowsExecutionsWorkflow_idStepsFailure - summary: Add Failures to Workflows Execution - description: Add a list of failures to a workflows execution. - x-authenticated: true - parameters: - - name: workflow_id - in: path - description: The workflows execution's workflow id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostWorkflowsAsyncResponseReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/steps/failure' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "transaction_id": "{value}", - "step_id": "{value}" - }' - tags: - - Workflows Executions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/workflows-executions/{workflow_id}/steps/success: - post: - operationId: PostWorkflowsExecutionsWorkflow_idStepsSuccess - summary: Add Successes to Workflows Execution - description: Add a list of successes to a workflows execution. - x-authenticated: true - parameters: - - name: workflow_id - in: path - description: The workflows execution's workflow id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostWorkflowsAsyncResponseReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/steps/success' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "transaction_id": "{value}", - "step_id": "{value}" - }' - tags: - - Workflows Executions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/workflows-executions/{workflow_id}/subscribe: - get: - operationId: GetWorkflowsExecutionsWorkflow_idSubscribe - summary: List Subscribes - description: Retrieve a list of subscribes in a workflows execution. The subscribes can be filtered by fields like FILTER FIELDS. The subscribes can also be paginated. - x-authenticated: true - parameters: - - name: workflow_id - in: path - description: The workflows execution's workflow id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/workflows-executions/{workflow_id}/subscribe' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Workflows Executions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/workflows-executions/{workflow_id}/{transaction_id}: - get: - operationId: GetWorkflowsExecutionsWorkflow_idTransaction_id - summary: 'List ' - description: Retrieve a list of in a workflows execution. The can be filtered by fields like FILTER FIELDS. The can also be paginated. - x-authenticated: true - parameters: - - name: workflow_id - in: path - description: The workflows execution's workflow id. - required: true - schema: - type: string - - name: transaction_id - in: path - description: The workflows execution's transaction id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/workflows-executions/{workflow_id}/{transaction_id}' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Workflows Executions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /admin/workflows-executions/{workflow_id}/{transaction_id}/{step_id}/subscribe: - get: - operationId: GetWorkflowsExecutionsWorkflow_idTransaction_idStep_idSubscribe - summary: List Subscribes - description: Retrieve a list of subscribes in a workflows execution. The subscribes can be filtered by fields like FILTER FIELDS. The subscribes can also be paginated. - x-authenticated: true - parameters: - - name: workflow_id - in: path - description: The workflows execution's workflow id. - required: true - schema: - type: string - - name: transaction_id - in: path - description: The workflows execution's transaction id. - required: true - schema: - type: string - - name: step_id - in: path - description: The workflows execution's step id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl '{backend_url}/admin/workflows-executions/{workflow_id}/{transaction_id}/{step_id}/subscribe' \ - -H 'x-medusa-access-token: {api_token}' - tags: - - Workflows Executions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} -components: - responses: - default_error: - description: Default Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - code: unknown_error - message: An unknown error occurred. - type: unknown_error - invalid_state_error: - description: Invalid State Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - code: unknown_error - message: The request conflicted with another request. You may retry the request with the provided Idempotency-Key. - type: QueryRunnerAlreadyReleasedError - invalid_request_error: - description: Invalid Request Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - code: invalid_request_error - message: Discount with code TEST already exists. - type: duplicate_error - not_found_error: - description: Not Found Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - message: Entity with id 1 was not found - type: not_found - 400_error: - description: Client Error or Multiple Errors - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/Error' - - $ref: '#/components/schemas/MultipleErrors' - examples: - not_allowed: - $ref: '#/components/examples/not_allowed_error' - invalid_data: - $ref: '#/components/examples/invalid_data_error' - MultipleErrors: - $ref: '#/components/examples/multiple_errors' - 500_error: - description: Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - examples: - database: - $ref: '#/components/examples/database_error' - unexpected_state: - $ref: '#/components/examples/unexpected_state_error' - invalid_argument: - $ref: '#/components/examples/invalid_argument_error' - default_error: - $ref: '#/components/examples/default_error' - unauthorized: - description: User is not authorized. Must log in first - content: - text/plain: - schema: - type: string - default: Unauthorized - example: Unauthorized - incorrect_credentials: - description: User does not exist or incorrect credentials - content: - text/plain: - schema: - type: string - default: Unauthorized - example: Unauthorized - examples: - not_allowed_error: - summary: Not Allowed Error - value: - message: Discount must be set to dynamic - type: not_allowed - invalid_data_error: - summary: Invalid Data Error - value: - message: first_name must be a string - type: invalid_data - multiple_errors: - summary: Multiple Errors - value: - message: Provided request body contains errors. Please check the data and retry the request - errors: - - message: first_name must be a string - type: invalid_data - - message: Discount must be set to dynamic - type: not_allowed - database_error: - summary: Database Error - value: - code: api_error - message: An error occured while hashing password - type: database_error - unexpected_state_error: - summary: Unexpected State Error - value: - message: cart.total must be defined - type: unexpected_state - invalid_argument_error: - summary: Invalid Argument Error - value: - message: cart.total must be defined - type: unexpected_state - default_error: - summary: Default Error - value: - code: unknown_error - message: An unknown error occurred. - type: unknown_error - securitySchemes: - api_token: - type: apiKey - x-displayName: API Token - in: header - name: x-medusa-access-token - jwt_token: - type: http - x-displayName: JWT Token - scheme: bearer - cookie_auth: - type: apiKey - in: cookie - name: connect.sid - x-displayName: Cookie Session ID - schemas: - AdminDeletePricingRuleTypesRuleTypeReq: - type: object - description: SUMMARY - x-schemaName: AdminDeletePricingRuleTypesRuleTypeReq - properties: {} - AdminGetPricingRuleTypesParams: - type: object - description: SUMMARY - x-schemaName: AdminGetPricingRuleTypesParams - properties: - rule_attribute: - type: array - description: The pricing's rule attribute. - items: - type: string - title: rule_attribute - description: The rule attribute's details. - expand: - type: string - title: expand - description: The pricing's expand. - fields: - type: string - title: fields - description: The pricing's fields. - offset: - type: number - title: offset - description: The pricing's offset. - limit: - type: number - title: limit - description: The pricing's limit. - order: - type: string - title: order - description: The pricing's order. - AdminGetPricingRuleTypesRuleTypeParams: - type: object - description: SUMMARY - x-schemaName: AdminGetPricingRuleTypesRuleTypeParams - properties: - expand: - type: string - title: expand - description: The pricing's expand. - fields: - type: string - title: fields - description: The pricing's fields. - AdminGetProductsParams: - type: object - description: SUMMARY - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The product's q. - id: - oneOf: - - type: string - title: id - description: The product's ID. - - type: array - description: The product's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The product's status. - items: {} - title: - type: string - title: title - description: The product's title. - handle: - type: string - title: handle - description: The product's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The product's is giftcard. - price_list_id: - type: array - description: The product's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The product's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The product's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The product's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The product's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The product's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The product's $and. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $and's q. - id: - oneOf: - - type: string - title: id - description: The $and's ID. - - type: array - description: The $and's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $and's status. - items: {} - title: - type: string - title: title - description: The $and's title. - handle: - type: string - title: handle - description: The $and's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $and's is giftcard. - price_list_id: - type: array - description: The $and's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $and's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $and's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $and's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $and's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $and's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $and's details. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $and's q. - id: - oneOf: - - type: string - title: id - description: The $and's ID. - - type: array - description: The $and's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $and's status. - items: {} - title: - type: string - title: title - description: The $and's title. - handle: - type: string - title: handle - description: The $and's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $and's is giftcard. - price_list_id: - type: array - description: The $and's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $and's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $and's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $and's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $and's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $and's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $and's details. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: {} - $or: - type: array - description: The $and's $or. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: {} - expand: - type: string - title: expand - description: The $and's expand. - fields: - type: string - title: fields - description: The $and's fields. - offset: - type: number - title: offset - description: The $and's offset. - limit: - type: number - title: limit - description: The $and's limit. - order: - type: string - title: order - description: The $and's order. - $or: - type: array - description: The $and's $or. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $or's q. - id: - oneOf: - - type: string - title: id - description: The $or's ID. - - type: array - description: The $or's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $or's status. - items: {} - title: - type: string - title: title - description: The $or's title. - handle: - type: string - title: handle - description: The $or's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $or's is giftcard. - price_list_id: - type: array - description: The $or's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $or's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $or's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $or's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $or's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $or's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $or's $and. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: {} - $or: - type: array - description: The $or's details. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: {} - expand: - type: string - title: expand - description: The $or's expand. - fields: - type: string - title: fields - description: The $or's fields. - offset: - type: number - title: offset - description: The $or's offset. - limit: - type: number - title: limit - description: The $or's limit. - order: - type: string - title: order - description: The $or's order. - expand: - type: string - title: expand - description: The $and's expand. - fields: - type: string - title: fields - description: The $and's fields. - offset: - type: number - title: offset - description: The $and's offset. - limit: - type: number - title: limit - description: The $and's limit. - order: - type: string - title: order - description: The $and's order. - $or: - type: array - description: The product's $or. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $or's q. - id: - oneOf: - - type: string - title: id - description: The $or's ID. - - type: array - description: The $or's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $or's status. - items: {} - title: - type: string - title: title - description: The $or's title. - handle: - type: string - title: handle - description: The $or's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $or's is giftcard. - price_list_id: - type: array - description: The $or's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $or's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $or's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $or's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $or's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $or's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $or's $and. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $and's q. - id: - oneOf: - - type: string - title: id - description: The $and's ID. - - type: array - description: The $and's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $and's status. - items: {} - title: - type: string - title: title - description: The $and's title. - handle: - type: string - title: handle - description: The $and's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $and's is giftcard. - price_list_id: - type: array - description: The $and's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $and's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $and's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $and's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $and's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $and's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $and's details. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: {} - $or: - type: array - description: The $and's $or. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: {} - expand: - type: string - title: expand - description: The $and's expand. - fields: - type: string - title: fields - description: The $and's fields. - offset: - type: number - title: offset - description: The $and's offset. - limit: - type: number - title: limit - description: The $and's limit. - order: - type: string - title: order - description: The $and's order. - $or: - type: array - description: The $or's details. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $or's q. - id: - oneOf: - - type: string - title: id - description: The $or's ID. - - type: array - description: The $or's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $or's status. - items: {} - title: - type: string - title: title - description: The $or's title. - handle: - type: string - title: handle - description: The $or's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $or's is giftcard. - price_list_id: - type: array - description: The $or's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $or's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $or's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $or's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $or's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $or's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $or's $and. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: {} - $or: - type: array - description: The $or's details. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: {} - expand: - type: string - title: expand - description: The $or's expand. - fields: - type: string - title: fields - description: The $or's fields. - offset: - type: number - title: offset - description: The $or's offset. - limit: - type: number - title: limit - description: The $or's limit. - order: - type: string - title: order - description: The $or's order. - expand: - type: string - title: expand - description: The $or's expand. - fields: - type: string - title: fields - description: The $or's fields. - offset: - type: number - title: offset - description: The $or's offset. - limit: - type: number - title: limit - description: The $or's limit. - order: - type: string - title: order - description: The $or's order. - expand: - type: string - title: expand - description: The product's expand. - fields: - type: string - title: fields - description: The product's fields. - offset: - type: number - title: offset - description: The product's offset. - limit: - type: number - title: limit - description: The product's limit. - order: - type: string - title: order - description: The product's order. - AdminGetPromotionsParams: - type: object - description: SUMMARY - x-schemaName: AdminGetPromotionsParams - properties: - code: - type: string - title: code - description: The promotion's code. - expand: - type: string - title: expand - description: The promotion's expand. - fields: - type: string - title: fields - description: The promotion's fields. - offset: - type: number - title: offset - description: The promotion's offset. - limit: - type: number - title: limit - description: The promotion's limit. - order: - type: string - title: order - description: The promotion's order. - AdminPostCampaignsReq: - type: object - description: The promotion's campaign. - x-schemaName: AdminPostCampaignsReq - required: - - name - properties: - name: - type: string - title: name - description: The campaign's name. - campaign_identifier: - type: string - title: campaign_identifier - description: The campaign's campaign identifier. - description: - type: string - title: description - description: The campaign's description. - currency: - type: string - title: currency - description: The campaign's currency. - budget: - $ref: '#/components/schemas/CampaignBudget' - starts_at: - type: string - title: starts_at - description: The campaign's starts at. - ends_at: - type: string - title: ends_at - description: The campaign's ends at. - promotions: - type: array - description: The campaign's promotions. - items: - type: object - description: The promotion's promotions. - x-schemaName: IdObject - required: - - id - properties: - id: - type: string - title: id - description: The promotion's ID. - AdminPostCustomerGroupsGroupCustomersBatchReq: - type: object - description: SUMMARY - x-schemaName: AdminPostCustomerGroupsGroupCustomersBatchReq - required: - - customer_ids - properties: - customer_ids: - type: array - description: The customer group's customer ids. - items: - type: object - description: The customer id's customer ids. - x-schemaName: CustomerGroupsBatchCustomer - required: - - id - properties: - id: - type: string - title: id - description: The customer id's ID. - AdminPostFulfillmentShippingOptionsRulesBatchAddReq: - type: object - description: SUMMARY - x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchAddReq - required: - - rules - properties: - rules: - type: array - description: The fulfillment's rules. - items: - type: object - description: The rule's rules. - x-schemaName: FulfillmentRuleCreate - required: - - operator - - attribute - - value - properties: - operator: {} - attribute: - type: string - title: attribute - description: The rule's attribute. - value: - oneOf: - - type: string - title: value - description: The rule's value. - - type: array - description: The rule's value. - items: - type: string - title: value - description: The value's details. - AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq: - type: object - description: SUMMARY - x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq - required: - - rule_ids - properties: - rule_ids: - type: array - description: The fulfillment's rule ids. - items: - type: string - title: rule_ids - description: The rule id's rule ids. - AdminPostInventoryItemsInventoryItemReq: - type: object - description: SUMMARY - x-schemaName: AdminPostInventoryItemsInventoryItemReq - properties: - sku: - type: string - title: sku - description: The inventory item's sku. - origin_country: - type: string - title: origin_country - description: The inventory item's origin country. - hs_code: - type: string - title: hs_code - description: The inventory item's hs code. - mid_code: - type: string - title: mid_code - description: The inventory item's mid code. - material: - type: string - title: material - description: The inventory item's material. - weight: - type: number - title: weight - description: The inventory item's weight. - height: - type: number - title: height - description: The inventory item's height. - length: - type: number - title: length - description: The inventory item's length. - width: - type: number - title: width - description: The inventory item's width. - title: - type: string - title: title - description: The inventory item's title. - description: - type: string - title: description - description: The inventory item's description. - thumbnail: - type: string - title: thumbnail - description: The inventory item's thumbnail. - requires_shipping: - type: boolean - title: requires_shipping - description: The inventory item's requires shipping. - AdminPostInventoryItemsItemLocationLevelsLevelReq: - type: object - description: SUMMARY - x-schemaName: AdminPostInventoryItemsItemLocationLevelsLevelReq - properties: - incoming_quantity: - type: number - title: incoming_quantity - description: The inventory item's incoming quantity. - stocked_quantity: - type: number - title: stocked_quantity - description: The inventory item's stocked quantity. - AdminPostInventoryItemsItemLocationLevelsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostInventoryItemsItemLocationLevelsReq - required: - - location_id - - stocked_quantity - properties: - location_id: - type: string - title: location_id - description: The inventory item's location id. - stocked_quantity: - type: number - title: stocked_quantity - description: The inventory item's stocked quantity. - incoming_quantity: - type: number - title: incoming_quantity - description: The inventory item's incoming quantity. - AdminPostInventoryItemsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostInventoryItemsReq - properties: - sku: - type: string - title: sku - description: The inventory item's sku. - hs_code: - type: string - title: hs_code - description: The inventory item's hs code. - weight: - type: number - title: weight - description: The inventory item's weight. - length: - type: number - title: length - description: The inventory item's length. - height: - type: number - title: height - description: The inventory item's height. - width: - type: number - title: width - description: The inventory item's width. - origin_country: - type: string - title: origin_country - description: The inventory item's origin country. - mid_code: - type: string - title: mid_code - description: The inventory item's mid code. - material: - type: string - title: material - description: The inventory item's material. - title: - type: string - title: title - description: The inventory item's title. - description: - type: string - title: description - description: The inventory item's description. - thumbnail: - type: string - title: thumbnail - description: The inventory item's thumbnail. - metadata: - type: object - description: The inventory item's metadata. - properties: {} - AdminPostInvitesInviteAcceptReq: - type: object - description: SUMMARY - x-schemaName: AdminPostInvitesInviteAcceptReq - required: - - first_name - - last_name - properties: - first_name: - type: string - title: first_name - description: The invite's first name. - last_name: - type: string - title: last_name - description: The invite's last name. - AdminPostPaymentsCapturesReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPaymentsCapturesReq - properties: - amount: - type: number - title: amount - description: The payment's amount. - AdminPostPaymentsRefundsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPaymentsRefundsReq - properties: - amount: - type: number - title: amount - description: The payment's amount. - AdminPostPriceListsPriceListPricesBatchAddReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPriceListsPriceListPricesBatchAddReq - required: - - prices - properties: - prices: - type: array - description: The price list's prices. - items: - type: object - description: The price's prices. - x-schemaName: AdminPriceListPricesCreateReq - required: - - currency_code - - amount - - variant_id - properties: - currency_code: - type: string - title: currency_code - description: The price's currency code. - amount: - type: number - title: amount - description: The price's amount. - variant_id: - type: string - title: variant_id - description: The price's variant id. - min_quantity: - type: number - title: min_quantity - description: The price's min quantity. - max_quantity: - type: number - title: max_quantity - description: The price's max quantity. - rules: - type: object - description: The price's rules. - properties: {} - AdminPostPriceListsPriceListPricesBatchRemoveReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPriceListsPriceListPricesBatchRemoveReq - required: - - ids - properties: - ids: - type: array - description: The price list's ids. - items: - type: string - title: ids - description: The id's ids. - AdminPostPriceListsPriceListReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPriceListsPriceListReq - required: - - prices - properties: - title: - type: string - title: title - description: The price list's title. - description: - type: string - title: description - description: The price list's description. - starts_at: - type: string - title: starts_at - description: The price list's starts at. - ends_at: - type: string - title: ends_at - description: The price list's ends at. - status: {} - type: {} - prices: - type: array - description: The price list's prices. - items: - type: object - description: The price's prices. - x-schemaName: AdminPriceListPricesCreateReq - required: - - currency_code - - amount - - variant_id - properties: - currency_code: - type: string - title: currency_code - description: The price's currency code. - amount: - type: number - title: amount - description: The price's amount. - variant_id: - type: string - title: variant_id - description: The price's variant id. - min_quantity: - type: number - title: min_quantity - description: The price's min quantity. - max_quantity: - type: number - title: max_quantity - description: The price's max quantity. - rules: - type: object - description: The price's rules. - properties: {} - rules: - type: object - description: The price list's rules. - properties: {} - AdminPostPriceListsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPriceListsReq - required: - - title - - description - - type - - prices - properties: - title: - type: string - title: title - description: The price list's title. - description: - type: string - title: description - description: The price list's description. - starts_at: - type: string - title: starts_at - description: The price list's starts at. - ends_at: - type: string - title: ends_at - description: The price list's ends at. - status: {} - type: {} - prices: - type: array - description: The price list's prices. - items: - type: object - description: The price's prices. - x-schemaName: AdminPriceListPricesCreateReq - required: - - currency_code - - amount - - variant_id - properties: - currency_code: - type: string - title: currency_code - description: The price's currency code. - amount: - type: number - title: amount - description: The price's amount. - variant_id: - type: string - title: variant_id - description: The price's variant id. - min_quantity: - type: number - title: min_quantity - description: The price's min quantity. - max_quantity: - type: number - title: max_quantity - description: The price's max quantity. - rules: - type: object - description: The price's rules. - properties: {} - rules: - type: object - description: The price list's rules. - properties: {} - AdminPostPricingRuleTypesReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPricingRuleTypesReq - required: - - name - - rule_attribute - - default_priority - properties: - name: - type: string - title: name - description: The pricing's name. - rule_attribute: - type: string - title: rule_attribute - description: The pricing's rule attribute. - default_priority: - type: number - title: default_priority - description: The pricing's default priority. - AdminPostPricingRuleTypesRuleTypeReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPricingRuleTypesRuleTypeReq - properties: - name: - type: string - title: name - description: The pricing's name. - rule_attribute: - type: string - title: rule_attribute - description: The pricing's rule attribute. - default_priority: - type: number - title: default_priority - description: The pricing's default priority. - AdminPostPromotionsPromotionReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPromotionsPromotionReq - properties: - code: - type: string - title: code - description: The promotion's code. - is_automatic: - type: boolean - title: is_automatic - description: The promotion's is automatic. - type: {} - campaign_id: - type: string - title: campaign_id - description: The promotion's campaign id. - campaign: - $ref: '#/components/schemas/AdminPostCampaignsReq' - application_method: - $ref: '#/components/schemas/ApplicationMethodsMethodPostReq' - rules: - type: array - description: The promotion's rules. - items: - type: object - description: The rule's rules. - x-schemaName: PromotionRule - required: - - operator - - attribute - - values - properties: - operator: {} - description: - type: string - title: description - description: The rule's description. - attribute: - type: string - title: attribute - description: The rule's attribute. - values: - type: array - description: The rule's values. - items: - type: string - title: values - description: The value's values. - AdminPostPromotionsPromotionRulesBatchAddReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPromotionsPromotionRulesBatchAddReq - required: - - rules - properties: - rules: - type: array - description: The promotion's rules. - items: - type: object - description: The rule's rules. - x-schemaName: PromotionRule - required: - - operator - - attribute - - values - properties: - operator: {} - description: - type: string - title: description - description: The rule's description. - attribute: - type: string - title: attribute - description: The rule's attribute. - values: - type: array - description: The rule's values. - items: - type: string - title: values - description: The value's values. - AdminPostPromotionsPromotionRulesBatchRemoveReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPromotionsPromotionRulesBatchRemoveReq - required: - - rule_ids - properties: - rule_ids: - type: array - description: The promotion's rule ids. - items: - type: string - title: rule_ids - description: The rule id's rule ids. - AdminPostPromotionsPromotionRulesBatchUpdateReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPromotionsPromotionRulesBatchUpdateReq - required: - - rules - properties: - rules: - type: array - description: The promotion's rules. - items: - type: object - description: The rule's rules. - x-schemaName: UpdatePromotionRule - required: - - id - - attribute - - values - properties: - id: - type: string - title: id - description: The rule's ID. - operator: {} - description: - type: string - title: description - description: The rule's description. - attribute: - type: string - title: attribute - description: The rule's attribute. - values: - type: array - description: The rule's values. - items: - type: string - title: values - description: The value's values. - AdminPostStockLocationsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostStockLocationsReq - required: - - name - properties: - name: - type: string - title: name - description: The stock location's name. - address: - $ref: '#/components/schemas/StockLocationAddress' - address_id: - type: string - title: address_id - description: The stock location's address id. - metadata: - type: object - description: The stock location's metadata. - properties: {} - AdminPostTaxRatesReq: - type: object - description: SUMMARY - x-schemaName: AdminPostTaxRatesReq - required: - - name - - tax_region_id - properties: - rate: - type: number - title: rate - description: The tax rate's rate. - code: - type: string - title: code - description: The tax rate's code. - rules: - type: array - description: The tax rate's rules. - items: - type: object - description: The rule's rules. - x-schemaName: CreateTaxRateRule - required: - - reference - - reference_id - properties: - reference: - type: string - title: reference - description: The rule's reference. - reference_id: - type: string - title: reference_id - description: The rule's reference id. - name: - type: string - title: name - description: The tax rate's name. - is_default: - type: boolean - title: is_default - description: The tax rate's is default. - is_combinable: - type: boolean - title: is_combinable - description: The tax rate's is combinable. - tax_region_id: - type: string - title: tax_region_id - description: The tax rate's tax region id. - metadata: - type: object - description: The tax rate's metadata. - properties: {} - AdminPostTaxRatesTaxRateReq: - type: object - description: SUMMARY - x-schemaName: AdminPostTaxRatesTaxRateReq - properties: - code: - type: string - title: code - description: The tax rate's code. - name: - type: string - title: name - description: The tax rate's name. - region_id: - type: string - title: region_id - description: The tax rate's region id. - rate: - type: number - title: rate - description: The tax rate's rate. - products: - type: array - description: The tax rate's products. - items: - type: string - title: products - description: The product's products. - shipping_options: - type: array - description: The tax rate's shipping options. - items: - type: string - title: shipping_options - description: The shipping option's shipping options. - product_types: - type: array - description: The tax rate's product types. - items: - type: string - title: product_types - description: The product type's product types. - AdminPostTaxRatesTaxRateRulesReq: - type: object - description: SUMMARY - x-schemaName: AdminPostTaxRatesTaxRateRulesReq - required: - - reference - - reference_id - properties: - reference: - type: string - title: reference - description: The tax rate's reference. - reference_id: - type: string - title: reference_id - description: The tax rate's reference id. - AdminPostTaxRegionsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostTaxRegionsReq - required: - - country_code - properties: - country_code: - type: string - title: country_code - description: The tax region's country code. - province_code: - type: string - title: province_code - description: The tax region's province code. - parent_id: - type: string - title: parent_id - description: The tax region's parent id. - default_tax_rate: - $ref: '#/components/schemas/CreateDefaultTaxRate' - metadata: - type: object - description: The tax region's metadata. - properties: {} - AdminPostWorkflowsAsyncResponseReq: - type: object - description: SUMMARY - x-schemaName: AdminPostWorkflowsAsyncResponseReq - required: - - transaction_id - - step_id - properties: - transaction_id: - type: string - title: transaction_id - description: The workflows execution's transaction id. - step_id: - type: string - title: step_id - description: The workflows execution's step id. - response: {} - compensate_input: {} - action: {} - AdminPostWorkflowsRunReq: - type: object - description: SUMMARY - x-schemaName: AdminPostWorkflowsRunReq - properties: - input: {} - transaction_id: - type: string - title: transaction_id - description: The workflows execution's transaction id. - AdminUpdateUserRequest: - type: object - description: SUMMARY - x-schemaName: AdminUpdateUserRequest - required: - - avatar_url - properties: - first_name: - type: string - title: first_name - description: The user's first name. - last_name: - type: string - title: last_name - description: The user's last name. - avatar_url: - type: string - title: avatar_url - description: The user's avatar url. - ApplicationMethodsMethodPostReq: - type: object - description: The promotion's application method. - x-schemaName: ApplicationMethodsMethodPostReq - properties: - description: - type: string - title: description - description: The application method's description. - value: - type: string - title: value - description: The application method's value. - max_quantity: - type: number - title: max_quantity - description: The application method's max quantity. - type: {} - target_type: {} - allocation: {} - target_rules: - type: array - description: The application method's target rules. - items: - type: object - description: The target rule's target rules. - x-schemaName: PromotionRule - required: - - operator - - attribute - - values - properties: - operator: {} - description: - type: string - title: description - description: The target rule's description. - attribute: - type: string - title: attribute - description: The target rule's attribute. - values: - type: array - description: The target rule's values. - items: - type: string - title: values - description: The value's values. - buy_rules: - type: array - description: The application method's buy rules. - items: - type: object - description: The buy rule's buy rules. - x-schemaName: PromotionRule - required: - - operator - - attribute - - values - properties: - operator: {} - description: - type: string - title: description - description: The buy rule's description. - attribute: - type: string - title: attribute - description: The buy rule's attribute. - values: - type: array - description: The buy rule's values. - items: - type: string - title: values - description: The value's values. - apply_to_quantity: - type: number - title: apply_to_quantity - description: The application method's apply to quantity. - buy_rules_min_quantity: - type: number - title: buy_rules_min_quantity - description: The application method's buy rules min quantity. - CampaignBudget: - type: object - description: The campaign's budget. - x-schemaName: CampaignBudget - properties: - type: {} - limit: - type: number - title: limit - description: The budget's limit. - CreateDefaultTaxRate: - type: object - description: The tax region's default tax rate. - x-schemaName: CreateDefaultTaxRate - required: - - name - properties: - rate: - type: number - title: rate - description: The default tax rate's rate. - code: - type: string - title: code - description: The default tax rate's code. - name: - type: string - title: name - description: The default tax rate's name. - metadata: - type: object - description: The default tax rate's metadata. - properties: {} - Error: - title: Response Error - type: object - properties: - code: - type: string - description: A slug code to indicate the type of the error. - enum: - - invalid_state_error - - invalid_request_error - - api_error - - unknown_error - message: - type: string - description: Description of the error that occurred. - example: first_name must be a string - type: - type: string - description: A slug indicating the type of the error. - enum: - - QueryRunnerAlreadyReleasedError - - TransactionAlreadyStartedError - - TransactionNotStartedError - - conflict - - unauthorized - - payment_authorization_error - - duplicate_error - - not_allowed - - invalid_data - - not_found - - database_error - - unexpected_state - - invalid_argument - - unknown_error - MultipleErrors: - title: Multiple Errors - type: object - properties: - errors: - type: array - description: Array of errors - items: - $ref: '#/components/schemas/Error' - message: - type: string - default: Provided request body contains errors. Please check the data and retry the request - StockLocationAddress: - type: object - description: The stock location's address. - x-schemaName: StockLocationAddress - required: - - address_1 - - country_code - properties: - address_1: - type: string - title: address_1 - description: The address's address 1. - address_2: - type: string - title: address_2 - description: The address's address 2. - company: - type: string - title: company - description: The address's company. - city: - type: string - title: city - description: The address's city. - country_code: - type: string - title: country_code - description: The address's country code. - phone: - type: string - title: phone - description: The address's phone. - postal_code: - type: string - title: postal_code - description: The address's postal code. - province: - type: string - title: province - description: The address's province. - StorePostCartsCartTaxesReq: - type: object - description: SUMMARY - x-schemaName: StorePostCartsCartTaxesReq - properties: {} - StorePostPaymentCollectionsPaymentSessionReq: - type: object - description: SUMMARY - x-schemaName: StorePostPaymentCollectionsPaymentSessionReq - required: - - provider_id - properties: - provider_id: - type: string - title: provider_id - description: The payment collection's provider id. - context: {} - data: - type: object - description: The payment collection's data. - properties: {} diff --git a/www/apps/api-reference/specs-v2/admin/openapi.yaml b/www/apps/api-reference/specs-v2/admin/openapi.yaml deleted file mode 100644 index d12892493e..0000000000 --- a/www/apps/api-reference/specs-v2/admin/openapi.yaml +++ /dev/null @@ -1,294 +0,0 @@ -openapi: 3.0.0 -info: - version: 2.0.0 - title: Medusa Admin API - license: - name: MIT - url: https://github.com/medusajs/medusa/blob/master/LICENSE -servers: - - url: http://localhost:9000 - - url: https://api.medusa-commerce.com -tags: - - name: Api Keys - - name: Campaigns - - name: Collections - - name: Currencies - description: > - A store can use unlimited currencies, and each region must be associated - with at least one currency. - - Currencies are defined within the Medusa backend. Currency API Routes - allow admins to list and update currencies. - externalDocs: - description: How to manage currencies - url: >- - https://docs.medusajs.com/modules/regions-and-currencies/admin/manage-currencies - - name: Customer Groups - description: > - Customer Groups can be used to organize customers that share similar data - or attributes into dedicated groups. - - This can be useful for different purposes such as setting a different - price for a specific customer group. - externalDocs: - description: How to manage customer groups - url: https://docs.medusajs.com/modules/customers/admin/manage-customer-groups - - name: Customers - description: > - Customers can either be created when they register through the Store APIs, - or created by the admin using the Admin APIs. - externalDocs: - description: How to manage customers - url: https://docs.medusajs.com/modules/customers/admin/manage-customers - - name: Fulfillment - - name: Inventory Items - description: > - Inventory items, provided by the [Inventory - Module](https://docs.medusajs.com/modules/multiwarehouse/inventory-module), - can be used to manage the inventory of saleable items in your store. - externalDocs: - description: How to manage inventory items - url: >- - https://docs.medusajs.com/modules/multiwarehouse/admin/manage-inventory-items - - name: Invites - description: > - An admin can invite new users to manage their team. This would allow new - users to authenticate as admins and perform admin functionalities. - externalDocs: - description: How to manage invites - url: https://docs.medusajs.com/modules/users/admin/manage-invites - - name: Payments - description: > - A payment can be related to an order, swap, return, or more. It can be - captured or refunded. - - name: Price Lists - description: > - A price list are special prices applied to products based on a set of - conditions, such as customer group. - externalDocs: - description: How to manage price lists - url: https://docs.medusajs.com/modules/price-lists/admin/manage-price-lists - - name: Pricing - - name: Products - description: > - Products are saleable items in a store. This also includes [saleable gift - cards](https://docs.medusajs.com/modules/gift-cards/admin/manage-gift-cards#manage-gift-card-product) - in a store. - externalDocs: - description: How to manage products - url: https://docs.medusajs.com/modules/products/admin/manage-products - - name: Promotions - - name: Regions - description: > - Regions are different countries or geographical regions that the commerce - store serves customers in. - - Admins can manage these regions, their providers, and more. - externalDocs: - description: How to manage regions - url: >- - https://docs.medusajs.com/modules/regions-and-currencies/admin/manage-regions - - name: Sales Channels - description: > - A sales channel indicates a channel where products can be sold in. For - example, a webshop or a mobile app. - - Admins can manage sales channels and the products available in them. - externalDocs: - description: How to manage sales channels - url: https://docs.medusajs.com/modules/sales-channels/admin/manage - - name: Stock Locations - - name: Stores - - name: Tax Rates - description: > - Each region has at least a default tax rate. Admins can create and manage - additional tax rates that can be applied for certain conditions, such as - for specific product types. - externalDocs: - description: How to manage tax rates - url: https://docs.medusajs.com/modules/taxes/admin/manage-tax-rates - - name: Tax Regions - - name: Users - description: > - A store can have more than one user, each having the same privileges. - Admins can manage users, their passwords, and more. - externalDocs: - description: How to manage users - url: https://docs.medusajs.com/modules/users/admin/manage-users - - name: Workflows Executions -paths: - /admin/api-keys: - $ref: paths/admin_api-keys.yaml - /admin/api-keys/{id}: - $ref: paths/admin_api-keys_{id}.yaml - /admin/api-keys/{id}/revoke: - $ref: paths/admin_api-keys_{id}_revoke.yaml - /admin/campaigns: - $ref: paths/admin_campaigns.yaml - /admin/campaigns/{id}: - $ref: paths/admin_campaigns_{id}.yaml - /admin/collections: - $ref: paths/admin_collections.yaml - /admin/collections/{id}: - $ref: paths/admin_collections_{id}.yaml - /admin/currencies: - $ref: paths/admin_currencies.yaml - /admin/currencies/{code}: - $ref: paths/admin_currencies_{code}.yaml - /admin/customer-groups: - $ref: paths/admin_customer-groups.yaml - /admin/customer-groups/{id}: - $ref: paths/admin_customer-groups_{id}.yaml - /admin/customer-groups/{id}/customers: - $ref: paths/admin_customer-groups_{id}_customers.yaml - /admin/customer-groups/{id}/customers/batch: - $ref: paths/admin_customer-groups_{id}_customers_batch.yaml - /admin/customer-groups/{id}/customers/remove: - $ref: paths/admin_customer-groups_{id}_customers_remove.yaml - /admin/customers: - $ref: paths/admin_customers.yaml - /admin/customers/{id}: - $ref: paths/admin_customers_{id}.yaml - /admin/customers/{id}/addresses: - $ref: paths/admin_customers_{id}_addresses.yaml - /admin/customers/{id}/addresses/{address_id}: - $ref: paths/admin_customers_{id}_addresses_{address_id}.yaml - /admin/fulfillment/shipping-options/{id}/rules/batch/add: - $ref: paths/admin_fulfillment_shipping-options_{id}_rules_batch_add.yaml - /admin/fulfillment/shipping-options/{id}/rules/batch/remove: - $ref: paths/admin_fulfillment_shipping-options_{id}_rules_batch_remove.yaml - /admin/inventory-items: - $ref: paths/admin_inventory-items.yaml - /admin/inventory-items/{id}: - $ref: paths/admin_inventory-items_{id}.yaml - /admin/inventory-items/{id}/location-levels: - $ref: paths/admin_inventory-items_{id}_location-levels.yaml - /admin/inventory-items/{id}/location-levels/{location_id}: - $ref: paths/admin_inventory-items_{id}_location-levels_{location_id}.yaml - /admin/invites: - $ref: paths/admin_invites.yaml - /admin/invites/accept: - $ref: paths/admin_invites_accept.yaml - /admin/invites/{id}: - $ref: paths/admin_invites_{id}.yaml - /admin/invites/{id}/resend: - $ref: paths/admin_invites_{id}_resend.yaml - /admin/payments: - $ref: paths/admin_payments.yaml - /admin/payments/{id}: - $ref: paths/admin_payments_{id}.yaml - /admin/payments/{id}/capture: - $ref: paths/admin_payments_{id}_capture.yaml - /admin/payments/{id}/refund: - $ref: paths/admin_payments_{id}_refund.yaml - /admin/price-lists: - $ref: paths/admin_price-lists.yaml - /admin/price-lists/{id}: - $ref: paths/admin_price-lists_{id}.yaml - /admin/price-lists/{id}/prices/batch/add: - $ref: paths/admin_price-lists_{id}_prices_batch_add.yaml - /admin/price-lists/{id}/prices/batch/remove: - $ref: paths/admin_price-lists_{id}_prices_batch_remove.yaml - /admin/pricing/rule-types: - $ref: paths/admin_pricing_rule-types.yaml - /admin/pricing/rule-types/{id}: - $ref: paths/admin_pricing_rule-types_{id}.yaml - /admin/products: - $ref: paths/admin_products.yaml - /admin/products/{id}: - $ref: paths/admin_products_{id}.yaml - /admin/products/{id}/options: - $ref: paths/admin_products_{id}_options.yaml - /admin/products/{id}/options/{option_id}: - $ref: paths/admin_products_{id}_options_{option_id}.yaml - /admin/products/{id}/variants: - $ref: paths/admin_products_{id}_variants.yaml - /admin/products/{id}/variants/{variant_id}: - $ref: paths/admin_products_{id}_variants_{variant_id}.yaml - /admin/promotions: - $ref: paths/admin_promotions.yaml - /admin/promotions/{id}: - $ref: paths/admin_promotions_{id}.yaml - /admin/promotions/{id}/buy-rules/batch/add: - $ref: paths/admin_promotions_{id}_buy-rules_batch_add.yaml - /admin/promotions/{id}/buy-rules/batch/remove: - $ref: paths/admin_promotions_{id}_buy-rules_batch_remove.yaml - /admin/promotions/{id}/rules/batch/add: - $ref: paths/admin_promotions_{id}_rules_batch_add.yaml - /admin/promotions/{id}/rules/batch/remove: - $ref: paths/admin_promotions_{id}_rules_batch_remove.yaml - /admin/promotions/{id}/rules/batch/update: - $ref: paths/admin_promotions_{id}_rules_batch_update.yaml - /admin/promotions/{id}/target-rules/batch/add: - $ref: paths/admin_promotions_{id}_target-rules_batch_add.yaml - /admin/promotions/{id}/target-rules/batch/remove: - $ref: paths/admin_promotions_{id}_target-rules_batch_remove.yaml - /admin/regions: - $ref: paths/admin_regions.yaml - /admin/regions/{id}: - $ref: paths/admin_regions_{id}.yaml - /admin/sales-channels: - $ref: paths/admin_sales-channels.yaml - /admin/sales-channels/{id}: - $ref: paths/admin_sales-channels_{id}.yaml - /admin/sales-channels/{id}/products/batch/add: - $ref: paths/admin_sales-channels_{id}_products_batch_add.yaml - /admin/stock-locations: - $ref: paths/admin_stock-locations.yaml - /admin/stock-locations/{id}: - $ref: paths/admin_stock-locations_{id}.yaml - /admin/stores: - $ref: paths/admin_stores.yaml - /admin/stores/{id}: - $ref: paths/admin_stores_{id}.yaml - /admin/tax-rates: - $ref: paths/admin_tax-rates.yaml - /admin/tax-rates/{id}: - $ref: paths/admin_tax-rates_{id}.yaml - /admin/tax-rates/{id}/rules: - $ref: paths/admin_tax-rates_{id}_rules.yaml - /admin/tax-rates/{id}/rules/{rule_id}: - $ref: paths/admin_tax-rates_{id}_rules_{rule_id}.yaml - /admin/tax-regions: - $ref: paths/admin_tax-regions.yaml - /admin/tax-regions/{id}: - $ref: paths/admin_tax-regions_{id}.yaml - /admin/users: - $ref: paths/admin_users.yaml - /admin/users/me: - $ref: paths/admin_users_me.yaml - /admin/users/{id}: - $ref: paths/admin_users_{id}.yaml - /admin/workflows-executions: - $ref: paths/admin_workflows-executions.yaml - /admin/workflows-executions/{id}: - $ref: paths/admin_workflows-executions_{id}.yaml - /admin/workflows-executions/{workflow_id}/run: - $ref: paths/admin_workflows-executions_{workflow_id}_run.yaml - /admin/workflows-executions/{workflow_id}/steps/failure: - $ref: paths/admin_workflows-executions_{workflow_id}_steps_failure.yaml - /admin/workflows-executions/{workflow_id}/steps/success: - $ref: paths/admin_workflows-executions_{workflow_id}_steps_success.yaml - /admin/workflows-executions/{workflow_id}/subscribe: - $ref: paths/admin_workflows-executions_{workflow_id}_subscribe.yaml - /admin/workflows-executions/{workflow_id}/{transaction_id}: - $ref: paths/admin_workflows-executions_{workflow_id}_{transaction_id}.yaml - /admin/workflows-executions/{workflow_id}/{transaction_id}/{step_id}/subscribe: - $ref: >- - paths/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe.yaml -components: - securitySchemes: - api_token: - type: apiKey - x-displayName: API Token - in: header - name: x-medusa-access-token - jwt_token: - type: http - x-displayName: JWT Token - scheme: bearer - cookie_auth: - type: apiKey - in: cookie - name: connect.sid - x-displayName: Cookie Session ID diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_collections.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_collections.yaml deleted file mode 100644 index 61db631ea0..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_collections.yaml +++ /dev/null @@ -1,70 +0,0 @@ -get: - operationId: GetCollections - summary: List Collections - description: >- - Retrieve a list of collections. The collections can be filtered by fields - such as `id`. The collections can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_collections/get.sh - tags: - - Collections - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostCollections - summary: Create Collection - description: Create a collection. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_collections/post.sh - tags: - - Collections - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_collections_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_collections_{id}.yaml deleted file mode 100644 index 4db0e2a3f1..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_collections_{id}.yaml +++ /dev/null @@ -1,122 +0,0 @@ -get: - operationId: GetCollectionsId - summary: Get a Collection - description: >- - Retrieve a collection by its ID. You can expand the collection's relations - or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The collection's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_collections_{id}/get.sh - tags: - - Collections - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostCollectionsId - summary: Update a Collection - description: Update a collection's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The collection's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_collections_{id}/post.sh - tags: - - Collections - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -delete: - operationId: DeleteCollectionsId - summary: Delete a Collection - description: Delete a collection. - x-authenticated: true - parameters: - - name: id - in: path - description: The collection's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_collections_{id}/delete.sh - tags: - - Collections - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_currencies.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_currencies.yaml deleted file mode 100644 index 586c02fc3e..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_currencies.yaml +++ /dev/null @@ -1,36 +0,0 @@ -get: - operationId: GetCurrencies - summary: List Currencies - description: >- - Retrieve a list of currencies. The currencies can be filtered by fields such - as `id`. The currencies can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_currencies/get.sh - tags: - - Currencies - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_currencies_{code}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_currencies_{code}.yaml deleted file mode 100644 index 8570532991..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_currencies_{code}.yaml +++ /dev/null @@ -1,42 +0,0 @@ -get: - operationId: GetCurrenciesCode - summary: Get a Currency - description: >- - Retrieve a currency by its ID. You can expand the currency's relations or - select the fields that should be returned. - x-authenticated: true - parameters: - - name: code - in: path - description: The currency's code. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_currencies_{code}/get.sh - tags: - - Currencies - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups.yaml deleted file mode 100644 index fab8099d36..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups.yaml +++ /dev/null @@ -1,70 +0,0 @@ -get: - operationId: GetCustomerGroups - summary: List Customer Groups - description: >- - Retrieve a list of customer groups. The customer groups can be filtered by - fields such as `id`. The customer groups can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customer-groups/get.sh - tags: - - Customer Groups - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostCustomerGroups - summary: Create Customer Group - description: Create a customer group. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customer-groups/post.sh - tags: - - Customer Groups - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups_{id}.yaml deleted file mode 100644 index e1b6789dfd..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups_{id}.yaml +++ /dev/null @@ -1,122 +0,0 @@ -get: - operationId: GetCustomerGroupsId - summary: Get a Customer Group - description: >- - Retrieve a customer group by its ID. You can expand the customer group's - relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer group's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customer-groups_{id}/get.sh - tags: - - Customer Groups - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostCustomerGroupsId - summary: Update a Customer Group - description: Update a customer group's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer group's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customer-groups_{id}/post.sh - tags: - - Customer Groups - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -delete: - operationId: DeleteCustomerGroupsId - summary: Delete a Customer Group - description: Delete a customer group. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer group's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customer-groups_{id}/delete.sh - tags: - - Customer Groups - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups_{id}_customers.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups_{id}_customers.yaml deleted file mode 100644 index bfb2f4dd54..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups_{id}_customers.yaml +++ /dev/null @@ -1,42 +0,0 @@ -get: - operationId: GetCustomerGroupsIdCustomers - summary: List Customers - description: >- - Retrieve a list of customers in a customer group. The customers can be - filtered by fields like FILTER FIELDS. The customers can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer group's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customer-groups_{id}_customers/get.sh - tags: - - Customer Groups - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups_{id}_customers_batch.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups_{id}_customers_batch.yaml deleted file mode 100644 index 81c5eac2aa..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups_{id}_customers_batch.yaml +++ /dev/null @@ -1,43 +0,0 @@ -post: - operationId: PostCustomerGroupsIdCustomersBatch - summary: Add Customers to Customer Group - description: Add a list of customers to a customer group. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer group's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_customer-groups_{id}_customers_batch/post.sh - tags: - - Customer Groups - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_customers.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_customers.yaml deleted file mode 100644 index 0fabec7b94..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_customers.yaml +++ /dev/null @@ -1,70 +0,0 @@ -get: - operationId: GetCustomers - summary: List Customers - description: >- - Retrieve a list of customers. The customers can be filtered by fields such - as `id`. The customers can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customers/get.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostCustomers - summary: Create Customer - description: Create a customer. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customers/post.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_customers_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_customers_{id}.yaml deleted file mode 100644 index 0050fbef8c..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_customers_{id}.yaml +++ /dev/null @@ -1,122 +0,0 @@ -get: - operationId: GetCustomersId - summary: Get a Customer - description: >- - Retrieve a customer by its ID. You can expand the customer's relations or - select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customers_{id}/get.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostCustomersId - summary: Update a Customer - description: Update a customer's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customers_{id}/post.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -delete: - operationId: DeleteCustomersId - summary: Delete a Customer - description: Delete a customer. - x-authenticated: true - parameters: - - name: id - in: path - description: The customer's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customers_{id}/delete.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items.yaml deleted file mode 100644 index e2b35b2d37..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items.yaml +++ /dev/null @@ -1,71 +0,0 @@ -get: - operationId: GetInventoryItems - summary: List Inventory Items - description: >- - Retrieve a list of inventory items. The inventory items can be filtered by - fields such as `id`. The inventory items can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_inventory-items/get.sh - tags: - - Inventory Items - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostInventoryItems - summary: Create Inventory Item - description: Create a inventory item. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostInventoryItemsReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_inventory-items/post.sh - tags: - - Inventory Items - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items_{id}.yaml deleted file mode 100644 index 7074f3a305..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items_{id}.yaml +++ /dev/null @@ -1,125 +0,0 @@ -get: - operationId: GetInventoryItemsId - summary: Get a Inventory Item - description: >- - Retrieve a inventory item by its ID. You can expand the inventory item's - relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_inventory-items_{id}/get.sh - tags: - - Inventory Items - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostInventoryItemsId - summary: Update a Inventory Item - description: Update a inventory item's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_inventory-items_{id}/post.sh - tags: - - Inventory Items - responses: - '200': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteInventoryItemsId - summary: Delete a Inventory Item - description: Delete a inventory item. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_inventory-items_{id}/delete.sh - tags: - - Inventory Items - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items_{id}_location-levels.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items_{id}_location-levels.yaml deleted file mode 100644 index a7cd8053b4..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items_{id}_location-levels.yaml +++ /dev/null @@ -1,43 +0,0 @@ -post: - operationId: PostInventoryItemsIdLocationLevels - summary: Add Location Levels to Inventory Item - description: Add a list of location levels to a inventory item. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_inventory-items_{id}_location-levels/post.sh - tags: - - Inventory Items - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items_{id}_location-levels_{location_id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items_{id}_location-levels_{location_id}.yaml deleted file mode 100644 index bf33698fef..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_inventory-items_{id}_location-levels_{location_id}.yaml +++ /dev/null @@ -1,101 +0,0 @@ -post: - operationId: PostInventoryItemsIdLocationLevelsLocation_id - summary: Add Location Levels to Inventory Item - description: Add a list of location levels to a inventory item. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - - name: location_id - in: path - description: The inventory item's location id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/post.sh - tags: - - Inventory Items - responses: - '200': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteInventoryItemsIdLocationLevelsLocation_id - summary: Remove Location Levels from Inventory Item - description: >- - Remove a list of location levels from a inventory item. This doesn't delete - the Location Level, only the association between the Location Level and the - inventory item. - x-authenticated: true - parameters: - - name: id - in: path - description: The inventory item's ID. - required: true - schema: - type: string - - name: location_id - in: path - description: The inventory item's location id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/delete.sh - tags: - - Inventory Items - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_invites.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_invites.yaml deleted file mode 100644 index c7fadba0ac..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_invites.yaml +++ /dev/null @@ -1,70 +0,0 @@ -get: - operationId: GetInvites - summary: List Invites - description: >- - Retrieve a list of invites. The invites can be filtered by fields such as - `id`. The invites can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_invites/get.sh - tags: - - Invites - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostInvites - summary: Create Invite - description: Create a invite. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_invites/post.sh - tags: - - Invites - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_invites_accept.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_invites_accept.yaml deleted file mode 100644 index 48794e3dd7..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_invites_accept.yaml +++ /dev/null @@ -1,35 +0,0 @@ -post: - operationId: PostInvitesAccept - summary: Create Invite - description: Create a invite. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostInvitesInviteAcceptReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_invites_accept/post.sh - tags: - - Invites - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_payments_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_payments_{id}.yaml deleted file mode 100644 index 3645a7b963..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_payments_{id}.yaml +++ /dev/null @@ -1,42 +0,0 @@ -get: - operationId: GetPaymentsId - summary: Get a Payment - description: >- - Retrieve a payment by its ID. You can expand the payment's relations or - select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The payment's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_payments_{id}/get.sh - tags: - - Payments - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_payments_{id}_capture.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_payments_{id}_capture.yaml deleted file mode 100644 index 351b9a32fc..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_payments_{id}_capture.yaml +++ /dev/null @@ -1,41 +0,0 @@ -post: - operationId: PostPaymentsIdCapture - summary: Add Captures to Payment - description: Add a list of captures to a payment. - x-authenticated: true - parameters: - - name: id - in: path - description: The payment's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostPaymentsCapturesReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_payments_{id}_capture/post.sh - tags: - - Payments - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_payments_{id}_refund.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_payments_{id}_refund.yaml deleted file mode 100644 index 198385879d..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_payments_{id}_refund.yaml +++ /dev/null @@ -1,41 +0,0 @@ -post: - operationId: PostPaymentsIdRefund - summary: Add Refunds to Payment - description: Add a list of refunds to a payment. - x-authenticated: true - parameters: - - name: id - in: path - description: The payment's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostPaymentsRefundsReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_payments_{id}_refund/post.sh - tags: - - Payments - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_price-lists.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_price-lists.yaml deleted file mode 100644 index 71af97f809..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_price-lists.yaml +++ /dev/null @@ -1,71 +0,0 @@ -get: - operationId: GetPriceLists - summary: List Price Lists - description: >- - Retrieve a list of price lists. The price lists can be filtered by fields - such as `id`. The price lists can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_price-lists/get.sh - tags: - - Price Lists - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostPriceLists - summary: Create Price List - description: Create a price list. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostPriceListsReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_price-lists/post.sh - tags: - - Price Lists - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_price-lists_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_price-lists_{id}.yaml deleted file mode 100644 index ba9185e216..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_price-lists_{id}.yaml +++ /dev/null @@ -1,123 +0,0 @@ -get: - operationId: GetPriceListsId - summary: Get a Price List - description: >- - Retrieve a price list by its ID. You can expand the price list's relations - or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The price list's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_price-lists_{id}/get.sh - tags: - - Price Lists - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostPriceListsId - summary: Update a Price List - description: Update a price list's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The price list's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostPriceListsPriceListReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_price-lists_{id}/post.sh - tags: - - Price Lists - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeletePriceListsId - summary: Delete a Price List - description: Delete a price list. - x-authenticated: true - parameters: - - name: id - in: path - description: The price list's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_price-lists_{id}/delete.sh - tags: - - Price Lists - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_products.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_products.yaml deleted file mode 100644 index ab6ac1e81f..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_products.yaml +++ /dev/null @@ -1,71 +0,0 @@ -get: - operationId: GetProducts - summary: List Products - description: >- - Retrieve a list of products. The products can be filtered by fields such as - `id`. The products can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminGetProductsParams.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products/get.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostProducts - summary: Create Product - description: Create a product. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products/post.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}.yaml deleted file mode 100644 index a631d54dfa..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}.yaml +++ /dev/null @@ -1,122 +0,0 @@ -get: - operationId: GetProductsId - summary: Get a Product - description: >- - Retrieve a product by its ID. You can expand the product's relations or - select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}/get.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostProductsId - summary: Update a Product - description: Update a product's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}/post.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -delete: - operationId: DeleteProductsId - summary: Delete a Product - description: Delete a product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}/delete.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_options.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_options.yaml deleted file mode 100644 index 640e9514b4..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_options.yaml +++ /dev/null @@ -1,82 +0,0 @@ -get: - operationId: GetProductsIdOptions - summary: List Options - description: >- - Retrieve a list of options in a product. The options can be filtered by - fields like FILTER FIELDS. The options can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}_options/get.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostProductsIdOptions - summary: Add Options to Product - description: Add a list of options to a product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}_options/post.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_options_{option_id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_options_{option_id}.yaml deleted file mode 100644 index 502c75a398..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_options_{option_id}.yaml +++ /dev/null @@ -1,143 +0,0 @@ -get: - operationId: GetProductsIdOptionsOption_id - summary: List Options - description: >- - Retrieve a list of options in a product. The options can be filtered by - fields like FILTER FIELDS. The options can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: option_id - in: path - description: The product's option id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}_options_{option_id}/get.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostProductsIdOptionsOption_id - summary: Add Options to Product - description: Add a list of options to a product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: option_id - in: path - description: The product's option id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}_options_{option_id}/post.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -delete: - operationId: DeleteProductsIdOptionsOption_id - summary: Remove Options from Product - description: >- - Remove a list of options from a product. This doesn't delete the Option, - only the association between the Option and the product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: option_id - in: path - description: The product's option id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_products_{id}_options_{option_id}/delete.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_variants.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_variants.yaml deleted file mode 100644 index f471fbcb4c..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_variants.yaml +++ /dev/null @@ -1,82 +0,0 @@ -get: - operationId: GetProductsIdVariants - summary: List Variants - description: >- - Retrieve a list of variants in a product. The variants can be filtered by - fields like FILTER FIELDS. The variants can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}_variants/get.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostProductsIdVariants - summary: Add Variants to Product - description: Add a list of variants to a product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}_variants/post.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_variants_{variant_id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_variants_{variant_id}.yaml deleted file mode 100644 index 30bc5900ee..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_products_{id}_variants_{variant_id}.yaml +++ /dev/null @@ -1,144 +0,0 @@ -get: - operationId: GetProductsIdVariantsVariant_id - summary: List Variants - description: >- - Retrieve a list of variants in a product. The variants can be filtered by - fields like FILTER FIELDS. The variants can also be paginated. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: variant_id - in: path - description: The product's variant id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}_variants_{variant_id}/get.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostProductsIdVariantsVariant_id - summary: Add Variants to Product - description: Add a list of variants to a product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: variant_id - in: path - description: The product's variant id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_products_{id}_variants_{variant_id}/post.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -delete: - operationId: DeleteProductsIdVariantsVariant_id - summary: Remove Variants from Product - description: >- - Remove a list of variants from a product. This doesn't delete the Variant, - only the association between the Variant and the product. - x-authenticated: true - parameters: - - name: id - in: path - description: The product's ID. - required: true - schema: - type: string - - name: variant_id - in: path - description: The product's variant id. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_products_{id}_variants_{variant_id}/delete.sh - tags: - - Products - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_regions.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_regions.yaml deleted file mode 100644 index 27c0595a7c..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_regions.yaml +++ /dev/null @@ -1,70 +0,0 @@ -get: - operationId: GetRegions - summary: List Regions - description: >- - Retrieve a list of regions. The regions can be filtered by fields such as - `id`. The regions can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_regions/get.sh - tags: - - Regions - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostRegions - summary: Create Region - description: Create a region. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_regions/post.sh - tags: - - Regions - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_regions_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_regions_{id}.yaml deleted file mode 100644 index 6d5e336391..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_regions_{id}.yaml +++ /dev/null @@ -1,122 +0,0 @@ -get: - operationId: GetRegionsId - summary: Get a Region - description: >- - Retrieve a region by its ID. You can expand the region's relations or select - the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The region's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_regions_{id}/get.sh - tags: - - Regions - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostRegionsId - summary: Update a Region - description: Update a region's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The region's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_regions_{id}/post.sh - tags: - - Regions - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -delete: - operationId: DeleteRegionsId - summary: Delete a Region - description: Delete a region. - x-authenticated: true - parameters: - - name: id - in: path - description: The region's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_regions_{id}/delete.sh - tags: - - Regions - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_sales-channels.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_sales-channels.yaml deleted file mode 100644 index 57adb7d9b0..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_sales-channels.yaml +++ /dev/null @@ -1,70 +0,0 @@ -get: - operationId: GetSalesChannels - summary: List Sales Channels - description: >- - Retrieve a list of sales channels. The sales channels can be filtered by - fields such as `id`. The sales channels can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_sales-channels/get.sh - tags: - - Sales Channels - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostSalesChannels - summary: Create Sales Channel - description: Create a sales channel. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_sales-channels/post.sh - tags: - - Sales Channels - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_sales-channels_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_sales-channels_{id}.yaml deleted file mode 100644 index 97dda13b58..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_sales-channels_{id}.yaml +++ /dev/null @@ -1,122 +0,0 @@ -get: - operationId: GetSalesChannelsId - summary: Get a Sales Channel - description: >- - Retrieve a sales channel by its ID. You can expand the sales channel's - relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The sales channel's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_sales-channels_{id}/get.sh - tags: - - Sales Channels - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostSalesChannelsId - summary: Update a Sales Channel - description: Update a sales channel's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The sales channel's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_sales-channels_{id}/post.sh - tags: - - Sales Channels - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -delete: - operationId: DeleteSalesChannelsId - summary: Delete a Sales Channel - description: Delete a sales channel. - x-authenticated: true - parameters: - - name: id - in: path - description: The sales channel's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_sales-channels_{id}/delete.sh - tags: - - Sales Channels - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_stock-locations.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_stock-locations.yaml deleted file mode 100644 index 3f3213681c..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_stock-locations.yaml +++ /dev/null @@ -1,37 +0,0 @@ -post: - operationId: PostStockLocations - summary: Create Stock Location - description: Create a stock location. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostStockLocationsReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_stock-locations/post.sh - tags: - - Stock Locations - responses: - '200': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_stock-locations_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_stock-locations_{id}.yaml deleted file mode 100644 index 24100d87fe..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_stock-locations_{id}.yaml +++ /dev/null @@ -1,78 +0,0 @@ -get: - operationId: GetStockLocationsId - summary: Get a Stock Location - description: >- - Retrieve a stock location by its ID. You can expand the stock location's - relations or select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The stock location's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_stock-locations_{id}/get.sh - tags: - - Stock Locations - responses: - '200': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteStockLocationsId - summary: Delete a Stock Location - description: Delete a stock location. - x-authenticated: true - parameters: - - name: id - in: path - description: The stock location's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_stock-locations_{id}/delete.sh - tags: - - Stock Locations - responses: - '200': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_tax-rates.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_tax-rates.yaml deleted file mode 100644 index 8b95f98131..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_tax-rates.yaml +++ /dev/null @@ -1,71 +0,0 @@ -get: - operationId: GetTaxRates - summary: List Tax Rates - description: >- - Retrieve a list of tax rates. The tax rates can be filtered by fields such - as `id`. The tax rates can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_tax-rates/get.sh - tags: - - Tax Rates - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostTaxRates - summary: Create Tax Rate - description: Create a tax rate. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostTaxRatesReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_tax-rates/post.sh - tags: - - Tax Rates - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_tax-rates_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_tax-rates_{id}.yaml deleted file mode 100644 index 0ee80d9166..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_tax-rates_{id}.yaml +++ /dev/null @@ -1,123 +0,0 @@ -get: - operationId: GetTaxRatesId - summary: Get a Tax Rate - description: >- - Retrieve a tax rate by its ID. You can expand the tax rate's relations or - select the fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The tax rate's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_tax-rates_{id}/get.sh - tags: - - Tax Rates - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostTaxRatesId - summary: Update a Tax Rate - description: Update a tax rate's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The tax rate's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostTaxRatesTaxRateReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_tax-rates_{id}/post.sh - tags: - - Tax Rates - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteTaxRatesId - summary: Delete a Tax Rate - description: Delete a tax rate. - x-authenticated: true - parameters: - - name: id - in: path - description: The tax rate's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_tax-rates_{id}/delete.sh - tags: - - Tax Rates - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_users.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_users.yaml deleted file mode 100644 index 795e7ab513..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_users.yaml +++ /dev/null @@ -1,70 +0,0 @@ -get: - operationId: GetUsers - summary: List Users - description: >- - Retrieve a list of users. The users can be filtered by fields such as `id`. - The users can also be sorted or paginated. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_users/get.sh - tags: - - Users - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostUsers - summary: Create User - description: Create a user. - x-authenticated: true - parameters: [] - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_users/post.sh - tags: - - Users - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_users_{id}.yaml b/www/apps/api-reference/specs-v2/admin/paths/admin_users_{id}.yaml deleted file mode 100644 index 2dad04fe01..0000000000 --- a/www/apps/api-reference/specs-v2/admin/paths/admin_users_{id}.yaml +++ /dev/null @@ -1,123 +0,0 @@ -get: - operationId: GetUsersId - summary: Get a User - description: >- - Retrieve a user by its ID. You can expand the user's relations or select the - fields that should be returned. - x-authenticated: true - parameters: - - name: id - in: path - description: The user's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_users_{id}/get.sh - tags: - - Users - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostUsersId - summary: Update a User - description: Update a user's details. - x-authenticated: true - parameters: - - name: id - in: path - description: The user's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminUpdateUserRequest.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_users_{id}/post.sh - tags: - - Users - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteUsersId - summary: Delete a User - description: Delete a user. - x-authenticated: true - parameters: - - name: id - in: path - description: The user's ID. - required: true - schema: - type: string - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_users_{id}/delete.sh - tags: - - Users - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/store.oas.json b/www/apps/api-reference/specs-v2/store.oas.json deleted file mode 100644 index 98ea7608b8..0000000000 --- a/www/apps/api-reference/specs-v2/store.oas.json +++ /dev/null @@ -1,4085 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "version": "2.0.0", - "title": "Medusa Storefront API", - "license": { - "name": "MIT", - "url": "https://github.com/medusajs/medusa/blob/master/LICENSE" - } - }, - "tags": [ - { - "name": "Carts", - "description": "A cart is a virtual shopping bag that customers can use to add items they want to purchase.\nA cart is then used to checkout and place an order.\n", - "externalDocs": { - "description": "How to implement cart functionality in your storefront", - "url": "https://docs.medusajs.com/modules/carts-and-checkout/storefront/implement-cart" - } - }, - { - "name": "Currencies" - }, - { - "name": "Customers", - "description": "A customer can register and manage their information such as addresses, orders, payment methods, and more.\n", - "externalDocs": { - "description": "How to implement customer profiles in your storefront", - "url": "https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles" - } - }, - { - "name": "Payment Collections", - "description": "A payment collection is useful for managing additional payments, such as for Order Edits, or installment payments.\n" - }, - { - "name": "Regions", - "description": "Regions are different countries or geographical regions that the commerce store serves customers in.\nCustomers can choose what region they're in, which can be used to change the prices shown based on the region and its currency.\n", - "externalDocs": { - "description": "How to use regions in a storefront", - "url": "https://docs.medusajs.com/modules/regions-and-currencies/storefront/use-regions" - } - }, - { - "name": "Shipping Options", - "description": "A shipping option is used to define the available shipping methods during checkout or when creating a return.\n", - "externalDocs": { - "description": "Shipping Option architecture", - "url": "https://docs.medusajs.com/modules/carts-and-checkout/shipping#shipping-option" - } - } - ], - "servers": [ - { - "url": "http://localhost:9000" - }, - { - "url": "https://api.medusa-commerce.com" - } - ], - "paths": { - "/store/carts": { - "post": { - "operationId": "PostCarts", - "summary": "Create Cart", - "description": "Create a cart.", - "x-authenticated": false, - "parameters": [], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/store/carts'" - } - ], - "tags": [ - "Carts" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/carts/{id}": { - "get": { - "operationId": "GetCartsId", - "summary": "Get a Cart", - "description": "Retrieve a cart by its ID. You can expand the cart's relations or select the fields that should be returned.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/store/carts/{id}'" - } - ], - "tags": [ - "Carts" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCartsId", - "summary": "Update a Cart", - "description": "Update a cart's details.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/store/carts/{id}'" - } - ], - "tags": [ - "Carts" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/carts/{id}/line-items": { - "post": { - "operationId": "PostCartsIdLineItems", - "summary": "Add Line Items to Cart", - "description": "Add a list of line items to a cart.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/store/carts/{id}/line-items'" - } - ], - "tags": [ - "Carts" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/carts/{id}/line-items/{line_id}": { - "post": { - "operationId": "PostCartsIdLineItemsLine_id", - "summary": "Add Line Items to Cart", - "description": "Add a list of line items to a cart.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "line_id", - "in": "path", - "description": "The cart's line id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/store/carts/{id}/line-items/{line_id}'" - } - ], - "tags": [ - "Carts" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteCartsIdLineItemsLine_id", - "summary": "Remove Line Items from Cart", - "description": "Remove a list of line items from a cart. This doesn't delete the Line Item, only the association between the Line Item and the cart.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart's ID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "line_id", - "in": "path", - "description": "The cart's line id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}'" - } - ], - "tags": [ - "Carts" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/carts/{id}/payment-collections": { - "post": { - "operationId": "PostCartsIdPaymentCollections", - "summary": "Add Payment Collections to Cart", - "description": "Add a list of payment collections to a cart.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/store/carts/{id}/payment-collections'" - } - ], - "tags": [ - "Carts" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/carts/{id}/promotions": { - "post": { - "operationId": "PostCartsIdPromotions", - "summary": "Add Promotions to Cart", - "description": "Add a list of promotions to a cart.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/store/carts/{id}/promotions'" - } - ], - "tags": [ - "Carts" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteCartsIdPromotions", - "summary": "Remove Promotions from Cart", - "description": "Remove a list of promotions from a cart. This doesn't delete the Promotion, only the association between the Promotion and the cart.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/store/carts/{id}/promotions'" - } - ], - "tags": [ - "Carts" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/carts/{id}/taxes": { - "post": { - "operationId": "PostCartsIdTaxes", - "summary": "Add Taxes to Cart", - "description": "Add a list of taxes to a cart.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StorePostCartsCartTaxesReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/store/carts/{id}/taxes'" - } - ], - "tags": [ - "Carts" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/store/currencies": { - "get": { - "operationId": "GetCurrencies", - "summary": "List Currencies", - "description": "Retrieve a list of currencies. The currencies can be filtered by fields such as `id`. The currencies can also be sorted or paginated.", - "x-authenticated": false, - "parameters": [], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/store/currencies'" - } - ], - "tags": [ - "Currencies" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/currencies/{code}": { - "get": { - "operationId": "GetCurrenciesCode", - "summary": "Get a Currency", - "description": "Retrieve a currency by its ID. You can expand the currency's relations or select the fields that should be returned.", - "x-authenticated": false, - "parameters": [ - { - "name": "code", - "in": "path", - "description": "The currency's code.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/store/currencies/{code}'" - } - ], - "tags": [ - "Currencies" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/customers": { - "post": { - "operationId": "PostCustomers", - "summary": "Create Customer", - "description": "Create a customer.", - "x-authenticated": false, - "parameters": [], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/store/customers'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/customers/me": { - "get": { - "operationId": "GetCustomersMe", - "summary": "List Customers", - "description": "Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated.", - "x-authenticated": false, - "parameters": [], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/store/customers/me'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/customers/me/addresses": { - "get": { - "operationId": "GetCustomersMeAddresses", - "summary": "List Customers", - "description": "Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated.", - "x-authenticated": false, - "parameters": [], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/store/customers/me/addresses'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCustomersMeAddresses", - "summary": "Create Customer", - "description": "Create a customer.", - "x-authenticated": false, - "parameters": [], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/store/customers/me/addresses'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/customers/me/addresses/{address_id}": { - "get": { - "operationId": "GetCustomersMeAddressesAddress_id", - "summary": "List Addresses", - "description": "Retrieve a list of addresses in a customer. The addresses can be filtered by fields like FILTER FIELDS. The addresses can also be paginated.", - "x-authenticated": false, - "parameters": [ - { - "name": "address_id", - "in": "path", - "description": "The customer's address id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/store/customers/me/addresses/{address_id}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "post": { - "operationId": "PostCustomersMeAddressesAddress_id", - "summary": "Add Addresses to Customer", - "description": "Add a list of addresses to a customer.", - "x-authenticated": false, - "parameters": [ - { - "name": "address_id", - "in": "path", - "description": "The customer's address id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/store/customers/me/addresses/{address_id}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "delete": { - "operationId": "DeleteCustomersMeAddressesAddress_id", - "summary": "Remove Addresses from Customer", - "description": "Remove a list of addresses from a customer. This doesn't delete the Address, only the association between the Address and the customer.", - "x-authenticated": false, - "parameters": [ - { - "name": "address_id", - "in": "path", - "description": "The customer's address id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}'" - } - ], - "tags": [ - "Customers" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/payment-collections/{id}/payment-sessions": { - "post": { - "operationId": "PostPaymentCollectionsIdPaymentSessions", - "summary": "Add Payment Sessions to Payment Collection", - "description": "Add a list of payment sessions to a payment collection.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The payment collection's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StorePostPaymentCollectionsPaymentSessionReq" - } - } - } - }, - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl -X POST '{backend_url}/store/payment-collections/{id}/payment-sessions' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"provider_id\": \"{value}\"\n}'" - } - ], - "tags": [ - "Payment Collections" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - } - } - }, - "/store/regions": { - "get": { - "operationId": "GetRegions", - "summary": "List Regions", - "description": "Retrieve a list of regions. The regions can be filtered by fields such as `id`. The regions can also be sorted or paginated.", - "x-authenticated": false, - "parameters": [], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/store/regions'" - } - ], - "tags": [ - "Regions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/regions/{id}": { - "get": { - "operationId": "GetRegionsId", - "summary": "Get a Region", - "description": "Retrieve a region by its ID. You can expand the region's relations or select the fields that should be returned.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The region's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/store/regions/{id}'" - } - ], - "tags": [ - "Regions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/regions/{id}/payment-providers": { - "get": { - "operationId": "GetRegionsIdPaymentProviders", - "summary": "List Payment Providers", - "description": "Retrieve a list of payment providers in a region. The payment providers can be filtered by fields like FILTER FIELDS. The payment providers can also be paginated.", - "x-authenticated": false, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The region's ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/store/regions/{id}/payment-providers'" - } - ], - "tags": [ - "Regions" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/store/shipping-options/{cart_id}": { - "get": { - "operationId": "GetShippingOptionsCart_id", - "summary": "Get a Shipping Option", - "description": "Retrieve a shipping option by its ID. You can expand the shipping option's relations or select the fields that should be returned.", - "x-authenticated": false, - "parameters": [ - { - "name": "cart_id", - "in": "path", - "description": "The shipping option's cart id.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "x-codeSamples": [ - { - "lang": "Shell", - "label": "cURL", - "source": "curl '{backend_url}/store/shipping-options/{cart_id}'" - } - ], - "tags": [ - "Shipping Options" - ], - "responses": { - "400": { - "$ref": "#/components/responses/400_error" - }, - "401": { - "$ref": "#/components/responses/unauthorized" - }, - "404": { - "$ref": "#/components/responses/not_found_error" - }, - "409": { - "$ref": "#/components/responses/invalid_state_error" - }, - "422": { - "$ref": "#/components/responses/invalid_request_error" - }, - "500": { - "$ref": "#/components/responses/500_error" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "components": { - "responses": { - "default_error": { - "description": "Default Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "example": { - "code": "unknown_error", - "message": "An unknown error occurred.", - "type": "unknown_error" - } - } - } - }, - "invalid_state_error": { - "description": "Invalid State Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "example": { - "code": "unknown_error", - "message": "The request conflicted with another request. You may retry the request with the provided Idempotency-Key.", - "type": "QueryRunnerAlreadyReleasedError" - } - } - } - }, - "invalid_request_error": { - "description": "Invalid Request Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "example": { - "code": "invalid_request_error", - "message": "Discount with code TEST already exists.", - "type": "duplicate_error" - } - } - } - }, - "not_found_error": { - "description": "Not Found Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "example": { - "message": "Entity with id 1 was not found", - "type": "not_found" - } - } - } - }, - "400_error": { - "description": "Client Error or Multiple Errors", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Error" - }, - { - "$ref": "#/components/schemas/MultipleErrors" - } - ] - }, - "examples": { - "not_allowed": { - "$ref": "#/components/examples/not_allowed_error" - }, - "invalid_data": { - "$ref": "#/components/examples/invalid_data_error" - }, - "MultipleErrors": { - "$ref": "#/components/examples/multiple_errors" - } - } - } - } - }, - "500_error": { - "description": "Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "database": { - "$ref": "#/components/examples/database_error" - }, - "unexpected_state": { - "$ref": "#/components/examples/unexpected_state_error" - }, - "invalid_argument": { - "$ref": "#/components/examples/invalid_argument_error" - }, - "default_error": { - "$ref": "#/components/examples/default_error" - } - } - } - } - }, - "unauthorized": { - "description": "User is not authorized. Must log in first", - "content": { - "text/plain": { - "schema": { - "type": "string", - "default": "Unauthorized", - "example": "Unauthorized" - } - } - } - }, - "incorrect_credentials": { - "description": "User does not exist or incorrect credentials", - "content": { - "text/plain": { - "schema": { - "type": "string", - "default": "Unauthorized", - "example": "Unauthorized" - } - } - } - } - }, - "examples": { - "not_allowed_error": { - "summary": "Not Allowed Error", - "value": { - "message": "Discount must be set to dynamic", - "type": "not_allowed" - } - }, - "invalid_data_error": { - "summary": "Invalid Data Error", - "value": { - "message": "first_name must be a string", - "type": "invalid_data" - } - }, - "multiple_errors": { - "summary": "Multiple Errors", - "value": { - "message": "Provided request body contains errors. Please check the data and retry the request", - "errors": [ - { - "message": "first_name must be a string", - "type": "invalid_data" - }, - { - "message": "Discount must be set to dynamic", - "type": "not_allowed" - } - ] - } - }, - "database_error": { - "summary": "Database Error", - "value": { - "code": "api_error", - "message": "An error occured while hashing password", - "type": "database_error" - } - }, - "unexpected_state_error": { - "summary": "Unexpected State Error", - "value": { - "message": "cart.total must be defined", - "type": "unexpected_state" - } - }, - "invalid_argument_error": { - "summary": "Invalid Argument Error", - "value": { - "message": "cart.total must be defined", - "type": "unexpected_state" - } - }, - "default_error": { - "summary": "Default Error", - "value": { - "code": "unknown_error", - "message": "An unknown error occurred.", - "type": "unknown_error" - } - } - }, - "securitySchemes": { - "jwt_token": { - "type": "http", - "x-displayName": "JWT Token", - "scheme": "bearer" - }, - "cookie_auth": { - "type": "apiKey", - "x-displayName": "Cookie Session ID", - "in": "cookie", - "name": "connect.sid", - "description": "Use a cookie session to send authenticated requests.\n\n### How to Obtain the Cookie Session\n\nIf you're sending requests through a browser, using JS Client, or using tools like Postman, the cookie session should be automatically set when the customer is logged in.\n\nIf you're sending requests using cURL, you must set the Session ID in the cookie manually.\n\nTo do that, send a request to [authenticate the customer](#tag/Auth/operation/PostAuth) and pass the cURL option `-v`:\n\n```bash\ncurl -v --location --request POST 'https://medusa-url.com/store/auth' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"email\": \"user@example.com\",\n \"password\": \"supersecret\"\n}'\n```\n\nThe headers will be logged in the terminal as well as the response. You should find in the headers a Cookie header similar to this:\n\n```bash\nSet-Cookie: connect.sid=s%3A2Bu8BkaP9JUfHu9rG59G16Ma0QZf6Gj1.WT549XqX37PN8n0OecqnMCq798eLjZC5IT7yiDCBHPM;\n```\n\nCopy the value after `connect.sid` (without the `;` at the end) and pass it as a cookie in subsequent requests as the following:\n\n```bash\ncurl --location --request GET 'https://medusa-url.com/store/customers/me/orders' \\\n--header 'Cookie: connect.sid={sid}'\n```\n\nWhere `{sid}` is the value of `connect.sid` that you copied.\n" - } - }, - "schemas": { - "AdminDeletePricingRuleTypesRuleTypeReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminDeletePricingRuleTypesRuleTypeReq", - "properties": {} - }, - "AdminGetPricingRuleTypesParams": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminGetPricingRuleTypesParams", - "properties": { - "rule_attribute": { - "type": "array", - "description": "The pricing's rule attribute.", - "items": { - "type": "string", - "title": "rule_attribute", - "description": "The rule attribute's details." - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The pricing's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The pricing's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The pricing's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The pricing's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The pricing's order." - } - } - }, - "AdminGetPricingRuleTypesRuleTypeParams": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminGetPricingRuleTypesRuleTypeParams", - "properties": { - "expand": { - "type": "string", - "title": "expand", - "description": "The pricing's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The pricing's fields." - } - } - }, - "AdminGetProductsParams": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The product's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The product's ID." - }, - { - "type": "array", - "description": "The product's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The product's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The product's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The product's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The product's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The product's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The product's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The product's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The product's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The product's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The product's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The product's $and.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $and's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $and's ID." - }, - { - "type": "array", - "description": "The $and's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $and's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $and's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $and's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $and's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $and's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $and's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $and's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $and's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $and's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $and's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $and's details.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $and's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $and's ID." - }, - { - "type": "array", - "description": "The $and's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $and's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $and's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $and's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $and's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $and's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $and's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $and's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $and's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $and's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $and's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $and's details.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "$or": { - "type": "array", - "description": "The $and's $or.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $and's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $and's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $and's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $and's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $and's order." - } - } - } - }, - "$or": { - "type": "array", - "description": "The $and's $or.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $or's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $or's ID." - }, - { - "type": "array", - "description": "The $or's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $or's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $or's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $or's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $or's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $or's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $or's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $or's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $or's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $or's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $or's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $or's $and.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "$or": { - "type": "array", - "description": "The $or's details.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $or's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $or's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $or's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $or's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $or's order." - } - } - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $and's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $and's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $and's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $and's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $and's order." - } - } - } - }, - "$or": { - "type": "array", - "description": "The product's $or.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $or's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $or's ID." - }, - { - "type": "array", - "description": "The $or's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $or's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $or's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $or's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $or's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $or's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $or's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $or's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $or's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $or's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $or's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $or's $and.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $and's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $and's ID." - }, - { - "type": "array", - "description": "The $and's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $and's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $and's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $and's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $and's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $and's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $and's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $and's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $and's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $and's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $and's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $and's details.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "$or": { - "type": "array", - "description": "The $and's $or.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $and's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $and's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $and's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $and's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $and's order." - } - } - } - }, - "$or": { - "type": "array", - "description": "The $or's details.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": { - "q": { - "type": "string", - "title": "q", - "description": "The $or's q." - }, - "id": { - "oneOf": [ - { - "type": "string", - "title": "id", - "description": "The $or's ID." - }, - { - "type": "array", - "description": "The $or's ID.", - "items": { - "type": "string", - "title": "id", - "description": "The id's ID." - } - } - ] - }, - "status": { - "type": "array", - "description": "The $or's status.", - "items": {} - }, - "title": { - "type": "string", - "title": "title", - "description": "The $or's title." - }, - "handle": { - "type": "string", - "title": "handle", - "description": "The $or's handle." - }, - "is_giftcard": { - "type": "boolean", - "title": "is_giftcard", - "description": "The $or's is giftcard." - }, - "price_list_id": { - "type": "array", - "description": "The $or's price list id.", - "items": { - "type": "string", - "title": "price_list_id", - "description": "The price list id's details." - } - }, - "sales_channel_id": { - "type": "array", - "description": "The $or's sales channel id.", - "items": { - "type": "string", - "title": "sales_channel_id", - "description": "The sales channel id's details." - } - }, - "collection_id": { - "type": "array", - "description": "The $or's collection id.", - "items": { - "type": "string", - "title": "collection_id", - "description": "The collection id's details." - } - }, - "tags": { - "type": "array", - "description": "The $or's tags.", - "items": { - "type": "string", - "title": "tags", - "description": "The tag's tags." - } - }, - "type_id": { - "type": "array", - "description": "The $or's type id.", - "items": { - "type": "string", - "title": "type_id", - "description": "The type id's details." - } - }, - "variants": { - "type": "object", - "description": "The $or's variants.", - "properties": {} - }, - "created_at": {}, - "updated_at": {}, - "deleted_at": {}, - "$and": { - "type": "array", - "description": "The $or's $and.", - "items": { - "type": "object", - "description": "The $and's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "$or": { - "type": "array", - "description": "The $or's details.", - "items": { - "type": "object", - "description": "The $or's details.", - "x-schemaName": "AdminGetProductsParams", - "properties": {} - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $or's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $or's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $or's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $or's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $or's order." - } - } - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The $or's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The $or's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The $or's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The $or's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The $or's order." - } - } - } - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The product's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The product's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The product's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The product's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The product's order." - } - } - }, - "AdminGetPromotionsParams": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminGetPromotionsParams", - "properties": { - "code": { - "type": "string", - "title": "code", - "description": "The promotion's code." - }, - "expand": { - "type": "string", - "title": "expand", - "description": "The promotion's expand." - }, - "fields": { - "type": "string", - "title": "fields", - "description": "The promotion's fields." - }, - "offset": { - "type": "number", - "title": "offset", - "description": "The promotion's offset." - }, - "limit": { - "type": "number", - "title": "limit", - "description": "The promotion's limit." - }, - "order": { - "type": "string", - "title": "order", - "description": "The promotion's order." - } - } - }, - "AdminPostCampaignsReq": { - "type": "object", - "description": "The promotion's campaign.", - "x-schemaName": "AdminPostCampaignsReq", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "title": "name", - "description": "The campaign's name." - }, - "campaign_identifier": { - "type": "string", - "title": "campaign_identifier", - "description": "The campaign's campaign identifier." - }, - "description": { - "type": "string", - "title": "description", - "description": "The campaign's description." - }, - "currency": { - "type": "string", - "title": "currency", - "description": "The campaign's currency." - }, - "budget": { - "$ref": "#/components/schemas/CampaignBudget" - }, - "starts_at": { - "type": "string", - "title": "starts_at", - "description": "The campaign's starts at." - }, - "ends_at": { - "type": "string", - "title": "ends_at", - "description": "The campaign's ends at." - }, - "promotions": { - "type": "array", - "description": "The campaign's promotions.", - "items": { - "type": "object", - "description": "The promotion's promotions.", - "x-schemaName": "IdObject", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "title": "id", - "description": "The promotion's ID." - } - } - } - } - } - }, - "AdminPostCustomerGroupsGroupCustomersBatchReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostCustomerGroupsGroupCustomersBatchReq", - "required": [ - "customer_ids" - ], - "properties": { - "customer_ids": { - "type": "array", - "description": "The customer group's customer ids.", - "items": { - "type": "object", - "description": "The customer id's customer ids.", - "x-schemaName": "CustomerGroupsBatchCustomer", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "title": "id", - "description": "The customer id's ID." - } - } - } - } - } - }, - "AdminPostFulfillmentShippingOptionsRulesBatchAddReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostFulfillmentShippingOptionsRulesBatchAddReq", - "required": [ - "rules" - ], - "properties": { - "rules": { - "type": "array", - "description": "The fulfillment's rules.", - "items": { - "type": "object", - "description": "The rule's rules.", - "x-schemaName": "FulfillmentRuleCreate", - "required": [ - "operator", - "attribute", - "value" - ], - "properties": { - "operator": {}, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The rule's attribute." - }, - "value": { - "oneOf": [ - { - "type": "string", - "title": "value", - "description": "The rule's value." - }, - { - "type": "array", - "description": "The rule's value.", - "items": { - "type": "string", - "title": "value", - "description": "The value's details." - } - } - ] - } - } - } - } - } - }, - "AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq", - "required": [ - "rule_ids" - ], - "properties": { - "rule_ids": { - "type": "array", - "description": "The fulfillment's rule ids.", - "items": { - "type": "string", - "title": "rule_ids", - "description": "The rule id's rule ids." - } - } - } - }, - "AdminPostInventoryItemsInventoryItemReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostInventoryItemsInventoryItemReq", - "properties": { - "sku": { - "type": "string", - "title": "sku", - "description": "The inventory item's sku." - }, - "origin_country": { - "type": "string", - "title": "origin_country", - "description": "The inventory item's origin country." - }, - "hs_code": { - "type": "string", - "title": "hs_code", - "description": "The inventory item's hs code." - }, - "mid_code": { - "type": "string", - "title": "mid_code", - "description": "The inventory item's mid code." - }, - "material": { - "type": "string", - "title": "material", - "description": "The inventory item's material." - }, - "weight": { - "type": "number", - "title": "weight", - "description": "The inventory item's weight." - }, - "height": { - "type": "number", - "title": "height", - "description": "The inventory item's height." - }, - "length": { - "type": "number", - "title": "length", - "description": "The inventory item's length." - }, - "width": { - "type": "number", - "title": "width", - "description": "The inventory item's width." - }, - "title": { - "type": "string", - "title": "title", - "description": "The inventory item's title." - }, - "description": { - "type": "string", - "title": "description", - "description": "The inventory item's description." - }, - "thumbnail": { - "type": "string", - "title": "thumbnail", - "description": "The inventory item's thumbnail." - }, - "requires_shipping": { - "type": "boolean", - "title": "requires_shipping", - "description": "The inventory item's requires shipping." - } - } - }, - "AdminPostInventoryItemsItemLocationLevelsLevelReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostInventoryItemsItemLocationLevelsLevelReq", - "properties": { - "incoming_quantity": { - "type": "number", - "title": "incoming_quantity", - "description": "The inventory item's incoming quantity." - }, - "stocked_quantity": { - "type": "number", - "title": "stocked_quantity", - "description": "The inventory item's stocked quantity." - } - } - }, - "AdminPostInventoryItemsItemLocationLevelsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostInventoryItemsItemLocationLevelsReq", - "required": [ - "location_id", - "stocked_quantity" - ], - "properties": { - "location_id": { - "type": "string", - "title": "location_id", - "description": "The inventory item's location id." - }, - "stocked_quantity": { - "type": "number", - "title": "stocked_quantity", - "description": "The inventory item's stocked quantity." - }, - "incoming_quantity": { - "type": "number", - "title": "incoming_quantity", - "description": "The inventory item's incoming quantity." - } - } - }, - "AdminPostInventoryItemsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostInventoryItemsReq", - "properties": { - "sku": { - "type": "string", - "title": "sku", - "description": "The inventory item's sku." - }, - "hs_code": { - "type": "string", - "title": "hs_code", - "description": "The inventory item's hs code." - }, - "weight": { - "type": "number", - "title": "weight", - "description": "The inventory item's weight." - }, - "length": { - "type": "number", - "title": "length", - "description": "The inventory item's length." - }, - "height": { - "type": "number", - "title": "height", - "description": "The inventory item's height." - }, - "width": { - "type": "number", - "title": "width", - "description": "The inventory item's width." - }, - "origin_country": { - "type": "string", - "title": "origin_country", - "description": "The inventory item's origin country." - }, - "mid_code": { - "type": "string", - "title": "mid_code", - "description": "The inventory item's mid code." - }, - "material": { - "type": "string", - "title": "material", - "description": "The inventory item's material." - }, - "title": { - "type": "string", - "title": "title", - "description": "The inventory item's title." - }, - "description": { - "type": "string", - "title": "description", - "description": "The inventory item's description." - }, - "thumbnail": { - "type": "string", - "title": "thumbnail", - "description": "The inventory item's thumbnail." - }, - "metadata": { - "type": "object", - "description": "The inventory item's metadata.", - "properties": {} - } - } - }, - "AdminPostInvitesInviteAcceptReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostInvitesInviteAcceptReq", - "required": [ - "first_name", - "last_name" - ], - "properties": { - "first_name": { - "type": "string", - "title": "first_name", - "description": "The invite's first name." - }, - "last_name": { - "type": "string", - "title": "last_name", - "description": "The invite's last name." - } - } - }, - "AdminPostPaymentsCapturesReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPaymentsCapturesReq", - "properties": { - "amount": { - "type": "number", - "title": "amount", - "description": "The payment's amount." - } - } - }, - "AdminPostPaymentsRefundsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPaymentsRefundsReq", - "properties": { - "amount": { - "type": "number", - "title": "amount", - "description": "The payment's amount." - } - } - }, - "AdminPostPriceListsPriceListPricesBatchAddReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPriceListsPriceListPricesBatchAddReq", - "required": [ - "prices" - ], - "properties": { - "prices": { - "type": "array", - "description": "The price list's prices.", - "items": { - "type": "object", - "description": "The price's prices.", - "x-schemaName": "AdminPriceListPricesCreateReq", - "required": [ - "currency_code", - "amount", - "variant_id" - ], - "properties": { - "currency_code": { - "type": "string", - "title": "currency_code", - "description": "The price's currency code." - }, - "amount": { - "type": "number", - "title": "amount", - "description": "The price's amount." - }, - "variant_id": { - "type": "string", - "title": "variant_id", - "description": "The price's variant id." - }, - "min_quantity": { - "type": "number", - "title": "min_quantity", - "description": "The price's min quantity." - }, - "max_quantity": { - "type": "number", - "title": "max_quantity", - "description": "The price's max quantity." - }, - "rules": { - "type": "object", - "description": "The price's rules.", - "properties": {} - } - } - } - } - } - }, - "AdminPostPriceListsPriceListPricesBatchRemoveReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPriceListsPriceListPricesBatchRemoveReq", - "required": [ - "ids" - ], - "properties": { - "ids": { - "type": "array", - "description": "The price list's ids.", - "items": { - "type": "string", - "title": "ids", - "description": "The id's ids." - } - } - } - }, - "AdminPostPriceListsPriceListReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPriceListsPriceListReq", - "required": [ - "prices" - ], - "properties": { - "title": { - "type": "string", - "title": "title", - "description": "The price list's title." - }, - "description": { - "type": "string", - "title": "description", - "description": "The price list's description." - }, - "starts_at": { - "type": "string", - "title": "starts_at", - "description": "The price list's starts at." - }, - "ends_at": { - "type": "string", - "title": "ends_at", - "description": "The price list's ends at." - }, - "status": {}, - "type": {}, - "prices": { - "type": "array", - "description": "The price list's prices.", - "items": { - "type": "object", - "description": "The price's prices.", - "x-schemaName": "AdminPriceListPricesCreateReq", - "required": [ - "currency_code", - "amount", - "variant_id" - ], - "properties": { - "currency_code": { - "type": "string", - "title": "currency_code", - "description": "The price's currency code." - }, - "amount": { - "type": "number", - "title": "amount", - "description": "The price's amount." - }, - "variant_id": { - "type": "string", - "title": "variant_id", - "description": "The price's variant id." - }, - "min_quantity": { - "type": "number", - "title": "min_quantity", - "description": "The price's min quantity." - }, - "max_quantity": { - "type": "number", - "title": "max_quantity", - "description": "The price's max quantity." - }, - "rules": { - "type": "object", - "description": "The price's rules.", - "properties": {} - } - } - } - }, - "rules": { - "type": "object", - "description": "The price list's rules.", - "properties": {} - } - } - }, - "AdminPostPriceListsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPriceListsReq", - "required": [ - "title", - "description", - "type", - "prices" - ], - "properties": { - "title": { - "type": "string", - "title": "title", - "description": "The price list's title." - }, - "description": { - "type": "string", - "title": "description", - "description": "The price list's description." - }, - "starts_at": { - "type": "string", - "title": "starts_at", - "description": "The price list's starts at." - }, - "ends_at": { - "type": "string", - "title": "ends_at", - "description": "The price list's ends at." - }, - "status": {}, - "type": {}, - "prices": { - "type": "array", - "description": "The price list's prices.", - "items": { - "type": "object", - "description": "The price's prices.", - "x-schemaName": "AdminPriceListPricesCreateReq", - "required": [ - "currency_code", - "amount", - "variant_id" - ], - "properties": { - "currency_code": { - "type": "string", - "title": "currency_code", - "description": "The price's currency code." - }, - "amount": { - "type": "number", - "title": "amount", - "description": "The price's amount." - }, - "variant_id": { - "type": "string", - "title": "variant_id", - "description": "The price's variant id." - }, - "min_quantity": { - "type": "number", - "title": "min_quantity", - "description": "The price's min quantity." - }, - "max_quantity": { - "type": "number", - "title": "max_quantity", - "description": "The price's max quantity." - }, - "rules": { - "type": "object", - "description": "The price's rules.", - "properties": {} - } - } - } - }, - "rules": { - "type": "object", - "description": "The price list's rules.", - "properties": {} - } - } - }, - "AdminPostPricingRuleTypesReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPricingRuleTypesReq", - "required": [ - "name", - "rule_attribute", - "default_priority" - ], - "properties": { - "name": { - "type": "string", - "title": "name", - "description": "The pricing's name." - }, - "rule_attribute": { - "type": "string", - "title": "rule_attribute", - "description": "The pricing's rule attribute." - }, - "default_priority": { - "type": "number", - "title": "default_priority", - "description": "The pricing's default priority." - } - } - }, - "AdminPostPricingRuleTypesRuleTypeReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPricingRuleTypesRuleTypeReq", - "properties": { - "name": { - "type": "string", - "title": "name", - "description": "The pricing's name." - }, - "rule_attribute": { - "type": "string", - "title": "rule_attribute", - "description": "The pricing's rule attribute." - }, - "default_priority": { - "type": "number", - "title": "default_priority", - "description": "The pricing's default priority." - } - } - }, - "AdminPostPromotionsPromotionReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPromotionsPromotionReq", - "properties": { - "code": { - "type": "string", - "title": "code", - "description": "The promotion's code." - }, - "is_automatic": { - "type": "boolean", - "title": "is_automatic", - "description": "The promotion's is automatic." - }, - "type": {}, - "campaign_id": { - "type": "string", - "title": "campaign_id", - "description": "The promotion's campaign id." - }, - "campaign": { - "$ref": "#/components/schemas/AdminPostCampaignsReq" - }, - "application_method": { - "$ref": "#/components/schemas/ApplicationMethodsMethodPostReq" - }, - "rules": { - "type": "array", - "description": "The promotion's rules.", - "items": { - "type": "object", - "description": "The rule's rules.", - "x-schemaName": "PromotionRule", - "required": [ - "operator", - "attribute", - "values" - ], - "properties": { - "operator": {}, - "description": { - "type": "string", - "title": "description", - "description": "The rule's description." - }, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The rule's attribute." - }, - "values": { - "type": "array", - "description": "The rule's values.", - "items": { - "type": "string", - "title": "values", - "description": "The value's values." - } - } - } - } - } - } - }, - "AdminPostPromotionsPromotionRulesBatchAddReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPromotionsPromotionRulesBatchAddReq", - "required": [ - "rules" - ], - "properties": { - "rules": { - "type": "array", - "description": "The promotion's rules.", - "items": { - "type": "object", - "description": "The rule's rules.", - "x-schemaName": "PromotionRule", - "required": [ - "operator", - "attribute", - "values" - ], - "properties": { - "operator": {}, - "description": { - "type": "string", - "title": "description", - "description": "The rule's description." - }, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The rule's attribute." - }, - "values": { - "type": "array", - "description": "The rule's values.", - "items": { - "type": "string", - "title": "values", - "description": "The value's values." - } - } - } - } - } - } - }, - "AdminPostPromotionsPromotionRulesBatchRemoveReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPromotionsPromotionRulesBatchRemoveReq", - "required": [ - "rule_ids" - ], - "properties": { - "rule_ids": { - "type": "array", - "description": "The promotion's rule ids.", - "items": { - "type": "string", - "title": "rule_ids", - "description": "The rule id's rule ids." - } - } - } - }, - "AdminPostPromotionsPromotionRulesBatchUpdateReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostPromotionsPromotionRulesBatchUpdateReq", - "required": [ - "rules" - ], - "properties": { - "rules": { - "type": "array", - "description": "The promotion's rules.", - "items": { - "type": "object", - "description": "The rule's rules.", - "x-schemaName": "UpdatePromotionRule", - "required": [ - "id", - "attribute", - "values" - ], - "properties": { - "id": { - "type": "string", - "title": "id", - "description": "The rule's ID." - }, - "operator": {}, - "description": { - "type": "string", - "title": "description", - "description": "The rule's description." - }, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The rule's attribute." - }, - "values": { - "type": "array", - "description": "The rule's values.", - "items": { - "type": "string", - "title": "values", - "description": "The value's values." - } - } - } - } - } - } - }, - "AdminPostStockLocationsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostStockLocationsReq", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "title": "name", - "description": "The stock location's name." - }, - "address": { - "$ref": "#/components/schemas/StockLocationAddress" - }, - "address_id": { - "type": "string", - "title": "address_id", - "description": "The stock location's address id." - }, - "metadata": { - "type": "object", - "description": "The stock location's metadata.", - "properties": {} - } - } - }, - "AdminPostTaxRatesReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostTaxRatesReq", - "required": [ - "name", - "tax_region_id" - ], - "properties": { - "rate": { - "type": "number", - "title": "rate", - "description": "The tax rate's rate." - }, - "code": { - "type": "string", - "title": "code", - "description": "The tax rate's code." - }, - "rules": { - "type": "array", - "description": "The tax rate's rules.", - "items": { - "type": "object", - "description": "The rule's rules.", - "x-schemaName": "CreateTaxRateRule", - "required": [ - "reference", - "reference_id" - ], - "properties": { - "reference": { - "type": "string", - "title": "reference", - "description": "The rule's reference." - }, - "reference_id": { - "type": "string", - "title": "reference_id", - "description": "The rule's reference id." - } - } - } - }, - "name": { - "type": "string", - "title": "name", - "description": "The tax rate's name." - }, - "is_default": { - "type": "boolean", - "title": "is_default", - "description": "The tax rate's is default." - }, - "is_combinable": { - "type": "boolean", - "title": "is_combinable", - "description": "The tax rate's is combinable." - }, - "tax_region_id": { - "type": "string", - "title": "tax_region_id", - "description": "The tax rate's tax region id." - }, - "metadata": { - "type": "object", - "description": "The tax rate's metadata.", - "properties": {} - } - } - }, - "AdminPostTaxRatesTaxRateReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostTaxRatesTaxRateReq", - "properties": { - "code": { - "type": "string", - "title": "code", - "description": "The tax rate's code." - }, - "name": { - "type": "string", - "title": "name", - "description": "The tax rate's name." - }, - "region_id": { - "type": "string", - "title": "region_id", - "description": "The tax rate's region id." - }, - "rate": { - "type": "number", - "title": "rate", - "description": "The tax rate's rate." - }, - "products": { - "type": "array", - "description": "The tax rate's products.", - "items": { - "type": "string", - "title": "products", - "description": "The product's products." - } - }, - "shipping_options": { - "type": "array", - "description": "The tax rate's shipping options.", - "items": { - "type": "string", - "title": "shipping_options", - "description": "The shipping option's shipping options." - } - }, - "product_types": { - "type": "array", - "description": "The tax rate's product types.", - "items": { - "type": "string", - "title": "product_types", - "description": "The product type's product types." - } - } - } - }, - "AdminPostTaxRatesTaxRateRulesReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostTaxRatesTaxRateRulesReq", - "required": [ - "reference", - "reference_id" - ], - "properties": { - "reference": { - "type": "string", - "title": "reference", - "description": "The tax rate's reference." - }, - "reference_id": { - "type": "string", - "title": "reference_id", - "description": "The tax rate's reference id." - } - } - }, - "AdminPostTaxRegionsReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostTaxRegionsReq", - "required": [ - "country_code" - ], - "properties": { - "country_code": { - "type": "string", - "title": "country_code", - "description": "The tax region's country code." - }, - "province_code": { - "type": "string", - "title": "province_code", - "description": "The tax region's province code." - }, - "parent_id": { - "type": "string", - "title": "parent_id", - "description": "The tax region's parent id." - }, - "default_tax_rate": { - "$ref": "#/components/schemas/CreateDefaultTaxRate" - }, - "metadata": { - "type": "object", - "description": "The tax region's metadata.", - "properties": {} - } - } - }, - "AdminPostWorkflowsAsyncResponseReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostWorkflowsAsyncResponseReq", - "required": [ - "transaction_id", - "step_id" - ], - "properties": { - "transaction_id": { - "type": "string", - "title": "transaction_id", - "description": "The workflows execution's transaction id." - }, - "step_id": { - "type": "string", - "title": "step_id", - "description": "The workflows execution's step id." - }, - "response": {}, - "compensate_input": {}, - "action": {} - } - }, - "AdminPostWorkflowsRunReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminPostWorkflowsRunReq", - "properties": { - "input": {}, - "transaction_id": { - "type": "string", - "title": "transaction_id", - "description": "The workflows execution's transaction id." - } - } - }, - "AdminUpdateUserRequest": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "AdminUpdateUserRequest", - "required": [ - "avatar_url" - ], - "properties": { - "first_name": { - "type": "string", - "title": "first_name", - "description": "The user's first name." - }, - "last_name": { - "type": "string", - "title": "last_name", - "description": "The user's last name." - }, - "avatar_url": { - "type": "string", - "title": "avatar_url", - "description": "The user's avatar url." - } - } - }, - "ApplicationMethodsMethodPostReq": { - "type": "object", - "description": "The promotion's application method.", - "x-schemaName": "ApplicationMethodsMethodPostReq", - "properties": { - "description": { - "type": "string", - "title": "description", - "description": "The application method's description." - }, - "value": { - "type": "string", - "title": "value", - "description": "The application method's value." - }, - "max_quantity": { - "type": "number", - "title": "max_quantity", - "description": "The application method's max quantity." - }, - "type": {}, - "target_type": {}, - "allocation": {}, - "target_rules": { - "type": "array", - "description": "The application method's target rules.", - "items": { - "type": "object", - "description": "The target rule's target rules.", - "x-schemaName": "PromotionRule", - "required": [ - "operator", - "attribute", - "values" - ], - "properties": { - "operator": {}, - "description": { - "type": "string", - "title": "description", - "description": "The target rule's description." - }, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The target rule's attribute." - }, - "values": { - "type": "array", - "description": "The target rule's values.", - "items": { - "type": "string", - "title": "values", - "description": "The value's values." - } - } - } - } - }, - "buy_rules": { - "type": "array", - "description": "The application method's buy rules.", - "items": { - "type": "object", - "description": "The buy rule's buy rules.", - "x-schemaName": "PromotionRule", - "required": [ - "operator", - "attribute", - "values" - ], - "properties": { - "operator": {}, - "description": { - "type": "string", - "title": "description", - "description": "The buy rule's description." - }, - "attribute": { - "type": "string", - "title": "attribute", - "description": "The buy rule's attribute." - }, - "values": { - "type": "array", - "description": "The buy rule's values.", - "items": { - "type": "string", - "title": "values", - "description": "The value's values." - } - } - } - } - }, - "apply_to_quantity": { - "type": "number", - "title": "apply_to_quantity", - "description": "The application method's apply to quantity." - }, - "buy_rules_min_quantity": { - "type": "number", - "title": "buy_rules_min_quantity", - "description": "The application method's buy rules min quantity." - } - } - }, - "CampaignBudget": { - "type": "object", - "description": "The campaign's budget.", - "x-schemaName": "CampaignBudget", - "properties": { - "type": {}, - "limit": { - "type": "number", - "title": "limit", - "description": "The budget's limit." - } - } - }, - "CreateDefaultTaxRate": { - "type": "object", - "description": "The tax region's default tax rate.", - "x-schemaName": "CreateDefaultTaxRate", - "required": [ - "name" - ], - "properties": { - "rate": { - "type": "number", - "title": "rate", - "description": "The default tax rate's rate." - }, - "code": { - "type": "string", - "title": "code", - "description": "The default tax rate's code." - }, - "name": { - "type": "string", - "title": "name", - "description": "The default tax rate's name." - }, - "metadata": { - "type": "object", - "description": "The default tax rate's metadata.", - "properties": {} - } - } - }, - "Error": { - "title": "Response Error", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "A slug code to indicate the type of the error.", - "enum": [ - "invalid_state_error", - "invalid_request_error", - "api_error", - "unknown_error" - ] - }, - "message": { - "type": "string", - "description": "Description of the error that occurred.", - "example": "first_name must be a string" - }, - "type": { - "type": "string", - "description": "A slug indicating the type of the error.", - "enum": [ - "QueryRunnerAlreadyReleasedError", - "TransactionAlreadyStartedError", - "TransactionNotStartedError", - "conflict", - "unauthorized", - "payment_authorization_error", - "duplicate_error", - "not_allowed", - "invalid_data", - "not_found", - "database_error", - "unexpected_state", - "invalid_argument", - "unknown_error" - ] - } - } - }, - "MultipleErrors": { - "title": "Multiple Errors", - "type": "object", - "properties": { - "errors": { - "type": "array", - "description": "Array of errors", - "items": { - "$ref": "#/components/schemas/Error" - } - }, - "message": { - "type": "string", - "default": "Provided request body contains errors. Please check the data and retry the request" - } - } - }, - "StockLocationAddress": { - "type": "object", - "description": "The stock location's address.", - "x-schemaName": "StockLocationAddress", - "required": [ - "address_1", - "country_code" - ], - "properties": { - "address_1": { - "type": "string", - "title": "address_1", - "description": "The address's address 1." - }, - "address_2": { - "type": "string", - "title": "address_2", - "description": "The address's address 2." - }, - "company": { - "type": "string", - "title": "company", - "description": "The address's company." - }, - "city": { - "type": "string", - "title": "city", - "description": "The address's city." - }, - "country_code": { - "type": "string", - "title": "country_code", - "description": "The address's country code." - }, - "phone": { - "type": "string", - "title": "phone", - "description": "The address's phone." - }, - "postal_code": { - "type": "string", - "title": "postal_code", - "description": "The address's postal code." - }, - "province": { - "type": "string", - "title": "province", - "description": "The address's province." - } - } - }, - "StorePostCartsCartTaxesReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "StorePostCartsCartTaxesReq", - "properties": {} - }, - "StorePostPaymentCollectionsPaymentSessionReq": { - "type": "object", - "description": "SUMMARY", - "x-schemaName": "StorePostPaymentCollectionsPaymentSessionReq", - "required": [ - "provider_id" - ], - "properties": { - "provider_id": { - "type": "string", - "title": "provider_id", - "description": "The payment collection's provider id." - }, - "context": {}, - "data": { - "type": "object", - "description": "The payment collection's data.", - "properties": {} - } - } - } - } - } -} \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts/post.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts/post.sh deleted file mode 100644 index 391027d3d6..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/carts' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}/get.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}/get.sh deleted file mode 100644 index dd696e7372..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/carts/{id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}/post.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}/post.sh deleted file mode 100644 index 39ee5de507..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/carts/{id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_line-items/post.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_line-items/post.sh deleted file mode 100644 index 3fab2d4346..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_line-items/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/carts/{id}/line-items' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/delete.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/delete.sh deleted file mode 100644 index 3673916dd9..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/delete.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/post.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/post.sh deleted file mode 100644 index f59518edc7..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/carts/{id}/line-items/{line_id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_taxes/post.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_taxes/post.sh deleted file mode 100644 index 7d0ce0080e..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_taxes/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/carts/{id}/taxes' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers/post.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers/post.sh deleted file mode 100644 index 080e5f6f70..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/customers' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me/get.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me/get.sh deleted file mode 100644 index fe3d326466..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/customers/me' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses/post.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses/post.sh deleted file mode 100644 index 2106fe7e19..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/customers/me/addresses' diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses_{address_id}/delete.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses_{address_id}/delete.sh deleted file mode 100644 index 9f87b916e6..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses_{address_id}/delete.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses_{address_id}/post.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses_{address_id}/post.sh deleted file mode 100644 index 476a0feca9..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses_{address_id}/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/customers/me/addresses/{address_id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_regions/get.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_regions/get.sh deleted file mode 100644 index b97508bcb2..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_regions/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/regions' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_regions_{id}/get.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_regions_{id}/get.sh deleted file mode 100644 index 7b9352b895..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_regions_{id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/regions/{id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_shipping-options_{cart_id}/get.sh b/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_shipping-options_{cart_id}/get.sh deleted file mode 100644 index 86ae6e7eb3..0000000000 --- a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_shipping-options_{cart_id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/shipping-options/{cart_id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/components/examples/database_error.yaml b/www/apps/api-reference/specs-v2/store/components/examples/database_error.yaml deleted file mode 100644 index 07f4ce82cb..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/examples/database_error.yaml +++ /dev/null @@ -1,5 +0,0 @@ -summary: Database Error -value: - code: api_error - message: An error occured while hashing password - type: database_error diff --git a/www/apps/api-reference/specs-v2/store/components/examples/default_error.yaml b/www/apps/api-reference/specs-v2/store/components/examples/default_error.yaml deleted file mode 100644 index b24cde7cd9..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/examples/default_error.yaml +++ /dev/null @@ -1,5 +0,0 @@ -summary: Default Error -value: - code: unknown_error - message: An unknown error occurred. - type: unknown_error diff --git a/www/apps/api-reference/specs-v2/store/components/examples/invalid_argument_error.yaml b/www/apps/api-reference/specs-v2/store/components/examples/invalid_argument_error.yaml deleted file mode 100644 index 364d93fde8..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/examples/invalid_argument_error.yaml +++ /dev/null @@ -1,4 +0,0 @@ -summary: Invalid Argument Error -value: - message: cart.total must be defined - type: unexpected_state diff --git a/www/apps/api-reference/specs-v2/store/components/examples/invalid_data_error.yaml b/www/apps/api-reference/specs-v2/store/components/examples/invalid_data_error.yaml deleted file mode 100644 index 62ea2f6f71..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/examples/invalid_data_error.yaml +++ /dev/null @@ -1,4 +0,0 @@ -summary: Invalid Data Error -value: - message: first_name must be a string - type: invalid_data diff --git a/www/apps/api-reference/specs-v2/store/components/examples/multiple_errors.yaml b/www/apps/api-reference/specs-v2/store/components/examples/multiple_errors.yaml deleted file mode 100644 index 044e062400..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/examples/multiple_errors.yaml +++ /dev/null @@ -1,10 +0,0 @@ -summary: Multiple Errors -value: - message: >- - Provided request body contains errors. Please check the data and retry the - request - errors: - - message: first_name must be a string - type: invalid_data - - message: Discount must be set to dynamic - type: not_allowed diff --git a/www/apps/api-reference/specs-v2/store/components/examples/not_allowed_error.yaml b/www/apps/api-reference/specs-v2/store/components/examples/not_allowed_error.yaml deleted file mode 100644 index 5388080633..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/examples/not_allowed_error.yaml +++ /dev/null @@ -1,4 +0,0 @@ -summary: Not Allowed Error -value: - message: Discount must be set to dynamic - type: not_allowed diff --git a/www/apps/api-reference/specs-v2/store/components/examples/unexpected_state_error.yaml b/www/apps/api-reference/specs-v2/store/components/examples/unexpected_state_error.yaml deleted file mode 100644 index 297e630dee..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/examples/unexpected_state_error.yaml +++ /dev/null @@ -1,4 +0,0 @@ -summary: Unexpected State Error -value: - message: cart.total must be defined - type: unexpected_state diff --git a/www/apps/api-reference/specs-v2/store/components/responses/400_error.yaml b/www/apps/api-reference/specs-v2/store/components/responses/400_error.yaml deleted file mode 100644 index b960f05fb4..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/responses/400_error.yaml +++ /dev/null @@ -1,14 +0,0 @@ -description: Client Error or Multiple Errors -content: - application/json: - schema: - oneOf: - - $ref: ../schemas/Error.yaml - - $ref: ../schemas/MultipleErrors.yaml - examples: - not_allowed: - $ref: ../examples/not_allowed_error.yaml - invalid_data: - $ref: ../examples/invalid_data_error.yaml - MultipleErrors: - $ref: ../examples/multiple_errors.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/responses/500_error.yaml b/www/apps/api-reference/specs-v2/store/components/responses/500_error.yaml deleted file mode 100644 index 5da1a171e5..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/responses/500_error.yaml +++ /dev/null @@ -1,14 +0,0 @@ -description: Server Error -content: - application/json: - schema: - $ref: ../schemas/Error.yaml - examples: - database: - $ref: ../examples/database_error.yaml - unexpected_state: - $ref: ../examples/unexpected_state_error.yaml - invalid_argument: - $ref: ../examples/invalid_argument_error.yaml - default_error: - $ref: ../examples/default_error.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/responses/default_error.yaml b/www/apps/api-reference/specs-v2/store/components/responses/default_error.yaml deleted file mode 100644 index 5591502a6c..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/responses/default_error.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Default Error -content: - application/json: - schema: - $ref: ../schemas/Error.yaml - example: - code: unknown_error - message: An unknown error occurred. - type: unknown_error diff --git a/www/apps/api-reference/specs-v2/store/components/responses/incorrect_credentials.yaml b/www/apps/api-reference/specs-v2/store/components/responses/incorrect_credentials.yaml deleted file mode 100644 index c1537623ba..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/responses/incorrect_credentials.yaml +++ /dev/null @@ -1,7 +0,0 @@ -description: User does not exist or incorrect credentials -content: - text/plain: - schema: - type: string - default: Unauthorized - example: Unauthorized diff --git a/www/apps/api-reference/specs-v2/store/components/responses/invalid_request_error.yaml b/www/apps/api-reference/specs-v2/store/components/responses/invalid_request_error.yaml deleted file mode 100644 index c70a32b01f..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/responses/invalid_request_error.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Invalid Request Error -content: - application/json: - schema: - $ref: ../schemas/Error.yaml - example: - code: invalid_request_error - message: Discount with code TEST already exists. - type: duplicate_error diff --git a/www/apps/api-reference/specs-v2/store/components/responses/invalid_state_error.yaml b/www/apps/api-reference/specs-v2/store/components/responses/invalid_state_error.yaml deleted file mode 100644 index 479206bab5..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/responses/invalid_state_error.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Invalid State Error -content: - application/json: - schema: - $ref: ../schemas/Error.yaml - example: - code: unknown_error - message: >- - The request conflicted with another request. You may retry the request - with the provided Idempotency-Key. - type: QueryRunnerAlreadyReleasedError diff --git a/www/apps/api-reference/specs-v2/store/components/responses/not_found_error.yaml b/www/apps/api-reference/specs-v2/store/components/responses/not_found_error.yaml deleted file mode 100644 index c6fea98d05..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/responses/not_found_error.yaml +++ /dev/null @@ -1,8 +0,0 @@ -description: Not Found Error -content: - application/json: - schema: - $ref: ../schemas/Error.yaml - example: - message: Entity with id 1 was not found - type: not_found diff --git a/www/apps/api-reference/specs-v2/store/components/responses/unauthorized.yaml b/www/apps/api-reference/specs-v2/store/components/responses/unauthorized.yaml deleted file mode 100644 index 6e59a0886a..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/responses/unauthorized.yaml +++ /dev/null @@ -1,7 +0,0 @@ -description: User is not authorized. Must log in first -content: - text/plain: - schema: - type: string - default: Unauthorized - example: Unauthorized diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml deleted file mode 100644 index b6d536cac5..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminPostCustomerGroupsGroupCustomersBatchReq -required: - - customer_ids -properties: - customer_ids: - type: array - description: The customer group's customer ids. - items: - type: object - description: The customer id's customer ids. - x-schemaName: CustomerGroupsBatchCustomer - required: - - id - properties: - id: - type: string - title: id - description: The customer id's ID. diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml deleted file mode 100644 index bf0295b65b..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml +++ /dev/null @@ -1,56 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminPostInventoryItemsInventoryItemReq -properties: - sku: - type: string - title: sku - description: The inventory item's sku. - origin_country: - type: string - title: origin_country - description: The inventory item's origin country. - hs_code: - type: string - title: hs_code - description: The inventory item's hs code. - mid_code: - type: string - title: mid_code - description: The inventory item's mid code. - material: - type: string - title: material - description: The inventory item's material. - weight: - type: number - title: weight - description: The inventory item's weight. - height: - type: number - title: height - description: The inventory item's height. - length: - type: number - title: length - description: The inventory item's length. - width: - type: number - title: width - description: The inventory item's width. - title: - type: string - title: title - description: The inventory item's title. - description: - type: string - title: description - description: The inventory item's description. - thumbnail: - type: string - title: thumbnail - description: The inventory item's thumbnail. - requires_shipping: - type: boolean - title: requires_shipping - description: The inventory item's requires shipping. diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml deleted file mode 100644 index 444b8870c0..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminPostInventoryItemsItemLocationLevelsLevelReq -properties: - incoming_quantity: - type: number - title: incoming_quantity - description: The inventory item's incoming quantity. - stocked_quantity: - type: number - title: stocked_quantity - description: The inventory item's stocked quantity. diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml deleted file mode 100644 index 0bdd7938fe..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminPostInventoryItemsItemLocationLevelsReq -required: - - location_id - - stocked_quantity -properties: - location_id: - type: string - title: location_id - description: The inventory item's location id. - stocked_quantity: - type: number - title: stocked_quantity - description: The inventory item's stocked quantity. - incoming_quantity: - type: number - title: incoming_quantity - description: The inventory item's incoming quantity. diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsReq.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsReq.yaml deleted file mode 100644 index d97997e360..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInventoryItemsReq.yaml +++ /dev/null @@ -1,56 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminPostInventoryItemsReq -properties: - sku: - type: string - title: sku - description: The inventory item's sku. - hs_code: - type: string - title: hs_code - description: The inventory item's hs code. - weight: - type: number - title: weight - description: The inventory item's weight. - length: - type: number - title: length - description: The inventory item's length. - height: - type: number - title: height - description: The inventory item's height. - width: - type: number - title: width - description: The inventory item's width. - origin_country: - type: string - title: origin_country - description: The inventory item's origin country. - mid_code: - type: string - title: mid_code - description: The inventory item's mid code. - material: - type: string - title: material - description: The inventory item's material. - title: - type: string - title: title - description: The inventory item's title. - description: - type: string - title: description - description: The inventory item's description. - thumbnail: - type: string - title: thumbnail - description: The inventory item's thumbnail. - metadata: - type: object - description: The inventory item's metadata. - properties: {} diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInvitesInviteAcceptReq.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInvitesInviteAcceptReq.yaml deleted file mode 100644 index 0843980500..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostInvitesInviteAcceptReq.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminPostInvitesInviteAcceptReq -required: - - first_name - - last_name -properties: - first_name: - type: string - title: first_name - description: The invite's first name. - last_name: - type: string - title: last_name - description: The invite's last name. diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPriceListsPriceListReq.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPriceListsPriceListReq.yaml deleted file mode 100644 index 544cae040d..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPriceListsPriceListReq.yaml +++ /dev/null @@ -1,64 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminPostPriceListsPriceListReq -required: - - prices -properties: - title: - type: string - title: title - description: The price list's title. - description: - type: string - title: description - description: The price list's description. - starts_at: - type: string - title: starts_at - description: The price list's starts at. - ends_at: - type: string - title: ends_at - description: The price list's ends at. - status: {} - type: {} - prices: - type: array - description: The price list's prices. - items: - type: object - description: The price's prices. - x-schemaName: AdminPriceListPricesCreateReq - required: - - currency_code - - amount - - variant_id - properties: - currency_code: - type: string - title: currency_code - description: The price's currency code. - amount: - type: number - title: amount - description: The price's amount. - variant_id: - type: string - title: variant_id - description: The price's variant id. - min_quantity: - type: number - title: min_quantity - description: The price's min quantity. - max_quantity: - type: number - title: max_quantity - description: The price's max quantity. - rules: - type: object - description: The price's rules. - properties: {} - rules: - type: object - description: The price list's rules. - properties: {} diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostStockLocationsReq.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostStockLocationsReq.yaml deleted file mode 100644 index a8c1dac40b..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostStockLocationsReq.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminPostStockLocationsReq -required: - - name -properties: - name: - type: string - title: name - description: The stock location's name. - address: - $ref: ./StockLocationAddress.yaml - address_id: - type: string - title: address_id - description: The stock location's address id. - metadata: - type: object - description: The stock location's metadata. - properties: {} diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostTaxRatesReq.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostTaxRatesReq.yaml deleted file mode 100644 index 31f7a9f5ac..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostTaxRatesReq.yaml +++ /dev/null @@ -1,54 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminPostTaxRatesReq -required: - - name - - tax_region_id -properties: - rate: - type: number - title: rate - description: The tax rate's rate. - code: - type: string - title: code - description: The tax rate's code. - rules: - type: array - description: The tax rate's rules. - items: - type: object - description: The rule's rules. - x-schemaName: CreateTaxRateRule - required: - - reference - - reference_id - properties: - reference: - type: string - title: reference - description: The rule's reference. - reference_id: - type: string - title: reference_id - description: The rule's reference id. - name: - type: string - title: name - description: The tax rate's name. - is_default: - type: boolean - title: is_default - description: The tax rate's is default. - is_combinable: - type: boolean - title: is_combinable - description: The tax rate's is combinable. - tax_region_id: - type: string - title: tax_region_id - description: The tax rate's tax region id. - metadata: - type: object - description: The tax rate's metadata. - properties: {} diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostTaxRatesTaxRateReq.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostTaxRatesTaxRateReq.yaml deleted file mode 100644 index a6c334bdc6..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostTaxRatesTaxRateReq.yaml +++ /dev/null @@ -1,41 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminPostTaxRatesTaxRateReq -properties: - code: - type: string - title: code - description: The tax rate's code. - name: - type: string - title: name - description: The tax rate's name. - region_id: - type: string - title: region_id - description: The tax rate's region id. - rate: - type: number - title: rate - description: The tax rate's rate. - products: - type: array - description: The tax rate's products. - items: - type: string - title: products - description: The product's products. - shipping_options: - type: array - description: The tax rate's shipping options. - items: - type: string - title: shipping_options - description: The shipping option's shipping options. - product_types: - type: array - description: The tax rate's product types. - items: - type: string - title: product_types - description: The product type's product types. diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminUpdateUserRequest.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/AdminUpdateUserRequest.yaml deleted file mode 100644 index cf5247c937..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/AdminUpdateUserRequest.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminUpdateUserRequest -required: - - avatar_url -properties: - first_name: - type: string - title: first_name - description: The user's first name. - last_name: - type: string - title: last_name - description: The user's last name. - avatar_url: - type: string - title: avatar_url - description: The user's avatar url. diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/Customer.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/Customer.yaml deleted file mode 100644 index 063a4ff87a..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/Customer.yaml +++ /dev/null @@ -1,87 +0,0 @@ -type: object -description: The context's customer. -x-schemaName: Customer -properties: - id: - type: string - title: id - description: The customer's ID. - email: - type: string - title: email - description: The customer's email. - format: email - default_billing_address_id: - type: string - title: default_billing_address_id - description: The customer's default billing address id. - default_shipping_address_id: - type: string - title: default_shipping_address_id - description: The customer's default shipping address id. - company_name: - type: string - title: company_name - description: The customer's company name. - first_name: - type: string - title: first_name - description: The customer's first name. - last_name: - type: string - title: last_name - description: The customer's last name. - addresses: - type: array - description: The customer's addresses. - items: - type: object - description: The address's addresses. - x-schemaName: CustomerAddress - properties: {} - phone: - type: string - title: phone - description: The customer's phone. - groups: - type: array - description: The customer's groups. - items: - type: object - description: The group's groups. - properties: {} - metadata: - type: object - description: The customer's metadata. - properties: {} - created_by: - type: string - title: created_by - description: The customer's created by. - deleted_at: - oneOf: - - type: string - title: deleted_at - description: The customer's deleted at. - - type: string - title: deleted_at - description: The customer's deleted at. - format: date-time - created_at: - oneOf: - - type: string - title: created_at - description: The customer's created at. - - type: string - title: created_at - description: The customer's created at. - format: date-time - updated_at: - oneOf: - - type: string - title: updated_at - description: The customer's updated at. - - type: string - title: updated_at - description: The customer's updated at. - format: date-time diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/Error.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/Error.yaml deleted file mode 100644 index dbbde56a51..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/Error.yaml +++ /dev/null @@ -1,33 +0,0 @@ -title: Response Error -type: object -properties: - code: - type: string - description: A slug code to indicate the type of the error. - enum: - - invalid_state_error - - invalid_request_error - - api_error - - unknown_error - message: - type: string - description: Description of the error that occurred. - example: first_name must be a string - type: - type: string - description: A slug indicating the type of the error. - enum: - - QueryRunnerAlreadyReleasedError - - TransactionAlreadyStartedError - - TransactionNotStartedError - - conflict - - unauthorized - - payment_authorization_error - - duplicate_error - - not_allowed - - invalid_data - - not_found - - database_error - - unexpected_state - - invalid_argument - - unknown_error diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/MultipleErrors.yaml b/www/apps/api-reference/specs-v2/store/components/schemas/MultipleErrors.yaml deleted file mode 100644 index 7ca18cda3b..0000000000 --- a/www/apps/api-reference/specs-v2/store/components/schemas/MultipleErrors.yaml +++ /dev/null @@ -1,13 +0,0 @@ -title: Multiple Errors -type: object -properties: - errors: - type: array - description: Array of errors - items: - $ref: ./Error.yaml - message: - type: string - default: >- - Provided request body contains errors. Please check the data and retry the - request diff --git a/www/apps/api-reference/specs-v2/store/openapi.full.yaml b/www/apps/api-reference/specs-v2/store/openapi.full.yaml deleted file mode 100644 index fe076c90a1..0000000000 --- a/www/apps/api-reference/specs-v2/store/openapi.full.yaml +++ /dev/null @@ -1,2993 +0,0 @@ -openapi: 3.0.0 -info: - version: 2.0.0 - title: Medusa Storefront API - license: - name: MIT - url: https://github.com/medusajs/medusa/blob/master/LICENSE -servers: - - url: http://localhost:9000 - - url: https://api.medusa-commerce.com -tags: - - name: Carts - description: | - A cart is a virtual shopping bag that customers can use to add items they want to purchase. - A cart is then used to checkout and place an order. - externalDocs: - description: How to implement cart functionality in your storefront - url: https://docs.medusajs.com/modules/carts-and-checkout/storefront/implement-cart - - name: Currencies - - name: Customers - description: | - A customer can register and manage their information such as addresses, orders, payment methods, and more. - externalDocs: - description: How to implement customer profiles in your storefront - url: https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles - - name: Payment Collections - description: | - A payment collection is useful for managing additional payments, such as for Order Edits, or installment payments. - - name: Regions - description: | - Regions are different countries or geographical regions that the commerce store serves customers in. - Customers can choose what region they're in, which can be used to change the prices shown based on the region and its currency. - externalDocs: - description: How to use regions in a storefront - url: https://docs.medusajs.com/modules/regions-and-currencies/storefront/use-regions - - name: Shipping Options - description: | - A shipping option is used to define the available shipping methods during checkout or when creating a return. - externalDocs: - description: Shipping Option architecture - url: https://docs.medusajs.com/modules/carts-and-checkout/shipping#shipping-option -paths: - /store/carts: - post: - operationId: PostCarts - summary: Create Cart - description: Create a cart. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/store/carts' - tags: - - Carts - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/carts/{id}: - get: - operationId: GetCartsId - summary: Get a Cart - description: Retrieve a cart by its ID. You can expand the cart's relations or select the fields that should be returned. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl '{backend_url}/store/carts/{id}' - tags: - - Carts - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCartsId - summary: Update a Cart - description: Update a cart's details. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/store/carts/{id}' - tags: - - Carts - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/carts/{id}/line-items: - post: - operationId: PostCartsIdLineItems - summary: Add Line Items to Cart - description: Add a list of line items to a cart. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/store/carts/{id}/line-items' - tags: - - Carts - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/carts/{id}/line-items/{line_id}: - post: - operationId: PostCartsIdLineItemsLine_id - summary: Add Line Items to Cart - description: Add a list of line items to a cart. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - - name: line_id - in: path - description: The cart's line id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/store/carts/{id}/line-items/{line_id}' - tags: - - Carts - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteCartsIdLineItemsLine_id - summary: Remove Line Items from Cart - description: Remove a list of line items from a cart. This doesn't delete the Line Item, only the association between the Line Item and the cart. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - - name: line_id - in: path - description: The cart's line id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}' - tags: - - Carts - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/carts/{id}/payment-collections: - post: - operationId: PostCartsIdPaymentCollections - summary: Add Payment Collections to Cart - description: Add a list of payment collections to a cart. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/store/carts/{id}/payment-collections' - tags: - - Carts - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/carts/{id}/promotions: - post: - operationId: PostCartsIdPromotions - summary: Add Promotions to Cart - description: Add a list of promotions to a cart. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/store/carts/{id}/promotions' - tags: - - Carts - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteCartsIdPromotions - summary: Remove Promotions from Cart - description: Remove a list of promotions from a cart. This doesn't delete the Promotion, only the association between the Promotion and the cart. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X DELETE '{backend_url}/store/carts/{id}/promotions' - tags: - - Carts - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/carts/{id}/taxes: - post: - operationId: PostCartsIdTaxes - summary: Add Taxes to Cart - description: Add a list of taxes to a cart. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostCartsCartTaxesReq' - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/store/carts/{id}/taxes' - tags: - - Carts - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/currencies: - get: - operationId: GetCurrencies - summary: List Currencies - description: Retrieve a list of currencies. The currencies can be filtered by fields such as `id`. The currencies can also be sorted or paginated. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: curl '{backend_url}/store/currencies' - tags: - - Currencies - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/currencies/{code}: - get: - operationId: GetCurrenciesCode - summary: Get a Currency - description: Retrieve a currency by its ID. You can expand the currency's relations or select the fields that should be returned. - x-authenticated: false - parameters: - - name: code - in: path - description: The currency's code. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl '{backend_url}/store/currencies/{code}' - tags: - - Currencies - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/customers: - post: - operationId: PostCustomers - summary: Create Customer - description: Create a customer. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/store/customers' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/customers/me: - get: - operationId: GetCustomersMe - summary: List Customers - description: Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: curl '{backend_url}/store/customers/me' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/customers/me/addresses: - get: - operationId: GetCustomersMeAddresses - summary: List Customers - description: Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: curl '{backend_url}/store/customers/me/addresses' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCustomersMeAddresses - summary: Create Customer - description: Create a customer. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/store/customers/me/addresses' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/customers/me/addresses/{address_id}: - get: - operationId: GetCustomersMeAddressesAddress_id - summary: List Addresses - description: Retrieve a list of addresses in a customer. The addresses can be filtered by fields like FILTER FIELDS. The addresses can also be paginated. - x-authenticated: false - parameters: - - name: address_id - in: path - description: The customer's address id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl '{backend_url}/store/customers/me/addresses/{address_id}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - post: - operationId: PostCustomersMeAddressesAddress_id - summary: Add Addresses to Customer - description: Add a list of addresses to a customer. - x-authenticated: false - parameters: - - name: address_id - in: path - description: The customer's address id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/store/customers/me/addresses/{address_id}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - delete: - operationId: DeleteCustomersMeAddressesAddress_id - summary: Remove Addresses from Customer - description: Remove a list of addresses from a customer. This doesn't delete the Address, only the association between the Address and the customer. - x-authenticated: false - parameters: - - name: address_id - in: path - description: The customer's address id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}' - tags: - - Customers - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/payment-collections/{id}/payment-sessions: - post: - operationId: PostPaymentCollectionsIdPaymentSessions - summary: Add Payment Sessions to Payment Collection - description: Add a list of payment sessions to a payment collection. - x-authenticated: false - parameters: - - name: id - in: path - description: The payment collection's ID. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostPaymentCollectionsPaymentSessionReq' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/store/payment-collections/{id}/payment-sessions' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "provider_id": "{value}" - }' - tags: - - Payment Collections - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/regions: - get: - operationId: GetRegions - summary: List Regions - description: Retrieve a list of regions. The regions can be filtered by fields such as `id`. The regions can also be sorted or paginated. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: curl '{backend_url}/store/regions' - tags: - - Regions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/regions/{id}: - get: - operationId: GetRegionsId - summary: Get a Region - description: Retrieve a region by its ID. You can expand the region's relations or select the fields that should be returned. - x-authenticated: false - parameters: - - name: id - in: path - description: The region's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl '{backend_url}/store/regions/{id}' - tags: - - Regions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/regions/{id}/payment-providers: - get: - operationId: GetRegionsIdPaymentProviders - summary: List Payment Providers - description: Retrieve a list of payment providers in a region. The payment providers can be filtered by fields like FILTER FIELDS. The payment providers can also be paginated. - x-authenticated: false - parameters: - - name: id - in: path - description: The region's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl '{backend_url}/store/regions/{id}/payment-providers' - tags: - - Regions - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} - /store/shipping-options/{cart_id}: - get: - operationId: GetShippingOptionsCart_id - summary: Get a Shipping Option - description: Retrieve a shipping option by its ID. You can expand the shipping option's relations or select the fields that should be returned. - x-authenticated: false - parameters: - - name: cart_id - in: path - description: The shipping option's cart id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: curl '{backend_url}/store/shipping-options/{cart_id}' - tags: - - Shipping Options - responses: - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - requestBody: - content: - application/json: - schema: {} -components: - responses: - default_error: - description: Default Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - code: unknown_error - message: An unknown error occurred. - type: unknown_error - invalid_state_error: - description: Invalid State Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - code: unknown_error - message: The request conflicted with another request. You may retry the request with the provided Idempotency-Key. - type: QueryRunnerAlreadyReleasedError - invalid_request_error: - description: Invalid Request Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - code: invalid_request_error - message: Discount with code TEST already exists. - type: duplicate_error - not_found_error: - description: Not Found Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - message: Entity with id 1 was not found - type: not_found - 400_error: - description: Client Error or Multiple Errors - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/Error' - - $ref: '#/components/schemas/MultipleErrors' - examples: - not_allowed: - $ref: '#/components/examples/not_allowed_error' - invalid_data: - $ref: '#/components/examples/invalid_data_error' - MultipleErrors: - $ref: '#/components/examples/multiple_errors' - 500_error: - description: Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - examples: - database: - $ref: '#/components/examples/database_error' - unexpected_state: - $ref: '#/components/examples/unexpected_state_error' - invalid_argument: - $ref: '#/components/examples/invalid_argument_error' - default_error: - $ref: '#/components/examples/default_error' - unauthorized: - description: User is not authorized. Must log in first - content: - text/plain: - schema: - type: string - default: Unauthorized - example: Unauthorized - incorrect_credentials: - description: User does not exist or incorrect credentials - content: - text/plain: - schema: - type: string - default: Unauthorized - example: Unauthorized - examples: - not_allowed_error: - summary: Not Allowed Error - value: - message: Discount must be set to dynamic - type: not_allowed - invalid_data_error: - summary: Invalid Data Error - value: - message: first_name must be a string - type: invalid_data - multiple_errors: - summary: Multiple Errors - value: - message: Provided request body contains errors. Please check the data and retry the request - errors: - - message: first_name must be a string - type: invalid_data - - message: Discount must be set to dynamic - type: not_allowed - database_error: - summary: Database Error - value: - code: api_error - message: An error occured while hashing password - type: database_error - unexpected_state_error: - summary: Unexpected State Error - value: - message: cart.total must be defined - type: unexpected_state - invalid_argument_error: - summary: Invalid Argument Error - value: - message: cart.total must be defined - type: unexpected_state - default_error: - summary: Default Error - value: - code: unknown_error - message: An unknown error occurred. - type: unknown_error - securitySchemes: - jwt_token: - type: http - x-displayName: JWT Token - scheme: bearer - cookie_auth: - type: apiKey - x-displayName: Cookie Session ID - in: cookie - name: connect.sid - description: | - Use a cookie session to send authenticated requests. - - ### How to Obtain the Cookie Session - - If you're sending requests through a browser, using JS Client, or using tools like Postman, the cookie session should be automatically set when the customer is logged in. - - If you're sending requests using cURL, you must set the Session ID in the cookie manually. - - To do that, send a request to [authenticate the customer](#tag/Auth/operation/PostAuth) and pass the cURL option `-v`: - - ```bash - curl -v --location --request POST 'https://medusa-url.com/store/auth' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com", - "password": "supersecret" - }' - ``` - - The headers will be logged in the terminal as well as the response. You should find in the headers a Cookie header similar to this: - - ```bash - Set-Cookie: connect.sid=s%3A2Bu8BkaP9JUfHu9rG59G16Ma0QZf6Gj1.WT549XqX37PN8n0OecqnMCq798eLjZC5IT7yiDCBHPM; - ``` - - Copy the value after `connect.sid` (without the `;` at the end) and pass it as a cookie in subsequent requests as the following: - - ```bash - curl --location --request GET 'https://medusa-url.com/store/customers/me/orders' \ - --header 'Cookie: connect.sid={sid}' - ``` - - Where `{sid}` is the value of `connect.sid` that you copied. - schemas: - AdminDeletePricingRuleTypesRuleTypeReq: - type: object - description: SUMMARY - x-schemaName: AdminDeletePricingRuleTypesRuleTypeReq - properties: {} - AdminGetPricingRuleTypesParams: - type: object - description: SUMMARY - x-schemaName: AdminGetPricingRuleTypesParams - properties: - rule_attribute: - type: array - description: The pricing's rule attribute. - items: - type: string - title: rule_attribute - description: The rule attribute's details. - expand: - type: string - title: expand - description: The pricing's expand. - fields: - type: string - title: fields - description: The pricing's fields. - offset: - type: number - title: offset - description: The pricing's offset. - limit: - type: number - title: limit - description: The pricing's limit. - order: - type: string - title: order - description: The pricing's order. - AdminGetPricingRuleTypesRuleTypeParams: - type: object - description: SUMMARY - x-schemaName: AdminGetPricingRuleTypesRuleTypeParams - properties: - expand: - type: string - title: expand - description: The pricing's expand. - fields: - type: string - title: fields - description: The pricing's fields. - AdminGetProductsParams: - type: object - description: SUMMARY - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The product's q. - id: - oneOf: - - type: string - title: id - description: The product's ID. - - type: array - description: The product's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The product's status. - items: {} - title: - type: string - title: title - description: The product's title. - handle: - type: string - title: handle - description: The product's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The product's is giftcard. - price_list_id: - type: array - description: The product's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The product's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The product's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The product's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The product's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The product's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The product's $and. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $and's q. - id: - oneOf: - - type: string - title: id - description: The $and's ID. - - type: array - description: The $and's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $and's status. - items: {} - title: - type: string - title: title - description: The $and's title. - handle: - type: string - title: handle - description: The $and's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $and's is giftcard. - price_list_id: - type: array - description: The $and's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $and's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $and's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $and's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $and's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $and's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $and's details. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $and's q. - id: - oneOf: - - type: string - title: id - description: The $and's ID. - - type: array - description: The $and's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $and's status. - items: {} - title: - type: string - title: title - description: The $and's title. - handle: - type: string - title: handle - description: The $and's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $and's is giftcard. - price_list_id: - type: array - description: The $and's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $and's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $and's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $and's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $and's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $and's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $and's details. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: {} - $or: - type: array - description: The $and's $or. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: {} - expand: - type: string - title: expand - description: The $and's expand. - fields: - type: string - title: fields - description: The $and's fields. - offset: - type: number - title: offset - description: The $and's offset. - limit: - type: number - title: limit - description: The $and's limit. - order: - type: string - title: order - description: The $and's order. - $or: - type: array - description: The $and's $or. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $or's q. - id: - oneOf: - - type: string - title: id - description: The $or's ID. - - type: array - description: The $or's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $or's status. - items: {} - title: - type: string - title: title - description: The $or's title. - handle: - type: string - title: handle - description: The $or's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $or's is giftcard. - price_list_id: - type: array - description: The $or's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $or's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $or's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $or's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $or's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $or's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $or's $and. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: {} - $or: - type: array - description: The $or's details. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: {} - expand: - type: string - title: expand - description: The $or's expand. - fields: - type: string - title: fields - description: The $or's fields. - offset: - type: number - title: offset - description: The $or's offset. - limit: - type: number - title: limit - description: The $or's limit. - order: - type: string - title: order - description: The $or's order. - expand: - type: string - title: expand - description: The $and's expand. - fields: - type: string - title: fields - description: The $and's fields. - offset: - type: number - title: offset - description: The $and's offset. - limit: - type: number - title: limit - description: The $and's limit. - order: - type: string - title: order - description: The $and's order. - $or: - type: array - description: The product's $or. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $or's q. - id: - oneOf: - - type: string - title: id - description: The $or's ID. - - type: array - description: The $or's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $or's status. - items: {} - title: - type: string - title: title - description: The $or's title. - handle: - type: string - title: handle - description: The $or's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $or's is giftcard. - price_list_id: - type: array - description: The $or's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $or's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $or's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $or's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $or's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $or's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $or's $and. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $and's q. - id: - oneOf: - - type: string - title: id - description: The $and's ID. - - type: array - description: The $and's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $and's status. - items: {} - title: - type: string - title: title - description: The $and's title. - handle: - type: string - title: handle - description: The $and's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $and's is giftcard. - price_list_id: - type: array - description: The $and's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $and's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $and's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $and's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $and's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $and's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $and's details. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: {} - $or: - type: array - description: The $and's $or. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: {} - expand: - type: string - title: expand - description: The $and's expand. - fields: - type: string - title: fields - description: The $and's fields. - offset: - type: number - title: offset - description: The $and's offset. - limit: - type: number - title: limit - description: The $and's limit. - order: - type: string - title: order - description: The $and's order. - $or: - type: array - description: The $or's details. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: - q: - type: string - title: q - description: The $or's q. - id: - oneOf: - - type: string - title: id - description: The $or's ID. - - type: array - description: The $or's ID. - items: - type: string - title: id - description: The id's ID. - status: - type: array - description: The $or's status. - items: {} - title: - type: string - title: title - description: The $or's title. - handle: - type: string - title: handle - description: The $or's handle. - is_giftcard: - type: boolean - title: is_giftcard - description: The $or's is giftcard. - price_list_id: - type: array - description: The $or's price list id. - items: - type: string - title: price_list_id - description: The price list id's details. - sales_channel_id: - type: array - description: The $or's sales channel id. - items: - type: string - title: sales_channel_id - description: The sales channel id's details. - collection_id: - type: array - description: The $or's collection id. - items: - type: string - title: collection_id - description: The collection id's details. - tags: - type: array - description: The $or's tags. - items: - type: string - title: tags - description: The tag's tags. - type_id: - type: array - description: The $or's type id. - items: - type: string - title: type_id - description: The type id's details. - variants: - type: object - description: The $or's variants. - properties: {} - created_at: {} - updated_at: {} - deleted_at: {} - $and: - type: array - description: The $or's $and. - items: - type: object - description: The $and's details. - x-schemaName: AdminGetProductsParams - properties: {} - $or: - type: array - description: The $or's details. - items: - type: object - description: The $or's details. - x-schemaName: AdminGetProductsParams - properties: {} - expand: - type: string - title: expand - description: The $or's expand. - fields: - type: string - title: fields - description: The $or's fields. - offset: - type: number - title: offset - description: The $or's offset. - limit: - type: number - title: limit - description: The $or's limit. - order: - type: string - title: order - description: The $or's order. - expand: - type: string - title: expand - description: The $or's expand. - fields: - type: string - title: fields - description: The $or's fields. - offset: - type: number - title: offset - description: The $or's offset. - limit: - type: number - title: limit - description: The $or's limit. - order: - type: string - title: order - description: The $or's order. - expand: - type: string - title: expand - description: The product's expand. - fields: - type: string - title: fields - description: The product's fields. - offset: - type: number - title: offset - description: The product's offset. - limit: - type: number - title: limit - description: The product's limit. - order: - type: string - title: order - description: The product's order. - AdminGetPromotionsParams: - type: object - description: SUMMARY - x-schemaName: AdminGetPromotionsParams - properties: - code: - type: string - title: code - description: The promotion's code. - expand: - type: string - title: expand - description: The promotion's expand. - fields: - type: string - title: fields - description: The promotion's fields. - offset: - type: number - title: offset - description: The promotion's offset. - limit: - type: number - title: limit - description: The promotion's limit. - order: - type: string - title: order - description: The promotion's order. - AdminPostCampaignsReq: - type: object - description: The promotion's campaign. - x-schemaName: AdminPostCampaignsReq - required: - - name - properties: - name: - type: string - title: name - description: The campaign's name. - campaign_identifier: - type: string - title: campaign_identifier - description: The campaign's campaign identifier. - description: - type: string - title: description - description: The campaign's description. - currency: - type: string - title: currency - description: The campaign's currency. - budget: - $ref: '#/components/schemas/CampaignBudget' - starts_at: - type: string - title: starts_at - description: The campaign's starts at. - ends_at: - type: string - title: ends_at - description: The campaign's ends at. - promotions: - type: array - description: The campaign's promotions. - items: - type: object - description: The promotion's promotions. - x-schemaName: IdObject - required: - - id - properties: - id: - type: string - title: id - description: The promotion's ID. - AdminPostCustomerGroupsGroupCustomersBatchReq: - type: object - description: SUMMARY - x-schemaName: AdminPostCustomerGroupsGroupCustomersBatchReq - required: - - customer_ids - properties: - customer_ids: - type: array - description: The customer group's customer ids. - items: - type: object - description: The customer id's customer ids. - x-schemaName: CustomerGroupsBatchCustomer - required: - - id - properties: - id: - type: string - title: id - description: The customer id's ID. - AdminPostFulfillmentShippingOptionsRulesBatchAddReq: - type: object - description: SUMMARY - x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchAddReq - required: - - rules - properties: - rules: - type: array - description: The fulfillment's rules. - items: - type: object - description: The rule's rules. - x-schemaName: FulfillmentRuleCreate - required: - - operator - - attribute - - value - properties: - operator: {} - attribute: - type: string - title: attribute - description: The rule's attribute. - value: - oneOf: - - type: string - title: value - description: The rule's value. - - type: array - description: The rule's value. - items: - type: string - title: value - description: The value's details. - AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq: - type: object - description: SUMMARY - x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq - required: - - rule_ids - properties: - rule_ids: - type: array - description: The fulfillment's rule ids. - items: - type: string - title: rule_ids - description: The rule id's rule ids. - AdminPostInventoryItemsInventoryItemReq: - type: object - description: SUMMARY - x-schemaName: AdminPostInventoryItemsInventoryItemReq - properties: - sku: - type: string - title: sku - description: The inventory item's sku. - origin_country: - type: string - title: origin_country - description: The inventory item's origin country. - hs_code: - type: string - title: hs_code - description: The inventory item's hs code. - mid_code: - type: string - title: mid_code - description: The inventory item's mid code. - material: - type: string - title: material - description: The inventory item's material. - weight: - type: number - title: weight - description: The inventory item's weight. - height: - type: number - title: height - description: The inventory item's height. - length: - type: number - title: length - description: The inventory item's length. - width: - type: number - title: width - description: The inventory item's width. - title: - type: string - title: title - description: The inventory item's title. - description: - type: string - title: description - description: The inventory item's description. - thumbnail: - type: string - title: thumbnail - description: The inventory item's thumbnail. - requires_shipping: - type: boolean - title: requires_shipping - description: The inventory item's requires shipping. - AdminPostInventoryItemsItemLocationLevelsLevelReq: - type: object - description: SUMMARY - x-schemaName: AdminPostInventoryItemsItemLocationLevelsLevelReq - properties: - incoming_quantity: - type: number - title: incoming_quantity - description: The inventory item's incoming quantity. - stocked_quantity: - type: number - title: stocked_quantity - description: The inventory item's stocked quantity. - AdminPostInventoryItemsItemLocationLevelsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostInventoryItemsItemLocationLevelsReq - required: - - location_id - - stocked_quantity - properties: - location_id: - type: string - title: location_id - description: The inventory item's location id. - stocked_quantity: - type: number - title: stocked_quantity - description: The inventory item's stocked quantity. - incoming_quantity: - type: number - title: incoming_quantity - description: The inventory item's incoming quantity. - AdminPostInventoryItemsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostInventoryItemsReq - properties: - sku: - type: string - title: sku - description: The inventory item's sku. - hs_code: - type: string - title: hs_code - description: The inventory item's hs code. - weight: - type: number - title: weight - description: The inventory item's weight. - length: - type: number - title: length - description: The inventory item's length. - height: - type: number - title: height - description: The inventory item's height. - width: - type: number - title: width - description: The inventory item's width. - origin_country: - type: string - title: origin_country - description: The inventory item's origin country. - mid_code: - type: string - title: mid_code - description: The inventory item's mid code. - material: - type: string - title: material - description: The inventory item's material. - title: - type: string - title: title - description: The inventory item's title. - description: - type: string - title: description - description: The inventory item's description. - thumbnail: - type: string - title: thumbnail - description: The inventory item's thumbnail. - metadata: - type: object - description: The inventory item's metadata. - properties: {} - AdminPostInvitesInviteAcceptReq: - type: object - description: SUMMARY - x-schemaName: AdminPostInvitesInviteAcceptReq - required: - - first_name - - last_name - properties: - first_name: - type: string - title: first_name - description: The invite's first name. - last_name: - type: string - title: last_name - description: The invite's last name. - AdminPostPaymentsCapturesReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPaymentsCapturesReq - properties: - amount: - type: number - title: amount - description: The payment's amount. - AdminPostPaymentsRefundsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPaymentsRefundsReq - properties: - amount: - type: number - title: amount - description: The payment's amount. - AdminPostPriceListsPriceListPricesBatchAddReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPriceListsPriceListPricesBatchAddReq - required: - - prices - properties: - prices: - type: array - description: The price list's prices. - items: - type: object - description: The price's prices. - x-schemaName: AdminPriceListPricesCreateReq - required: - - currency_code - - amount - - variant_id - properties: - currency_code: - type: string - title: currency_code - description: The price's currency code. - amount: - type: number - title: amount - description: The price's amount. - variant_id: - type: string - title: variant_id - description: The price's variant id. - min_quantity: - type: number - title: min_quantity - description: The price's min quantity. - max_quantity: - type: number - title: max_quantity - description: The price's max quantity. - rules: - type: object - description: The price's rules. - properties: {} - AdminPostPriceListsPriceListPricesBatchRemoveReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPriceListsPriceListPricesBatchRemoveReq - required: - - ids - properties: - ids: - type: array - description: The price list's ids. - items: - type: string - title: ids - description: The id's ids. - AdminPostPriceListsPriceListReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPriceListsPriceListReq - required: - - prices - properties: - title: - type: string - title: title - description: The price list's title. - description: - type: string - title: description - description: The price list's description. - starts_at: - type: string - title: starts_at - description: The price list's starts at. - ends_at: - type: string - title: ends_at - description: The price list's ends at. - status: {} - type: {} - prices: - type: array - description: The price list's prices. - items: - type: object - description: The price's prices. - x-schemaName: AdminPriceListPricesCreateReq - required: - - currency_code - - amount - - variant_id - properties: - currency_code: - type: string - title: currency_code - description: The price's currency code. - amount: - type: number - title: amount - description: The price's amount. - variant_id: - type: string - title: variant_id - description: The price's variant id. - min_quantity: - type: number - title: min_quantity - description: The price's min quantity. - max_quantity: - type: number - title: max_quantity - description: The price's max quantity. - rules: - type: object - description: The price's rules. - properties: {} - rules: - type: object - description: The price list's rules. - properties: {} - AdminPostPriceListsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPriceListsReq - required: - - title - - description - - type - - prices - properties: - title: - type: string - title: title - description: The price list's title. - description: - type: string - title: description - description: The price list's description. - starts_at: - type: string - title: starts_at - description: The price list's starts at. - ends_at: - type: string - title: ends_at - description: The price list's ends at. - status: {} - type: {} - prices: - type: array - description: The price list's prices. - items: - type: object - description: The price's prices. - x-schemaName: AdminPriceListPricesCreateReq - required: - - currency_code - - amount - - variant_id - properties: - currency_code: - type: string - title: currency_code - description: The price's currency code. - amount: - type: number - title: amount - description: The price's amount. - variant_id: - type: string - title: variant_id - description: The price's variant id. - min_quantity: - type: number - title: min_quantity - description: The price's min quantity. - max_quantity: - type: number - title: max_quantity - description: The price's max quantity. - rules: - type: object - description: The price's rules. - properties: {} - rules: - type: object - description: The price list's rules. - properties: {} - AdminPostPricingRuleTypesReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPricingRuleTypesReq - required: - - name - - rule_attribute - - default_priority - properties: - name: - type: string - title: name - description: The pricing's name. - rule_attribute: - type: string - title: rule_attribute - description: The pricing's rule attribute. - default_priority: - type: number - title: default_priority - description: The pricing's default priority. - AdminPostPricingRuleTypesRuleTypeReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPricingRuleTypesRuleTypeReq - properties: - name: - type: string - title: name - description: The pricing's name. - rule_attribute: - type: string - title: rule_attribute - description: The pricing's rule attribute. - default_priority: - type: number - title: default_priority - description: The pricing's default priority. - AdminPostPromotionsPromotionReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPromotionsPromotionReq - properties: - code: - type: string - title: code - description: The promotion's code. - is_automatic: - type: boolean - title: is_automatic - description: The promotion's is automatic. - type: {} - campaign_id: - type: string - title: campaign_id - description: The promotion's campaign id. - campaign: - $ref: '#/components/schemas/AdminPostCampaignsReq' - application_method: - $ref: '#/components/schemas/ApplicationMethodsMethodPostReq' - rules: - type: array - description: The promotion's rules. - items: - type: object - description: The rule's rules. - x-schemaName: PromotionRule - required: - - operator - - attribute - - values - properties: - operator: {} - description: - type: string - title: description - description: The rule's description. - attribute: - type: string - title: attribute - description: The rule's attribute. - values: - type: array - description: The rule's values. - items: - type: string - title: values - description: The value's values. - AdminPostPromotionsPromotionRulesBatchAddReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPromotionsPromotionRulesBatchAddReq - required: - - rules - properties: - rules: - type: array - description: The promotion's rules. - items: - type: object - description: The rule's rules. - x-schemaName: PromotionRule - required: - - operator - - attribute - - values - properties: - operator: {} - description: - type: string - title: description - description: The rule's description. - attribute: - type: string - title: attribute - description: The rule's attribute. - values: - type: array - description: The rule's values. - items: - type: string - title: values - description: The value's values. - AdminPostPromotionsPromotionRulesBatchRemoveReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPromotionsPromotionRulesBatchRemoveReq - required: - - rule_ids - properties: - rule_ids: - type: array - description: The promotion's rule ids. - items: - type: string - title: rule_ids - description: The rule id's rule ids. - AdminPostPromotionsPromotionRulesBatchUpdateReq: - type: object - description: SUMMARY - x-schemaName: AdminPostPromotionsPromotionRulesBatchUpdateReq - required: - - rules - properties: - rules: - type: array - description: The promotion's rules. - items: - type: object - description: The rule's rules. - x-schemaName: UpdatePromotionRule - required: - - id - - attribute - - values - properties: - id: - type: string - title: id - description: The rule's ID. - operator: {} - description: - type: string - title: description - description: The rule's description. - attribute: - type: string - title: attribute - description: The rule's attribute. - values: - type: array - description: The rule's values. - items: - type: string - title: values - description: The value's values. - AdminPostStockLocationsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostStockLocationsReq - required: - - name - properties: - name: - type: string - title: name - description: The stock location's name. - address: - $ref: '#/components/schemas/StockLocationAddress' - address_id: - type: string - title: address_id - description: The stock location's address id. - metadata: - type: object - description: The stock location's metadata. - properties: {} - AdminPostTaxRatesReq: - type: object - description: SUMMARY - x-schemaName: AdminPostTaxRatesReq - required: - - name - - tax_region_id - properties: - rate: - type: number - title: rate - description: The tax rate's rate. - code: - type: string - title: code - description: The tax rate's code. - rules: - type: array - description: The tax rate's rules. - items: - type: object - description: The rule's rules. - x-schemaName: CreateTaxRateRule - required: - - reference - - reference_id - properties: - reference: - type: string - title: reference - description: The rule's reference. - reference_id: - type: string - title: reference_id - description: The rule's reference id. - name: - type: string - title: name - description: The tax rate's name. - is_default: - type: boolean - title: is_default - description: The tax rate's is default. - is_combinable: - type: boolean - title: is_combinable - description: The tax rate's is combinable. - tax_region_id: - type: string - title: tax_region_id - description: The tax rate's tax region id. - metadata: - type: object - description: The tax rate's metadata. - properties: {} - AdminPostTaxRatesTaxRateReq: - type: object - description: SUMMARY - x-schemaName: AdminPostTaxRatesTaxRateReq - properties: - code: - type: string - title: code - description: The tax rate's code. - name: - type: string - title: name - description: The tax rate's name. - region_id: - type: string - title: region_id - description: The tax rate's region id. - rate: - type: number - title: rate - description: The tax rate's rate. - products: - type: array - description: The tax rate's products. - items: - type: string - title: products - description: The product's products. - shipping_options: - type: array - description: The tax rate's shipping options. - items: - type: string - title: shipping_options - description: The shipping option's shipping options. - product_types: - type: array - description: The tax rate's product types. - items: - type: string - title: product_types - description: The product type's product types. - AdminPostTaxRatesTaxRateRulesReq: - type: object - description: SUMMARY - x-schemaName: AdminPostTaxRatesTaxRateRulesReq - required: - - reference - - reference_id - properties: - reference: - type: string - title: reference - description: The tax rate's reference. - reference_id: - type: string - title: reference_id - description: The tax rate's reference id. - AdminPostTaxRegionsReq: - type: object - description: SUMMARY - x-schemaName: AdminPostTaxRegionsReq - required: - - country_code - properties: - country_code: - type: string - title: country_code - description: The tax region's country code. - province_code: - type: string - title: province_code - description: The tax region's province code. - parent_id: - type: string - title: parent_id - description: The tax region's parent id. - default_tax_rate: - $ref: '#/components/schemas/CreateDefaultTaxRate' - metadata: - type: object - description: The tax region's metadata. - properties: {} - AdminPostWorkflowsAsyncResponseReq: - type: object - description: SUMMARY - x-schemaName: AdminPostWorkflowsAsyncResponseReq - required: - - transaction_id - - step_id - properties: - transaction_id: - type: string - title: transaction_id - description: The workflows execution's transaction id. - step_id: - type: string - title: step_id - description: The workflows execution's step id. - response: {} - compensate_input: {} - action: {} - AdminPostWorkflowsRunReq: - type: object - description: SUMMARY - x-schemaName: AdminPostWorkflowsRunReq - properties: - input: {} - transaction_id: - type: string - title: transaction_id - description: The workflows execution's transaction id. - AdminUpdateUserRequest: - type: object - description: SUMMARY - x-schemaName: AdminUpdateUserRequest - required: - - avatar_url - properties: - first_name: - type: string - title: first_name - description: The user's first name. - last_name: - type: string - title: last_name - description: The user's last name. - avatar_url: - type: string - title: avatar_url - description: The user's avatar url. - ApplicationMethodsMethodPostReq: - type: object - description: The promotion's application method. - x-schemaName: ApplicationMethodsMethodPostReq - properties: - description: - type: string - title: description - description: The application method's description. - value: - type: string - title: value - description: The application method's value. - max_quantity: - type: number - title: max_quantity - description: The application method's max quantity. - type: {} - target_type: {} - allocation: {} - target_rules: - type: array - description: The application method's target rules. - items: - type: object - description: The target rule's target rules. - x-schemaName: PromotionRule - required: - - operator - - attribute - - values - properties: - operator: {} - description: - type: string - title: description - description: The target rule's description. - attribute: - type: string - title: attribute - description: The target rule's attribute. - values: - type: array - description: The target rule's values. - items: - type: string - title: values - description: The value's values. - buy_rules: - type: array - description: The application method's buy rules. - items: - type: object - description: The buy rule's buy rules. - x-schemaName: PromotionRule - required: - - operator - - attribute - - values - properties: - operator: {} - description: - type: string - title: description - description: The buy rule's description. - attribute: - type: string - title: attribute - description: The buy rule's attribute. - values: - type: array - description: The buy rule's values. - items: - type: string - title: values - description: The value's values. - apply_to_quantity: - type: number - title: apply_to_quantity - description: The application method's apply to quantity. - buy_rules_min_quantity: - type: number - title: buy_rules_min_quantity - description: The application method's buy rules min quantity. - CampaignBudget: - type: object - description: The campaign's budget. - x-schemaName: CampaignBudget - properties: - type: {} - limit: - type: number - title: limit - description: The budget's limit. - CreateDefaultTaxRate: - type: object - description: The tax region's default tax rate. - x-schemaName: CreateDefaultTaxRate - required: - - name - properties: - rate: - type: number - title: rate - description: The default tax rate's rate. - code: - type: string - title: code - description: The default tax rate's code. - name: - type: string - title: name - description: The default tax rate's name. - metadata: - type: object - description: The default tax rate's metadata. - properties: {} - Error: - title: Response Error - type: object - properties: - code: - type: string - description: A slug code to indicate the type of the error. - enum: - - invalid_state_error - - invalid_request_error - - api_error - - unknown_error - message: - type: string - description: Description of the error that occurred. - example: first_name must be a string - type: - type: string - description: A slug indicating the type of the error. - enum: - - QueryRunnerAlreadyReleasedError - - TransactionAlreadyStartedError - - TransactionNotStartedError - - conflict - - unauthorized - - payment_authorization_error - - duplicate_error - - not_allowed - - invalid_data - - not_found - - database_error - - unexpected_state - - invalid_argument - - unknown_error - MultipleErrors: - title: Multiple Errors - type: object - properties: - errors: - type: array - description: Array of errors - items: - $ref: '#/components/schemas/Error' - message: - type: string - default: Provided request body contains errors. Please check the data and retry the request - StockLocationAddress: - type: object - description: The stock location's address. - x-schemaName: StockLocationAddress - required: - - address_1 - - country_code - properties: - address_1: - type: string - title: address_1 - description: The address's address 1. - address_2: - type: string - title: address_2 - description: The address's address 2. - company: - type: string - title: company - description: The address's company. - city: - type: string - title: city - description: The address's city. - country_code: - type: string - title: country_code - description: The address's country code. - phone: - type: string - title: phone - description: The address's phone. - postal_code: - type: string - title: postal_code - description: The address's postal code. - province: - type: string - title: province - description: The address's province. - StorePostCartsCartTaxesReq: - type: object - description: SUMMARY - x-schemaName: StorePostCartsCartTaxesReq - properties: {} - StorePostPaymentCollectionsPaymentSessionReq: - type: object - description: SUMMARY - x-schemaName: StorePostPaymentCollectionsPaymentSessionReq - required: - - provider_id - properties: - provider_id: - type: string - title: provider_id - description: The payment collection's provider id. - context: {} - data: - type: object - description: The payment collection's data. - properties: {} diff --git a/www/apps/api-reference/specs-v2/store/openapi.yaml b/www/apps/api-reference/specs-v2/store/openapi.yaml deleted file mode 100644 index e7588daca6..0000000000 --- a/www/apps/api-reference/specs-v2/store/openapi.yaml +++ /dev/null @@ -1,162 +0,0 @@ -openapi: 3.0.0 -info: - version: 2.0.0 - title: Medusa Storefront API - license: - name: MIT - url: https://github.com/medusajs/medusa/blob/master/LICENSE -servers: - - url: http://localhost:9000 - - url: https://api.medusa-commerce.com -tags: - - name: Carts - description: > - A cart is a virtual shopping bag that customers can use to add items they - want to purchase. - - A cart is then used to checkout and place an order. - externalDocs: - description: How to implement cart functionality in your storefront - url: >- - https://docs.medusajs.com/modules/carts-and-checkout/storefront/implement-cart - - name: Currencies - - name: Customers - description: > - A customer can register and manage their information such as addresses, - orders, payment methods, and more. - externalDocs: - description: How to implement customer profiles in your storefront - url: >- - https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles - - name: Payment Collections - description: > - A payment collection is useful for managing additional payments, such as - for Order Edits, or installment payments. - - name: Regions - description: > - Regions are different countries or geographical regions that the commerce - store serves customers in. - - Customers can choose what region they're in, which can be used to change - the prices shown based on the region and its currency. - externalDocs: - description: How to use regions in a storefront - url: >- - https://docs.medusajs.com/modules/regions-and-currencies/storefront/use-regions - - name: Shipping Options - description: > - A shipping option is used to define the available shipping methods during - checkout or when creating a return. - externalDocs: - description: Shipping Option architecture - url: >- - https://docs.medusajs.com/modules/carts-and-checkout/shipping#shipping-option -paths: - /store/carts: - $ref: paths/store_carts.yaml - /store/carts/{id}: - $ref: paths/store_carts_{id}.yaml - /store/carts/{id}/line-items: - $ref: paths/store_carts_{id}_line-items.yaml - /store/carts/{id}/line-items/{line_id}: - $ref: paths/store_carts_{id}_line-items_{line_id}.yaml - /store/carts/{id}/payment-collections: - $ref: paths/store_carts_{id}_payment-collections.yaml - /store/carts/{id}/promotions: - $ref: paths/store_carts_{id}_promotions.yaml - /store/carts/{id}/taxes: - $ref: paths/store_carts_{id}_taxes.yaml - /store/currencies: - $ref: paths/store_currencies.yaml - /store/currencies/{code}: - $ref: paths/store_currencies_{code}.yaml - /store/customers: - $ref: paths/store_customers.yaml - /store/customers/me: - $ref: paths/store_customers_me.yaml - /store/customers/me/addresses: - $ref: paths/store_customers_me_addresses.yaml - /store/customers/me/addresses/{address_id}: - $ref: paths/store_customers_me_addresses_{address_id}.yaml - /store/payment-collections/{id}/payment-sessions: - $ref: paths/store_payment-collections_{id}_payment-sessions.yaml - /store/regions: - $ref: paths/store_regions.yaml - /store/regions/{id}: - $ref: paths/store_regions_{id}.yaml - /store/regions/{id}/payment-providers: - $ref: paths/store_regions_{id}_payment-providers.yaml - /store/shipping-options/{cart_id}: - $ref: paths/store_shipping-options_{cart_id}.yaml -components: - securitySchemes: - jwt_token: - type: http - x-displayName: JWT Token - scheme: bearer - cookie_auth: - type: apiKey - x-displayName: Cookie Session ID - in: cookie - name: connect.sid - description: > - Use a cookie session to send authenticated requests. - - - ### How to Obtain the Cookie Session - - - If you're sending requests through a browser, using JS Client, or using - tools like Postman, the cookie session should be automatically set when - the customer is logged in. - - - If you're sending requests using cURL, you must set the Session ID in - the cookie manually. - - - To do that, send a request to [authenticate the - customer](#tag/Auth/operation/PostAuth) and pass the cURL option `-v`: - - - ```bash - - curl -v --location --request POST 'https://medusa-url.com/store/auth' \ - - --header 'Content-Type: application/json' \ - - --data-raw '{ - "email": "user@example.com", - "password": "supersecret" - }' - - ``` - - - The headers will be logged in the terminal as well as the response. You - should find in the headers a Cookie header similar to this: - - - ```bash - - Set-Cookie: - connect.sid=s%3A2Bu8BkaP9JUfHu9rG59G16Ma0QZf6Gj1.WT549XqX37PN8n0OecqnMCq798eLjZC5IT7yiDCBHPM; - - ``` - - - Copy the value after `connect.sid` (without the `;` at the end) and pass - it as a cookie in subsequent requests as the following: - - - ```bash - - curl --location --request GET - 'https://medusa-url.com/store/customers/me/orders' \ - - --header 'Cookie: connect.sid={sid}' - - ``` - - - Where `{sid}` is the value of `connect.sid` that you copied. diff --git a/www/apps/api-reference/specs-v2/store/paths/store_carts.yaml b/www/apps/api-reference/specs-v2/store/paths/store_carts.yaml deleted file mode 100644 index b3c9f70118..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_carts.yaml +++ /dev/null @@ -1,30 +0,0 @@ -post: - operationId: PostCarts - summary: Create Cart - description: Create a cart. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts/post.sh - tags: - - Carts - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}.yaml b/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}.yaml deleted file mode 100644 index 6c7ff10d87..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}.yaml +++ /dev/null @@ -1,74 +0,0 @@ -get: - operationId: GetCartsId - summary: Get a Cart - description: >- - Retrieve a cart by its ID. You can expand the cart's relations or select the - fields that should be returned. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts_{id}/get.sh - tags: - - Carts - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostCartsId - summary: Update a Cart - description: Update a cart's details. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts_{id}/post.sh - tags: - - Carts - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_line-items.yaml b/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_line-items.yaml deleted file mode 100644 index c821f142a0..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_line-items.yaml +++ /dev/null @@ -1,36 +0,0 @@ -post: - operationId: PostCartsIdLineItems - summary: Add Line Items to Cart - description: Add a list of line items to a cart. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts_{id}_line-items/post.sh - tags: - - Carts - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_line-items_{line_id}.yaml b/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_line-items_{line_id}.yaml deleted file mode 100644 index eb41b93406..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_line-items_{line_id}.yaml +++ /dev/null @@ -1,86 +0,0 @@ -post: - operationId: PostCartsIdLineItemsLine_id - summary: Add Line Items to Cart - description: Add a list of line items to a cart. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - - name: line_id - in: path - description: The cart's line id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts_{id}_line-items_{line_id}/post.sh - tags: - - Carts - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -delete: - operationId: DeleteCartsIdLineItemsLine_id - summary: Remove Line Items from Cart - description: >- - Remove a list of line items from a cart. This doesn't delete the Line Item, - only the association between the Line Item and the cart. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - - name: line_id - in: path - description: The cart's line id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts_{id}_line-items_{line_id}/delete.sh - tags: - - Carts - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_taxes.yaml b/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_taxes.yaml deleted file mode 100644 index b682bfc374..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_taxes.yaml +++ /dev/null @@ -1,37 +0,0 @@ -post: - operationId: PostCartsIdTaxes - summary: Add Taxes to Cart - description: Add a list of taxes to a cart. - x-authenticated: false - parameters: - - name: id - in: path - description: The cart's ID. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCartsCartTaxesReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts_{id}_taxes/post.sh - tags: - - Carts - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/store/paths/store_customers.yaml b/www/apps/api-reference/specs-v2/store/paths/store_customers.yaml deleted file mode 100644 index 26ff1861ee..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_customers.yaml +++ /dev/null @@ -1,30 +0,0 @@ -post: - operationId: PostCustomers - summary: Create Customer - description: Create a customer. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_customers/post.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_customers_me.yaml b/www/apps/api-reference/specs-v2/store/paths/store_customers_me.yaml deleted file mode 100644 index f4fa33b2b6..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_customers_me.yaml +++ /dev/null @@ -1,32 +0,0 @@ -get: - operationId: GetCustomersMe - summary: List Customers - description: >- - Retrieve a list of customers. The customers can be filtered by fields such - as `id`. The customers can also be sorted or paginated. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_customers_me/get.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_customers_me_addresses.yaml b/www/apps/api-reference/specs-v2/store/paths/store_customers_me_addresses.yaml deleted file mode 100644 index d993417ab0..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_customers_me_addresses.yaml +++ /dev/null @@ -1,62 +0,0 @@ -get: - operationId: GetCustomersMeAddresses - summary: List Customers - description: >- - Retrieve a list of customers. The customers can be filtered by fields such - as `id`. The customers can also be sorted or paginated. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_customers_me_addresses/get.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostCustomersMeAddresses - summary: Create Customer - description: Create a customer. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_customers_me_addresses/post.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_customers_me_addresses_{address_id}.yaml b/www/apps/api-reference/specs-v2/store/paths/store_customers_me_addresses_{address_id}.yaml deleted file mode 100644 index cd34e7826b..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_customers_me_addresses_{address_id}.yaml +++ /dev/null @@ -1,114 +0,0 @@ -get: - operationId: GetCustomersMeAddressesAddress_id - summary: List Addresses - description: >- - Retrieve a list of addresses in a customer. The addresses can be filtered by - fields like FILTER FIELDS. The addresses can also be paginated. - x-authenticated: false - parameters: - - name: address_id - in: path - description: The customer's address id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_customers_me_addresses_{address_id}/get.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -post: - operationId: PostCustomersMeAddressesAddress_id - summary: Add Addresses to Customer - description: Add a list of addresses to a customer. - x-authenticated: false - parameters: - - name: address_id - in: path - description: The customer's address id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/store_customers_me_addresses_{address_id}/post.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} -delete: - operationId: DeleteCustomersMeAddressesAddress_id - summary: Remove Addresses from Customer - description: >- - Remove a list of addresses from a customer. This doesn't delete the Address, - only the association between the Address and the customer. - x-authenticated: false - parameters: - - name: address_id - in: path - description: The customer's address id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/store_customers_me_addresses_{address_id}/delete.sh - tags: - - Customers - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_regions.yaml b/www/apps/api-reference/specs-v2/store/paths/store_regions.yaml deleted file mode 100644 index d360b3398d..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_regions.yaml +++ /dev/null @@ -1,32 +0,0 @@ -get: - operationId: GetRegions - summary: List Regions - description: >- - Retrieve a list of regions. The regions can be filtered by fields such as - `id`. The regions can also be sorted or paginated. - x-authenticated: false - parameters: [] - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_regions/get.sh - tags: - - Regions - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_regions_{id}.yaml b/www/apps/api-reference/specs-v2/store/paths/store_regions_{id}.yaml deleted file mode 100644 index 8c726fd014..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_regions_{id}.yaml +++ /dev/null @@ -1,38 +0,0 @@ -get: - operationId: GetRegionsId - summary: Get a Region - description: >- - Retrieve a region by its ID. You can expand the region's relations or select - the fields that should be returned. - x-authenticated: false - parameters: - - name: id - in: path - description: The region's ID. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_regions_{id}/get.sh - tags: - - Regions - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_shipping-options_{cart_id}.yaml b/www/apps/api-reference/specs-v2/store/paths/store_shipping-options_{cart_id}.yaml deleted file mode 100644 index 6d78928e6f..0000000000 --- a/www/apps/api-reference/specs-v2/store/paths/store_shipping-options_{cart_id}.yaml +++ /dev/null @@ -1,38 +0,0 @@ -get: - operationId: GetShippingOptionsCart_id - summary: Get a Shipping Option - description: >- - Retrieve a shipping option by its ID. You can expand the shipping option's - relations or select the fields that should be returned. - x-authenticated: false - parameters: - - name: cart_id - in: path - description: The shipping option's cart id. - required: true - schema: - type: string - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_shipping-options_{cart_id}/get.sh - tags: - - Shipping Options - responses: - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml - requestBody: - content: - application/json: - schema: {} diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth/delete.js deleted file mode 100644 index b4a267c62e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth/delete.js +++ /dev/null @@ -1,4 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in -medusa.admin.auth.deleteSession() diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth/get.js deleted file mode 100644 index 44cab70d2e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.auth.getSession() -.then(({ user }) => { - console.log(user.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth/post.js deleted file mode 100644 index ce4daa1294..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.admin.auth.createSession({ - email: "user@example.com", - password: "supersecret" -}) -.then(({ user }) => { - console.log(user.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth_token/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth_token/post.js deleted file mode 100644 index cf8a5e7c32..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_auth_token/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.admin.auth.getToken({ - email: 'user@example.com', - password: 'supersecret' -}) -.then(({ access_token }) => { - console.log(access_token); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs/get.js deleted file mode 100644 index ac5e34da3a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.batchJobs.list() -.then(({ batch_jobs, limit, offset, count }) => { - console.log(batch_jobs.length) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs/post.js deleted file mode 100644 index a75472d0ab..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.batchJobs.create({ - type: 'product-export', - context: {}, - dry_run: false -}).then((({ batch_job }) => { - console.log(batch_job.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs_{id}/get.js deleted file mode 100644 index 4fab0f6dda..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.batchJobs.retrieve(batchJobId) -.then(({ batch_job }) => { - console.log(batch_job.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs_{id}_cancel/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs_{id}_cancel/post.js deleted file mode 100644 index 639dd18004..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs_{id}_cancel/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.batchJobs.cancel(batchJobId) -.then(({ batch_job }) => { - console.log(batch_job.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs_{id}_confirm/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs_{id}_confirm/post.js deleted file mode 100644 index 153604ef5e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_batch-jobs_{id}_confirm/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.batchJobs.confirm(batchJobId) -.then(({ batch_job }) => { - console.log(batch_job.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections/get.js deleted file mode 100644 index 5bb6f372cd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.collections.list() -.then(({ collections, limit, offset, count }) => { - console.log(collections.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections/post.js deleted file mode 100644 index b1baf8d155..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.collections.create({ - title: "New Collection" -}) -.then(({ collection }) => { - console.log(collection.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}/delete.js deleted file mode 100644 index a3edc10937..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.collections.delete(collectionId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}/get.js deleted file mode 100644 index 3bebde426e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.collections.retrieve(collectionId) -.then(({ collection }) => { - console.log(collection.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}/post.js deleted file mode 100644 index 926e7ca326..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.collections.update(collectionId, { - title: "New Collection" -}) -.then(({ collection }) => { - console.log(collection.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}_products_batch/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}_products_batch/delete.js deleted file mode 100644 index e8ae833aa6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}_products_batch/delete.js +++ /dev/null @@ -1,12 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.collections.removeProducts(collectionId, { - product_ids: [ - productId1, - productId2 - ] -}) -.then(({ id, object, removed_products }) => { - console.log(removed_products) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}_products_batch/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}_products_batch/post.js deleted file mode 100644 index a85310862e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_collections_{id}_products_batch/post.js +++ /dev/null @@ -1,12 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.collections.addProducts(collectionId, { - product_ids: [ - productId1, - productId2 - ] -}) -.then(({ collection }) => { - console.log(collection.products) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_currencies/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_currencies/get.js deleted file mode 100644 index 286a6490b9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_currencies/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.currencies.list() -.then(({ currencies, count, offset, limit }) => { - console.log(currencies.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_currencies_{code}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_currencies_{code}/post.js deleted file mode 100644 index 8bd811990e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_currencies_{code}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.currencies.update(code, { - includes_tax: true -}) -.then(({ currency }) => { - console.log(currency.code); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups/get.js deleted file mode 100644 index ae2beec241..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customerGroups.list() -.then(({ customer_groups, limit, offset, count }) => { - console.log(customer_groups.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups/post.js deleted file mode 100644 index 5fe5f54c5f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customerGroups.create({ - name: "VIP" -}) -.then(({ customer_group }) => { - console.log(customer_group.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}/delete.js deleted file mode 100644 index dfb0a6a4b5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customerGroups.delete(customerGroupId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}/get.js deleted file mode 100644 index d175f7a92c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customerGroups.retrieve(customerGroupId) -.then(({ customer_group }) => { - console.log(customer_group.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}/post.js deleted file mode 100644 index 11d7eeae6b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customerGroups.update(customerGroupId, { - name: "VIP" -}) -.then(({ customer_group }) => { - console.log(customer_group.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}_customers/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}_customers/get.js deleted file mode 100644 index b4fb1b2670..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}_customers/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customerGroups.listCustomers(customerGroupId) -.then(({ customers }) => { - console.log(customers.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}_customers_batch/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}_customers_batch/delete.js deleted file mode 100644 index 0528621964..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}_customers_batch/delete.js +++ /dev/null @@ -1,13 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customerGroups.removeCustomers(customerGroupId, { - customer_ids: [ - { - id: customerId - } - ] -}) -.then(({ customer_group }) => { - console.log(customer_group.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}_customers_batch/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}_customers_batch/post.js deleted file mode 100644 index 4c419cafdc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customer-groups_{id}_customers_batch/post.js +++ /dev/null @@ -1,13 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customerGroups.addCustomers(customerGroupId, { - customer_ids: [ - { - id: customerId - } - ] -}) -.then(({ customer_group }) => { - console.log(customer_group.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers/get.js deleted file mode 100644 index c0496e446e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customers.list() -.then(({ customers, limit, offset, count }) => { - console.log(customers.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers/post.js deleted file mode 100644 index 8c2041aefb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers/post.js +++ /dev/null @@ -1,12 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customers.create({ - email: "user@example.com", - first_name: "Caterina", - last_name: "Yost", - password: "supersecret" -}) -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers_{id}/get.js deleted file mode 100644 index 276a32d0fe..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customers.retrieve(customerId) -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers_{id}/post.js deleted file mode 100644 index 213da32ae6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_customers_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.customers.update(customerId, { - first_name: "Dolly" -}) -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts/get.js deleted file mode 100644 index eaeaa3fdec..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.list() -.then(({ discounts, limit, offset, count }) => { - console.log(discounts.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts/post.js deleted file mode 100644 index 4de95a9b3c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts/post.js +++ /dev/null @@ -1,18 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -import { AllocationType, DiscountRuleType } from "@medusajs/medusa" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.create({ - code: "TEST", - rule: { - type: DiscountRuleType.FIXED, - value: 10, - allocation: AllocationType.ITEM - }, - regions: ["reg_XXXXXXXX"], - is_dynamic: false, - is_disabled: false -}) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_code_{code}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_code_{code}/get.js deleted file mode 100644 index 42b3af87b3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_code_{code}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.retrieveByCode(code) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions/post.js deleted file mode 100644 index 01886c88c1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions/post.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -import { DiscountConditionOperator } from "@medusajs/medusa" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.createCondition(discountId, { - operator: DiscountConditionOperator.IN, - products: [productId] -}) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/delete.js deleted file mode 100644 index 3da54407d7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.deleteCondition(discountId, conditionId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/get.js deleted file mode 100644 index 23d4dee146..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.getCondition(discountId, conditionId) -.then(({ discount_condition }) => { - console.log(discount_condition.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/post.js deleted file mode 100644 index d59f59db04..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/post.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.updateCondition(discountId, conditionId, { - products: [ - productId - ] -}) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.js deleted file mode 100644 index 8528680079..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.deleteConditionResourceBatch(discountId, conditionId, { - resources: [{ id: itemId }] -}) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.js deleted file mode 100644 index fc8caffa6b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.addConditionResourceBatch(discountId, conditionId, { - resources: [{ id: itemId }] -}) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}/delete.js deleted file mode 100644 index 0b615bf8d6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.delete(discountId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}/get.js deleted file mode 100644 index bba22cd8ff..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.retrieve(discountId) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}/post.js deleted file mode 100644 index e580e90380..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.update(discountId, { - code: "TEST" -}) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_dynamic-codes/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_dynamic-codes/post.js deleted file mode 100644 index b9a33dc6a5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_dynamic-codes/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.createDynamicCode(discountId, { - code: "TEST", - usage_limit: 1 -}) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_dynamic-codes_{code}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_dynamic-codes_{code}/delete.js deleted file mode 100644 index 344a60ae96..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_dynamic-codes_{code}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.deleteDynamicCode(discountId, code) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_regions_{region_id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_regions_{region_id}/delete.js deleted file mode 100644 index 57ce1befcd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_regions_{region_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.removeRegion(discountId, regionId) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_regions_{region_id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_regions_{region_id}/post.js deleted file mode 100644 index 439050d200..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_discounts_{id}_regions_{region_id}/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.discounts.addRegion(discountId, regionId) -.then(({ discount }) => { - console.log(discount.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders/get.js deleted file mode 100644 index 02a002151a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.draftOrders.list() -.then(({ draft_orders, limit, offset, count }) => { - console.log(draft_orders.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders/post.js deleted file mode 100644 index 38e6a1a5ca..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders/post.js +++ /dev/null @@ -1,20 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.draftOrders.create({ - email: "user@example.com", - region_id, - items: [ - { - quantity: 1 - } - ], - shipping_methods: [ - { - option_id - } - ], -}) -.then(({ draft_order }) => { - console.log(draft_order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}/delete.js deleted file mode 100644 index 363405573c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.draftOrders.delete(draftOrderId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}/get.js deleted file mode 100644 index 1636c13fd7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.draftOrders.retrieve(draftOrderId) -.then(({ draft_order }) => { - console.log(draft_order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}/post.js deleted file mode 100644 index a350c78898..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.draftOrders.update(draftOrderId, { - email: "user@example.com" -}) -.then(({ draft_order }) => { - console.log(draft_order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_line-items/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_line-items/post.js deleted file mode 100644 index 62e41cc059..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_line-items/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.draftOrders.addLineItem(draftOrderId, { - quantity: 1 -}) -.then(({ draft_order }) => { - console.log(draft_order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_line-items_{line_id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_line-items_{line_id}/delete.js deleted file mode 100644 index dd69c9ab74..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_line-items_{line_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.draftOrders.removeLineItem(draftOrderId, itemId) -.then(({ draft_order }) => { - console.log(draft_order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_line-items_{line_id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_line-items_{line_id}/post.js deleted file mode 100644 index b0f25f157d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_line-items_{line_id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.draftOrders.updateLineItem(draftOrderId, lineId, { - quantity: 1 -}) -.then(({ draft_order }) => { - console.log(draft_order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_pay/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_pay/post.js deleted file mode 100644 index ce81255c42..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_draft-orders_{id}_pay/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.draftOrders.markPaid(draftOrderId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards/get.js deleted file mode 100644 index 15f4a4be64..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.giftCards.list() -.then(({ gift_cards, limit, offset, count }) => { - console.log(gift_cards.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards/post.js deleted file mode 100644 index 2e6aa01e32..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.giftCards.create({ - region_id -}) -.then(({ gift_card }) => { - console.log(gift_card.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards_{id}/delete.js deleted file mode 100644 index 6401273a45..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.giftCards.delete(giftCardId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards_{id}/get.js deleted file mode 100644 index 566b7cf5da..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.giftCards.retrieve(giftCardId) -.then(({ gift_card }) => { - console.log(gift_card.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards_{id}/post.js deleted file mode 100644 index d360c55300..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_gift-cards_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.giftCards.update(giftCardId, { - region_id -}) -.then(({ gift_card }) => { - console.log(gift_card.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items/get.js deleted file mode 100644 index 6ea3b2fdd5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.inventoryItems.list() -.then(({ inventory_items, count, offset, limit }) => { - console.log(inventory_items.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items/post.js deleted file mode 100644 index c87f6789ef..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.inventoryItems.create({ - variant_id: "variant_123", -}) -.then(({ inventory_item }) => { - console.log(inventory_item.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}/delete.js deleted file mode 100644 index 2d998b01fc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.inventoryItems.delete(inventoryItemId) -.then(({ id, object, deleted }) => { - console.log(id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}/get.js deleted file mode 100644 index 65f102df3f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.inventoryItems.retrieve(inventoryItemId) -.then(({ inventory_item }) => { - console.log(inventory_item.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}/post.js deleted file mode 100644 index 91ec13d1f6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.inventoryItems.update(inventoryItemId, { - origin_country: "US", -}) -.then(({ inventory_item }) => { - console.log(inventory_item.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels/get.js deleted file mode 100644 index 01bc8de71f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.inventoryItems.listLocationLevels(inventoryItemId) -.then(({ inventory_item }) => { - console.log(inventory_item.location_levels); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels/post.js deleted file mode 100644 index 01f41a6fff..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.inventoryItems.createLocationLevel(inventoryItemId, { - location_id: "sloc_123", - stocked_quantity: 10, -}) -.then(({ inventory_item }) => { - console.log(inventory_item.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels_{location_id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels_{location_id}/delete.js deleted file mode 100644 index 7af922f19b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels_{location_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.inventoryItems.deleteLocationLevel(inventoryItemId, locationId) -.then(({ inventory_item }) => { - console.log(inventory_item.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels_{location_id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels_{location_id}/post.js deleted file mode 100644 index 6e76ff2ba5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_inventory-items_{id}_location-levels_{location_id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.inventoryItems.updateLocationLevel(inventoryItemId, locationId, { - stocked_quantity: 15, -}) -.then(({ inventory_item }) => { - console.log(inventory_item.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites/get.js deleted file mode 100644 index abea181cd6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.invites.list() -.then(({ invites }) => { - console.log(invites.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites/post.js deleted file mode 100644 index 460bdaf6f5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites/post.js +++ /dev/null @@ -1,13 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.invites.create({ - user: "user@example.com", - role: "admin" -}) -.then(() => { - // successful -}) -.catch(() => { - // an error occurred -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites_accept/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites_accept/post.js deleted file mode 100644 index 58df5efdb1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites_accept/post.js +++ /dev/null @@ -1,17 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.invites.accept({ - token, - user: { - first_name: "Brigitte", - last_name: "Collier", - password: "supersecret" - } -}) -.then(() => { - // successful -}) -.catch(() => { - // an error occurred -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites_{invite_id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites_{invite_id}/delete.js deleted file mode 100644 index 4b1399f15a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites_{invite_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.invites.delete(inviteId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites_{invite_id}_resend/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites_{invite_id}_resend/post.js deleted file mode 100644 index a425b24d2d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_invites_{invite_id}_resend/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.invites.resend(inviteId) -.then(() => { - // successful -}) -.catch(() => { - // an error occurred -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes/get.js deleted file mode 100644 index 3b21b2c2de..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.notes.list() -.then(({ notes, limit, offset, count }) => { - console.log(notes.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes/post.js deleted file mode 100644 index 0bf37d1fa7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes/post.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.notes.create({ - resource_id, - resource_type: "order", - value: "We delivered this order" -}) -.then(({ note }) => { - console.log(note.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes_{id}/delete.js deleted file mode 100644 index 8125500adf..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.notes.delete(noteId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes_{id}/get.js deleted file mode 100644 index 8a06e6fcd1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.notes.retrieve(noteId) -.then(({ note }) => { - console.log(note.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes_{id}/post.js deleted file mode 100644 index efa6c9615d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notes_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.notes.update(noteId, { - value: "We delivered this order" -}) -.then(({ note }) => { - console.log(note.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notifications/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notifications/get.js deleted file mode 100644 index d109e2c8af..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notifications/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.notifications.list() -.then(({ notifications }) => { - console.log(notifications.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notifications_{id}_resend/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notifications_{id}_resend/post.js deleted file mode 100644 index bf5e270b22..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_notifications_{id}_resend/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.notifications.resend(notificationId) -.then(({ notification }) => { - console.log(notification.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits/get.js deleted file mode 100644 index 153886a98a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.list() -.then(({ order_edits, count, limit, offset }) => { - console.log(order_edits.length) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits/post.js deleted file mode 100644 index 7bc8ff715d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.create({ orderId }) -.then(({ order_edit }) => { - console.log(order_edit.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}/delete.js deleted file mode 100644 index 75006062e8..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.delete(orderEditId) -.then(({ id, object, deleted }) => { - console.log(id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}/get.js deleted file mode 100644 index 73ec5a5670..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.retrieve(orderEditId) -.then(({ order_edit }) => { - console.log(order_edit.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}/post.js deleted file mode 100644 index b314021235..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.update(orderEditId, { - internal_note: "internal reason XY" -}) -.then(({ order_edit }) => { - console.log(order_edit.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_cancel/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_cancel/post.js deleted file mode 100644 index 77fee48db9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_cancel/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.cancel(orderEditId) -.then(({ order_edit }) => { - console.log(order_edit.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_changes_{change_id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_changes_{change_id}/delete.js deleted file mode 100644 index 323810d25f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_changes_{change_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.deleteItemChange(orderEdit_id, itemChangeId) -.then(({ id, object, deleted }) => { - console.log(id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_confirm/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_confirm/post.js deleted file mode 100644 index a79cbabbba..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_confirm/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.confirm(orderEditId) -.then(({ order_edit }) => { - console.log(order_edit.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_items/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_items/post.js deleted file mode 100644 index 63f12fe826..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_items/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.addLineItem(orderEditId, { - variant_id, - quantity -}) -.then(({ order_edit }) => { - console.log(order_edit.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_items_{item_id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_items_{item_id}/delete.js deleted file mode 100644 index 46beb557fd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_items_{item_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.removeLineItem(orderEditId, lineItemId) -.then(({ order_edit }) => { - console.log(order_edit.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_items_{item_id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_items_{item_id}/post.js deleted file mode 100644 index 00cfbbcd72..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_items_{item_id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.updateLineItem(orderEditId, lineItemId, { - quantity: 5 -}) -.then(({ order_edit }) => { - console.log(order_edit.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_request/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_request/post.js deleted file mode 100644 index 0f79c1e853..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_order-edits_{id}_request/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orderEdits.requestConfirmation(orderEditId) -.then({ order_edit }) => { - console.log(order_edit.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders/get.js deleted file mode 100644 index 0b6b5ff508..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.list() -.then(({ orders, limit, offset, count }) => { - console.log(orders.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}/get.js deleted file mode 100644 index c9b93d4f7b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.retrieve(orderId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}/post.js deleted file mode 100644 index 3fc08c0b20..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.update(orderId, { - email: "user@example.com" -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_archive/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_archive/post.js deleted file mode 100644 index 9bb95dfbf0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_archive/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.archive(orderId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_cancel/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_cancel/post.js deleted file mode 100644 index 271e0359eb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_cancel/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.cancel(orderId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_capture/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_capture/post.js deleted file mode 100644 index 0e8c0e9496..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_capture/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.capturePayment(orderId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims/post.js deleted file mode 100644 index e635c46f82..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims/post.js +++ /dev/null @@ -1,15 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.createClaim(orderId, { - type: 'refund', - claim_items: [ - { - item_id, - quantity: 1 - } - ] -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}/post.js deleted file mode 100644 index d3db08333f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.updateClaim(orderId, claimId, { - no_notification: true -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_cancel/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_cancel/post.js deleted file mode 100644 index 0039cb0566..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_cancel/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.cancelClaim(orderId, claimId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_fulfillments/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_fulfillments/post.js deleted file mode 100644 index 070df1694d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_fulfillments/post.js +++ /dev/null @@ -1,8 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.fulfillClaim(orderId, claimId, { -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.js deleted file mode 100644 index 8ecf87f7a7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.cancelClaimFulfillment(orderId, claimId, fulfillmentId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_shipments/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_shipments/post.js deleted file mode 100644 index c209120759..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_shipments/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.createClaimShipment(orderId, claimId, { - fulfillment_id -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_complete/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_complete/post.js deleted file mode 100644 index 62cf37c16d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_complete/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.complete(orderId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_fulfillment/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_fulfillment/post.js deleted file mode 100644 index 8fcc64aeba..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_fulfillment/post.js +++ /dev/null @@ -1,14 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.createFulfillment(orderId, { - items: [ - { - item_id, - quantity: 1 - } - ] -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.js deleted file mode 100644 index f3bbd29811..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.cancelFulfillment(orderId, fulfillmentId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_refund/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_refund/post.js deleted file mode 100644 index 5b45bb9542..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_refund/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.refundPayment(orderId, { - amount: 1000, - reason: "Do not like it" -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_return/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_return/post.js deleted file mode 100644 index e5b519bcf6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_return/post.js +++ /dev/null @@ -1,14 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.requestReturn(orderId, { - items: [ - { - item_id, - quantity: 1 - } - ] -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_shipment/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_shipment/post.js deleted file mode 100644 index 620274fb37..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_shipment/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.createShipment(order_id, { - fulfillment_id -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_shipping-methods/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_shipping-methods/post.js deleted file mode 100644 index 65dda8bcbd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_shipping-methods/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.addShippingMethod(orderId, { - price: 1000, - option_id -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps/post.js deleted file mode 100644 index 5c28515bba..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps/post.js +++ /dev/null @@ -1,14 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.createSwap(orderId, { - return_items: [ - { - item_id, - quantity: 1 - } - ] -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_cancel/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_cancel/post.js deleted file mode 100644 index b20cdb0a41..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_cancel/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.cancelSwap(orderId, swapId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.js deleted file mode 100644 index 318b671886..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.fulfillSwap(orderId, swapId, { - -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.js deleted file mode 100644 index 2abfc9954f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.cancelSwapFulfillment(orderId, swapId, fulfillmentId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_process-payment/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_process-payment/post.js deleted file mode 100644 index fb8e065af4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_process-payment/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.processSwapPayment(orderId, swapId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_shipments/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_shipments/post.js deleted file mode 100644 index 046356d93c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_shipments/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.orders.createSwapShipment(orderId, swapId, { - fulfillment_id -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}/delete.js deleted file mode 100644 index b246e4620e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.paymentCollections.delete(paymentCollectionId) -.then(({ id, object, deleted }) => { - console.log(id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}/get.js deleted file mode 100644 index 553d64e404..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.paymentCollections.retrieve(paymentCollectionId) -.then(({ payment_collection }) => { - console.log(payment_collection.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}/post.js deleted file mode 100644 index 3a94713539..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.paymentCollections.update(paymentCollectionId, { - description -}) -.then(({ payment_collection }) => { - console.log(payment_collection.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}_authorize/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}_authorize/post.js deleted file mode 100644 index 282e993124..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payment-collections_{id}_authorize/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.paymentCollections.markAsAuthorized(paymentCollectionId) -.then(({ payment_collection }) => { - console.log(payment_collection.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payments_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payments_{id}/get.js deleted file mode 100644 index ada073593a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payments_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.payments.retrieve(paymentId) -.then(({ payment }) => { - console.log(payment.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payments_{id}_capture/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payments_{id}_capture/post.js deleted file mode 100644 index 24db538566..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payments_{id}_capture/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.payments.capturePayment(paymentId) -.then(({ payment }) => { - console.log(payment.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payments_{id}_refund/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payments_{id}_refund/post.js deleted file mode 100644 index c37ed64e57..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_payments_{id}_refund/post.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.payments.refundPayment(paymentId, { - amount: 1000, - reason: "return", - note: "Do not like it", -}) -.then(({ payment }) => { - console.log(payment.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists/get.js deleted file mode 100644 index 2f5076c457..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.priceLists.list() -.then(({ price_lists, limit, offset, count }) => { - console.log(price_lists.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists/post.js deleted file mode 100644 index 1d2c9627cb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists/post.js +++ /dev/null @@ -1,19 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -import { PriceListType } from "@medusajs/medusa" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.priceLists.create({ - name: "New Price List", - description: "A new price list", - type: PriceListType.SALE, - prices: [ - { - amount: 1000, - variant_id, - currency_code: "eur" - } - ] -}) -.then(({ price_list }) => { - console.log(price_list.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}/delete.js deleted file mode 100644 index fd126775e0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.priceLists.delete(priceListId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}/get.js deleted file mode 100644 index 1ae04780b6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.priceLists.retrieve(priceListId) -.then(({ price_list }) => { - console.log(price_list.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}/post.js deleted file mode 100644 index fe9fd2b55f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.priceLists.update(priceListId, { - name: "New Price List" -}) -.then(({ price_list }) => { - console.log(price_list.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_prices_batch/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_prices_batch/delete.js deleted file mode 100644 index ed925b0331..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_prices_batch/delete.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.priceLists.deletePrices(priceListId, { - price_ids: [ - price_id - ] -}) -.then(({ ids, object, deleted }) => { - console.log(ids.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_prices_batch/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_prices_batch/post.js deleted file mode 100644 index 273cc9d276..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_prices_batch/post.js +++ /dev/null @@ -1,15 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.priceLists.addPrices(priceListId, { - prices: [ - { - amount: 1000, - variant_id, - currency_code: "eur" - } - ] -}) -.then(({ price_list }) => { - console.log(price_list.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_products/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_products/get.js deleted file mode 100644 index afd30dceff..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_products/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.priceLists.listProducts(priceListId) -.then(({ products, limit, offset, count }) => { - console.log(products.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_products_prices_batch/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_products_prices_batch/delete.js deleted file mode 100644 index 129218f080..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_products_prices_batch/delete.js +++ /dev/null @@ -1,12 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.priceLists.deleteProductsPrices(priceListId, { - product_ids: [ - productId1, - productId2, - ] -}) -.then(({ ids, object, deleted }) => { - console.log(ids.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_products_{product_id}_prices/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_products_{product_id}_prices/delete.js deleted file mode 100644 index f93fea4a41..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_products_{product_id}_prices/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.priceLists.deleteProductPrices(priceListId, productId) -.then(({ ids, object, deleted }) => { - console.log(ids.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_variants_{variant_id}_prices/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_variants_{variant_id}_prices/delete.js deleted file mode 100644 index ce22d96528..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_price-lists_{id}_variants_{variant_id}_prices/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.priceLists.deleteVariantPrices(priceListId, variantId) -.then(({ ids, object, deleted }) => { - console.log(ids); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories/get.js deleted file mode 100644 index be3b48c395..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productCategories.list() -.then(({ product_categories, limit, offset, count }) => { - console.log(product_categories.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories/post.js deleted file mode 100644 index 3a64df6ac0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productCategories.create({ - name: "Skinny Jeans", -}) -.then(({ product_category }) => { - console.log(product_category.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}/delete.js deleted file mode 100644 index d8f4d2e89d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productCategories.delete(productCategoryId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}/get.js deleted file mode 100644 index 4281b7e540..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productCategories.retrieve(productCategoryId) -.then(({ product_category }) => { - console.log(product_category.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}/post.js deleted file mode 100644 index bcb24b74dc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productCategories.update(productCategoryId, { - name: "Skinny Jeans" -}) -.then(({ product_category }) => { - console.log(product_category.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}_products_batch/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}_products_batch/delete.js deleted file mode 100644 index c1c49aeb37..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}_products_batch/delete.js +++ /dev/null @@ -1,13 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productCategories.removeProducts(productCategoryId, { - product_ids: [ - { - id: productId - } - ] -}) -.then(({ product_category }) => { - console.log(product_category.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}_products_batch/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}_products_batch/post.js deleted file mode 100644 index b303c6ed02..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-categories_{id}_products_batch/post.js +++ /dev/null @@ -1,13 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productCategories.addProducts(productCategoryId, { - product_ids: [ - { - id: productId - } - ] -}) -.then(({ product_category }) => { - console.log(product_category.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-tags/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-tags/get.js deleted file mode 100644 index b13d6f05d9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-tags/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productTags.list() -.then(({ product_tags }) => { - console.log(product_tags.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-types/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-types/get.js deleted file mode 100644 index 98b2c0860a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_product-types/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productTypes.list() -.then(({ product_types }) => { - console.log(product_types.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products/get.js deleted file mode 100644 index 14c8e5e192..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.list() -.then(({ products, limit, offset, count }) => { - console.log(products.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products/post.js deleted file mode 100644 index a9e7150511..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products/post.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.create({ - title: "Shirt", - is_giftcard: false, - discountable: true -}) -.then(({ product }) => { - console.log(product.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_tag-usage/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_tag-usage/get.js deleted file mode 100644 index e6e17cfb0c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_tag-usage/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.listTags() -.then(({ tags }) => { - console.log(tags.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_types/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_types/get.js deleted file mode 100644 index 348c33460f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_types/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.listTypes() -.then(({ types }) => { - console.log(types.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}/delete.js deleted file mode 100644 index 0a69bca706..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.delete(productId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}/get.js deleted file mode 100644 index ab69a73129..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.retrieve(productId) -.then(({ product }) => { - console.log(product.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}/post.js deleted file mode 100644 index 515832dfa2..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.update(productId, { - title: "Shirt", -}) -.then(({ product }) => { - console.log(product.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_metadata/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_metadata/post.js deleted file mode 100644 index 2fc17c15ea..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_metadata/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.setMetadata(productId, { - key: "test", - value: "true" -}) -.then(({ product }) => { - console.log(product.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_options/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_options/post.js deleted file mode 100644 index 3dd1b432bd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_options/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.addOption(productId, { - title: "Size" -}) -.then(({ product }) => { - console.log(product.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_options_{option_id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_options_{option_id}/delete.js deleted file mode 100644 index 311597bac8..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_options_{option_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.deleteOption(productId, optionId) -.then(({ option_id, object, deleted, product }) => { - console.log(product.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_options_{option_id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_options_{option_id}/post.js deleted file mode 100644 index c8236c1c6e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_options_{option_id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.updateOption(productId, optionId, { - title: "Size" -}) -.then(({ product }) => { - console.log(product.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_variants/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_variants/post.js deleted file mode 100644 index 927885245a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_variants/post.js +++ /dev/null @@ -1,22 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.createVariant(productId, { - title: "Color", - prices: [ - { - amount: 1000, - currency_code: "eur" - } - ], - options: [ - { - option_id, - value: "S" - } - ], - inventory_quantity: 100 -}) -.then(({ product }) => { - console.log(product.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_variants_{variant_id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_variants_{variant_id}/delete.js deleted file mode 100644 index 21f3b3e58d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_variants_{variant_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.deleteVariant(productId, variantId) -.then(({ variant_id, object, deleted, product }) => { - console.log(product.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_variants_{variant_id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_variants_{variant_id}/post.js deleted file mode 100644 index a406cc6ba4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_products_{id}_variants_{variant_id}/post.js +++ /dev/null @@ -1,22 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.products.updateVariant(productId, variantId, { - title: "Color", - prices: [ - { - amount: 1000, - currency_code: "eur" - } - ], - options: [ - { - option_id, - value: "S" - } - ], - inventory_quantity: 100 -}) -.then(({ product }) => { - console.log(product.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys/get.js deleted file mode 100644 index 7027ee3c61..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.publishableApiKeys.list() -.then(({ publishable_api_keys, count, limit, offset }) => { - console.log(publishable_api_keys) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys/post.js deleted file mode 100644 index 2e83cfc321..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.publishableApiKeys.create({ - title -}) -.then(({ publishable_api_key }) => { - console.log(publishable_api_key.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}/delete.js deleted file mode 100644 index 0da44544f5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.publishableApiKeys.delete(publishableApiKeyId) -.then(({ id, object, deleted }) => { - console.log(id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}/get.js deleted file mode 100644 index a49f6d1a5b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.publishableApiKeys.retrieve(publishableApiKeyId) -.then(({ publishable_api_key }) => { - console.log(publishable_api_key.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}/post.js deleted file mode 100644 index 5b9e46f3d4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.publishableApiKeys.update(publishableApiKeyId, { - title: "new title" -}) -.then(({ publishable_api_key }) => { - console.log(publishable_api_key.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_revoke/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_revoke/post.js deleted file mode 100644 index c48cc0f180..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_revoke/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.publishableApiKeys.revoke(publishableApiKeyId) -.then(({ publishable_api_key }) => { - console.log(publishable_api_key.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels/get.js deleted file mode 100644 index b14d54188b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.publishableApiKeys.listSalesChannels() -.then(({ sales_channels }) => { - console.log(sales_channels.length) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels_batch/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels_batch/delete.js deleted file mode 100644 index aeb244376d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels_batch/delete.js +++ /dev/null @@ -1,13 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.publishableApiKeys.deleteSalesChannelsBatch(publishableApiKeyId, { - sales_channel_ids: [ - { - id: channelId - } - ] -}) -.then(({ publishable_api_key }) => { - console.log(publishable_api_key.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels_batch/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels_batch/post.js deleted file mode 100644 index fd38b7f096..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels_batch/post.js +++ /dev/null @@ -1,13 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.publishableApiKeys.addSalesChannelsBatch(publishableApiKeyId, { - sales_channel_ids: [ - { - id: channelId - } - ] -}) -.then(({ publishable_api_key }) => { - console.log(publishable_api_key.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions/get.js deleted file mode 100644 index 647c347340..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.list() -.then(({ regions, limit, offset, count }) => { - console.log(regions.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions/post.js deleted file mode 100644 index 43eff6dbcf..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions/post.js +++ /dev/null @@ -1,20 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.create({ - name: "Europe", - currency_code: "eur", - tax_rate: 0, - payment_providers: [ - "manual" - ], - fulfillment_providers: [ - "manual" - ], - countries: [ - "DK" - ] -}) -.then(({ region }) => { - console.log(region.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}/delete.js deleted file mode 100644 index 87149267ba..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.delete(regionId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}/get.js deleted file mode 100644 index 0697eddf84..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.retrieve(regionId) -.then(({ region }) => { - console.log(region.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}/post.js deleted file mode 100644 index a96f349303..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.update(regionId, { - name: "Europe" -}) -.then(({ region }) => { - console.log(region.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_countries/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_countries/post.js deleted file mode 100644 index b2c31cceee..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_countries/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.addCountry(regionId, { - country_code: "dk" -}) -.then(({ region }) => { - console.log(region.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_countries_{country_code}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_countries_{country_code}/delete.js deleted file mode 100644 index 7398b8ba11..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_countries_{country_code}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.deleteCountry(regionId, "dk") -.then(({ region }) => { - console.log(region.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_fulfillment-options/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_fulfillment-options/get.js deleted file mode 100644 index 69c6e82bcd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_fulfillment-options/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.retrieveFulfillmentOptions(regionId) -.then(({ fulfillment_options }) => { - console.log(fulfillment_options.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_fulfillment-providers/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_fulfillment-providers/post.js deleted file mode 100644 index 350822c70b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_fulfillment-providers/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.addFulfillmentProvider(regionId, { - provider_id: "manual" -}) -.then(({ region }) => { - console.log(region.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.js deleted file mode 100644 index 4fe91d2993..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.deleteFulfillmentProvider(regionId, "manual") -.then(({ region }) => { - console.log(region.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_payment-providers/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_payment-providers/post.js deleted file mode 100644 index be40f8498c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_payment-providers/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.addPaymentProvider(regionId, { - provider_id: "manual" -}) -.then(({ region }) => { - console.log(region.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_payment-providers_{provider_id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_payment-providers_{provider_id}/delete.js deleted file mode 100644 index 4591a1b351..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_regions_{id}_payment-providers_{provider_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.regions.deletePaymentProvider(regionId, "manual") -.then(({ region }) => { - console.log(region.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations/get.js deleted file mode 100644 index a868f35485..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.reservations.list() -.then(({ reservations, count, limit, offset }) => { - console.log(reservations.length) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations/post.js deleted file mode 100644 index 55fdf093cb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations/post.js +++ /dev/null @@ -1,12 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.reservations.create({ - line_item_id: "item_123", - location_id: "loc_123", - inventory_item_id: "iitem_123", - quantity: 1 -}) -.then(({ reservation }) => { - console.log(reservation.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations_{id}/delete.js deleted file mode 100644 index 0cffb9d607..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.reservations.delete(reservationId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations_{id}/get.js deleted file mode 100644 index 480aa766ec..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.reservations.retrieve(reservationId) -.then(({ reservation }) => { - console.log(reservation.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations_{id}/post.js deleted file mode 100644 index b0edd1d39b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_reservations_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.reservations.update(reservationId, { - quantity: 3 -}) -.then(({ reservation }) => { - console.log(reservation.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons/get.js deleted file mode 100644 index 2ef93fb1ba..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.returnReasons.list() -.then(({ return_reasons }) => { - console.log(return_reasons.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons/post.js deleted file mode 100644 index 8f6ba5a2ad..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.returnReasons.create({ - label: "Damaged", - value: "damaged" -}) -.then(({ return_reason }) => { - console.log(return_reason.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons_{id}/delete.js deleted file mode 100644 index d69c087f34..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.returnReasons.delete(returnReasonId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons_{id}/get.js deleted file mode 100644 index 094096b898..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.returnReasons.retrieve(returnReasonId) -.then(({ return_reason }) => { - console.log(return_reason.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons_{id}/post.js deleted file mode 100644 index 78756c3989..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_return-reasons_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.returnReasons.update(returnReasonId, { - label: "Damaged" -}) -.then(({ return_reason }) => { - console.log(return_reason.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_returns/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_returns/get.js deleted file mode 100644 index d07e97b191..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_returns/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.returns.list() -.then(({ returns, limit, offset, count }) => { - console.log(returns.length) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_returns_{id}_cancel/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_returns_{id}_cancel/post.js deleted file mode 100644 index 9c8e7ca903..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_returns_{id}_cancel/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.returns.cancel(returnId) -.then(({ order }) => { - console.log(order.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_returns_{id}_receive/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_returns_{id}_receive/post.js deleted file mode 100644 index 7c1e52791e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_returns_{id}_receive/post.js +++ /dev/null @@ -1,14 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.returns.receive(returnId, { - items: [ - { - item_id, - quantity: 1 - } - ] -}) -.then((data) => { - console.log(data.return.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels/get.js deleted file mode 100644 index fca9318064..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.salesChannels.list() -.then(({ sales_channels, limit, offset, count }) => { - console.log(sales_channels.length) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels/post.js deleted file mode 100644 index 343af3b461..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.salesChannels.create({ - name: "App", - description: "Mobile app" -}) -.then(({ sales_channel }) => { - console.log(sales_channel.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}/delete.js deleted file mode 100644 index d877774830..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.salesChannels.delete(salesChannelId) -.then(({ id, object, deleted }) => { - console.log(id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}/get.js deleted file mode 100644 index e32d8f0592..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.salesChannels.retrieve(salesChannelId) -.then(({ sales_channel }) => { - console.log(sales_channel.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}/post.js deleted file mode 100644 index 4f511af44f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.salesChannels.update(salesChannelId, { - name: "App" -}) -.then(({ sales_channel }) => { - console.log(sales_channel.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_products_batch/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_products_batch/delete.js deleted file mode 100644 index b64765defb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_products_batch/delete.js +++ /dev/null @@ -1,13 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.salesChannels.removeProducts(salesChannelId, { - product_ids: [ - { - id: productId - } - ] -}) -.then(({ sales_channel }) => { - console.log(sales_channel.id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_products_batch/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_products_batch/post.js deleted file mode 100644 index 2385e9fb6f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_products_batch/post.js +++ /dev/null @@ -1,13 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.salesChannels.addProducts(salesChannelId, { - product_ids: [ - { - id: productId - } - ] -}) -.then(({ sales_channel }) => { - console.log(sales_channel.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_stock-locations/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_stock-locations/delete.js deleted file mode 100644 index 0a8e044188..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_stock-locations/delete.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.salesChannels.removeLocation(salesChannelId, { - location_id: "loc_id" -}) -.then(({ sales_channel }) => { - console.log(sales_channel.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_stock-locations/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_stock-locations/post.js deleted file mode 100644 index ea7f2cce0b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_sales-channels_{id}_stock-locations/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.salesChannels.addLocation(salesChannelId, { - location_id: "loc_123" -}) -.then(({ sales_channel }) => { - console.log(sales_channel.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options/get.js deleted file mode 100644 index a67bf2c443..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.shippingOptions.list() -.then(({ shipping_options, count }) => { - console.log(shipping_options.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options/post.js deleted file mode 100644 index 1b9373e143..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options/post.js +++ /dev/null @@ -1,14 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.shippingOptions.create({ - name: "PostFake", - region_id, - provider_id, - data: { - }, - price_type: "flat_rate" -}) -.then(({ shipping_option }) => { - console.log(shipping_option.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options_{id}/delete.js deleted file mode 100644 index 86ff851dfc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.shippingOptions.delete(optionId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options_{id}/get.js deleted file mode 100644 index 3f0ad845ac..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.shippingOptions.retrieve(optionId) -.then(({ shipping_option }) => { - console.log(shipping_option.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options_{id}/post.js deleted file mode 100644 index ef30c1219f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-options_{id}/post.js +++ /dev/null @@ -1,16 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.shippingOptions.update(optionId, { - name: "PostFake", - requirements: [ - { - id, - type: "max_subtotal", - amount: 1000 - } - ] -}) -.then(({ shipping_option }) => { - console.log(shipping_option.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles/get.js deleted file mode 100644 index c15f3bd0ba..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.shippingProfiles.list() -.then(({ shipping_profiles }) => { - console.log(shipping_profiles.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles/post.js deleted file mode 100644 index 9cd8bb9c05..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.shippingProfiles.create({ - name: "Large Products" -}) -.then(({ shipping_profile }) => { - console.log(shipping_profile.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles_{id}/delete.js deleted file mode 100644 index 814f719edd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.shippingProfiles.delete(profileId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles_{id}/get.js deleted file mode 100644 index bcde558645..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.shippingProfiles.retrieve(profileId) -.then(({ shipping_profile }) => { - console.log(shipping_profile.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles_{id}/post.js deleted file mode 100644 index fcaac5eda2..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_shipping-profiles_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.shippingProfiles.update(shippingProfileId, { - name: 'Large Products' -}) -.then(({ shipping_profile }) => { - console.log(shipping_profile.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations/get.js deleted file mode 100644 index de8a49d085..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.stockLocations.list() -.then(({ stock_locations, limit, offset, count }) => { - console.log(stock_locations.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations/post.js deleted file mode 100644 index 43add759fc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.stockLocations.create({ - name: "Main Warehouse", -}) -.then(({ stock_location }) => { - console.log(stock_location.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations_{id}/delete.js deleted file mode 100644 index f49f312bfa..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.stockLocations.delete(stockLocationId) -.then(({ id, object, deleted }) => { - console.log(id) -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations_{id}/get.js deleted file mode 100644 index c69524cdfb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.stockLocations.retrieve(stockLocationId) -.then(({ stock_location }) => { - console.log(stock_location.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations_{id}/post.js deleted file mode 100644 index d03f2a3ff0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_stock-locations_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.stockLocations.update(stockLocationId, { - name: 'Main Warehouse' -}) -.then(({ stock_location }) => { - console.log(stock_location.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store/get.js deleted file mode 100644 index e9ff095154..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.store.retrieve() -.then(({ store }) => { - console.log(store.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store/post.js deleted file mode 100644 index 12fb37943a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.store.update({ - name: "Medusa Store" -}) -.then(({ store }) => { - console.log(store.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_currencies_{code}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_currencies_{code}/delete.js deleted file mode 100644 index bfdbcf73be..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_currencies_{code}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.store.deleteCurrency("eur") -.then(({ store }) => { - console.log(store.currencies); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_currencies_{code}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_currencies_{code}/post.js deleted file mode 100644 index 53a55fdded..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_currencies_{code}/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.store.addCurrency("eur") -.then(({ store }) => { - console.log(store.currencies); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_payment-providers/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_payment-providers/get.js deleted file mode 100644 index 499ae8c6ff..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_payment-providers/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.store.listPaymentProviders() -.then(({ payment_providers }) => { - console.log(payment_providers.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_tax-providers/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_tax-providers/get.js deleted file mode 100644 index c0e5b424e0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_store_tax-providers/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.store.listTaxProviders() -.then(({ tax_providers }) => { - console.log(tax_providers.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_swaps/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_swaps/get.js deleted file mode 100644 index 7cfa03d604..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_swaps/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.swaps.list() -.then(({ swaps }) => { - console.log(swaps.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_swaps_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_swaps_{id}/get.js deleted file mode 100644 index 754f2aa341..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_swaps_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.swaps.retrieve(swapId) -.then(({ swap }) => { - console.log(swap.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates/get.js deleted file mode 100644 index 824b60b633..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.taxRates.list() -.then(({ tax_rates, limit, offset, count }) => { - console.log(tax_rates.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates/post.js deleted file mode 100644 index a5ab240912..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates/post.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.taxRates.create({ - code: "TEST", - name: "New Tax Rate", - region_id -}) -.then(({ tax_rate }) => { - console.log(tax_rate.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}/delete.js deleted file mode 100644 index fd84111a14..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.taxRates.delete(taxRateId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}/get.js deleted file mode 100644 index 92aa4a8d67..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.taxRates.retrieve(taxRateId) -.then(({ tax_rate }) => { - console.log(tax_rate.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}/post.js deleted file mode 100644 index e32c49bfa4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.taxRates.update(taxRateId, { - name: "New Tax Rate" -}) -.then(({ tax_rate }) => { - console.log(tax_rate.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_product-types_batch/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_product-types_batch/delete.js deleted file mode 100644 index 25277943a3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_product-types_batch/delete.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.taxRates.removeProductTypes(taxRateId, { - product_types: [ - productTypeId - ] -}) -.then(({ tax_rate }) => { - console.log(tax_rate.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_product-types_batch/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_product-types_batch/post.js deleted file mode 100644 index 5b5ce3f6ac..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_product-types_batch/post.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.taxRates.addProductTypes(taxRateId, { - product_types: [ - productTypeId - ] -}) -.then(({ tax_rate }) => { - console.log(tax_rate.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_products_batch/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_products_batch/delete.js deleted file mode 100644 index aa3fa0db50..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_products_batch/delete.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.taxRates.removeProducts(taxRateId, { - products: [ - productId - ] -}) -.then(({ tax_rate }) => { - console.log(tax_rate.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_products_batch/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_products_batch/post.js deleted file mode 100644 index 74830ca7ef..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_products_batch/post.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.taxRates.addProducts(taxRateId, { - products: [ - productId - ] -}) -.then(({ tax_rate }) => { - console.log(tax_rate.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_shipping-options_batch/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_shipping-options_batch/delete.js deleted file mode 100644 index 0295bc2ccf..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_shipping-options_batch/delete.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.taxRates.removeShippingOptions(taxRateId, { - shipping_options: [ - shippingOptionId - ] -}) -.then(({ tax_rate }) => { - console.log(tax_rate.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_shipping-options_batch/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_shipping-options_batch/post.js deleted file mode 100644 index f24e59c767..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-rates_{id}_shipping-options_batch/post.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.taxRates.addShippingOptions(taxRateId, { - shipping_options: [ - shippingOptionId - ] -}) -.then(({ tax_rate }) => { - console.log(tax_rate.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads/delete.js deleted file mode 100644 index 4edd8431db..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads/delete.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.uploads.delete({ - file_key -}) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads/post.js deleted file mode 100644 index 4d73e5cb5a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.uploads.create(file) -.then(({ uploads }) => { - console.log(uploads.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads_download-url/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads_download-url/post.js deleted file mode 100644 index ccbc1154fa..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads_download-url/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.uploads.getPresignedDownloadUrl({ - file_key -}) -.then(({ download_url }) => { - console.log(download_url); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads_protected/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads_protected/post.js deleted file mode 100644 index a35f958acf..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_uploads_protected/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.uploads.createProtected(file) -.then(({ uploads }) => { - console.log(uploads.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users/get.js deleted file mode 100644 index 09fb52748f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.users.list() -.then(({ users, limit, offset, count }) => { - console.log(users.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users/post.js deleted file mode 100644 index 70aa036912..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.users.create({ - email: "user@example.com", - password: "supersecret" -}) -.then(({ user }) => { - console.log(user.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_password-token/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_password-token/post.js deleted file mode 100644 index eb62808f65..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_password-token/post.js +++ /dev/null @@ -1,12 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.users.sendResetPasswordToken({ - email: "user@example.com" -}) -.then(() => { - // successful -}) -.catch(() => { - // error occurred -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_reset-password/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_reset-password/post.js deleted file mode 100644 index 3d6c146ba4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_reset-password/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.users.resetPassword({ - token: "supersecrettoken", - password: "supersecret" -}) -.then(({ user }) => { - console.log(user.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_{id}/delete.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_{id}/delete.js deleted file mode 100644 index 8f6e0e4665..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_{id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.users.delete(userId) -.then(({ id, object, deleted }) => { - console.log(id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_{id}/get.js deleted file mode 100644 index 1c9acc76b6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.users.retrieve(userId) -.then(({ user }) => { - console.log(user.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_{id}/post.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_{id}/post.js deleted file mode 100644 index bd461cb961..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_users_{id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.users.update(userId, { - first_name: "Marcellus" -}) -.then(({ user }) => { - console.log(user.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_variants/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_variants/get.js deleted file mode 100644 index 8ee716d2ea..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_variants/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.variants.list() -.then(({ variants, limit, offset, count }) => { - console.log(variants.length); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_variants_{id}/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_variants_{id}/get.js deleted file mode 100644 index 34b5cb84db..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_variants_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.variants.retrieve(variantId) -.then(({ variant }) => { - console.log(variant.id); -}) diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_variants_{id}_inventory/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_variants_{id}_inventory/get.js deleted file mode 100644 index 18dc4e241a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_variants_{id}_inventory/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.variants.getInventory(variantId) -.then(({ variant }) => { - console.log(variant.inventory, variant.sales_channel_availability) -}) diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys_{id}/delete.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys_{id}/delete.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys_{id}/delete.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys_{id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys_{id}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys_{id}/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys_{id}/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys_{id}/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys_{id}/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys_{id}_revoke/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys_{id}_revoke/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_api-keys_{id}_revoke/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_api-keys_{id}_revoke/post.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_apps/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_apps/get.sh deleted file mode 100644 index 657fc13de9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_apps/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/apps' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_apps_authorizations/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_apps_authorizations/post.sh deleted file mode 100644 index dbbfd9c292..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_apps_authorizations/post.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X POST '{backend_url}/admin/apps/authorizations' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "application_name": "example", - "state": "ready", - "code": "token" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth/delete.sh deleted file mode 100644 index 266aef9f6d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/auth' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth/get.sh deleted file mode 100644 index 481fd1ce23..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/auth' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth/post.sh deleted file mode 100644 index 69f0d27eb4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/auth' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "password": "supersecret" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth_token/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth_token/post.sh deleted file mode 100644 index 9804a33d68..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth_token/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/auth/token' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "password": "supersecret" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs/get.sh deleted file mode 100644 index 763116b318..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/batch-jobs' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs/post.sh deleted file mode 100644 index 910222dcac..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs/post.sh +++ /dev/null @@ -1,7 +0,0 @@ -curl -X POST '{backend_url}/admin/batch-jobs' \ --H 'Content-Type: application/json' \ --H 'x-medusa-access-token: {api_token}' \ ---data-raw '{ - "type": "product-export", - "context": { } -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs_{id}/get.sh deleted file mode 100644 index 4d72075321..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/batch-jobs/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs_{id}_cancel/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs_{id}_cancel/post.sh deleted file mode 100644 index d2a020d855..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs_{id}_cancel/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/batch-jobs/{id}/cancel' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs_{id}_confirm/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs_{id}_confirm/post.sh deleted file mode 100644 index 7d9fa63c3e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_batch-jobs_{id}_confirm/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/batch-jobs/{id}/confirm' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_campaigns/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_campaigns/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_campaigns/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_campaigns/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_campaigns/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_campaigns/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_campaigns/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_campaigns/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_campaigns_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_campaigns_{id}/delete.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_campaigns_{id}/delete.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_campaigns_{id}/delete.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_campaigns_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_campaigns_{id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_campaigns_{id}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_campaigns_{id}/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_campaigns_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_campaigns_{id}/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_campaigns_{id}/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_campaigns_{id}/post.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections/get.sh index 1bac2ed967..ad6a8611a1 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/collections' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections/post.sh index 6efc22366f..564406d2c8 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/collections' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "title": "New Collection" -}' +-H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/delete.sh index 5129f74d1b..ac6ab81926 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/collections/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/get.sh index c84c143035..d5e3ac9901 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/collections/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/post.sh index f238f91dce..1ed3078733 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/collections/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "title": "New Collection" -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}_products_batch/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}_products_batch/delete.sh deleted file mode 100644 index 5851a6f7b3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}_products_batch/delete.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X DELETE '{backend_url}/admin/collections/{id}/products/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "product_ids": [ - "prod_01G1G5V2MBA328390B5AXJ610F" - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}_products_batch/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}_products_batch/post.sh deleted file mode 100644 index ac76d11a6f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_collections_{id}_products_batch/post.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X POST '{backend_url}/admin/collections/{id}/products/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "product_ids": [ - "prod_01G1G5V2MBA328390B5AXJ610F" - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_currencies/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_currencies/get.sh index 1e4efed234..98bde5a28f 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_currencies/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_currencies/get.sh @@ -1,2 +1,2 @@ -curl -X POST '{backend_url}/admin/currencies' \ --H 'x-medusa-access-token: {api_token}' +curl '{backend_url}/admin/currencies' \ +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_currencies_{code}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_currencies_{code}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_currencies_{code}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_currencies_{code}/get.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_currencies_{code}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_currencies_{code}/post.sh deleted file mode 100644 index 00cb3fbc20..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_currencies_{code}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/currencies/{code}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "includes_tax": true -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups/get.sh index 88c81fea83..a1e09a1830 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/customer-groups' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups/post.sh index 3106ab15d6..5dc5d9806f 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/customer-groups' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "VIP" -}' +-H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/delete.sh index 57929e8273..fb76fec5a4 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/customer-groups/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/get.sh index d5d9239c1b..775aa665b6 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/customer-groups/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/post.sh index 94cb0a8b06..2f19abfcce 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/customer-groups/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "VIP" -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers/get.sh index f6282935ec..07089b3972 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/customer-groups/{id}/customers' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers_batch/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers_batch/delete.sh deleted file mode 100644 index 43ef90f0f5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers_batch/delete.sh +++ /dev/null @@ -1,10 +0,0 @@ -curl -X DELETE '{backend_url}/admin/customer-groups/{id}/customers/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "customer_ids": [ - { - "id": "cus_01G2Q4BS9GAHDBMDEN4ZQZCJB2" - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers_batch/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers_batch/post.sh index 26254c4fcd..34c79ef48e 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers_batch/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers_batch/post.sh @@ -2,9 +2,9 @@ curl -X POST '{backend_url}/admin/customer-groups/{id}/customers/batch' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "customer_ids": [ - { - "id": "cus_01G2Q4BS9GAHDBMDEN4ZQZCJB2" - } - ] -}' + "customer_ids": [ + { + "id": "id_dx2Wieq4uGG" + } + ] +}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}_customers_remove/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers_remove/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customer-groups_{id}_customers_remove/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_customer-groups_{id}_customers_remove/post.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers/get.sh index 9b95898713..a3cb447f4d 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/customers' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers/post.sh index c78a5a53e1..ea92b85acf 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers/post.sh @@ -1,9 +1,2 @@ curl -X POST '{backend_url}/admin/customers' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "first_name": "Caterina", - "last_name": "Yost", - "password": "supersecret" -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}/delete.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}/delete.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}/delete.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}/get.sh index 31ecfa95eb..84b7af171c 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/customers/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}/post.sh index 07fec92dab..867aa617b0 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/customers/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "first_name": "Dolly" -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}_addresses/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}_addresses/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}_addresses/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}_addresses/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}_addresses/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}_addresses/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}_addresses/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}_addresses/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/delete.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/delete.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/delete.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_customers_{id}_addresses_{address_id}/post.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts/get.sh deleted file mode 100644 index 8cb1339883..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/discounts' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts/post.sh deleted file mode 100644 index e340dc7d8f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts/post.sh +++ /dev/null @@ -1,12 +0,0 @@ -curl -X POST '{backend_url}/admin/discounts' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "code": "TEST", - "rule": { - "type": "fixed", - "value": 10, - "allocation": "item" - }, - "regions": ["reg_XXXXXXXX"] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_code_{code}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_code_{code}/get.sh deleted file mode 100644 index ef6695b282..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_code_{code}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/discounts/code/{code}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions/post.sh deleted file mode 100644 index 0fbf33ced6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/discounts/{id}/conditions' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "operator": "in" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/delete.sh deleted file mode 100644 index cd58034500..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/discounts/{id}/conditions/{condition_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/get.sh deleted file mode 100644 index ff8521036f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/discounts/{id}/conditions/{condition_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/post.sh deleted file mode 100644 index 1041781ae4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/post.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X POST '{backend_url}/admin/discounts/{id}/conditions/{condition}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "products": [ - "prod_01G1G5V2MBA328390B5AXJ610F" - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.sh deleted file mode 100644 index 9c95cc860f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X DELETE '{backend_url}/admin/discounts/{id}/conditions/{condition_id}/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "resources": [{ "id": "item_id" }] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.sh deleted file mode 100644 index 96bbb0ec47..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/discounts/{id}/conditions/{condition_id}/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "resources": [{ "id": "item_id" }] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}/delete.sh deleted file mode 100644 index e40cbd058d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/discounts/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}/get.sh deleted file mode 100644 index ffa49d9b5f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/discounts/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}/post.sh deleted file mode 100644 index 9fc3d0c2a3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/discounts/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "code": "TEST" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_dynamic-codes/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_dynamic-codes/post.sh deleted file mode 100644 index 89cfa93dbb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_dynamic-codes/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/discounts/{id}/dynamic-codes' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "code": "TEST" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_dynamic-codes_{code}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_dynamic-codes_{code}/delete.sh deleted file mode 100644 index 0c0ca2675e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_dynamic-codes_{code}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/discounts/{id}/dynamic-codes/{code}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_regions_{region_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_regions_{region_id}/delete.sh deleted file mode 100644 index 4815509925..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_regions_{region_id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/discounts/{id}/regions/{region_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_regions_{region_id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_regions_{region_id}/post.sh deleted file mode 100644 index 9f05b8cdd7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_discounts_{id}_regions_{region_id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/discounts/{id}/regions/{region_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders/get.sh deleted file mode 100644 index 5ac625add9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/draft-orders' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders/post.sh deleted file mode 100644 index d471373f60..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders/post.sh +++ /dev/null @@ -1,17 +0,0 @@ -curl -X POST '{backend_url}/admin/draft-orders' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "region_id": "{region_id}" - "items": [ - { - "quantity": 1 - } - ], - "shipping_methods": [ - { - "option_id": "{option_id}" - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}/delete.sh deleted file mode 100644 index 2e9fb29a57..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/draft-orders/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}/get.sh deleted file mode 100644 index 2a026d9f46..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/draft-orders/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}/post.sh deleted file mode 100644 index 43ba56aa1b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/draft-orders/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_line-items/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_line-items/post.sh deleted file mode 100644 index 6eb2b1cf9f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_line-items/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/draft-orders/{id}/line-items' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "quantity": 1 -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_line-items_{line_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_line-items_{line_id}/delete.sh deleted file mode 100644 index bbd011a358..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_line-items_{line_id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/draft-orders/{id}/line-items/{line_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_line-items_{line_id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_line-items_{line_id}/post.sh deleted file mode 100644 index 59f1d272c9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_line-items_{line_id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/draft-orders/{id}/line-items/{line_id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "quantity": 1 -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_pay/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_pay/post.sh deleted file mode 100644 index 1e602565d8..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_draft-orders_{id}_pay/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/draft-orders/{id}/pay' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_fulfillment_shipping-options_{id}_rules_batch_add/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_fulfillment_shipping-options_{id}_rules_batch_add/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_fulfillment_shipping-options_{id}_rules_batch_add/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_fulfillment_shipping-options_{id}_rules_batch_add/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_fulfillment_shipping-options_{id}_rules_batch_remove/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_fulfillment_shipping-options_{id}_rules_batch_remove/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_fulfillment_shipping-options_{id}_rules_batch_remove/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_fulfillment_shipping-options_{id}_rules_batch_remove/post.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards/get.sh deleted file mode 100644 index bb56f1fd72..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/gift-cards' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards/post.sh deleted file mode 100644 index 748dd33eba..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/gift-cards' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "region_id": "{region_id}" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}/delete.sh deleted file mode 100644 index f21f681df1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/gift-cards/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}/get.sh deleted file mode 100644 index cd26e95f98..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/gift-cards/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}/post.sh deleted file mode 100644 index 8ca658c0fc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/gift-cards/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "region_id": "{region_id}" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items/get.sh index f8a62d76c6..474b73d170 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/inventory-items' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items/post.sh index 5ae5c9992a..6c92c8d0e0 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/inventory-items' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "variant_id": "variant_123", -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/delete.sh index 573a4a4078..1361e6d32f 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/inventory-items/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/get.sh index c4f3eed184..ec7499af1d 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/inventory-items/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/post.sh index 7dd99df85a..7de420fdea 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/inventory-items/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "origin_country": "US" -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels/get.sh deleted file mode 100644 index 5891447a1f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/inventory-items/{id}/location-levels' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels/post.sh index 6a2d1bb6eb..0e1ca69def 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels/post.sh @@ -2,6 +2,6 @@ curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "location_id": "sloc_123", - "stocked_quantity": 10 -}' + "location_id": "{value}", + "stocked_quantity": 1506469662949376 +}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/delete.sh index 355f165de9..d8ca96677f 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/post.sh index d5cce2b223..1487c477f9 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "stocked_quantity": 15 -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites/get.sh index 4e36b30f04..248ec00ebb 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/invites' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites/post.sh index a5b7b7ecf6..55871d44bb 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites/post.sh @@ -1,7 +1,2 @@ curl -X POST '{backend_url}/admin/invites' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "user": "user@example.com", - "role": "admin" -}' +-H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_accept/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_accept/post.sh index b44a6e70cf..6fcd4de1a5 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_accept/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_accept/post.sh @@ -2,10 +2,6 @@ curl -X POST '{backend_url}/admin/invites/accept' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "token": "{token}", - "user": { - "first_name": "Brigitte", - "last_name": "Collier", - "password": "supersecret" - } -}' + "first_name": "{value}", + "last_name": "{value}" +}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{id}/delete.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites_{id}/delete.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{id}/delete.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites_{id}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{id}/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites_{id}_resend/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{id}_resend/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_invites_{id}_resend/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{id}_resend/post.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{invite_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{invite_id}/delete.sh deleted file mode 100644 index c328268a45..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{invite_id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/invites/{invite_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{invite_id}_resend/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{invite_id}_resend/post.sh deleted file mode 100644 index 9d13d7d7da..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_invites_{invite_id}_resend/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/invites/{invite_id}/resend' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes/get.sh deleted file mode 100644 index 9f0c2dbf06..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/notes' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes/post.sh deleted file mode 100644 index 7e80dee8cd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes/post.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X POST '{backend_url}/admin/notes' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "resource_id": "{resource_id}", - "resource_type": "order", - "value": "We delivered this order" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes_{id}/delete.sh deleted file mode 100644 index 81b23e552a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/notes/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes_{id}/get.sh deleted file mode 100644 index 36eef2dc70..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/notes/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes_{id}/post.sh deleted file mode 100644 index b185e02c5c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notes_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/notes/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "value": "We delivered this order" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notifications/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notifications/get.sh deleted file mode 100644 index ef26b588a0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notifications/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/notifications' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notifications_{id}_resend/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notifications_{id}_resend/post.sh deleted file mode 100644 index 97b80dd167..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_notifications_{id}_resend/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/notifications/{id}/resend' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits/get.sh deleted file mode 100644 index 332b1cf1b8..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/order-edits' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits/post.sh deleted file mode 100644 index 3c23978ab3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits/post.sh +++ /dev/null @@ -1,4 +0,0 @@ -curl -X POST '{backend_url}/admin/order-edits' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ "order_id": "my_order_id", "internal_note": "my_optional_note" }' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}/delete.sh deleted file mode 100644 index dcc6484f17..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/order-edits/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}/get.sh deleted file mode 100644 index 97c511df23..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/order-edits/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}/post.sh deleted file mode 100644 index f113faba9c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/order-edits/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "internal_note": "internal reason XY" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_cancel/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_cancel/post.sh deleted file mode 100644 index 77e4166c0f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_cancel/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/order-edits/{id}/cancel' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_changes_{change_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_changes_{change_id}/delete.sh deleted file mode 100644 index 2db2b962f8..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_changes_{change_id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/order-edits/{id}/changes/{change_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_confirm/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_confirm/post.sh deleted file mode 100644 index a0a1f9115d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_confirm/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/order-edits/{id}/confirm' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_items/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_items/post.sh deleted file mode 100644 index 68be1ff0ea..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_items/post.sh +++ /dev/null @@ -1,4 +0,0 @@ -curl -X POST '{backend_url}/admin/order-edits/{id}/items' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ "variant_id": "variant_01G1G5V2MRX2V3PVSR2WXYPFB6", "quantity": 3 }' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_items_{item_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_items_{item_id}/delete.sh deleted file mode 100644 index 95c2d72ee3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_items_{item_id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/order-edits/{id}/items/{item_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_items_{item_id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_items_{item_id}/post.sh deleted file mode 100644 index d1f375ccee..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_items_{item_id}/post.sh +++ /dev/null @@ -1,4 +0,0 @@ -curl -X POST '{backend_url}/admin/order-edits/{id}/items/{item_id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ "quantity": 5 }' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_request/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_request/post.sh deleted file mode 100644 index e11c810ac3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_order-edits_{id}_request/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/order-edits/{id}/request' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders/get.sh deleted file mode 100644 index f51ea7beb7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/orders' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}/get.sh deleted file mode 100644 index 6c827ad807..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/orders/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}/post.sh deleted file mode 100644 index ff7417db6d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/adasda' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_archive/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_archive/post.sh deleted file mode 100644 index fb3ef5e2a9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_archive/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/archive' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_cancel/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_cancel/post.sh deleted file mode 100644 index 23103d908b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_cancel/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/cancel' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_capture/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_capture/post.sh deleted file mode 100644 index fcffdf4411..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_capture/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/capture' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims/post.sh deleted file mode 100644 index 17eea842b7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims/post.sh +++ /dev/null @@ -1,12 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/claims' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "type": "refund", - "claim_items": [ - { - "item_id": "asdsd", - "quantity": 1 - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}/post.sh deleted file mode 100644 index 73ae381da8..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/claims/{claim_id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "no_notification": true -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_cancel/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_cancel/post.sh deleted file mode 100644 index d1e48e1126..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_cancel/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/claims/{claim_id}/cancel' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_fulfillments/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_fulfillments/post.sh deleted file mode 100644 index 2a306033d2..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_fulfillments/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/claims/{claim_id}/fulfillments' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.sh deleted file mode 100644 index 104facb4b4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/claims/{claim_id}/fulfillments/{fulfillment_id}/cancel' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_shipments/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_shipments/post.sh deleted file mode 100644 index 5ffb9a6660..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_claims_{claim_id}_shipments/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/claims/{claim_id}/shipments' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "fulfillment_id": "{fulfillment_id}" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_complete/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_complete/post.sh deleted file mode 100644 index 400855b799..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_complete/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/complete' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_fulfillment/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_fulfillment/post.sh deleted file mode 100644 index bcdab2b569..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_fulfillment/post.sh +++ /dev/null @@ -1,11 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/fulfillment' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "items": [ - { - "item_id": "{item_id}", - "quantity": 1 - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.sh deleted file mode 100644 index 62ad2c466b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/fulfillments/{fulfillment_id}/cancel' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_line-items_{line_item_id}_reserve/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_line-items_{line_item_id}_reserve/post.sh deleted file mode 100644 index bf627969ee..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_line-items_{line_item_id}_reserve/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/line-items/{line_item_id}/reserve' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "location_id": "loc_1" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_refund/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_refund/post.sh deleted file mode 100644 index fd43b3d1a1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_refund/post.sh +++ /dev/null @@ -1,7 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/adasda/refund' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "amount": 1000, - "reason": "Do not like it" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_reservations/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_reservations/get.sh deleted file mode 100644 index b76237c681..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_reservations/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/orders/{id}/reservations' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_return/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_return/post.sh deleted file mode 100644 index 39ef8e0c38..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_return/post.sh +++ /dev/null @@ -1,11 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/return' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "items": [ - { - "item_id": "{item_id}", - "quantity": 1 - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_shipment/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_shipment/post.sh deleted file mode 100644 index f44e57d92e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_shipment/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/shipment' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "fulfillment_id": "{fulfillment_id}" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_shipping-methods/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_shipping-methods/post.sh deleted file mode 100644 index ac8565e992..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_shipping-methods/post.sh +++ /dev/null @@ -1,7 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/shipping-methods' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "price": 1000, - "option_id": "{option_id}" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps/post.sh deleted file mode 100644 index 8af8a7d2f9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps/post.sh +++ /dev/null @@ -1,11 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/swaps' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "return_items": [ - { - "item_id": "asfasf", - "quantity": 1 - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_cancel/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_cancel/post.sh deleted file mode 100644 index 0cb90e2cc3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_cancel/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{order_id}/swaps/{swap_id}/cancel' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.sh deleted file mode 100644 index 32d8d9a965..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/swaps/{swap_id}/fulfillments' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.sh deleted file mode 100644 index 01d7002f5d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/swaps/{swap_id}/fulfillments/{fulfillment_id}/cancel' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_process-payment/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_process-payment/post.sh deleted file mode 100644 index c80b00f108..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_process-payment/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/swaps/{swap_id}/process-payment' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_shipments/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_shipments/post.sh deleted file mode 100644 index 9a57574b1f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_shipments/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/orders/{id}/swaps/{swap_id}/shipments' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "fulfillment_id": "{fulfillment_id}" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}/delete.sh deleted file mode 100644 index b15376e7f5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/payment-collections/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}/get.sh deleted file mode 100644 index b305acdb48..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/payment-collections/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}/post.sh deleted file mode 100644 index 6b8d4f065f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/payment-collections/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "description": "Description of payment collection" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}_authorize/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}_authorize/post.sh deleted file mode 100644 index afd2656f5c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payment-collections_{id}_authorize/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/payment-collections/{id}/authorize' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_payments/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_payments/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments/get.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}/get.sh index 223c18d399..3d63a30b19 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/payments/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}_capture/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}_capture/post.sh index 02046022e7..dd1ae194e3 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}_capture/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}_capture/post.sh @@ -1,2 +1,2 @@ curl -X POST '{backend_url}/admin/payments/{id}/capture' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}_refund/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}_refund/post.sh index d09fbd2db0..fc1d105267 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}_refund/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_payments_{id}_refund/post.sh @@ -1,8 +1,2 @@ -curl -X POST '{backend_url}/admin/payments/pay_123/refund' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "amount": 1000, - "reason": "return", - "note": "Do not like it" -}' +curl -X POST '{backend_url}/admin/payments/{id}/refund' \ +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists/get.sh index 5c5666bd7d..912c4350b5 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/price-lists' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists/post.sh index e466204c45..1efe400afe 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists/post.sh @@ -2,14 +2,13 @@ curl -X POST '{backend_url}/admin/price-lists' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "name": "New Price List", - "description": "A new price list", - "type": "sale", - "prices": [ - { - "amount": 1000, - "variant_id": "afafa", - "currency_code": "eur" - } - ] -}' + "title": "{value}", + "description": "{value}", + "prices": [ + { + "currency_code": "{value}", + "amount": 1270314195484672, + "variant_id": "{value}" + } + ] +}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/delete.sh index eb8b20179f..d1e910883d 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/price-lists/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/get.sh index cc2d9cbb41..dd174647af 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/price-lists/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/post.sh index 3f9038f788..d9ac4ad542 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}/post.sh @@ -2,5 +2,11 @@ curl -X POST '{backend_url}/admin/price-lists/{id}' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "name": "New Price List" -}' + "prices": [ + { + "currency_code": "{value}", + "amount": 1670236243755008, + "variant_id": "{value}" + } + ] +}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch/delete.sh deleted file mode 100644 index a96b05ded3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch/delete.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X DELETE '{backend_url}/admin/price-lists/{id}/prices/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "price_ids": [ - "adasfa" - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch/post.sh deleted file mode 100644 index f31bf7e772..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch/post.sh +++ /dev/null @@ -1,12 +0,0 @@ -curl -X POST '{backend_url}/admin/price-lists/{id}/prices/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "prices": [ - { - "amount": 100, - "variant_id": "afasfa", - "currency_code": "eur" - } - ] -}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch_add/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch_add/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch_add/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch_add/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch_remove/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch_remove/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch_remove/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_prices_batch_remove/post.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_products/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_products/get.sh deleted file mode 100644 index 18f0bdf017..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_products/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/price-lists/{id}/products' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_products_prices_batch/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_products_prices_batch/delete.sh deleted file mode 100644 index 69ebf12650..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_products_prices_batch/delete.sh +++ /dev/null @@ -1,9 +0,0 @@ -curl -X DELETE '{backend_url}/admin/price-lists/{id}/products/prices/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "product_ids": [ - "prod_1", - "prod_2" - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_products_{product_id}_prices/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_products_{product_id}_prices/delete.sh deleted file mode 100644 index 0a5b8b9dfb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_products_{product_id}_prices/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/price-lists/{id}/products/{product_id}/prices' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_variants_{variant_id}_prices/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_variants_{variant_id}_prices/delete.sh deleted file mode 100644 index 985df46343..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-lists_{id}_variants_{variant_id}_prices/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/price-lists/{id}/variants/{variant_id}/prices' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_pricing_rule-types/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_pricing_rule-types/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_pricing_rule-types/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_pricing_rule-types/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_pricing_rule-types/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_pricing_rule-types/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_pricing_rule-types/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_pricing_rule-types/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_pricing_rule-types_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_pricing_rule-types_{id}/delete.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_pricing_rule-types_{id}/delete.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_pricing_rule-types_{id}/delete.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_pricing_rule-types_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_pricing_rule-types_{id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_pricing_rule-types_{id}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_pricing_rule-types_{id}/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_pricing_rule-types_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_pricing_rule-types_{id}/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_pricing_rule-types_{id}/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_pricing_rule-types_{id}/post.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories/get.sh deleted file mode 100644 index 207edc85f2..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/product-categories' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories/post.sh deleted file mode 100644 index fbfe2f9c44..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/product-categories' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "Skinny Jeans" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}/delete.sh deleted file mode 100644 index d0e9d413c5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/product-categories/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}/get.sh deleted file mode 100644 index 670237618e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/product-categories/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}/post.sh deleted file mode 100644 index 6fbc350da7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/product-categories/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "Skinny Jeans" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}_products_batch/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}_products_batch/delete.sh deleted file mode 100644 index fb7dcac2f0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}_products_batch/delete.sh +++ /dev/null @@ -1,10 +0,0 @@ -curl -X DELETE '{backend_url}/admin/product-categories/{id}/products/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "product_ids": [ - { - "id": "{product_id}" - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}_products_batch/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}_products_batch/post.sh deleted file mode 100644 index 69e1fc50ac..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-categories_{id}_products_batch/post.sh +++ /dev/null @@ -1,10 +0,0 @@ -curl -X POST '{backend_url}/admin/product-categories/{id}/products/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "product_ids": [ - { - "id": "{product_id}" - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-tags/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-tags/get.sh deleted file mode 100644 index 65070de39e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-tags/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/product-tags' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-types/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-types/get.sh deleted file mode 100644 index 36de9076a4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_product-types/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/product-types' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products/get.sh index ef1aa18f51..f7b343e7bc 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/products' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products/post.sh index 0785ff62c8..631af544f9 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/products' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "title": "Shirt" -}' +-H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_tag-usage/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_tag-usage/get.sh deleted file mode 100644 index 1fbeaf851c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_tag-usage/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/products/tag-usage' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_types/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_types/get.sh deleted file mode 100644 index f552b6c557..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_types/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/products/types' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/delete.sh index 4a8915f168..1f5383aa7a 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/products/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/get.sh index 9a7339e6e9..ca6c6a0a93 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/products/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/post.sh index 19aa0625c1..99441e36d4 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/products/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "title": "Size" -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_metadata/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_metadata/post.sh deleted file mode 100644 index 348fe79485..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_metadata/post.sh +++ /dev/null @@ -1,7 +0,0 @@ -curl -X POST '{backend_url}/admin/products/{id}/metadata' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "key": "test", - "value": "true" -}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options/get.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options/post.sh index 1ff59b8182..9b8dac7ef3 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/products/{id}/options' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "title": "Size" -}' +-H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/delete.sh index 247d82ab08..568d959752 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/products/{id}/options/{option_id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/get.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/post.sh index 65ff7d868d..ca930ee9af 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_options_{option_id}/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/products/{id}/options/{option_id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "title": "Size" -}' +-H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants/get.sh index c80dc17afc..c0dec3e252 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/products/{id}/variants' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants/post.sh index 51a36dac56..1315966d84 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants/post.sh @@ -1,18 +1,2 @@ curl -X POST '{backend_url}/admin/products/{id}/variants' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "title": "Color", - "prices": [ - { - "amount": 1000, - "currency_code": "eur" - } - ], - "options": [ - { - "option_id": "asdasf", - "value": "S" - } - ] -}' +-H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/delete.sh index 9b0af26e8f..6ed61d5122 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/products/{id}/variants/{variant_id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/get.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/post.sh index 0b3c7c4e46..b456242794 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_products_{id}_variants_{variant_id}/post.sh @@ -1,12 +1,2 @@ curl -X POST '{backend_url}/admin/products/{id}/variants/{variant_id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "title": "Color", - "prices": [ - { - "amount": 1000, - "currency_code": "eur" - } - ] -}' +-H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}/delete.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}/delete.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}/delete.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_buy-rules_batch_add/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_buy-rules_batch_add/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_buy-rules_batch_add/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_buy-rules_batch_add/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_buy-rules_batch_remove/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_buy-rules_batch_remove/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_buy-rules_batch_remove/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_buy-rules_batch_remove/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_add/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_add/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_add/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_add/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_remove/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_remove/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_remove/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_remove/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_update/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_update/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_update/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_rules_batch_update/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_target-rules_batch_add/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_target-rules_batch_add/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_target-rules_batch_add/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_target-rules_batch_add/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_target-rules_batch_remove/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_target-rules_batch_remove/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_promotions_{id}_target-rules_batch_remove/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_promotions_{id}_target-rules_batch_remove/post.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys/get.sh deleted file mode 100644 index 92b91ac067..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/publishable-api-keys' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys/post.sh deleted file mode 100644 index 85c0606755..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/publishable-api-keys' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "title": "Web API Key" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}/delete.sh deleted file mode 100644 index 976345ad0b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/publishable-api-key/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}/get.sh deleted file mode 100644 index 3803b076d2..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/publishable-api-keys/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}/post.sh deleted file mode 100644 index 1c44b4a50b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/publishable-api-key/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "title": "new title" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_revoke/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_revoke/post.sh deleted file mode 100644 index 75dcedaec9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_revoke/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/publishable-api-keys/{id}/revoke' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels/get.sh deleted file mode 100644 index f89eeeb94f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/publishable-api-keys/{id}/sales-channels' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels_batch/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels_batch/delete.sh deleted file mode 100644 index 27d3d34699..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels_batch/delete.sh +++ /dev/null @@ -1,10 +0,0 @@ -curl -X DELETE '{backend_url}/admin/publishable-api-keys/{id}/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "sales_channel_ids": [ - { - "id": "{sales_channel_id}" - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels_batch/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels_batch/post.sh deleted file mode 100644 index 8b28c731d1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels_batch/post.sh +++ /dev/null @@ -1,10 +0,0 @@ -curl -X POST '{backend_url}/admin/publishable-api-keys/{pak_id}/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "sales_channel_ids": [ - { - "id": "{sales_channel_id}" - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions/get.sh index 28170b5333..d867926ab3 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/regions' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions/post.sh index 8f48f0663e..5904a7d833 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions/post.sh @@ -1,17 +1,2 @@ curl -X POST '{backend_url}/admin/regions' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "Europe", - "currency_code": "eur", - "tax_rate": 0, - "payment_providers": [ - "manual" - ], - "fulfillment_providers": [ - "manual" - ], - "countries": [ - "DK" - ] -}' +-H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/delete.sh index f253132cf5..c1a1e78e1f 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/regions/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/get.sh index a2d1f9248c..abd55fc993 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/regions/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/post.sh index 8940921a55..7af660e7ef 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/regions/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "Europe" -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_countries/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_countries/post.sh deleted file mode 100644 index 3c7d397a9f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_countries/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/regions/{region_id}/countries' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "country_code": "dk" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_countries_{country_code}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_countries_{country_code}/delete.sh deleted file mode 100644 index 4ced289d00..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_countries_{country_code}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/regions/{id}/countries/{country_code}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_fulfillment-options/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_fulfillment-options/get.sh deleted file mode 100644 index 4f852b3797..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_fulfillment-options/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/regions/{id}/fulfillment-options' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_fulfillment-providers/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_fulfillment-providers/post.sh deleted file mode 100644 index 02cfb3fb8c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_fulfillment-providers/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/regions/{id}/fulfillment-providers' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "provider_id": "manual" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.sh deleted file mode 100644 index 711df029c0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/regions/{id}/fulfillment-providers/{provider_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_payment-providers/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_payment-providers/post.sh deleted file mode 100644 index 7c4f9566ba..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_payment-providers/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/regions/{id}/payment-providers' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "provider_id": "manual" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_payment-providers_{provider_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_payment-providers_{provider_id}/delete.sh deleted file mode 100644 index 018e5702f6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_regions_{id}_payment-providers_{provider_id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/regions/{id}/payment-providers/{provider_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations/get.sh deleted file mode 100644 index 207edc85f2..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/product-categories' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations/post.sh deleted file mode 100644 index 042de4fb83..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations/post.sh +++ /dev/null @@ -1,9 +0,0 @@ -curl -X POST '{backend_url}/admin/reservations' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "line_item_id": "item_123", - "location_id": "loc_123", - "inventory_item_id": "iitem_123", - "quantity": 1 -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations_{id}/delete.sh deleted file mode 100644 index 2488f33fef..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/reservations/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations_{id}/get.sh deleted file mode 100644 index 42192a64e3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/reservations/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations_{id}/post.sh deleted file mode 100644 index b3653fd068..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_reservations_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/reservations/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "quantity": 3, -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons/get.sh deleted file mode 100644 index 687c692518..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/return-reasons' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons/post.sh deleted file mode 100644 index e0d5391ae7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons/post.sh +++ /dev/null @@ -1,7 +0,0 @@ -curl -X POST '{backend_url}/admin/return-reasons' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "label": "Damaged", - "value": "damaged" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons_{id}/delete.sh deleted file mode 100644 index efcaa32065..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/return-reasons/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons_{id}/get.sh deleted file mode 100644 index 2842cceefe..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/return-reasons/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons_{id}/post.sh deleted file mode 100644 index 1948c33ac3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_return-reasons_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/return-reasons/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "label": "Damaged" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_returns/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_returns/get.sh deleted file mode 100644 index bb6d60384c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_returns/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/returns' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_returns_{id}_cancel/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_returns_{id}_cancel/post.sh deleted file mode 100644 index 61d9494c81..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_returns_{id}_cancel/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/returns/{id}/cancel' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_returns_{id}_receive/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_returns_{id}_receive/post.sh deleted file mode 100644 index 29ead24a28..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_returns_{id}_receive/post.sh +++ /dev/null @@ -1,11 +0,0 @@ -curl -X POST '{backend_url}/admin/returns/{id}/receive' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "items": [ - { - "item_id": "asafg", - "quantity": 1 - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels/get.sh index 00e664be70..3fb86e9166 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/sales-channels' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels/post.sh index 1accb0737b..3f31f0b065 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/sales-channels' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "App" -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/delete.sh index 0df659dc43..9650bf9aca 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/sales-channels/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/get.sh index 27c46009b4..b28d3e3ad8 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/sales-channels/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/post.sh index 10412d8916..9705aca3aa 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/sales-channels/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "App" -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_products_batch/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_products_batch/delete.sh deleted file mode 100644 index 5b203523bf..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_products_batch/delete.sh +++ /dev/null @@ -1,10 +0,0 @@ -curl -X DELETE '{backend_url}/admin/sales-channels/{id}/products/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "product_ids": [ - { - "id": "{product_id}" - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_products_batch/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_products_batch/post.sh deleted file mode 100644 index bec08c850f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_products_batch/post.sh +++ /dev/null @@ -1,10 +0,0 @@ -curl -X POST '{backend_url}/admin/sales-channels/{id}/products/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "product_ids": [ - { - "id": "{product_id}" - } - ] -}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels_{id}_products_batch_add/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_products_batch_add/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_sales-channels_{id}_products_batch_add/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_products_batch_add/post.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_stock-locations/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_stock-locations/delete.sh deleted file mode 100644 index 4755f4493d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_stock-locations/delete.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X DELETE '{backend_url}/admin/sales-channels/{id}/stock-locations' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "locaton_id": "loc_id" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_stock-locations/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_stock-locations/post.sh deleted file mode 100644 index 8b81e984a6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_sales-channels_{id}_stock-locations/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/sales-channels/{id}/stock-locations' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "locaton_id": "loc_123" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options/get.sh deleted file mode 100644 index 3ce957cee1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/shipping-options' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options/post.sh deleted file mode 100644 index cd13c8282c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options/post.sh +++ /dev/null @@ -1,10 +0,0 @@ -curl -X POST '{backend_url}/admin/shipping-options' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "PostFake", - "region_id": "afasf", - "provider_id": "manual", - "data": {}, - "price_type": "flat_rate" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options_{id}/delete.sh deleted file mode 100644 index 491894b189..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/shipping-options/{option_id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options_{id}/get.sh deleted file mode 100644 index 932aa9ee12..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/shipping-options/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options_{id}/post.sh deleted file mode 100644 index 9c997a445f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-options_{id}/post.sh +++ /dev/null @@ -1,11 +0,0 @@ -curl -X POST '{backend_url}/admin/shipping-options/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "requirements": [ - { - "type": "max_subtotal", - "amount": 1000 - } - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles/get.sh deleted file mode 100644 index 2a48c54230..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/shipping-profiles' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles/post.sh deleted file mode 100644 index 64742e8bfc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/shipping-profiles' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "Large Products" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles_{id}/delete.sh deleted file mode 100644 index 8e64ed85f4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles_{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/shipping-profiles/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles_{id}/get.sh deleted file mode 100644 index 39934a6044..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/shipping-profiles/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles_{id}/post.sh deleted file mode 100644 index 86894c132d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_shipping-profiles_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/shipping-profiles/{id} \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "Large Products" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations/get.sh deleted file mode 100644 index 625a0d2870..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/stock-locations' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations/post.sh index acbd4fdd9f..9e40419982 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations/post.sh @@ -2,5 +2,5 @@ curl -X POST '{backend_url}/admin/stock-locations' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "name": "App" -}' + "name": "Dorthy" +}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations_{id}/delete.sh index b4b07d584b..ad7c82955d 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations_{id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations_{id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/stock-locations/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations_{id}/get.sh index 879f424af1..27fe59d04e 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/stock-locations/{id}' \ --H 'x-medusa-access-token: {api_token}' \ +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations_{id}/post.sh deleted file mode 100644 index 52fb318a36..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stock-locations_{id}/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/stock-locations/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "Main Warehouse" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store/get.sh deleted file mode 100644 index 14f65b9760..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/store' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store/post.sh deleted file mode 100644 index befe74613d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/store' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "Medusa Store" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_currencies_{code}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_currencies_{code}/delete.sh deleted file mode 100644 index 8306e6db8d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_currencies_{code}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/admin/store/currencies/{currency_code}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_currencies_{code}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_currencies_{code}/post.sh deleted file mode 100644 index 668c240e94..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_currencies_{code}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X POST '{backend_url}/admin/store/currencies/{currency_code}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_payment-providers/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_payment-providers/get.sh deleted file mode 100644 index 75fd81ed67..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_payment-providers/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/store/payment-providers' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_tax-providers/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_tax-providers/get.sh deleted file mode 100644 index dd767f4e94..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_store_tax-providers/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/store/tax-providers' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stores/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stores/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stores/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_stores/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stores_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stores_{id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stores_{id}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_stores_{id}/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stores_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_stores_{id}/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_stores_{id}/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_stores_{id}/post.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_swaps/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_swaps/get.sh deleted file mode 100644 index 762f762ee2..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_swaps/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/swaps' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_swaps_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_swaps_{id}/get.sh deleted file mode 100644 index f83a17d4a7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_swaps_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/swaps/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates/get.sh index ff5ea08ff4..7be7a1d650 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/tax-rates' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates/post.sh index 95a69ed9c2..741f31d081 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates/post.sh @@ -2,7 +2,6 @@ curl -X POST '{backend_url}/admin/tax-rates' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "code": "TEST", - "name": "New Tax Rate", - "region_id": "{region_id}" -}' + "name": "Emilio", + "tax_region_id": "{value}" +}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/delete.sh index 282d55478d..bc3e9c0401 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/tax-rates/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/get.sh index adaf7509ad..cb8de3d3c9 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/tax-rates/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/post.sh index bf7df6af97..f85107c680 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}/post.sh @@ -1,6 +1,2 @@ curl -X POST '{backend_url}/admin/tax-rates/{id}' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "New Tax Rate" -}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_product-types_batch/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_product-types_batch/delete.sh deleted file mode 100644 index 97c7fc2522..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_product-types_batch/delete.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X DELETE '{backend_url}/admin/tax-rates/{id}/product-types/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "product_types": [ - "{product_type_id}" - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_product-types_batch/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_product-types_batch/post.sh deleted file mode 100644 index 3a4f10bbc0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_product-types_batch/post.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X POST '{backend_url}/admin/tax-rates/{id}/product-types/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "product_types": [ - "{product_type_id}" - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_products_batch/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_products_batch/delete.sh deleted file mode 100644 index 2659c52980..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_products_batch/delete.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X DELETE '{backend_url}/admin/tax-rates/{id}/products/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "products": [ - "{product_id}" - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_products_batch/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_products_batch/post.sh deleted file mode 100644 index be66fb9c81..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_products_batch/post.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X POST '{backend_url}/admin/tax-rates/{id}/products/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "products": [ - "{product_id}" - ] -}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}_rules/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_rules/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}_rules/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_rules/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}_rules_{rule_id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_rules_{rule_id}/delete.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-rates_{id}_rules_{rule_id}/delete.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_rules_{rule_id}/delete.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_shipping-options_batch/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_shipping-options_batch/delete.sh deleted file mode 100644 index 06f5896a9c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_shipping-options_batch/delete.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X DELETE '{backend_url}/admin/tax-rates/{id}/shipping-options/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "shipping_options": [ - "{shipping_option_id}" - ] -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_shipping-options_batch/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_shipping-options_batch/post.sh deleted file mode 100644 index c20c3abacb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-rates_{id}_shipping-options_batch/post.sh +++ /dev/null @@ -1,8 +0,0 @@ -curl -X POST '{backend_url}/admin/tax-rates/{id}/shipping-options/batch' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "shipping_options": [ - "{shipping_option_id}" - ] -}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-regions/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-regions/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-regions/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-regions/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-regions_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-regions_{id}/delete.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_tax-regions_{id}/delete.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-regions_{id}/delete.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads/delete.sh deleted file mode 100644 index ec2c351618..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads/delete.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X DELETE '{backend_url}/admin/uploads' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "file_key": "{file_key}" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads/post.sh deleted file mode 100644 index 665641db5b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads/post.sh +++ /dev/null @@ -1,5 +0,0 @@ -curl -X POST '{backend_url}/admin/uploads' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: image/jpeg' \ ---form 'files=@""' \ ---form 'files=@""' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads_download-url/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads_download-url/post.sh deleted file mode 100644 index 4cceb40a4f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads_download-url/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/uploads/download-url' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "file_key": "{file_key}" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads_protected/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads_protected/post.sh deleted file mode 100644 index d93d2117ec..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_uploads_protected/post.sh +++ /dev/null @@ -1,5 +0,0 @@ -curl -X POST '{backend_url}/admin/uploads/protected' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: image/jpeg' \ ---form 'files=@""' \ ---form 'files=@""' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users/get.sh index 775dc71edb..6bdef51bd1 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/users' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users/post.sh index 992cdfd30e..054dc2e9f9 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users/post.sh @@ -1,7 +1,2 @@ curl -X POST '{backend_url}/admin/users' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "password": "supersecret" -}' +-H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users_me/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_me/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_users_me/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_me/get.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_password-token/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_password-token/post.sh deleted file mode 100644 index e1eec8eccd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_password-token/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/admin/users/password-token' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_reset-password/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_reset-password/post.sh deleted file mode 100644 index 88d69803b8..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_reset-password/post.sh +++ /dev/null @@ -1,7 +0,0 @@ -curl -X POST '{backend_url}/admin/users/reset-password' \ --H 'x-medusa-access-token: {api_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "token": "supersecrettoken", - "password": "supersecret" -}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/delete.sh index f2dfc47e69..d89b51ae7b 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/delete.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/delete.sh @@ -1,2 +1,2 @@ curl -X DELETE '{backend_url}/admin/users/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/get.sh index 0a503add23..a30ecf3e5c 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/get.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/get.sh @@ -1,2 +1,2 @@ curl '{backend_url}/admin/users/{id}' \ --H 'x-medusa-access-token: {api_token}' +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/post.sh index db6e37298e..7e0ec197ef 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_users_{id}/post.sh @@ -2,5 +2,5 @@ curl -X POST '{backend_url}/admin/users/{id}' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "first_name": "Marcellus" -}' + "avatar_url": "{value}" +}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_variants/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_variants/get.sh deleted file mode 100644 index 78f30d551c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_variants/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/variants' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_variants_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_variants_{id}/get.sh deleted file mode 100644 index 7ea8950fee..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_variants_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/variants/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_variants_{id}_inventory/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_variants_{id}_inventory/get.sh deleted file mode 100644 index 48ea303a95..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_variants_{id}_inventory/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/admin/variants/{id}/inventory' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{id}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{id}/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_run/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_run/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_run/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_run/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_steps_failure/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_steps_failure/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_steps_failure/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_steps_failure/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_steps_success/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_steps_success/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_steps_success/post.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_steps_success/post.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_subscribe/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_subscribe/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_subscribe/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_subscribe/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_{transaction_id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_{transaction_id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_{transaction_id}/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_{transaction_id}/get.sh diff --git a/www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe/get.sh rename to www/apps/api-reference/specs/admin/code_samples/Shell/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe/get.sh diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_auth/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_auth/delete.tsx deleted file mode 100644 index f7e0c99715..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_auth/delete.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminDeleteSession } from "medusa-react" - -const Logout = () => { - const adminLogout = useAdminDeleteSession() - // ... - - const handleLogout = () => { - adminLogout.mutate(undefined, { - onSuccess: () => { - // user logged out. - } - }) - } - - // ... -} - -export default Logout diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_auth/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_auth/get.tsx deleted file mode 100644 index 31843ba03f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_auth/get.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from "react" -import { useAdminGetSession } from "medusa-react" - -const Profile = () => { - const { user, isLoading } = useAdminGetSession() - - return ( -
- {isLoading && Loading...} - {user && {user.email}} -
- ) -} - -export default Profile diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_auth/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_auth/post.tsx deleted file mode 100644 index d12e8e0da6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_auth/post.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminLogin } from "medusa-react" - -const Login = () => { - const adminLogin = useAdminLogin() - // ... - - const handleLogin = () => { - adminLogin.mutate({ - email: "user@example.com", - password: "supersecret", - }, { - onSuccess: ({ user }) => { - console.log(user) - } - }) - } - - // ... -} - -export default Login diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs/get.tsx deleted file mode 100644 index 649608f7aa..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs/get.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminBatchJobs } from "medusa-react" - -const BatchJobs = () => { - const { - batch_jobs, - limit, - offset, - count, - isLoading - } = useAdminBatchJobs() - - return ( -
- {isLoading && Loading...} - {batch_jobs?.length && ( -
    - {batch_jobs.map((batchJob) => ( -
  • - {batchJob.id} -
  • - ))} -
- )} -
- ) -} - -export default BatchJobs diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs/post.tsx deleted file mode 100644 index feaf488e08..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs/post.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminCreateBatchJob } from "medusa-react" - -const CreateBatchJob = () => { - const createBatchJob = useAdminCreateBatchJob() - // ... - - const handleCreateBatchJob = () => { - createBatchJob.mutate({ - type: "publish-products", - context: {}, - dry_run: true - }, { - onSuccess: ({ batch_job }) => { - console.log(batch_job) - } - }) - } - - // ... -} - -export default CreateBatchJob diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs_{id}/get.tsx deleted file mode 100644 index 8f46818fcb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs_{id}/get.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminBatchJob } from "medusa-react" - -type Props = { - batchJobId: string -} - -const BatchJob = ({ batchJobId }: Props) => { - const { batch_job, isLoading } = useAdminBatchJob(batchJobId) - - return ( -
- {isLoading && Loading...} - {batch_job && {batch_job.created_by}} -
- ) -} - -export default BatchJob diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs_{id}_cancel/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs_{id}_cancel/post.tsx deleted file mode 100644 index d64dd6a396..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs_{id}_cancel/post.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminCancelBatchJob } from "medusa-react" - -type Props = { - batchJobId: string -} - -const BatchJob = ({ batchJobId }: Props) => { - const cancelBatchJob = useAdminCancelBatchJob(batchJobId) - // ... - - const handleCancel = () => { - cancelBatchJob.mutate(undefined, { - onSuccess: ({ batch_job }) => { - console.log(batch_job) - } - }) - } - - // ... -} - -export default BatchJob diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs_{id}_confirm/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs_{id}_confirm/post.tsx deleted file mode 100644 index 10cccca092..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_batch-jobs_{id}_confirm/post.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminConfirmBatchJob } from "medusa-react" - -type Props = { - batchJobId: string -} - -const BatchJob = ({ batchJobId }: Props) => { - const confirmBatchJob = useAdminConfirmBatchJob(batchJobId) - // ... - - const handleConfirm = () => { - confirmBatchJob.mutate(undefined, { - onSuccess: ({ batch_job }) => { - console.log(batch_job) - } - }) - } - - // ... -} - -export default BatchJob diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections/get.tsx deleted file mode 100644 index 6a75994666..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminCollections } from "medusa-react" - -const Collections = () => { - const { collections, isLoading } = useAdminCollections() - - return ( -
- {isLoading && Loading...} - {collections && !collections.length && - No Product Collections - } - {collections && collections.length > 0 && ( -
    - {collections.map((collection) => ( -
  • {collection.title}
  • - ))} -
- )} -
- ) -} - -export default Collections diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections/post.tsx deleted file mode 100644 index 5a7968c237..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections/post.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminCreateCollection } from "medusa-react" - -const CreateCollection = () => { - const createCollection = useAdminCreateCollection() - // ... - - const handleCreate = (title: string) => { - createCollection.mutate({ - title - }, { - onSuccess: ({ collection }) => { - console.log(collection.id) - } - }) - } - - // ... -} - -export default CreateCollection diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}/delete.tsx deleted file mode 100644 index 13b16dd02b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}/delete.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminDeleteCollection } from "medusa-react" - -type Props = { - collectionId: string -} - -const Collection = ({ collectionId }: Props) => { - const deleteCollection = useAdminDeleteCollection(collectionId) - // ... - - const handleDelete = (title: string) => { - deleteCollection.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default Collection diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}/get.tsx deleted file mode 100644 index 97baebadfe..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}/get.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminCollection } from "medusa-react" - -type Props = { - collectionId: string -} - -const Collection = ({ collectionId }: Props) => { - const { collection, isLoading } = useAdminCollection(collectionId) - - return ( -
- {isLoading && Loading...} - {collection && {collection.title}} -
- ) -} - -export default Collection diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}/post.tsx deleted file mode 100644 index ece82e028f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminUpdateCollection } from "medusa-react" - -type Props = { - collectionId: string -} - -const Collection = ({ collectionId }: Props) => { - const updateCollection = useAdminUpdateCollection(collectionId) - // ... - - const handleUpdate = (title: string) => { - updateCollection.mutate({ - title - }, { - onSuccess: ({ collection }) => { - console.log(collection.id) - } - }) - } - - // ... -} - -export default Collection diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}_products_batch/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}_products_batch/delete.tsx deleted file mode 100644 index 96816c1793..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}_products_batch/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminRemoveProductsFromCollection } from "medusa-react" - -type Props = { - collectionId: string -} - -const Collection = ({ collectionId }: Props) => { - const removeProducts = useAdminRemoveProductsFromCollection(collectionId) - // ... - - const handleRemoveProducts = (productIds: string[]) => { - removeProducts.mutate({ - product_ids: productIds - }, { - onSuccess: ({ id, object, removed_products }) => { - console.log(removed_products) - } - }) - } - - // ... -} - -export default Collection diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}_products_batch/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}_products_batch/post.tsx deleted file mode 100644 index 4d05b2ef9f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_collections_{id}_products_batch/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminAddProductsToCollection } from "medusa-react" - -type Props = { - collectionId: string -} - -const Collection = ({ collectionId }: Props) => { - const addProducts = useAdminAddProductsToCollection(collectionId) - // ... - - const handleAddProducts = (productIds: string[]) => { - addProducts.mutate({ - product_ids: productIds - }, { - onSuccess: ({ collection }) => { - console.log(collection.products) - } - }) - } - - // ... -} - -export default Collection diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_currencies/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_currencies/get.tsx deleted file mode 100644 index 3baf56da87..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_currencies/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminCurrencies } from "medusa-react" - -const Currencies = () => { - const { currencies, isLoading } = useAdminCurrencies() - - return ( -
- {isLoading && Loading...} - {currencies && !currencies.length && ( - No Currencies - )} - {currencies && currencies.length > 0 && ( -
    - {currencies.map((currency) => ( -
  • {currency.name}
  • - ))} -
- )} -
- ) -} - -export default Currencies diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_currencies_{code}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_currencies_{code}/post.tsx deleted file mode 100644 index e15e86c718..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_currencies_{code}/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminUpdateCurrency } from "medusa-react" - -type Props = { - currencyCode: string -} - -const Currency = ({ currencyCode }: Props) => { - const updateCurrency = useAdminUpdateCurrency(currencyCode) - // ... - - const handleUpdate = (includes_tax: boolean) => { - updateCurrency.mutate({ - includes_tax, - }, { - onSuccess: ({ currency }) => { - console.log(currency) - } - }) - } - - // ... -} - -export default Currency diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups/get.tsx deleted file mode 100644 index 2fed5941eb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups/get.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { useAdminCustomerGroups } from "medusa-react" - -const CustomerGroups = () => { - const { - customer_groups, - isLoading, - } = useAdminCustomerGroups() - - return ( -
- {isLoading && Loading...} - {customer_groups && !customer_groups.length && ( - No Customer Groups - )} - {customer_groups && customer_groups.length > 0 && ( -
    - {customer_groups.map( - (customerGroup) => ( -
  • - {customerGroup.name} -
  • - ) - )} -
- )} -
- ) -} - -export default CustomerGroups diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups/post.tsx deleted file mode 100644 index caed96f9cd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups/post.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from "react" -import { useAdminCreateCustomerGroup } from "medusa-react" - -const CreateCustomerGroup = () => { - const createCustomerGroup = useAdminCreateCustomerGroup() - // ... - - const handleCreate = (name: string) => { - createCustomerGroup.mutate({ - name, - }) - } - - // ... -} - -export default CreateCustomerGroup diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}/delete.tsx deleted file mode 100644 index 2ebd8bd738..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}/delete.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminDeleteCustomerGroup } from "medusa-react" - -type Props = { - customerGroupId: string -} - -const CustomerGroup = ({ customerGroupId }: Props) => { - const deleteCustomerGroup = useAdminDeleteCustomerGroup( - customerGroupId - ) - // ... - - const handleDeleteCustomerGroup = () => { - deleteCustomerGroup.mutate() - } - - // ... -} - -export default CustomerGroup diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}/get.tsx deleted file mode 100644 index fcec5e8cc8..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}/get.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminCustomerGroup } from "medusa-react" - -type Props = { - customerGroupId: string -} - -const CustomerGroup = ({ customerGroupId }: Props) => { - const { customer_group, isLoading } = useAdminCustomerGroup( - customerGroupId - ) - - return ( -
- {isLoading && Loading...} - {customer_group && {customer_group.name}} -
- ) -} - -export default CustomerGroup diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}/post.tsx deleted file mode 100644 index a9a402f054..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}/post.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminUpdateCustomerGroup } from "medusa-react" - -type Props = { - customerGroupId: string -} - -const CustomerGroup = ({ customerGroupId }: Props) => { - const updateCustomerGroup = useAdminUpdateCustomerGroup( - customerGroupId - ) - // .. - - const handleUpdate = (name: string) => { - updateCustomerGroup.mutate({ - name, - }) - } - - // ... -} - -export default CustomerGroup diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}_customers/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}_customers/get.tsx deleted file mode 100644 index 8182bd7596..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}_customers/get.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from "react" -import { useAdminCustomerGroupCustomers } from "medusa-react" - -type Props = { - customerGroupId: string -} - -const CustomerGroup = ({ customerGroupId }: Props) => { - const { - customers, - isLoading, - } = useAdminCustomerGroupCustomers( - customerGroupId - ) - - return ( -
- {isLoading && Loading...} - {customers && !customers.length && ( - No customers - )} - {customers && customers.length > 0 && ( -
    - {customers.map((customer) => ( -
  • {customer.first_name}
  • - ))} -
- )} -
- ) -} - -export default CustomerGroup diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}_customers_batch/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}_customers_batch/delete.tsx deleted file mode 100644 index 5363f25208..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}_customers_batch/delete.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react" -import { - useAdminRemoveCustomersFromCustomerGroup, -} from "medusa-react" - -type Props = { - customerGroupId: string -} - -const CustomerGroup = ({ customerGroupId }: Props) => { - const removeCustomers = - useAdminRemoveCustomersFromCustomerGroup( - customerGroupId - ) - // ... - - const handleRemoveCustomer = (customerId: string) => { - removeCustomers.mutate({ - customer_ids: [ - { - id: customerId, - }, - ], - }) - } - - // ... -} - -export default CustomerGroup diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}_customers_batch/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}_customers_batch/post.tsx deleted file mode 100644 index 133cdb0f16..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customer-groups_{id}_customers_batch/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { - useAdminAddCustomersToCustomerGroup, -} from "medusa-react" - -type Props = { - customerGroupId: string -} - -const CustomerGroup = ({ customerGroupId }: Props) => { - const addCustomers = useAdminAddCustomersToCustomerGroup( - customerGroupId - ) - // ... - - const handleAddCustomers= (customerId: string) => { - addCustomers.mutate({ - customer_ids: [ - { - id: customerId, - }, - ], - }) - } - - // ... -} - -export default CustomerGroup diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers/get.tsx deleted file mode 100644 index ccd29cf36e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminCustomers } from "medusa-react" - -const Customers = () => { - const { customers, isLoading } = useAdminCustomers() - - return ( -
- {isLoading && Loading...} - {customers && !customers.length && ( - No customers - )} - {customers && customers.length > 0 && ( -
    - {customers.map((customer) => ( -
  • {customer.first_name}
  • - ))} -
- )} -
- ) -} - -export default Customers diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers/post.tsx deleted file mode 100644 index f211730064..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers/post.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useAdminCreateCustomer } from "medusa-react" - -type CustomerData = { - first_name: string - last_name: string - email: string - password: string -} - -const CreateCustomer = () => { - const createCustomer = useAdminCreateCustomer() - // ... - - const handleCreate = (customerData: CustomerData) => { - createCustomer.mutate(customerData, { - onSuccess: ({ customer }) => { - console.log(customer.id) - } - }) - } - - // ... -} - -export default CreateCustomer diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers_{id}/get.tsx deleted file mode 100644 index bae0acc37c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers_{id}/get.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminCustomer } from "medusa-react" - -type Props = { - customerId: string -} - -const Customer = ({ customerId }: Props) => { - const { customer, isLoading } = useAdminCustomer( - customerId - ) - - return ( -
- {isLoading && Loading...} - {customer && {customer.first_name}} -
- ) -} - -export default Customer diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers_{id}/post.tsx deleted file mode 100644 index 65783fd138..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_customers_{id}/post.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useAdminUpdateCustomer } from "medusa-react" - -type CustomerData = { - first_name: string - last_name: string - email: string - password: string -} - -type Props = { - customerId: string -} - -const Customer = ({ customerId }: Props) => { - const updateCustomer = useAdminUpdateCustomer(customerId) - // ... - - const handleUpdate = (customerData: CustomerData) => { - updateCustomer.mutate(customerData) - } - - // ... -} - -export default Customer diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts/get.tsx deleted file mode 100644 index 3f765829b5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminDiscounts } from "medusa-react" - -const Discounts = () => { - const { discounts, isLoading } = useAdminDiscounts() - - return ( -
- {isLoading && Loading...} - {discounts && !discounts.length && ( - No customers - )} - {discounts && discounts.length > 0 && ( -
    - {discounts.map((discount) => ( -
  • {discount.code}
  • - ))} -
- )} -
- ) -} - -export default Discounts diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts/post.tsx deleted file mode 100644 index 9396d9365b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts/post.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from "react" -import { - useAdminCreateDiscount, -} from "medusa-react" -import { - AllocationType, - DiscountRuleType, -} from "@medusajs/medusa" - -const CreateDiscount = () => { - const createDiscount = useAdminCreateDiscount() - // ... - - const handleCreate = ( - currencyCode: string, - regionId: string - ) => { - // ... - createDiscount.mutate({ - code: currencyCode, - rule: { - type: DiscountRuleType.FIXED, - value: 10, - allocation: AllocationType.ITEM, - }, - regions: [ - regionId, - ], - is_dynamic: false, - is_disabled: false, - }) - } - - // ... -} - -export default CreateDiscount diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_code_{code}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_code_{code}/get.tsx deleted file mode 100644 index 8fc922386c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_code_{code}/get.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminGetDiscountByCode } from "medusa-react" - -type Props = { - discountCode: string -} - -const Discount = ({ discountCode }: Props) => { - const { discount, isLoading } = useAdminGetDiscountByCode( - discountCode - ) - - return ( -
- {isLoading && Loading...} - {discount && {discount.code}} -
- ) -} - -export default Discount diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions/post.tsx deleted file mode 100644 index 302dd8800f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions/post.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react" -import { DiscountConditionOperator } from "@medusajs/medusa" -import { useAdminDiscountCreateCondition } from "medusa-react" - -type Props = { - discountId: string -} - -const Discount = ({ discountId }: Props) => { - const createCondition = useAdminDiscountCreateCondition(discountId) - // ... - - const handleCreateCondition = ( - operator: DiscountConditionOperator, - products: string[] - ) => { - createCondition.mutate({ - operator, - products - }, { - onSuccess: ({ discount }) => { - console.log(discount.id) - } - }) - } - - // ... -} - -export default Discount diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/delete.tsx deleted file mode 100644 index 92649d199e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/delete.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { - useAdminDiscountRemoveCondition -} from "medusa-react" - -type Props = { - discountId: string -} - -const Discount = ({ discountId }: Props) => { - const deleteCondition = useAdminDiscountRemoveCondition( - discountId - ) - // ... - - const handleDelete = ( - conditionId: string - ) => { - deleteCondition.mutate(conditionId, { - onSuccess: ({ id, object, deleted }) => { - console.log(deleted) - } - }) - } - - // ... -} - -export default Discount diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/get.tsx deleted file mode 100644 index fcc1761abb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/get.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { useAdminGetDiscountCondition } from "medusa-react" - -type Props = { - discountId: string - discountConditionId: string -} - -const DiscountCondition = ({ - discountId, - discountConditionId -}: Props) => { - const { - discount_condition, - isLoading - } = useAdminGetDiscountCondition( - discountId, - discountConditionId - ) - - return ( -
- {isLoading && Loading...} - {discount_condition && ( - {discount_condition.type} - )} -
- ) -} - -export default DiscountCondition diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/post.tsx deleted file mode 100644 index 5a37d9c296..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/post.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react" -import { useAdminDiscountUpdateCondition } from "medusa-react" - -type Props = { - discountId: string - conditionId: string -} - -const DiscountCondition = ({ - discountId, - conditionId -}: Props) => { - const update = useAdminDiscountUpdateCondition( - discountId, - conditionId - ) - // ... - - const handleUpdate = ( - products: string[] - ) => { - update.mutate({ - products - }, { - onSuccess: ({ discount }) => { - console.log(discount.id) - } - }) - } - - // ... -} - -export default DiscountCondition diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.tsx deleted file mode 100644 index 8a7ccea025..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React from "react" -import { - useAdminDeleteDiscountConditionResourceBatch -} from "medusa-react" - -type Props = { - discountId: string - conditionId: string -} - -const DiscountCondition = ({ - discountId, - conditionId -}: Props) => { - const deleteConditionResource = useAdminDeleteDiscountConditionResourceBatch( - discountId, - conditionId, - ) - // ... - - const handleDelete = (itemId: string) => { - deleteConditionResource.mutate({ - resources: [ - { - id: itemId - } - ] - }, { - onSuccess: ({ discount }) => { - console.log(discount.id) - } - }) - } - - // ... -} - -export default DiscountCondition diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.tsx deleted file mode 100644 index 4683656cd0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React from "react" -import { - useAdminAddDiscountConditionResourceBatch -} from "medusa-react" - -type Props = { - discountId: string - conditionId: string -} - -const DiscountCondition = ({ - discountId, - conditionId -}: Props) => { - const addConditionResources = useAdminAddDiscountConditionResourceBatch( - discountId, - conditionId - ) - // ... - - const handleAdd = (itemId: string) => { - addConditionResources.mutate({ - resources: [ - { - id: itemId - } - ] - }, { - onSuccess: ({ discount }) => { - console.log(discount.id) - } - }) - } - - // ... -} - -export default DiscountCondition diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}/delete.tsx deleted file mode 100644 index 2793d68b65..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}/delete.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from "react" -import { useAdminDeleteDiscount } from "medusa-react" - -const Discount = () => { - const deleteDiscount = useAdminDeleteDiscount(discount_id) - // ... - - const handleDelete = () => { - deleteDiscount.mutate() - } - - // ... -} - -export default Discount diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}/get.tsx deleted file mode 100644 index ecc8cb26e4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}/get.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminDiscount } from "medusa-react" - -type Props = { - discountId: string -} - -const Discount = ({ discountId }: Props) => { - const { discount, isLoading } = useAdminDiscount( - discountId - ) - - return ( -
- {isLoading && Loading...} - {discount && {discount.code}} -
- ) -} - -export default Discount diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}/post.tsx deleted file mode 100644 index 26a0b502c2..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}/post.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminUpdateDiscount } from "medusa-react" - -type Props = { - discountId: string -} - -const Discount = ({ discountId }: Props) => { - const updateDiscount = useAdminUpdateDiscount(discountId) - // ... - - const handleUpdate = (isDisabled: boolean) => { - updateDiscount.mutate({ - is_disabled: isDisabled, - }) - } - - // ... -} - -export default Discount diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_dynamic-codes/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_dynamic-codes/post.tsx deleted file mode 100644 index 2b6770b8ca..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_dynamic-codes/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminCreateDynamicDiscountCode } from "medusa-react" - -type Props = { - discountId: string -} - -const Discount = ({ discountId }: Props) => { - const createDynamicDiscount = useAdminCreateDynamicDiscountCode(discountId) - // ... - - const handleCreate = ( - code: string, - usageLimit: number - ) => { - createDynamicDiscount.mutate({ - code, - usage_limit: usageLimit - }, { - onSuccess: ({ discount }) => { - console.log(discount.is_dynamic) - } - }) - } - - // ... -} - -export default Discount diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_dynamic-codes_{code}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_dynamic-codes_{code}/delete.tsx deleted file mode 100644 index ee8a6e59d2..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_dynamic-codes_{code}/delete.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminDeleteDynamicDiscountCode } from "medusa-react" - -type Props = { - discountId: string -} - -const Discount = ({ discountId }: Props) => { - const deleteDynamicDiscount = useAdminDeleteDynamicDiscountCode(discountId) - // ... - - const handleDelete = (code: string) => { - deleteDynamicDiscount.mutate(code, { - onSuccess: ({ discount }) => { - console.log(discount.is_dynamic) - } - }) - } - - // ... -} - -export default Discount diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_regions_{region_id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_regions_{region_id}/delete.tsx deleted file mode 100644 index 417384ee94..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_regions_{region_id}/delete.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminDiscountRemoveRegion } from "medusa-react" - -type Props = { - discountId: string -} - -const Discount = ({ discountId }: Props) => { - const deleteRegion = useAdminDiscountRemoveRegion(discountId) - // ... - - const handleDelete = (regionId: string) => { - deleteRegion.mutate(regionId, { - onSuccess: ({ discount }) => { - console.log(discount.regions) - } - }) - } - - // ... -} - -export default Discount diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_regions_{region_id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_regions_{region_id}/post.tsx deleted file mode 100644 index d146c8b91a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_discounts_{id}_regions_{region_id}/post.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminDiscountAddRegion } from "medusa-react" - -type Props = { - discountId: string -} - -const Discount = ({ discountId }: Props) => { - const addRegion = useAdminDiscountAddRegion(discountId) - // ... - - const handleAdd = (regionId: string) => { - addRegion.mutate(regionId, { - onSuccess: ({ discount }) => { - console.log(discount.regions) - } - }) - } - - // ... -} - -export default Discount diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders/get.tsx deleted file mode 100644 index 9427212b0b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminDraftOrders } from "medusa-react" - -const DraftOrders = () => { - const { draft_orders, isLoading } = useAdminDraftOrders() - - return ( -
- {isLoading && Loading...} - {draft_orders && !draft_orders.length && ( - No Draft Orders - )} - {draft_orders && draft_orders.length > 0 && ( -
    - {draft_orders.map((order) => ( -
  • {order.display_id}
  • - ))} -
- )} -
- ) -} - -export default DraftOrders diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders/post.tsx deleted file mode 100644 index 74b97ed212..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders/post.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react" -import { useAdminCreateDraftOrder } from "medusa-react" - -type DraftOrderData = { - email: string - region_id: string - items: { - quantity: number, - variant_id: string - }[] - shipping_methods: { - option_id: string - price: number - }[] -} - -const CreateDraftOrder = () => { - const createDraftOrder = useAdminCreateDraftOrder() - // ... - - const handleCreate = (data: DraftOrderData) => { - createDraftOrder.mutate(data, { - onSuccess: ({ draft_order }) => { - console.log(draft_order.id) - } - }) - } - - // ... -} - -export default CreateDraftOrder diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}/delete.tsx deleted file mode 100644 index 36ef1a96bd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeleteDraftOrder } from "medusa-react" - -type Props = { - draftOrderId: string -} - -const DraftOrder = ({ draftOrderId }: Props) => { - const deleteDraftOrder = useAdminDeleteDraftOrder( - draftOrderId - ) - // ... - - const handleDelete = () => { - deleteDraftOrder.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default DraftOrder diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}/get.tsx deleted file mode 100644 index fc770501ae..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}/get.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminDraftOrder } from "medusa-react" - -type Props = { - draftOrderId: string -} - -const DraftOrder = ({ draftOrderId }: Props) => { - const { - draft_order, - isLoading, - } = useAdminDraftOrder(draftOrderId) - - return ( -
- {isLoading && Loading...} - {draft_order && {draft_order.display_id}} - -
- ) -} - -export default DraftOrder diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}/post.tsx deleted file mode 100644 index 878c466f01..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminUpdateDraftOrder } from "medusa-react" - -type Props = { - draftOrderId: string -} - -const DraftOrder = ({ draftOrderId }: Props) => { - const updateDraftOrder = useAdminUpdateDraftOrder( - draftOrderId - ) - // ... - - const handleUpdate = (email: string) => { - updateDraftOrder.mutate({ - email, - }, { - onSuccess: ({ draft_order }) => { - console.log(draft_order.id) - } - }) - } - - // ... -} - -export default DraftOrder diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_line-items/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_line-items/post.tsx deleted file mode 100644 index 149e78fea2..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_line-items/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminDraftOrderAddLineItem } from "medusa-react" - -type Props = { - draftOrderId: string -} - -const DraftOrder = ({ draftOrderId }: Props) => { - const addLineItem = useAdminDraftOrderAddLineItem( - draftOrderId - ) - // ... - - const handleAdd = (quantity: number) => { - addLineItem.mutate({ - quantity, - }, { - onSuccess: ({ draft_order }) => { - console.log(draft_order.cart) - } - }) - } - - // ... -} - -export default DraftOrder diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_line-items_{line_id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_line-items_{line_id}/delete.tsx deleted file mode 100644 index 6e4a51fdd5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_line-items_{line_id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDraftOrderRemoveLineItem } from "medusa-react" - -type Props = { - draftOrderId: string -} - -const DraftOrder = ({ draftOrderId }: Props) => { - const deleteLineItem = useAdminDraftOrderRemoveLineItem( - draftOrderId - ) - // ... - - const handleDelete = (itemId: string) => { - deleteLineItem.mutate(itemId, { - onSuccess: ({ draft_order }) => { - console.log(draft_order.cart) - } - }) - } - - // ... -} - -export default DraftOrder diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_line-items_{line_id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_line-items_{line_id}/post.tsx deleted file mode 100644 index 1f11cb9682..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_line-items_{line_id}/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminDraftOrderUpdateLineItem } from "medusa-react" - -type Props = { - draftOrderId: string -} - -const DraftOrder = ({ draftOrderId }: Props) => { - const updateLineItem = useAdminDraftOrderUpdateLineItem( - draftOrderId - ) - // ... - - const handleUpdate = ( - itemId: string, - quantity: number - ) => { - updateLineItem.mutate({ - item_id: itemId, - quantity, - }) - } - - // ... -} - -export default DraftOrder diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_pay/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_pay/post.tsx deleted file mode 100644 index fab40520d1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_draft-orders_{id}_pay/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDraftOrderRegisterPayment } from "medusa-react" - -type Props = { - draftOrderId: string -} - -const DraftOrder = ({ draftOrderId }: Props) => { - const registerPayment = useAdminDraftOrderRegisterPayment( - draftOrderId - ) - // ... - - const handlePayment = () => { - registerPayment.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.id) - } - }) - } - - // ... -} - -export default DraftOrder diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards/get.tsx deleted file mode 100644 index 851b342b81..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards/get.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { GiftCard } from "@medusajs/medusa" -import { useAdminGiftCards } from "medusa-react" - -const CustomGiftCards = () => { - const { gift_cards, isLoading } = useAdminGiftCards() - - return ( -
- {isLoading && Loading...} - {gift_cards && !gift_cards.length && ( - No custom gift cards... - )} - {gift_cards && gift_cards.length > 0 && ( -
    - {gift_cards.map((giftCard: GiftCard) => ( -
  • {giftCard.code}
  • - ))} -
- )} -
- ) -} - -export default CustomGiftCards diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards/post.tsx deleted file mode 100644 index 7f2d78dbdf..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminCreateGiftCard } from "medusa-react" - -const CreateCustomGiftCards = () => { - const createGiftCard = useAdminCreateGiftCard() - // ... - - const handleCreate = ( - regionId: string, - value: number - ) => { - createGiftCard.mutate({ - region_id: regionId, - value, - }, { - onSuccess: ({ gift_card }) => { - console.log(gift_card.id) - } - }) - } - - // ... -} - -export default CreateCustomGiftCards diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards_{id}/delete.tsx deleted file mode 100644 index 66f70ded08..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards_{id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeleteGiftCard } from "medusa-react" - -type Props = { - customGiftCardId: string -} - -const CustomGiftCard = ({ customGiftCardId }: Props) => { - const deleteGiftCard = useAdminDeleteGiftCard( - customGiftCardId - ) - // ... - - const handleDelete = () => { - deleteGiftCard.mutate(void 0, { - onSuccess: ({ id, object, deleted}) => { - console.log(id) - } - }) - } - - // ... -} - -export default CustomGiftCard diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards_{id}/get.tsx deleted file mode 100644 index 2dede57fba..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards_{id}/get.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminGiftCard } from "medusa-react" - -type Props = { - giftCardId: string -} - -const CustomGiftCard = ({ giftCardId }: Props) => { - const { gift_card, isLoading } = useAdminGiftCard(giftCardId) - - return ( -
- {isLoading && Loading...} - {gift_card && {gift_card.code}} -
- ) -} - -export default CustomGiftCard diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards_{id}/post.tsx deleted file mode 100644 index e5c22ac6be..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_gift-cards_{id}/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminUpdateGiftCard } from "medusa-react" - -type Props = { - customGiftCardId: string -} - -const CustomGiftCard = ({ customGiftCardId }: Props) => { - const updateGiftCard = useAdminUpdateGiftCard( - customGiftCardId - ) - // ... - - const handleUpdate = (regionId: string) => { - updateGiftCard.mutate({ - region_id: regionId, - }, { - onSuccess: ({ gift_card }) => { - console.log(gift_card.id) - } - }) - } - - // ... -} - -export default CustomGiftCard diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items/get.tsx deleted file mode 100644 index 4d61d3cbdc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items/get.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminInventoryItems } from "medusa-react" - -function InventoryItems() { - const { - inventory_items, - isLoading - } = useAdminInventoryItems() - - return ( -
- {isLoading && Loading...} - {inventory_items && !inventory_items.length && ( - No Items - )} - {inventory_items && inventory_items.length > 0 && ( -
    - {inventory_items.map( - (item) => ( -
  • {item.id}
  • - ) - )} -
- )} -
- ) -} - -export default InventoryItems diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items/post.tsx deleted file mode 100644 index 67781a7453..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items/post.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminCreateInventoryItem } from "medusa-react" - -const CreateInventoryItem = () => { - const createInventoryItem = useAdminCreateInventoryItem() - // ... - - const handleCreate = (variantId: string) => { - createInventoryItem.mutate({ - variant_id: variantId, - }, { - onSuccess: ({ inventory_item }) => { - console.log(inventory_item.id) - } - }) - } - - // ... -} - -export default CreateInventoryItem diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}/delete.tsx deleted file mode 100644 index 68377e3d80..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}/delete.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminDeleteInventoryItem } from "medusa-react" - -type Props = { - inventoryItemId: string -} - -const InventoryItem = ({ inventoryItemId }: Props) => { - const deleteInventoryItem = useAdminDeleteInventoryItem( - inventoryItemId - ) - // ... - - const handleDelete = () => { - deleteInventoryItem.mutate() - } - - // ... -} - -export default InventoryItem diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}/get.tsx deleted file mode 100644 index 16edab6c5a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminInventoryItem } from "medusa-react" - -type Props = { - inventoryItemId: string -} - -const InventoryItem = ({ inventoryItemId }: Props) => { - const { - inventory_item, - isLoading - } = useAdminInventoryItem(inventoryItemId) - - return ( -
- {isLoading && Loading...} - {inventory_item && ( - {inventory_item.sku} - )} -
- ) -} - -export default InventoryItem diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}/post.tsx deleted file mode 100644 index bf66bca6f0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminUpdateInventoryItem } from "medusa-react" - -type Props = { - inventoryItemId: string -} - -const InventoryItem = ({ inventoryItemId }: Props) => { - const updateInventoryItem = useAdminUpdateInventoryItem( - inventoryItemId - ) - // ... - - const handleUpdate = (origin_country: string) => { - updateInventoryItem.mutate({ - origin_country, - }, { - onSuccess: ({ inventory_item }) => { - console.log(inventory_item.origin_country) - } - }) - } - - // ... -} - -export default InventoryItem diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels/get.tsx deleted file mode 100644 index c1b037353e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels/get.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react" -import { - useAdminInventoryItemLocationLevels, -} from "medusa-react" - -type Props = { - inventoryItemId: string -} - -const InventoryItem = ({ inventoryItemId }: Props) => { - const { - inventory_item, - isLoading, - } = useAdminInventoryItemLocationLevels(inventoryItemId) - - return ( -
- {isLoading && Loading...} - {inventory_item && ( -
    - {inventory_item.location_levels.map((level) => ( - {level.stocked_quantity} - ))} -
- )} -
- ) -} - -export default InventoryItem diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels/post.tsx deleted file mode 100644 index 0eccc8b3d1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels/post.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { useAdminCreateLocationLevel } from "medusa-react" - -type Props = { - inventoryItemId: string -} - -const InventoryItem = ({ inventoryItemId }: Props) => { - const createLocationLevel = useAdminCreateLocationLevel( - inventoryItemId - ) - // ... - - const handleCreateLocationLevel = ( - locationId: string, - stockedQuantity: number - ) => { - createLocationLevel.mutate({ - location_id: locationId, - stocked_quantity: stockedQuantity, - }, { - onSuccess: ({ inventory_item }) => { - console.log(inventory_item.id) - } - }) - } - - // ... -} - -export default InventoryItem diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels_{location_id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels_{location_id}/delete.tsx deleted file mode 100644 index d7a7fa4d14..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels_{location_id}/delete.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminDeleteLocationLevel } from "medusa-react" - -type Props = { - inventoryItemId: string -} - -const InventoryItem = ({ inventoryItemId }: Props) => { - const deleteLocationLevel = useAdminDeleteLocationLevel( - inventoryItemId - ) - // ... - - const handleDelete = ( - locationId: string - ) => { - deleteLocationLevel.mutate(locationId) - } - - // ... -} - -export default InventoryItem diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels_{location_id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels_{location_id}/post.tsx deleted file mode 100644 index b5fb876374..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_inventory-items_{id}_location-levels_{location_id}/post.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { useAdminUpdateLocationLevel } from "medusa-react" - -type Props = { - inventoryItemId: string -} - -const InventoryItem = ({ inventoryItemId }: Props) => { - const updateLocationLevel = useAdminUpdateLocationLevel( - inventoryItemId - ) - // ... - - const handleUpdate = ( - stockLocationId: string, - stocked_quantity: number - ) => { - updateLocationLevel.mutate({ - stockLocationId, - stocked_quantity, - }, { - onSuccess: ({ inventory_item }) => { - console.log(inventory_item.id) - } - }) - } - - // ... -} - -export default InventoryItem diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_invites_accept/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_invites_accept/post.tsx deleted file mode 100644 index 500035e16e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_invites_accept/post.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { useAdminAcceptInvite } from "medusa-react" - -const AcceptInvite = () => { - const acceptInvite = useAdminAcceptInvite() - // ... - - const handleAccept = ( - token: string, - firstName: string, - lastName: string, - password: string - ) => { - acceptInvite.mutate({ - token, - user: { - first_name: firstName, - last_name: lastName, - password, - }, - }, { - onSuccess: () => { - // invite accepted successfully. - } - }) - } - - // ... -} - -export default AcceptInvite diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_invites_{invite_id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_invites_{invite_id}/delete.tsx deleted file mode 100644 index 14ee4edb9a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_invites_{invite_id}/delete.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminDeleteInvite } from "medusa-react" - -type Props = { - inviteId: string -} - -const DeleteInvite = ({ inviteId }: Props) => { - const deleteInvite = useAdminDeleteInvite(inviteId) - // ... - - const handleDelete = () => { - deleteInvite.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default Invite diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_invites_{invite_id}_resend/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_invites_{invite_id}_resend/post.tsx deleted file mode 100644 index 174af6336f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_invites_{invite_id}_resend/post.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminResendInvite } from "medusa-react" - -type Props = { - inviteId: string -} - -const ResendInvite = ({ inviteId }: Props) => { - const resendInvite = useAdminResendInvite(inviteId) - // ... - - const handleResend = () => { - resendInvite.mutate(void 0, { - onSuccess: () => { - // invite resent successfully - } - }) - } - - // ... -} - -export default ResendInvite diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes/get.tsx deleted file mode 100644 index 5f03be318b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminNotes } from "medusa-react" - -const Notes = () => { - const { notes, isLoading } = useAdminNotes() - - return ( -
- {isLoading && Loading...} - {notes && !notes.length && No Notes} - {notes && notes.length > 0 && ( -
    - {notes.map((note) => ( -
  • {note.resource_type}
  • - ))} -
- )} -
- ) -} - -export default Notes diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes/post.tsx deleted file mode 100644 index 373f407bd6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes/post.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminCreateNote } from "medusa-react" - -const CreateNote = () => { - const createNote = useAdminCreateNote() - // ... - - const handleCreate = () => { - createNote.mutate({ - resource_id: "order_123", - resource_type: "order", - value: "We delivered this order" - }, { - onSuccess: ({ note }) => { - console.log(note.id) - } - }) - } - - // ... -} - -export default CreateNote diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes_{id}/delete.tsx deleted file mode 100644 index 67e9e6059b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes_{id}/delete.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminDeleteNote } from "medusa-react" - -type Props = { - noteId: string -} - -const Note = ({ noteId }: Props) => { - const deleteNote = useAdminDeleteNote(noteId) - // ... - - const handleDelete = () => { - deleteNote.mutate() - } - - // ... -} - -export default Note diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes_{id}/get.tsx deleted file mode 100644 index c988865da1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes_{id}/get.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminNote } from "medusa-react" - -type Props = { - noteId: string -} - -const Note = ({ noteId }: Props) => { - const { note, isLoading } = useAdminNote(noteId) - - return ( -
- {isLoading && Loading...} - {note && {note.resource_type}} -
- ) -} - -export default Note diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes_{id}/post.tsx deleted file mode 100644 index 55e4b1c3f7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notes_{id}/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminUpdateNote } from "medusa-react" - -type Props = { - noteId: string -} - -const Note = ({ noteId }: Props) => { - const updateNote = useAdminUpdateNote(noteId) - // ... - - const handleUpdate = ( - value: string - ) => { - updateNote.mutate({ - value - }, { - onSuccess: ({ note }) => { - console.log(note.value) - } - }) - } - - // ... -} - -export default Note diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notifications/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notifications/get.tsx deleted file mode 100644 index e988c5843f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notifications/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminNotifications } from "medusa-react" - -const Notifications = () => { - const { notifications, isLoading } = useAdminNotifications() - - return ( -
- {isLoading && Loading...} - {notifications && !notifications.length && ( - No Notifications - )} - {notifications && notifications.length > 0 && ( -
    - {notifications.map((notification) => ( -
  • {notification.to}
  • - ))} -
- )} -
- ) -} - -export default Notifications diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notifications_{id}_resend/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notifications_{id}_resend/post.tsx deleted file mode 100644 index d01ccd65f4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_notifications_{id}_resend/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminResendNotification } from "medusa-react" - -type Props = { - notificationId: string -} - -const Notification = ({ notificationId }: Props) => { - const resendNotification = useAdminResendNotification( - notificationId - ) - // ... - - const handleResend = () => { - resendNotification.mutate({}, { - onSuccess: ({ notification }) => { - console.log(notification.id) - } - }) - } - - // ... -} - -export default Notification diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits/get.tsx deleted file mode 100644 index c6c7282692..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits/get.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useAdminOrderEdits } from "medusa-react" - -const OrderEdits = () => { - const { order_edits, isLoading } = useAdminOrderEdits() - - return ( -
- {isLoading && Loading...} - {order_edits && !order_edits.length && ( - No Order Edits - )} - {order_edits && order_edits.length > 0 && ( -
    - {order_edits.map((orderEdit) => ( -
  • - {orderEdit.status} -
  • - ))} -
- )} -
- ) -} - -export default OrderEdits diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits/post.tsx deleted file mode 100644 index 1d464dabb0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits/post.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from "react" -import { useAdminCreateOrderEdit } from "medusa-react" - -const CreateOrderEdit = () => { - const createOrderEdit = useAdminCreateOrderEdit() - - const handleCreateOrderEdit = (orderId: string) => { - createOrderEdit.mutate({ - order_id: orderId, - }, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.id) - } - }) - } - - // ... -} - -export default CreateOrderEdit diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}/delete.tsx deleted file mode 100644 index 1f42bc4867..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}/delete.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminDeleteOrderEdit } from "medusa-react" - -type Props = { - orderEditId: string -} - -const OrderEdit = ({ orderEditId }: Props) => { - const deleteOrderEdit = useAdminDeleteOrderEdit( - orderEditId - ) - - const handleDelete = () => { - deleteOrderEdit.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default OrderEdit diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}/get.tsx deleted file mode 100644 index 3c8030a9e0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminOrderEdit } from "medusa-react" - -type Props = { - orderEditId: string -} - -const OrderEdit = ({ orderEditId }: Props) => { - const { - order_edit, - isLoading, - } = useAdminOrderEdit(orderEditId) - - return ( -
- {isLoading && Loading...} - {order_edit && {order_edit.status}} -
- ) -} - -export default OrderEdit diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}/post.tsx deleted file mode 100644 index 9b73c3346e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}/post.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { useAdminUpdateOrderEdit } from "medusa-react" - -type Props = { - orderEditId: string -} - -const OrderEdit = ({ orderEditId }: Props) => { - const updateOrderEdit = useAdminUpdateOrderEdit( - orderEditId, - ) - - const handleUpdate = ( - internalNote: string - ) => { - updateOrderEdit.mutate({ - internal_note: internalNote - }, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.internal_note) - } - }) - } - - // ... -} - -export default OrderEdit diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_cancel/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_cancel/post.tsx deleted file mode 100644 index c612aa770a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_cancel/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { - useAdminCancelOrderEdit -} from "medusa-react" - -type Props = { - orderEditId: string -} - -const OrderEdit = ({ orderEditId }: Props) => { - const cancelOrderEdit = - useAdminCancelOrderEdit( - orderEditId - ) - - const handleCancel = () => { - cancelOrderEdit.mutate(void 0, { - onSuccess: ({ order_edit }) => { - console.log( - order_edit.id - ) - } - }) - } - - // ... -} - -export default OrderEdit diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_changes_{change_id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_changes_{change_id}/delete.tsx deleted file mode 100644 index a67c589215..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_changes_{change_id}/delete.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminDeleteOrderEditItemChange } from "medusa-react" - -type Props = { - orderEditId: string - itemChangeId: string -} - -const OrderEditItemChange = ({ - orderEditId, - itemChangeId -}: Props) => { - const deleteItemChange = useAdminDeleteOrderEditItemChange( - orderEditId, - itemChangeId - ) - - const handleDeleteItemChange = () => { - deleteItemChange.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default OrderEditItemChange diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_confirm/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_confirm/post.tsx deleted file mode 100644 index 46b0a30086..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_confirm/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminConfirmOrderEdit } from "medusa-react" - -type Props = { - orderEditId: string -} - -const OrderEdit = ({ orderEditId }: Props) => { - const confirmOrderEdit = useAdminConfirmOrderEdit( - orderEditId - ) - - const handleConfirmOrderEdit = () => { - confirmOrderEdit.mutate(void 0, { - onSuccess: ({ order_edit }) => { - console.log( - order_edit.confirmed_at, - order_edit.confirmed_by - ) - } - }) - } - - // ... -} - -export default OrderEdit diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_items/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_items/post.tsx deleted file mode 100644 index 3e8f31ff27..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_items/post.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { useAdminOrderEditAddLineItem } from "medusa-react" - -type Props = { - orderEditId: string -} - -const OrderEdit = ({ orderEditId }: Props) => { - const addLineItem = useAdminOrderEditAddLineItem( - orderEditId - ) - - const handleAddLineItem = - (quantity: number, variantId: string) => { - addLineItem.mutate({ - quantity, - variant_id: variantId, - }, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.changes) - } - }) - } - - // ... -} - -export default OrderEdit diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_items_{item_id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_items_{item_id}/delete.tsx deleted file mode 100644 index 0f30e30af7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_items_{item_id}/delete.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminOrderEditDeleteLineItem } from "medusa-react" - -type Props = { - orderEditId: string - itemId: string -} - -const OrderEditLineItem = ({ - orderEditId, - itemId -}: Props) => { - const removeLineItem = useAdminOrderEditDeleteLineItem( - orderEditId, - itemId - ) - - const handleRemoveLineItem = () => { - removeLineItem.mutate(void 0, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.changes) - } - }) - } - - // ... -} - -export default OrderEditLineItem diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_items_{item_id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_items_{item_id}/post.tsx deleted file mode 100644 index f1421ca699..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_items_{item_id}/post.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { useAdminOrderEditUpdateLineItem } from "medusa-react" - -type Props = { - orderEditId: string - itemId: string -} - -const OrderEditItemChange = ({ - orderEditId, - itemId -}: Props) => { - const updateLineItem = useAdminOrderEditUpdateLineItem( - orderEditId, - itemId - ) - - const handleUpdateLineItem = (quantity: number) => { - updateLineItem.mutate({ - quantity, - }, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.items) - } - }) - } - - // ... -} - -export default OrderEditItemChange diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_request/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_request/post.tsx deleted file mode 100644 index 23199c686f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_order-edits_{id}_request/post.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react" -import { - useAdminRequestOrderEditConfirmation, -} from "medusa-react" - -type Props = { - orderEditId: string -} - -const OrderEdit = ({ orderEditId }: Props) => { - const requestOrderConfirmation = - useAdminRequestOrderEditConfirmation( - orderEditId - ) - - const handleRequestConfirmation = () => { - requestOrderConfirmation.mutate(void 0, { - onSuccess: ({ order_edit }) => { - console.log( - order_edit.requested_at, - order_edit.requested_by - ) - } - }) - } - - // ... -} - -export default OrderEdit diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders/get.tsx deleted file mode 100644 index 8ed27a3d43..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminOrders } from "medusa-react" - -const Orders = () => { - const { orders, isLoading } = useAdminOrders() - - return ( -
- {isLoading && Loading...} - {orders && !orders.length && No Orders} - {orders && orders.length > 0 && ( -
    - {orders.map((order) => ( -
  • {order.display_id}
  • - ))} -
- )} -
- ) -} - -export default Orders diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}/get.tsx deleted file mode 100644 index 2e3fc6d4ee..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}/get.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminOrder } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const { - order, - isLoading, - } = useAdminOrder(orderId) - - return ( -
- {isLoading && Loading...} - {order && {order.display_id}} - -
- ) -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}/post.tsx deleted file mode 100644 index 72c69116d7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}/post.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { useAdminUpdateOrder } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const updateOrder = useAdminUpdateOrder( - orderId - ) - - const handleUpdate = ( - email: string - ) => { - updateOrder.mutate({ - email, - }, { - onSuccess: ({ order }) => { - console.log(order.email) - } - }) - } - - // ... -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_archive/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_archive/post.tsx deleted file mode 100644 index 3c5c67bb08..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_archive/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminArchiveOrder } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const archiveOrder = useAdminArchiveOrder( - orderId - ) - // ... - - const handleArchivingOrder = () => { - archiveOrder.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.status) - } - }) - } - - // ... -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_cancel/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_cancel/post.tsx deleted file mode 100644 index ca595e362b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_cancel/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminCancelOrder } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const cancelOrder = useAdminCancelOrder( - orderId - ) - // ... - - const handleCancel = () => { - cancelOrder.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.status) - } - }) - } - - // ... -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_capture/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_capture/post.tsx deleted file mode 100644 index 876cc12edc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_capture/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminCapturePayment } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const capturePayment = useAdminCapturePayment( - orderId - ) - // ... - - const handleCapture = () => { - capturePayment.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.status) - } - }) - } - - // ... -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims/post.tsx deleted file mode 100644 index 9ade683618..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims/post.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from "react" -import { useAdminCreateClaim } from "medusa-react" - -type Props = { - orderId: string -} - -const CreateClaim = ({ orderId }: Props) => { - -const CreateClaim = (orderId: string) => { - const createClaim = useAdminCreateClaim(orderId) - // ... - - const handleCreate = (itemId: string) => { - createClaim.mutate({ - type: "refund", - claim_items: [ - { - item_id: itemId, - quantity: 1, - }, - ], - }, { - onSuccess: ({ order }) => { - console.log(order.claims) - } - }) - } - - // ... -} - -export default CreateClaim diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}/post.tsx deleted file mode 100644 index 729861e78d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminUpdateClaim } from "medusa-react" - -type Props = { - orderId: string - claimId: string -} - -const Claim = ({ orderId, claimId }: Props) => { - const updateClaim = useAdminUpdateClaim(orderId) - // ... - - const handleUpdate = () => { - updateClaim.mutate({ - claim_id: claimId, - no_notification: false - }, { - onSuccess: ({ order }) => { - console.log(order.claims) - } - }) - } - - // ... -} - -export default Claim diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_cancel/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_cancel/post.tsx deleted file mode 100644 index 1a558f8558..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_cancel/post.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from "react" -import { useAdminCancelClaim } from "medusa-react" - -type Props = { - orderId: string - claimId: string -} - -const Claim = ({ orderId, claimId }: Props) => { - const cancelClaim = useAdminCancelClaim(orderId) - // ... - - const handleCancel = () => { - cancelClaim.mutate(claimId) - } - - // ... -} - -export default Claim diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_fulfillments/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_fulfillments/post.tsx deleted file mode 100644 index 4aa47b153a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_fulfillments/post.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useAdminFulfillClaim } from "medusa-react" - -type Props = { - orderId: string - claimId: string -} - -const Claim = ({ orderId, claimId }: Props) => { - const fulfillClaim = useAdminFulfillClaim(orderId) - // ... - - const handleFulfill = () => { - fulfillClaim.mutate({ - claim_id: claimId, - }, { - onSuccess: ({ order }) => { - console.log(order.claims) - } - }) - } - - // ... -} - -export default Claim diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.tsx deleted file mode 100644 index c1798beab1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminCancelClaimFulfillment } from "medusa-react" - -type Props = { - orderId: string - claimId: string -} - -const Claim = ({ orderId, claimId }: Props) => { - const cancelFulfillment = useAdminCancelClaimFulfillment( - orderId - ) - // ... - - const handleCancel = (fulfillmentId: string) => { - cancelFulfillment.mutate({ - claim_id: claimId, - fulfillment_id: fulfillmentId, - }, { - onSuccess: ({ order }) => { - console.log(order.claims) - } - }) - } - - // ... -} - -export default Claim diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_shipments/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_shipments/post.tsx deleted file mode 100644 index 2c87380d0e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_claims_{claim_id}_shipments/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminCreateClaimShipment } from "medusa-react" - -type Props = { - orderId: string - claimId: string -} - -const Claim = ({ orderId, claimId }: Props) => { - const createShipment = useAdminCreateClaimShipment(orderId) - // ... - - const handleCreateShipment = (fulfillmentId: string) => { - createShipment.mutate({ - claim_id: claimId, - fulfillment_id: fulfillmentId, - }, { - onSuccess: ({ order }) => { - console.log(order.claims) - } - }) - } - - // ... -} - -export default Claim diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_complete/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_complete/post.tsx deleted file mode 100644 index c2d55a22b6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_complete/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminCompleteOrder } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const completeOrder = useAdminCompleteOrder( - orderId - ) - // ... - - const handleComplete = () => { - completeOrder.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.status) - } - }) - } - - // ... -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_fulfillment/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_fulfillment/post.tsx deleted file mode 100644 index 86079002fe..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_fulfillment/post.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from "react" -import { useAdminCreateFulfillment } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const createFulfillment = useAdminCreateFulfillment( - orderId - ) - // ... - - const handleCreateFulfillment = ( - itemId: string, - quantity: number - ) => { - createFulfillment.mutate({ - items: [ - { - item_id: itemId, - quantity, - }, - ], - }, { - onSuccess: ({ order }) => { - console.log(order.fulfillments) - } - }) - } - - // ... -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.tsx deleted file mode 100644 index d0b5e6ca50..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminCancelFulfillment } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const cancelFulfillment = useAdminCancelFulfillment( - orderId - ) - // ... - - const handleCancel = ( - fulfillmentId: string - ) => { - cancelFulfillment.mutate(fulfillmentId, { - onSuccess: ({ order }) => { - console.log(order.fulfillments) - } - }) - } - - // ... -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_refund/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_refund/post.tsx deleted file mode 100644 index aaf937c4d7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_refund/post.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { useAdminRefundPayment } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const refundPayment = useAdminRefundPayment( - orderId - ) - // ... - - const handleRefund = ( - amount: number, - reason: string - ) => { - refundPayment.mutate({ - amount, - reason, - }, { - onSuccess: ({ order }) => { - console.log(order.refunds) - } - }) - } - - // ... -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_return/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_return/post.tsx deleted file mode 100644 index f6d2b40bfc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_return/post.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from "react" -import { useAdminRequestReturn } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const requestReturn = useAdminRequestReturn( - orderId - ) - // ... - - const handleRequestingReturn = ( - itemId: string, - quantity: number - ) => { - requestReturn.mutate({ - items: [ - { - item_id: itemId, - quantity - } - ] - }, { - onSuccess: ({ order }) => { - console.log(order.returns) - } - }) - } - - // ... -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_shipment/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_shipment/post.tsx deleted file mode 100644 index 6d12137790..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_shipment/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminCreateShipment } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const createShipment = useAdminCreateShipment( - orderId - ) - // ... - - const handleCreate = ( - fulfillmentId: string - ) => { - createShipment.mutate({ - fulfillment_id: fulfillmentId, - }, { - onSuccess: ({ order }) => { - console.log(order.fulfillment_status) - } - }) - } - - // ... -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_shipping-methods/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_shipping-methods/post.tsx deleted file mode 100644 index eec3471a8f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_shipping-methods/post.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { useAdminAddShippingMethod } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const addShippingMethod = useAdminAddShippingMethod( - orderId - ) - // ... - - const handleAddShippingMethod = ( - optionId: string, - price: number - ) => { - addShippingMethod.mutate({ - option_id: optionId, - price - }, { - onSuccess: ({ order }) => { - console.log(order.shipping_methods) - } - }) - } - - // ... -} - -export default Order diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps/post.tsx deleted file mode 100644 index b215d366c3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps/post.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react" -import { useAdminCreateSwap } from "medusa-react" - -type Props = { - orderId: string -} - -const CreateSwap = ({ orderId }: Props) => { - const createSwap = useAdminCreateSwap(orderId) - // ... - - const handleCreate = ( - returnItems: { - item_id: string, - quantity: number - }[] - ) => { - createSwap.mutate({ - return_items: returnItems - }, { - onSuccess: ({ order }) => { - console.log(order.swaps) - } - }) - } - - // ... -} - -export default CreateSwap diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_cancel/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_cancel/post.tsx deleted file mode 100644 index bab3da81a6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_cancel/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminCancelSwap } from "medusa-react" - -type Props = { - orderId: string, - swapId: string -} - -const Swap = ({ - orderId, - swapId -}: Props) => { - const cancelSwap = useAdminCancelSwap( - orderId - ) - // ... - - const handleCancel = () => { - cancelSwap.mutate(swapId, { - onSuccess: ({ order }) => { - console.log(order.swaps) - } - }) - } - - // ... -} - -export default Swap diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.tsx deleted file mode 100644 index 1824122ed7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { useAdminFulfillSwap } from "medusa-react" - -type Props = { - orderId: string, - swapId: string -} - -const Swap = ({ - orderId, - swapId -}: Props) => { - const fulfillSwap = useAdminFulfillSwap( - orderId - ) - // ... - - const handleFulfill = () => { - fulfillSwap.mutate({ - swap_id: swapId, - }, { - onSuccess: ({ order }) => { - console.log(order.swaps) - } - }) - } - - // ... -} - -export default Swap diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.tsx deleted file mode 100644 index a4c88c19c1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react" -import { useAdminCancelSwapFulfillment } from "medusa-react" - -type Props = { - orderId: string, - swapId: string -} - -const Swap = ({ - orderId, - swapId -}: Props) => { - const cancelFulfillment = useAdminCancelSwapFulfillment( - orderId - ) - // ... - - const handleCancelFulfillment = ( - fulfillmentId: string - ) => { - cancelFulfillment.mutate({ - swap_id: swapId, - fulfillment_id: fulfillmentId, - }) - } - - // ... -} - -export default Swap diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_process-payment/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_process-payment/post.tsx deleted file mode 100644 index 5883be9ed0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_process-payment/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminProcessSwapPayment } from "medusa-react" - -type Props = { - orderId: string, - swapId: string -} - -const Swap = ({ - orderId, - swapId -}: Props) => { - const processPayment = useAdminProcessSwapPayment( - orderId - ) - // ... - - const handleProcessPayment = () => { - processPayment.mutate(swapId, { - onSuccess: ({ order }) => { - console.log(order.swaps) - } - }) - } - - // ... -} - -export default Swap diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_shipments/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_shipments/post.tsx deleted file mode 100644 index 8a04c442d5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_shipments/post.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react" -import { useAdminCreateSwapShipment } from "medusa-react" - -type Props = { - orderId: string, - swapId: string -} - -const Swap = ({ - orderId, - swapId -}: Props) => { - const createShipment = useAdminCreateSwapShipment( - orderId - ) - // ... - - const handleCreateShipment = ( - fulfillmentId: string - ) => { - createShipment.mutate({ - swap_id: swapId, - fulfillment_id: fulfillmentId, - }, { - onSuccess: ({ order }) => { - console.log(order.swaps) - } - }) - } - - // ... -} - -export default Swap diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}/delete.tsx deleted file mode 100644 index d5254a3980..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeletePaymentCollection } from "medusa-react" - -type Props = { - paymentCollectionId: string -} - -const PaymentCollection = ({ paymentCollectionId }: Props) => { - const deleteCollection = useAdminDeletePaymentCollection( - paymentCollectionId - ) - // ... - - const handleDelete = () => { - deleteCollection.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default PaymentCollection diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}/get.tsx deleted file mode 100644 index 7da4ee3c30..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}/get.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminPaymentCollection } from "medusa-react" - -type Props = { - paymentCollectionId: string -} - -const PaymentCollection = ({ paymentCollectionId }: Props) => { - const { - payment_collection, - isLoading, - } = useAdminPaymentCollection(paymentCollectionId) - - return ( -
- {isLoading && Loading...} - {payment_collection && ( - {payment_collection.status} - )} - -
- ) -} - -export default PaymentCollection diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}/post.tsx deleted file mode 100644 index b85fd9de16..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminUpdatePaymentCollection } from "medusa-react" - -type Props = { - paymentCollectionId: string -} - -const PaymentCollection = ({ paymentCollectionId }: Props) => { - const updateCollection = useAdminUpdatePaymentCollection( - paymentCollectionId - ) - // ... - - const handleUpdate = ( - description: string - ) => { - updateCollection.mutate({ - description - }, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.description) - } - }) - } - - // ... -} - -export default PaymentCollection diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}_authorize/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}_authorize/post.tsx deleted file mode 100644 index 7603ac8445..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payment-collections_{id}_authorize/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminMarkPaymentCollectionAsAuthorized } from "medusa-react" - -type Props = { - paymentCollectionId: string -} - -const PaymentCollection = ({ paymentCollectionId }: Props) => { - const markAsAuthorized = useAdminMarkPaymentCollectionAsAuthorized( - paymentCollectionId - ) - // ... - - const handleAuthorization = () => { - markAsAuthorized.mutate(void 0, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.status) - } - }) - } - - // ... -} - -export default PaymentCollection diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payments_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payments_{id}/get.tsx deleted file mode 100644 index 3c569f2544..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payments_{id}/get.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminPayment } from "medusa-react" - -type Props = { - paymentId: string -} - -const Payment = ({ paymentId }: Props) => { - const { - payment, - isLoading, - } = useAdminPayment(paymentId) - - return ( -
- {isLoading && Loading...} - {payment && {payment.amount}} - -
- ) -} - -export default Payment diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payments_{id}_capture/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payments_{id}_capture/post.tsx deleted file mode 100644 index cff62106d3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payments_{id}_capture/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminPaymentsCapturePayment } from "medusa-react" - -type Props = { - paymentId: string -} - -const Payment = ({ paymentId }: Props) => { - const capture = useAdminPaymentsCapturePayment( - paymentId - ) - // ... - - const handleCapture = () => { - capture.mutate(void 0, { - onSuccess: ({ payment }) => { - console.log(payment.amount) - } - }) - } - - // ... -} - -export default Payment diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payments_{id}_refund/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payments_{id}_refund/post.tsx deleted file mode 100644 index 7edfbdd3ad..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_payments_{id}_refund/post.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react" -import { RefundReason } from "@medusajs/medusa" -import { useAdminPaymentsRefundPayment } from "medusa-react" - -type Props = { - paymentId: string -} - -const Payment = ({ paymentId }: Props) => { - const refund = useAdminPaymentsRefundPayment( - paymentId - ) - // ... - - const handleRefund = ( - amount: number, - reason: RefundReason, - note: string - ) => { - refund.mutate({ - amount, - reason, - note - }, { - onSuccess: ({ refund }) => { - console.log(refund.amount) - } - }) - } - - // ... -} - -export default Payment diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists/get.tsx deleted file mode 100644 index 08df213213..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminPriceLists } from "medusa-react" - -const PriceLists = () => { - const { price_lists, isLoading } = useAdminPriceLists() - - return ( -
- {isLoading && Loading...} - {price_lists && !price_lists.length && ( - No Price Lists - )} - {price_lists && price_lists.length > 0 && ( -
    - {price_lists.map((price_list) => ( -
  • {price_list.name}
  • - ))} -
- )} -
- ) -} - -export default PriceLists diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists/post.tsx deleted file mode 100644 index 8cedddf1b0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists/post.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React from "react" -import { - PriceListStatus, - PriceListType, -} from "@medusajs/medusa" -import { useAdminCreatePriceList } from "medusa-react" - -type CreateData = { - name: string - description: string - type: PriceListType - status: PriceListStatus - prices: { - amount: number - variant_id: string - currency_code: string - max_quantity: number - }[] -} - -const CreatePriceList = () => { - const createPriceList = useAdminCreatePriceList() - // ... - - const handleCreate = ( - data: CreateData - ) => { - createPriceList.mutate(data, { - onSuccess: ({ price_list }) => { - console.log(price_list.id) - } - }) - } - - // ... -} - -export default CreatePriceList diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}/delete.tsx deleted file mode 100644 index 686f0d903f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeletePriceList } from "medusa-react" - -type Props = { - priceListId: string -} - -const PriceList = ({ - priceListId -}: Props) => { - const deletePriceList = useAdminDeletePriceList(priceListId) - // ... - - const handleDelete = () => { - deletePriceList.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default PriceList diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}/get.tsx deleted file mode 100644 index 974d570134..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminPriceList } from "medusa-react" - -type Props = { - priceListId: string -} - -const PriceList = ({ - priceListId -}: Props) => { - const { - price_list, - isLoading, - } = useAdminPriceList(priceListId) - - return ( -
- {isLoading && Loading...} - {price_list && {price_list.name}} -
- ) -} - -export default PriceList diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}/post.tsx deleted file mode 100644 index 8785d4ba01..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminUpdatePriceList } from "medusa-react" - -type Props = { - priceListId: string -} - -const PriceList = ({ - priceListId -}: Props) => { - const updatePriceList = useAdminUpdatePriceList(priceListId) - // ... - - const handleUpdate = ( - endsAt: Date - ) => { - updatePriceList.mutate({ - ends_at: endsAt, - }, { - onSuccess: ({ price_list }) => { - console.log(price_list.ends_at) - } - }) - } - - // ... -} - -export default PriceList diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_prices_batch/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_prices_batch/delete.tsx deleted file mode 100644 index 62a5f91992..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_prices_batch/delete.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminDeletePriceListPrices } from "medusa-react" - -const PriceList = ( - priceListId: string -) => { - const deletePrices = useAdminDeletePriceListPrices(priceListId) - // ... - - const handleDeletePrices = (priceIds: string[]) => { - deletePrices.mutate({ - price_ids: priceIds - }, { - onSuccess: ({ ids, deleted, object }) => { - console.log(ids) - } - }) - } - - // ... -} - -export default PriceList diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_prices_batch/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_prices_batch/post.tsx deleted file mode 100644 index c2dfe55128..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_prices_batch/post.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from "react" -import { useAdminCreatePriceListPrices } from "medusa-react" - -type PriceData = { - amount: number - variant_id: string - currency_code: string -} - -type Props = { - priceListId: string -} - -const PriceList = ({ - priceListId -}: Props) => { - const addPrices = useAdminCreatePriceListPrices(priceListId) - // ... - - const handleAddPrices = (prices: PriceData[]) => { - addPrices.mutate({ - prices - }, { - onSuccess: ({ price_list }) => { - console.log(price_list.prices) - } - }) - } - - // ... -} - -export default PriceList diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_products/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_products/get.tsx deleted file mode 100644 index 0fc5109dd0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_products/get.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react" -import { useAdminPriceListProducts } from "medusa-react" - -type Props = { - priceListId: string -} - -const PriceListProducts = ({ - priceListId -}: Props) => { - const { products, isLoading } = useAdminPriceListProducts( - priceListId - ) - - return ( -
- {isLoading && Loading...} - {products && !products.length && ( - No Price Lists - )} - {products && products.length > 0 && ( -
    - {products.map((product) => ( -
  • {product.title}
  • - ))} -
- )} -
- ) -} - -export default PriceListProducts diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_products_prices_batch/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_products_prices_batch/delete.tsx deleted file mode 100644 index 70690b7a43..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_products_prices_batch/delete.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminDeletePriceListProductsPrices } from "medusa-react" - -type Props = { - priceListId: string -} - -const PriceList = ({ - priceListId -}: Props) => { - const deleteProductsPrices = useAdminDeletePriceListProductsPrices( - priceListId - ) - // ... - - const handleDeleteProductsPrices = (productIds: string[]) => { - deleteProductsPrices.mutate({ - product_ids: productIds - }, { - onSuccess: ({ ids, deleted, object }) => { - console.log(ids) - } - }) - } - - // ... -} - -export default PriceList diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_products_{product_id}_prices/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_products_{product_id}_prices/delete.tsx deleted file mode 100644 index 1192bf1113..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_products_{product_id}_prices/delete.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react" -import { - useAdminDeletePriceListProductPrices -} from "medusa-react" - -type Props = { - priceListId: string - productId: string -} - -const PriceListProduct = ({ - priceListId, - productId -}: Props) => { - const deleteProductPrices = useAdminDeletePriceListProductPrices( - priceListId, - productId - ) - // ... - - const handleDeleteProductPrices = () => { - deleteProductPrices.mutate(void 0, { - onSuccess: ({ ids, deleted, object }) => { - console.log(ids) - } - }) - } - - // ... -} - -export default PriceListProduct diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_variants_{variant_id}_prices/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_variants_{variant_id}_prices/delete.tsx deleted file mode 100644 index cfff01f247..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_price-lists_{id}_variants_{variant_id}_prices/delete.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react" -import { - useAdminDeletePriceListVariantPrices -} from "medusa-react" - -type Props = { - priceListId: string - variantId: string -} - -const PriceListVariant = ({ - priceListId, - variantId -}: Props) => { - const deleteVariantPrices = useAdminDeletePriceListVariantPrices( - priceListId, - variantId - ) - // ... - - const handleDeleteVariantPrices = () => { - deleteVariantPrices.mutate(void 0, { - onSuccess: ({ ids, deleted, object }) => { - console.log(ids) - } - }) - } - - // ... -} - -export default PriceListVariant diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories/get.tsx deleted file mode 100644 index 81310dbcd2..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories/get.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminProductCategories } from "medusa-react" - -function Categories() { - const { - product_categories, - isLoading - } = useAdminProductCategories() - - return ( -
- {isLoading && Loading...} - {product_categories && !product_categories.length && ( - No Categories - )} - {product_categories && product_categories.length > 0 && ( -
    - {product_categories.map( - (category) => ( -
  • {category.name}
  • - ) - )} -
- )} -
- ) -} - -export default Categories diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories/post.tsx deleted file mode 100644 index e1e122de25..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories/post.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminCreateProductCategory } from "medusa-react" - -const CreateCategory = () => { - const createCategory = useAdminCreateProductCategory() - // ... - - const handleCreate = ( - name: string - ) => { - createCategory.mutate({ - name, - }, { - onSuccess: ({ product_category }) => { - console.log(product_category.id) - } - }) - } - - // ... -} - -export default CreateCategory diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}/delete.tsx deleted file mode 100644 index 077e93d851..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}/delete.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminDeleteProductCategory } from "medusa-react" - -type Props = { - productCategoryId: string -} - -const Category = ({ - productCategoryId -}: Props) => { - const deleteCategory = useAdminDeleteProductCategory( - productCategoryId - ) - // ... - - const handleDelete = () => { - deleteCategory.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default Category diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}/get.tsx deleted file mode 100644 index 3365cd513c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}/get.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminProductCategory } from "medusa-react" - -type Props = { - productCategoryId: string -} - -const Category = ({ - productCategoryId -}: Props) => { - const { - product_category, - isLoading, - } = useAdminProductCategory(productCategoryId) - - return ( -
- {isLoading && Loading...} - {product_category && ( - {product_category.name} - )} - -
- ) -} - -export default Category diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}/post.tsx deleted file mode 100644 index f2ea381b87..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}/post.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { useAdminUpdateProductCategory } from "medusa-react" - -type Props = { - productCategoryId: string -} - -const Category = ({ - productCategoryId -}: Props) => { - const updateCategory = useAdminUpdateProductCategory( - productCategoryId - ) - // ... - - const handleUpdate = ( - name: string - ) => { - updateCategory.mutate({ - name, - }, { - onSuccess: ({ product_category }) => { - console.log(product_category.id) - } - }) - } - - // ... -} - -export default Category diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}_products_batch/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}_products_batch/delete.tsx deleted file mode 100644 index 485e1e0cf1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}_products_batch/delete.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from "react" -import { useAdminDeleteProductsFromCategory } from "medusa-react" - -type ProductsData = { - id: string -} - -type Props = { - productCategoryId: string -} - -const Category = ({ - productCategoryId -}: Props) => { - const deleteProducts = useAdminDeleteProductsFromCategory( - productCategoryId - ) - // ... - - const handleDeleteProducts = ( - productIds: ProductsData[] - ) => { - deleteProducts.mutate({ - product_ids: productIds - }, { - onSuccess: ({ product_category }) => { - console.log(product_category.products) - } - }) - } - - // ... -} - -export default Category diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}_products_batch/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}_products_batch/post.tsx deleted file mode 100644 index 7d2c482a78..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-categories_{id}_products_batch/post.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from "react" -import { useAdminAddProductsToCategory } from "medusa-react" - -type ProductsData = { - id: string -} - -type Props = { - productCategoryId: string -} - -const Category = ({ - productCategoryId -}: Props) => { - const addProducts = useAdminAddProductsToCategory( - productCategoryId - ) - // ... - - const handleAddProducts = ( - productIds: ProductsData[] - ) => { - addProducts.mutate({ - product_ids: productIds - }, { - onSuccess: ({ product_category }) => { - console.log(product_category.products) - } - }) - } - - // ... -} - -export default Category diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-tags/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-tags/get.tsx deleted file mode 100644 index 7d8ed91514..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-tags/get.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminProductTags } from "medusa-react" - -function ProductTags() { - const { - product_tags, - isLoading - } = useAdminProductTags() - - return ( -
- {isLoading && Loading...} - {product_tags && !product_tags.length && ( - No Product Tags - )} - {product_tags && product_tags.length > 0 && ( -
    - {product_tags.map( - (tag) => ( -
  • {tag.value}
  • - ) - )} -
- )} -
- ) -} - -export default ProductTags diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-types/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-types/get.tsx deleted file mode 100644 index a79f1f5f4b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_product-types/get.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminProductTypes } from "medusa-react" - -function ProductTypes() { - const { - product_types, - isLoading - } = useAdminProductTypes() - - return ( -
- {isLoading && Loading...} - {product_types && !product_types.length && ( - No Product Tags - )} - {product_types && product_types.length > 0 && ( -
    - {product_types.map( - (type) => ( -
  • {type.value}
  • - ) - )} -
- )} -
- ) -} - -export default ProductTypes diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products/get.tsx deleted file mode 100644 index abbb3931e5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminProducts } from "medusa-react" - -const Products = () => { - const { products, isLoading } = useAdminProducts() - - return ( -
- {isLoading && Loading...} - {products && !products.length && No Products} - {products && products.length > 0 && ( -
    - {products.map((product) => ( -
  • {product.title}
  • - ))} -
- )} -
- ) -} - -export default Products diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products/post.tsx deleted file mode 100644 index 34face10ca..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products/post.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import React from "react" -import { useAdminCreateProduct } from "medusa-react" - -type CreateProductData = { - title: string - is_giftcard: boolean - discountable: boolean - options: { - title: string - }[] - variants: { - title: string - prices: { - amount: number - currency_code :string - }[] - options: { - value: string - }[] - }[], - collection_id: string - categories: { - id: string - }[] - type: { - value: string - } - tags: { - value: string - }[] -} - -const CreateProduct = () => { - const createProduct = useAdminCreateProduct() - // ... - - const handleCreate = (productData: CreateProductData) => { - createProduct.mutate(productData, { - onSuccess: ({ product }) => { - console.log(product.id) - } - }) - } - - // ... -} - -export default CreateProduct diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_tag-usage/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_tag-usage/get.tsx deleted file mode 100644 index 6e78d16038..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_tag-usage/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminProductTagUsage } from "medusa-react" - -const ProductTags = (productId: string) => { - const { tags, isLoading } = useAdminProductTagUsage() - - return ( -
- {isLoading && Loading...} - {tags && !tags.length && No Product Tags} - {tags && tags.length > 0 && ( -
    - {tags.map((tag) => ( -
  • {tag.value} - {tag.usage_count}
  • - ))} -
- )} -
- ) -} - -export default ProductTags diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}/delete.tsx deleted file mode 100644 index 9c0e33c183..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeleteProduct } from "medusa-react" - -type Props = { - productId: string -} - -const Product = ({ productId }: Props) => { - const deleteProduct = useAdminDeleteProduct( - productId - ) - // ... - - const handleDelete = () => { - deleteProduct.mutate(void 0, { - onSuccess: ({ id, object, deleted}) => { - console.log(id) - } - }) - } - - // ... -} - -export default Product diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}/get.tsx deleted file mode 100644 index bc2a0dde7f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}/get.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminProduct } from "medusa-react" - -type Props = { - productId: string -} - -const Product = ({ productId }: Props) => { - const { - product, - isLoading, - } = useAdminProduct(productId) - - return ( -
- {isLoading && Loading...} - {product && {product.title}} - -
- ) -} - -export default Product diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}/post.tsx deleted file mode 100644 index 46d9c6df85..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminUpdateProduct } from "medusa-react" - -type Props = { - productId: string -} - -const Product = ({ productId }: Props) => { - const updateProduct = useAdminUpdateProduct( - productId - ) - // ... - - const handleUpdate = ( - title: string - ) => { - updateProduct.mutate({ - title, - }, { - onSuccess: ({ product }) => { - console.log(product.id) - } - }) - } - - // ... -} - -export default Product diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_options/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_options/post.tsx deleted file mode 100644 index 2d8dd027d5..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_options/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminCreateProductOption } from "medusa-react" - -type Props = { - productId: string -} - -const CreateProductOption = ({ productId }: Props) => { - const createOption = useAdminCreateProductOption( - productId - ) - // ... - - const handleCreate = ( - title: string - ) => { - createOption.mutate({ - title - }, { - onSuccess: ({ product }) => { - console.log(product.options) - } - }) - } - - // ... -} - -export default CreateProductOption diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_options_{option_id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_options_{option_id}/delete.tsx deleted file mode 100644 index e217920631..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_options_{option_id}/delete.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminDeleteProductOption } from "medusa-react" - -type Props = { - productId: string - optionId: string -} - -const ProductOption = ({ - productId, - optionId -}: Props) => { - const deleteOption = useAdminDeleteProductOption( - productId - ) - // ... - - const handleDelete = () => { - deleteOption.mutate(optionId, { - onSuccess: ({ option_id, object, deleted, product }) => { - console.log(product.options) - } - }) - } - - // ... -} - -export default ProductOption diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_options_{option_id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_options_{option_id}/post.tsx deleted file mode 100644 index 0b0cdc0ba6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_options_{option_id}/post.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react" -import { useAdminUpdateProductOption } from "medusa-react" - -type Props = { - productId: string - optionId: string -} - -const ProductOption = ({ - productId, - optionId -}: Props) => { - const updateOption = useAdminUpdateProductOption( - productId - ) - // ... - - const handleUpdate = ( - title: string - ) => { - updateOption.mutate({ - option_id: optionId, - title, - }, { - onSuccess: ({ product }) => { - console.log(product.options) - } - }) - } - - // ... -} - -export default ProductOption diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_variants/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_variants/post.tsx deleted file mode 100644 index 621e790976..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_variants/post.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import React from "react" -import { useAdminCreateVariant } from "medusa-react" - -type CreateVariantData = { - title: string - prices: { - amount: number - currency_code: string - }[] - options: { - option_id: string - value: string - }[] -} - -type Props = { - productId: string -} - -const CreateProductVariant = ({ productId }: Props) => { - const createVariant = useAdminCreateVariant( - productId - ) - // ... - - const handleCreate = ( - variantData: CreateVariantData - ) => { - createVariant.mutate(variantData, { - onSuccess: ({ product }) => { - console.log(product.variants) - } - }) - } - - // ... -} - -export default CreateProductVariant diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_variants_{variant_id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_variants_{variant_id}/delete.tsx deleted file mode 100644 index 612709ea74..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_variants_{variant_id}/delete.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminDeleteVariant } from "medusa-react" - -type Props = { - productId: string - variantId: string -} - -const ProductVariant = ({ - productId, - variantId -}: Props) => { - const deleteVariant = useAdminDeleteVariant( - productId - ) - // ... - - const handleDelete = () => { - deleteVariant.mutate(variantId, { - onSuccess: ({ variant_id, object, deleted, product }) => { - console.log(product.variants) - } - }) - } - - // ... -} - -export default ProductVariant diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_variants_{variant_id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_variants_{variant_id}/post.tsx deleted file mode 100644 index 7b5836c76e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_products_{id}_variants_{variant_id}/post.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react" -import { useAdminUpdateVariant } from "medusa-react" - -type Props = { - productId: string - variantId: string -} - -const ProductVariant = ({ - productId, - variantId -}: Props) => { - const updateVariant = useAdminUpdateVariant( - productId - ) - // ... - - const handleUpdate = (title: string) => { - updateVariant.mutate({ - variant_id: variantId, - title, - }, { - onSuccess: ({ product }) => { - console.log(product.variants) - } - }) - } - - // ... -} - -export default ProductVariant diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys/get.tsx deleted file mode 100644 index 5f4fe624e6..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys/get.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { PublishableApiKey } from "@medusajs/medusa" -import { useAdminPublishableApiKeys } from "medusa-react" - -const PublishableApiKeys = () => { - const { publishable_api_keys, isLoading } = - useAdminPublishableApiKeys() - - return ( -
- {isLoading && Loading...} - {publishable_api_keys && !publishable_api_keys.length && ( - No Publishable API Keys - )} - {publishable_api_keys && - publishable_api_keys.length > 0 && ( -
    - {publishable_api_keys.map( - (publishableApiKey: PublishableApiKey) => ( -
  • - {publishableApiKey.title} -
  • - ) - )} -
- )} -
- ) -} - -export default PublishableApiKeys diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys/post.tsx deleted file mode 100644 index 3733c4d15b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys/post.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminCreatePublishableApiKey } from "medusa-react" - -const CreatePublishableApiKey = () => { - const createKey = useAdminCreatePublishableApiKey() - // ... - - const handleCreate = (title: string) => { - createKey.mutate({ - title, - }, { - onSuccess: ({ publishable_api_key }) => { - console.log(publishable_api_key.id) - } - }) - } - - // ... -} - -export default CreatePublishableApiKey diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}/delete.tsx deleted file mode 100644 index e97ecae6e3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}/delete.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminDeletePublishableApiKey } from "medusa-react" - -type Props = { - publishableApiKeyId: string -} - -const PublishableApiKey = ({ - publishableApiKeyId -}: Props) => { - const deleteKey = useAdminDeletePublishableApiKey( - publishableApiKeyId - ) - // ... - - const handleDelete = () => { - deleteKey.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default PublishableApiKey diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}/get.tsx deleted file mode 100644 index 28a349f11a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}/get.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { - useAdminPublishableApiKey, -} from "medusa-react" - -type Props = { - publishableApiKeyId: string -} - -const PublishableApiKey = ({ - publishableApiKeyId -}: Props) => { - const { publishable_api_key, isLoading } = - useAdminPublishableApiKey( - publishableApiKeyId - ) - - - return ( -
- {isLoading && Loading...} - {publishable_api_key && {publishable_api_key.title}} -
- ) -} - -export default PublishableApiKey diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}/post.tsx deleted file mode 100644 index 960ab908cd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminUpdatePublishableApiKey } from "medusa-react" - -type Props = { - publishableApiKeyId: string -} - -const PublishableApiKey = ({ - publishableApiKeyId -}: Props) => { - const updateKey = useAdminUpdatePublishableApiKey( - publishableApiKeyId - ) - // ... - - const handleUpdate = (title: string) => { - updateKey.mutate({ - title, - }, { - onSuccess: ({ publishable_api_key }) => { - console.log(publishable_api_key.id) - } - }) - } - - // ... -} - -export default PublishableApiKey diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_revoke/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_revoke/post.tsx deleted file mode 100644 index 50badc614d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_revoke/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminRevokePublishableApiKey } from "medusa-react" - -type Props = { - publishableApiKeyId: string -} - -const PublishableApiKey = ({ - publishableApiKeyId -}: Props) => { - const revokeKey = useAdminRevokePublishableApiKey( - publishableApiKeyId - ) - // ... - - const handleRevoke = () => { - revokeKey.mutate(void 0, { - onSuccess: ({ publishable_api_key }) => { - console.log(publishable_api_key.revoked_at) - } - }) - } - - // ... -} - -export default PublishableApiKey diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels/get.tsx deleted file mode 100644 index 09bf34ac3b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels/get.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from "react" -import { - useAdminPublishableApiKeySalesChannels, -} from "medusa-react" - -type Props = { - publishableApiKeyId: string -} - -const SalesChannels = ({ - publishableApiKeyId -}: Props) => { - const { sales_channels, isLoading } = - useAdminPublishableApiKeySalesChannels( - publishableApiKeyId - ) - - return ( -
- {isLoading && Loading...} - {sales_channels && !sales_channels.length && ( - No Sales Channels - )} - {sales_channels && sales_channels.length > 0 && ( -
    - {sales_channels.map((salesChannel) => ( -
  • {salesChannel.name}
  • - ))} -
- )} -
- ) -} - -export default SalesChannels diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels_batch/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels_batch/delete.tsx deleted file mode 100644 index 80fbd5bd51..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels_batch/delete.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from "react" -import { - useAdminRemovePublishableKeySalesChannelsBatch, -} from "medusa-react" - -type Props = { - publishableApiKeyId: string -} - -const PublishableApiKey = ({ - publishableApiKeyId -}: Props) => { - const deleteSalesChannels = - useAdminRemovePublishableKeySalesChannelsBatch( - publishableApiKeyId - ) - // ... - - const handleDelete = (salesChannelId: string) => { - deleteSalesChannels.mutate({ - sales_channel_ids: [ - { - id: salesChannelId, - }, - ], - }, { - onSuccess: ({ publishable_api_key }) => { - console.log(publishable_api_key.id) - } - }) - } - - // ... -} - -export default PublishableApiKey diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels_batch/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels_batch/post.tsx deleted file mode 100644 index 30f70c3221..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels_batch/post.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from "react" -import { - useAdminAddPublishableKeySalesChannelsBatch, -} from "medusa-react" - -type Props = { - publishableApiKeyId: string -} - -const PublishableApiKey = ({ - publishableApiKeyId -}: Props) => { - const addSalesChannels = - useAdminAddPublishableKeySalesChannelsBatch( - publishableApiKeyId - ) - // ... - - const handleAdd = (salesChannelId: string) => { - addSalesChannels.mutate({ - sales_channel_ids: [ - { - id: salesChannelId, - }, - ], - }, { - onSuccess: ({ publishable_api_key }) => { - console.log(publishable_api_key.id) - } - }) - } - - // ... -} - -export default PublishableApiKey diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions/get.tsx deleted file mode 100644 index d3047a14e0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminRegions } from "medusa-react" - -const Regions = () => { - const { regions, isLoading } = useAdminRegions() - - return ( -
- {isLoading && Loading...} - {regions && !regions.length && No Regions} - {regions && regions.length > 0 && ( -
    - {regions.map((region) => ( -
  • {region.name}
  • - ))} -
- )} -
- ) -} - -export default Regions diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions/post.tsx deleted file mode 100644 index 0065cce82e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions/post.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { useAdminCreateRegion } from "medusa-react" - -type CreateData = { - name: string - currency_code: string - tax_rate: number - payment_providers: string[] - fulfillment_providers: string[] - countries: string[] -} - -const CreateRegion = () => { - const createRegion = useAdminCreateRegion() - // ... - - const handleCreate = (regionData: CreateData) => { - createRegion.mutate(regionData, { - onSuccess: ({ region }) => { - console.log(region.id) - } - }) - } - - // ... -} - -export default CreateRegion diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}/delete.tsx deleted file mode 100644 index e8ae2847bf..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeleteRegion } from "medusa-react" - -type Props = { - regionId: string -} - -const Region = ({ - regionId -}: Props) => { - const deleteRegion = useAdminDeleteRegion(regionId) - // ... - - const handleDelete = () => { - deleteRegion.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default Region diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}/get.tsx deleted file mode 100644 index 8bdd82b381..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}/get.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminRegion } from "medusa-react" - -type Props = { - regionId: string -} - -const Region = ({ - regionId -}: Props) => { - const { region, isLoading } = useAdminRegion( - regionId - ) - - return ( -
- {isLoading && Loading...} - {region && {region.name}} -
- ) -} - -export default Region diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}/post.tsx deleted file mode 100644 index 5c38751f89..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminUpdateRegion } from "medusa-react" - -type Props = { - regionId: string -} - -const Region = ({ - regionId -}: Props) => { - const updateRegion = useAdminUpdateRegion(regionId) - // ... - - const handleUpdate = ( - countries: string[] - ) => { - updateRegion.mutate({ - countries, - }, { - onSuccess: ({ region }) => { - console.log(region.id) - } - }) - } - - // ... -} - -export default Region diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_countries/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_countries/post.tsx deleted file mode 100644 index 8028fe26da..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_countries/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminRegionAddCountry } from "medusa-react" - -type Props = { - regionId: string -} - -const Region = ({ - regionId -}: Props) => { - const addCountry = useAdminRegionAddCountry(regionId) - // ... - - const handleAddCountry = ( - countryCode: string - ) => { - addCountry.mutate({ - country_code: countryCode - }, { - onSuccess: ({ region }) => { - console.log(region.countries) - } - }) - } - - // ... -} - -export default Region diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_countries_{country_code}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_countries_{country_code}/delete.tsx deleted file mode 100644 index 00fb391759..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_countries_{country_code}/delete.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminRegionRemoveCountry } from "medusa-react" - -type Props = { - regionId: string -} - -const Region = ({ - regionId -}: Props) => { - const removeCountry = useAdminRegionRemoveCountry(regionId) - // ... - - const handleRemoveCountry = ( - countryCode: string - ) => { - removeCountry.mutate(countryCode, { - onSuccess: ({ region }) => { - console.log(region.countries) - } - }) - } - - // ... -} - -export default Region diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_fulfillment-options/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_fulfillment-options/get.tsx deleted file mode 100644 index fd365e0a1d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_fulfillment-options/get.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React from "react" -import { useAdminRegionFulfillmentOptions } from "medusa-react" - -type Props = { - regionId: string -} - -const Region = ({ - regionId -}: Props) => { - const { - fulfillment_options, - isLoading - } = useAdminRegionFulfillmentOptions( - regionId - ) - - return ( -
- {isLoading && Loading...} - {fulfillment_options && !fulfillment_options.length && ( - No Regions - )} - {fulfillment_options && - fulfillment_options.length > 0 && ( -
    - {fulfillment_options.map((option) => ( -
  • - {option.provider_id} -
  • - ))} -
- )} -
- ) -} - -export default Region diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_fulfillment-providers/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_fulfillment-providers/post.tsx deleted file mode 100644 index 5d7b0e8048..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_fulfillment-providers/post.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react" -import { - useAdminRegionAddFulfillmentProvider -} from "medusa-react" - -type Props = { - regionId: string -} - -const Region = ({ - regionId -}: Props) => { - const addFulfillmentProvider = - useAdminRegionAddFulfillmentProvider(regionId) - // ... - - const handleAddFulfillmentProvider = ( - providerId: string - ) => { - addFulfillmentProvider.mutate({ - provider_id: providerId - }, { - onSuccess: ({ region }) => { - console.log(region.fulfillment_providers) - } - }) - } - - // ... -} - -export default Region diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.tsx deleted file mode 100644 index cd91f16ce1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react" -import { - useAdminRegionDeleteFulfillmentProvider -} from "medusa-react" - -type Props = { - regionId: string -} - -const Region = ({ - regionId -}: Props) => { - const removeFulfillmentProvider = - useAdminRegionDeleteFulfillmentProvider(regionId) - // ... - - const handleRemoveFulfillmentProvider = ( - providerId: string - ) => { - removeFulfillmentProvider.mutate(providerId, { - onSuccess: ({ region }) => { - console.log(region.fulfillment_providers) - } - }) - } - - // ... -} - -export default Region diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_payment-providers/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_payment-providers/post.tsx deleted file mode 100644 index aeff48d3cb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_payment-providers/post.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react" -import { - useAdminRegionAddPaymentProvider -} from "medusa-react" - -type Props = { - regionId: string -} - -const Region = ({ - regionId -}: Props) => { - const addPaymentProvider = - useAdminRegionAddPaymentProvider(regionId) - // ... - - const handleAddPaymentProvider = ( - providerId: string - ) => { - addPaymentProvider.mutate({ - provider_id: providerId - }, { - onSuccess: ({ region }) => { - console.log(region.payment_providers) - } - }) - } - - // ... -} - -export default Region diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_payment-providers_{provider_id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_payment-providers_{provider_id}/delete.tsx deleted file mode 100644 index 82cb654e6f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_regions_{id}_payment-providers_{provider_id}/delete.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react" -import { - useAdminRegionDeletePaymentProvider -} from "medusa-react" - -type Props = { - regionId: string -} - -const Region = ({ - regionId -}: Props) => { - const removePaymentProvider = - useAdminRegionDeletePaymentProvider(regionId) - // ... - - const handleRemovePaymentProvider = ( - providerId: string - ) => { - removePaymentProvider.mutate(providerId, { - onSuccess: ({ region }) => { - console.log(region.payment_providers) - } - }) - } - - // ... -} - -export default Region diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations/get.tsx deleted file mode 100644 index 7448c95be9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminReservations } from "medusa-react" - -const Reservations = () => { - const { reservations, isLoading } = useAdminReservations() - - return ( -
- {isLoading && Loading...} - {reservations && !reservations.length && ( - No Reservations - )} - {reservations && reservations.length > 0 && ( -
    - {reservations.map((reservation) => ( -
  • {reservation.quantity}
  • - ))} -
- )} -
- ) -} - -export default Reservations diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations/post.tsx deleted file mode 100644 index 89ea01a6f7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminCreateReservation } from "medusa-react" - -const CreateReservation = () => { - const createReservation = useAdminCreateReservation() - // ... - - const handleCreate = ( - locationId: string, - inventoryItemId: string, - quantity: number - ) => { - createReservation.mutate({ - location_id: locationId, - inventory_item_id: inventoryItemId, - quantity, - }, { - onSuccess: ({ reservation }) => { - console.log(reservation.id) - } - }) - } - - // ... -} - -export default CreateReservation diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations_{id}/delete.tsx deleted file mode 100644 index e4d2d7c875..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations_{id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeleteReservation } from "medusa-react" - -type Props = { - reservationId: string -} - -const Reservation = ({ reservationId }: Props) => { - const deleteReservation = useAdminDeleteReservation( - reservationId - ) - // ... - - const handleDelete = () => { - deleteReservation.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default Reservation diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations_{id}/get.tsx deleted file mode 100644 index 147be76c2c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations_{id}/get.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminReservation } from "medusa-react" - -type Props = { - reservationId: string -} - -const Reservation = ({ reservationId }: Props) => { - const { reservation, isLoading } = useAdminReservation( - reservationId - ) - - return ( -
- {isLoading && Loading...} - {reservation && {reservation.inventory_item_id}} -
- ) -} - -export default Reservation diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations_{id}/post.tsx deleted file mode 100644 index ab1c6fe4b9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_reservations_{id}/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminUpdateReservation } from "medusa-react" - -type Props = { - reservationId: string -} - -const Reservation = ({ reservationId }: Props) => { - const updateReservation = useAdminUpdateReservation( - reservationId - ) - // ... - - const handleUpdate = ( - quantity: number - ) => { - updateReservation.mutate({ - quantity, - }) - } - - // ... -} - -export default Reservation diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons/get.tsx deleted file mode 100644 index 3088c65f2e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons/get.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useAdminReturnReasons } from "medusa-react" - -const ReturnReasons = () => { - const { return_reasons, isLoading } = useAdminReturnReasons() - - return ( -
- {isLoading && Loading...} - {return_reasons && !return_reasons.length && ( - No Return Reasons - )} - {return_reasons && return_reasons.length > 0 && ( -
    - {return_reasons.map((reason) => ( -
  • - {reason.label}: {reason.value} -
  • - ))} -
- )} -
- ) -} - -export default ReturnReasons diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons/post.tsx deleted file mode 100644 index af1bfcf79b..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminCreateReturnReason } from "medusa-react" - -const CreateReturnReason = () => { - const createReturnReason = useAdminCreateReturnReason() - // ... - - const handleCreate = ( - label: string, - value: string - ) => { - createReturnReason.mutate({ - label, - value, - }, { - onSuccess: ({ return_reason }) => { - console.log(return_reason.id) - } - }) - } - - // ... -} - -export default CreateReturnReason diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons_{id}/delete.tsx deleted file mode 100644 index 1ed77fb20f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons_{id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeleteReturnReason } from "medusa-react" - -type Props = { - returnReasonId: string -} - -const ReturnReason = ({ returnReasonId }: Props) => { - const deleteReturnReason = useAdminDeleteReturnReason( - returnReasonId - ) - // ... - - const handleDelete = () => { - deleteReturnReason.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default ReturnReason diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons_{id}/get.tsx deleted file mode 100644 index 71cdc32ddb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons_{id}/get.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminReturnReason } from "medusa-react" - -type Props = { - returnReasonId: string -} - -const ReturnReason = ({ returnReasonId }: Props) => { - const { return_reason, isLoading } = useAdminReturnReason( - returnReasonId - ) - - return ( -
- {isLoading && Loading...} - {return_reason && {return_reason.label}} -
- ) -} - -export default ReturnReason diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons_{id}/post.tsx deleted file mode 100644 index a5ab7d0b37..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_return-reasons_{id}/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminUpdateReturnReason } from "medusa-react" - -type Props = { - returnReasonId: string -} - -const ReturnReason = ({ returnReasonId }: Props) => { - const updateReturnReason = useAdminUpdateReturnReason( - returnReasonId - ) - // ... - - const handleUpdate = ( - label: string - ) => { - updateReturnReason.mutate({ - label, - }, { - onSuccess: ({ return_reason }) => { - console.log(return_reason.label) - } - }) - } - - // ... -} - -export default ReturnReason diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_returns/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_returns/get.tsx deleted file mode 100644 index 41bb4764c1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_returns/get.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useAdminReturns } from "medusa-react" - -const Returns = () => { - const { returns, isLoading } = useAdminReturns() - - return ( -
- {isLoading && Loading...} - {returns && !returns.length && ( - No Returns - )} - {returns && returns.length > 0 && ( -
    - {returns.map((returnData) => ( -
  • - {returnData.status} -
  • - ))} -
- )} -
- ) -} - -export default Returns diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_returns_{id}_cancel/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_returns_{id}_cancel/post.tsx deleted file mode 100644 index bf03bebab3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_returns_{id}_cancel/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminCancelReturn } from "medusa-react" - -type Props = { - returnId: string -} - -const Return = ({ returnId }: Props) => { - const cancelReturn = useAdminCancelReturn( - returnId - ) - // ... - - const handleCancel = () => { - cancelReturn.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.returns) - } - }) - } - - // ... -} - -export default Return diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_returns_{id}_receive/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_returns_{id}_receive/post.tsx deleted file mode 100644 index b05170456d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_returns_{id}_receive/post.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react" -import { useAdminReceiveReturn } from "medusa-react" - -type ReceiveReturnData = { - items: { - item_id: string - quantity: number - }[] -} - -type Props = { - returnId: string -} - -const Return = ({ returnId }: Props) => { - const receiveReturn = useAdminReceiveReturn( - returnId - ) - // ... - - const handleReceive = (data: ReceiveReturnData) => { - receiveReturn.mutate(data, { - onSuccess: ({ return: dataReturn }) => { - console.log(dataReturn.status) - } - }) - } - - // ... -} - -export default Return diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels/get.tsx deleted file mode 100644 index 0a5cffdeb9..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminSalesChannels } from "medusa-react" - -const SalesChannels = () => { - const { sales_channels, isLoading } = useAdminSalesChannels() - - return ( -
- {isLoading && Loading...} - {sales_channels && !sales_channels.length && ( - No Sales Channels - )} - {sales_channels && sales_channels.length > 0 && ( -
    - {sales_channels.map((salesChannel) => ( -
  • {salesChannel.name}
  • - ))} -
- )} -
- ) -} - -export default SalesChannels diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels/post.tsx deleted file mode 100644 index 0106d99fcc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels/post.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminCreateSalesChannel } from "medusa-react" - -const CreateSalesChannel = () => { - const createSalesChannel = useAdminCreateSalesChannel() - // ... - - const handleCreate = (name: string, description: string) => { - createSalesChannel.mutate({ - name, - description, - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.id) - } - }) - } - - // ... -} - -export default CreateSalesChannel diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}/delete.tsx deleted file mode 100644 index 398356218d..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeleteSalesChannel } from "medusa-react" - -type Props = { - salesChannelId: string -} - -const SalesChannel = ({ salesChannelId }: Props) => { - const deleteSalesChannel = useAdminDeleteSalesChannel( - salesChannelId - ) - // ... - - const handleDelete = () => { - deleteSalesChannel.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default SalesChannel diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}/get.tsx deleted file mode 100644 index 0542f868df..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminSalesChannel } from "medusa-react" - -type Props = { - salesChannelId: string -} - -const SalesChannel = ({ salesChannelId }: Props) => { - const { - sales_channel, - isLoading, - } = useAdminSalesChannel(salesChannelId) - - return ( -
- {isLoading && Loading...} - {sales_channel && {sales_channel.name}} -
- ) -} - -export default SalesChannel diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}/post.tsx deleted file mode 100644 index 7ee5357ffa..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminUpdateSalesChannel } from "medusa-react" - -type Props = { - salesChannelId: string -} - -const SalesChannel = ({ salesChannelId }: Props) => { - const updateSalesChannel = useAdminUpdateSalesChannel( - salesChannelId - ) - // ... - - const handleUpdate = ( - is_disabled: boolean - ) => { - updateSalesChannel.mutate({ - is_disabled, - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.is_disabled) - } - }) - } - - // ... -} - -export default SalesChannel diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_products_batch/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_products_batch/delete.tsx deleted file mode 100644 index 7c852970ba..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_products_batch/delete.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from "react" -import { - useAdminDeleteProductsFromSalesChannel, -} from "medusa-react" - -type Props = { - salesChannelId: string -} - -const SalesChannel = ({ salesChannelId }: Props) => { - const deleteProducts = useAdminDeleteProductsFromSalesChannel( - salesChannelId - ) - // ... - - const handleDeleteProducts = (productId: string) => { - deleteProducts.mutate({ - product_ids: [ - { - id: productId, - }, - ], - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.id) - } - }) - } - - // ... -} - -export default SalesChannel diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_products_batch/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_products_batch/post.tsx deleted file mode 100644 index 6ad37b2b70..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_products_batch/post.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { useAdminAddProductsToSalesChannel } from "medusa-react" - -type Props = { - salesChannelId: string -} - -const SalesChannel = ({ salesChannelId }: Props) => { - const addProducts = useAdminAddProductsToSalesChannel( - salesChannelId - ) - // ... - - const handleAddProducts = (productId: string) => { - addProducts.mutate({ - product_ids: [ - { - id: productId, - }, - ], - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.id) - } - }) - } - - // ... -} - -export default SalesChannel diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_stock-locations/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_stock-locations/delete.tsx deleted file mode 100644 index e748372153..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_stock-locations/delete.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { - useAdminRemoveLocationFromSalesChannel -} from "medusa-react" - -type Props = { - salesChannelId: string -} - -const SalesChannel = ({ salesChannelId }: Props) => { - const removeLocation = useAdminRemoveLocationFromSalesChannel() - // ... - - const handleRemoveLocation = (locationId: string) => { - removeLocation.mutate({ - sales_channel_id: salesChannelId, - location_id: locationId - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.locations) - } - }) - } - - // ... -} - -export default SalesChannel diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_stock-locations/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_stock-locations/post.tsx deleted file mode 100644 index 51e42aff45..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_sales-channels_{id}_stock-locations/post.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { - useAdminAddLocationToSalesChannel -} from "medusa-react" - -type Props = { - salesChannelId: string -} - -const SalesChannel = ({ salesChannelId }: Props) => { - const addLocation = useAdminAddLocationToSalesChannel() - // ... - - const handleAddLocation = (locationId: string) => { - addLocation.mutate({ - sales_channel_id: salesChannelId, - location_id: locationId - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.locations) - } - }) - } - - // ... -} - -export default SalesChannel diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options/get.tsx deleted file mode 100644 index 585f65b6da..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options/get.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminShippingOptions } from "medusa-react" - -const ShippingOptions = () => { - const { - shipping_options, - isLoading - } = useAdminShippingOptions() - - return ( -
- {isLoading && Loading...} - {shipping_options && !shipping_options.length && ( - No Shipping Options - )} - {shipping_options && shipping_options.length > 0 && ( -
    - {shipping_options.map((option) => ( -
  • {option.name}
  • - ))} -
- )} -
- ) -} - -export default ShippingOptions diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options/post.tsx deleted file mode 100644 index 160e1b2c08..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options/post.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from "react" -import { useAdminCreateShippingOption } from "medusa-react" - -type CreateShippingOption = { - name: string - provider_id: string - data: Record - price_type: string - amount: number -} - -type Props = { - regionId: string -} - -const Region = ({ regionId }: Props) => { - const createShippingOption = useAdminCreateShippingOption() - // ... - - const handleCreate = ( - data: CreateShippingOption - ) => { - createShippingOption.mutate({ - ...data, - region_id: regionId - }, { - onSuccess: ({ shipping_option }) => { - console.log(shipping_option.id) - } - }) - } - - // ... -} - -export default Region diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options_{id}/delete.tsx deleted file mode 100644 index 28dcb6dc24..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options_{id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeleteShippingOption } from "medusa-react" - -type Props = { - shippingOptionId: string -} - -const ShippingOption = ({ shippingOptionId }: Props) => { - const deleteShippingOption = useAdminDeleteShippingOption( - shippingOptionId - ) - // ... - - const handleDelete = () => { - deleteShippingOption.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default ShippingOption diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options_{id}/get.tsx deleted file mode 100644 index 78698ccd79..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options_{id}/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminShippingOption } from "medusa-react" - -type Props = { - shippingOptionId: string -} - -const ShippingOption = ({ shippingOptionId }: Props) => { - const { - shipping_option, - isLoading - } = useAdminShippingOption( - shippingOptionId - ) - - return ( -
- {isLoading && Loading...} - {shipping_option && {shipping_option.name}} -
- ) -} - -export default ShippingOption diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options_{id}/post.tsx deleted file mode 100644 index ec6ecbc981..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-options_{id}/post.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from "react" -import { useAdminUpdateShippingOption } from "medusa-react" - -type Props = { - shippingOptionId: string -} - -const ShippingOption = ({ shippingOptionId }: Props) => { - const updateShippingOption = useAdminUpdateShippingOption( - shippingOptionId - ) - // ... - - const handleUpdate = ( - name: string, - requirements: { - id: string, - type: string, - amount: number - }[] - ) => { - updateShippingOption.mutate({ - name, - requirements - }, { - onSuccess: ({ shipping_option }) => { - console.log(shipping_option.requirements) - } - }) - } - - // ... -} - -export default ShippingOption diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles/get.tsx deleted file mode 100644 index be8e493635..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles/get.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminShippingProfiles } from "medusa-react" - -const ShippingProfiles = () => { - const { - shipping_profiles, - isLoading - } = useAdminShippingProfiles() - - return ( -
- {isLoading && Loading...} - {shipping_profiles && !shipping_profiles.length && ( - No Shipping Profiles - )} - {shipping_profiles && shipping_profiles.length > 0 && ( -
    - {shipping_profiles.map((profile) => ( -
  • {profile.name}
  • - ))} -
- )} -
- ) -} - -export default ShippingProfiles diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles/post.tsx deleted file mode 100644 index 48364cad28..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles/post.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { ShippingProfileType } from "@medusajs/medusa" -import { useAdminCreateShippingProfile } from "medusa-react" - -const CreateShippingProfile = () => { - const createShippingProfile = useAdminCreateShippingProfile() - // ... - - const handleCreate = ( - name: string, - type: ShippingProfileType - ) => { - createShippingProfile.mutate({ - name, - type - }, { - onSuccess: ({ shipping_profile }) => { - console.log(shipping_profile.id) - } - }) - } - - // ... -} - -export default CreateShippingProfile diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles_{id}/delete.tsx deleted file mode 100644 index a71e310ebc..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles_{id}/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeleteShippingProfile } from "medusa-react" - -type Props = { - shippingProfileId: string -} - -const ShippingProfile = ({ shippingProfileId }: Props) => { - const deleteShippingProfile = useAdminDeleteShippingProfile( - shippingProfileId - ) - // ... - - const handleDelete = () => { - deleteShippingProfile.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default ShippingProfile diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles_{id}/get.tsx deleted file mode 100644 index c5ef864b18..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles_{id}/get.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useAdminShippingProfile } from "medusa-react" - -type Props = { - shippingProfileId: string -} - -const ShippingProfile = ({ shippingProfileId }: Props) => { - const { - shipping_profile, - isLoading - } = useAdminShippingProfile( - shippingProfileId - ) - - return ( -
- {isLoading && Loading...} - {shipping_profile && ( - {shipping_profile.name} - )} -
- ) -} - -export default ShippingProfile diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles_{id}/post.tsx deleted file mode 100644 index 7404dac87c..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_shipping-profiles_{id}/post.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react" -import { ShippingProfileType } from "@medusajs/medusa" -import { useAdminUpdateShippingProfile } from "medusa-react" - -type Props = { - shippingProfileId: string -} - -const ShippingProfile = ({ shippingProfileId }: Props) => { - const updateShippingProfile = useAdminUpdateShippingProfile( - shippingProfileId - ) - // ... - - const handleUpdate = ( - name: string, - type: ShippingProfileType - ) => { - updateShippingProfile.mutate({ - name, - type - }, { - onSuccess: ({ shipping_profile }) => { - console.log(shipping_profile.name) - } - }) - } - - // ... -} - -export default ShippingProfile diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations/get.tsx deleted file mode 100644 index 95dbf88b30..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations/get.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminStockLocations } from "medusa-react" - -function StockLocations() { - const { - stock_locations, - isLoading - } = useAdminStockLocations() - - return ( -
- {isLoading && Loading...} - {stock_locations && !stock_locations.length && ( - No Locations - )} - {stock_locations && stock_locations.length > 0 && ( -
    - {stock_locations.map( - (location) => ( -
  • {location.name}
  • - ) - )} -
- )} -
- ) -} - -export default StockLocations diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations/post.tsx deleted file mode 100644 index 188fd7cc29..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations/post.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminCreateStockLocation } from "medusa-react" - -const CreateStockLocation = () => { - const createStockLocation = useAdminCreateStockLocation() - // ... - - const handleCreate = (name: string) => { - createStockLocation.mutate({ - name, - }, { - onSuccess: ({ stock_location }) => { - console.log(stock_location.id) - } - }) - } - - // ... -} - -export default CreateStockLocation diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations_{id}/delete.tsx deleted file mode 100644 index 7112587081..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations_{id}/delete.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminDeleteStockLocation } from "medusa-react" - -type Props = { - stockLocationId: string -} - -const StockLocation = ({ stockLocationId }: Props) => { - const deleteLocation = useAdminDeleteStockLocation( - stockLocationId - ) - // ... - - const handleDelete = () => { - deleteLocation.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } -} - -export default StockLocation diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations_{id}/get.tsx deleted file mode 100644 index 5e225b37ff..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations_{id}/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminStockLocation } from "medusa-react" - -type Props = { - stockLocationId: string -} - -const StockLocation = ({ stockLocationId }: Props) => { - const { - stock_location, - isLoading - } = useAdminStockLocation(stockLocationId) - - return ( -
- {isLoading && Loading...} - {stock_location && ( - {stock_location.name} - )} -
- ) -} - -export default StockLocation diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations_{id}/post.tsx deleted file mode 100644 index e4d62322bb..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_stock-locations_{id}/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminUpdateStockLocation } from "medusa-react" - -type Props = { - stockLocationId: string -} - -const StockLocation = ({ stockLocationId }: Props) => { - const updateLocation = useAdminUpdateStockLocation( - stockLocationId - ) - // ... - - const handleUpdate = ( - name: string - ) => { - updateLocation.mutate({ - name - }, { - onSuccess: ({ stock_location }) => { - console.log(stock_location.name) - } - }) - } -} - -export default StockLocation diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store/get.tsx deleted file mode 100644 index c2004792f3..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store/get.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from "react" -import { useAdminStore } from "medusa-react" - -const Store = () => { - const { - store, - isLoading - } = useAdminStore() - - return ( -
- {isLoading && Loading...} - {store && {store.name}} -
- ) -} - -export default Store diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store/post.tsx deleted file mode 100644 index 50f7b3d49a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store/post.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminUpdateStore } from "medusa-react" - -function Store() { - const updateStore = useAdminUpdateStore() - // ... - - const handleUpdate = ( - name: string - ) => { - updateStore.mutate({ - name - }, { - onSuccess: ({ store }) => { - console.log(store.name) - } - }) - } -} - -export default Store diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_currencies_{code}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_currencies_{code}/delete.tsx deleted file mode 100644 index bfb3914d67..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_currencies_{code}/delete.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminDeleteStoreCurrency } from "medusa-react" - -const Store = () => { - const deleteCurrency = useAdminDeleteStoreCurrency() - // ... - - const handleAdd = (code: string) => { - deleteCurrency.mutate(code, { - onSuccess: ({ store }) => { - console.log(store.currencies) - } - }) - } - - // ... -} - -export default Store diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_currencies_{code}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_currencies_{code}/post.tsx deleted file mode 100644 index c4a586f2c1..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_currencies_{code}/post.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminAddStoreCurrency } from "medusa-react" - -const Store = () => { - const addCurrency = useAdminAddStoreCurrency() - // ... - - const handleAdd = (code: string) => { - addCurrency.mutate(code, { - onSuccess: ({ store }) => { - console.log(store.currencies) - } - }) - } - - // ... -} - -export default Store diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_payment-providers/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_payment-providers/get.tsx deleted file mode 100644 index 48c4d20924..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_payment-providers/get.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { useAdminStorePaymentProviders } from "medusa-react" - -const PaymentProviders = () => { - const { - payment_providers, - isLoading - } = useAdminStorePaymentProviders() - - return ( -
- {isLoading && Loading...} - {payment_providers && !payment_providers.length && ( - No Payment Providers - )} - {payment_providers && - payment_providers.length > 0 &&( -
    - {payment_providers.map((provider) => ( -
  • {provider.id}
  • - ))} -
- )} -
- ) -} - -export default PaymentProviders diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_tax-providers/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_tax-providers/get.tsx deleted file mode 100644 index b0214ad1cd..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_store_tax-providers/get.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { useAdminStoreTaxProviders } from "medusa-react" - -const TaxProviders = () => { - const { - tax_providers, - isLoading - } = useAdminStoreTaxProviders() - - return ( -
- {isLoading && Loading...} - {tax_providers && !tax_providers.length && ( - No Tax Providers - )} - {tax_providers && - tax_providers.length > 0 &&( -
    - {tax_providers.map((provider) => ( -
  • {provider.id}
  • - ))} -
- )} -
- ) -} - -export default TaxProviders diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_swaps/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_swaps/get.tsx deleted file mode 100644 index 9e297a8823..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_swaps/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminSwaps } from "medusa-react" - -const Swaps = () => { - const { swaps, isLoading } = useAdminSwaps() - - return ( -
- {isLoading && Loading...} - {swaps && !swaps.length && No Swaps} - {swaps && swaps.length > 0 && ( -
    - {swaps.map((swap) => ( -
  • {swap.payment_status}
  • - ))} -
- )} -
- ) -} - -export default Swaps diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_swaps_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_swaps_{id}/get.tsx deleted file mode 100644 index 85f72480f7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_swaps_{id}/get.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminSwap } from "medusa-react" - -type Props = { - swapId: string -} - -const Swap = ({ swapId }: Props) => { - const { swap, isLoading } = useAdminSwap(swapId) - - return ( -
- {isLoading && Loading...} - {swap && {swap.id}} -
- ) -} - -export default Swap diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates/get.tsx deleted file mode 100644 index a82ad7feb7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates/get.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminTaxRates } from "medusa-react" - -const TaxRates = () => { - const { - tax_rates, - isLoading - } = useAdminTaxRates() - - return ( -
- {isLoading && Loading...} - {tax_rates && !tax_rates.length && ( - No Tax Rates - )} - {tax_rates && tax_rates.length > 0 && ( -
    - {tax_rates.map((tax_rate) => ( -
  • {tax_rate.code}
  • - ))} -
- )} -
- ) -} - -export default TaxRates diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates/post.tsx deleted file mode 100644 index 595cf119b0..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates/post.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react" -import { useAdminCreateTaxRate } from "medusa-react" - -type Props = { - regionId: string -} - -const CreateTaxRate = ({ regionId }: Props) => { - const createTaxRate = useAdminCreateTaxRate() - // ... - - const handleCreate = ( - code: string, - name: string, - rate: number - ) => { - createTaxRate.mutate({ - code, - name, - region_id: regionId, - rate, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.id) - } - }) - } - - // ... -} - -export default CreateTaxRate diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}/delete.tsx deleted file mode 100644 index 25a4bc4bdf..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}/delete.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminDeleteTaxRate } from "medusa-react" - -type Props = { - taxRateId: string -} - -const TaxRate = ({ taxRateId }: Props) => { - const deleteTaxRate = useAdminDeleteTaxRate(taxRateId) - // ... - - const handleDelete = () => { - deleteTaxRate.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default TaxRate diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}/get.tsx deleted file mode 100644 index eea6f92e61..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}/get.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminTaxRate } from "medusa-react" - -type Props = { - taxRateId: string -} - -const TaxRate = ({ taxRateId }: Props) => { - const { tax_rate, isLoading } = useAdminTaxRate(taxRateId) - - return ( -
- {isLoading && Loading...} - {tax_rate && {tax_rate.code}} -
- ) -} - -export default TaxRate diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}/post.tsx deleted file mode 100644 index 2265bbd448..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminUpdateTaxRate } from "medusa-react" - -type Props = { - taxRateId: string -} - -const TaxRate = ({ taxRateId }: Props) => { - const updateTaxRate = useAdminUpdateTaxRate(taxRateId) - // ... - - const handleUpdate = ( - name: string - ) => { - updateTaxRate.mutate({ - name - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.name) - } - }) - } - - // ... -} - -export default TaxRate diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_product-types_batch/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_product-types_batch/delete.tsx deleted file mode 100644 index bc4cdd19a7..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_product-types_batch/delete.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { - useAdminDeleteProductTypeTaxRates, -} from "medusa-react" - -type Props = { - taxRateId: string -} - -const TaxRate = ({ taxRateId }: Props) => { - const removeProductTypes = useAdminDeleteProductTypeTaxRates( - taxRateId - ) - // ... - - const handleRemoveProductTypes = ( - productTypeIds: string[] - ) => { - removeProductTypes.mutate({ - product_types: productTypeIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.product_types) - } - }) - } - - // ... -} - -export default TaxRate diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_product-types_batch/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_product-types_batch/post.tsx deleted file mode 100644 index b398eb8e9e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_product-types_batch/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { - useAdminCreateProductTypeTaxRates, -} from "medusa-react" - -type Props = { - taxRateId: string -} - -const TaxRate = ({ taxRateId }: Props) => { - const addProductTypes = useAdminCreateProductTypeTaxRates( - taxRateId - ) - // ... - - const handleAddProductTypes = (productTypeIds: string[]) => { - addProductTypes.mutate({ - product_types: productTypeIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.product_types) - } - }) - } - - // ... -} - -export default TaxRate diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_products_batch/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_products_batch/delete.tsx deleted file mode 100644 index d55af26d43..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_products_batch/delete.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminDeleteProductTaxRates } from "medusa-react" - -type Props = { - taxRateId: string -} - -const TaxRate = ({ taxRateId }: Props) => { - const removeProduct = useAdminDeleteProductTaxRates(taxRateId) - // ... - - const handleRemoveProduct = (productIds: string[]) => { - removeProduct.mutate({ - products: productIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.products) - } - }) - } - - // ... -} - -export default TaxRate diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_products_batch/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_products_batch/post.tsx deleted file mode 100644 index cb5ad79c49..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_products_batch/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminCreateProductTaxRates } from "medusa-react" - -type Props = { - taxRateId: string -} - -const TaxRate = ({ taxRateId }: Props) => { - const addProduct = useAdminCreateProductTaxRates(taxRateId) - // ... - - const handleAddProduct = (productIds: string[]) => { - addProduct.mutate({ - products: productIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.products) - } - }) - } - - // ... -} - -export default TaxRate diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_shipping-options_batch/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_shipping-options_batch/delete.tsx deleted file mode 100644 index 087c23976a..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_shipping-options_batch/delete.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminDeleteShippingTaxRates } from "medusa-react" - -type Props = { - taxRateId: string -} - -const TaxRate = ({ taxRateId }: Props) => { - const removeShippingOptions = useAdminDeleteShippingTaxRates( - taxRateId - ) - // ... - - const handleRemoveShippingOptions = ( - shippingOptionIds: string[] - ) => { - removeShippingOptions.mutate({ - shipping_options: shippingOptionIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.shipping_options) - } - }) - } - - // ... -} - -export default TaxRate diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_shipping-options_batch/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_shipping-options_batch/post.tsx deleted file mode 100644 index 8951d71328..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_tax-rates_{id}_shipping-options_batch/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAdminCreateShippingTaxRates } from "medusa-react" - -type Props = { - taxRateId: string -} - -const TaxRate = ({ taxRateId }: Props) => { - const addShippingOption = useAdminCreateShippingTaxRates( - taxRateId - ) - // ... - - const handleAddShippingOptions = ( - shippingOptionIds: string[] - ) => { - addShippingOption.mutate({ - shipping_options: shippingOptionIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.shipping_options) - } - }) - } - - // ... -} - -export default TaxRate diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads/delete.tsx deleted file mode 100644 index ee004df738..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads/delete.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminDeleteFile } from "medusa-react" - -const Image = () => { - const deleteFile = useAdminDeleteFile() - // ... - - const handleDeleteFile = (fileKey: string) => { - deleteFile.mutate({ - file_key: fileKey - }, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default Image diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads/post.tsx deleted file mode 100644 index b35789cbab..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads/post.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminUploadFile } from "medusa-react" - -const UploadFile = () => { - const uploadFile = useAdminUploadFile() - // ... - - const handleFileUpload = (file: File) => { - uploadFile.mutate(file, { - onSuccess: ({ uploads }) => { - console.log(uploads[0].key) - } - }) - } - - // ... -} - -export default UploadFile diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads_download-url/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads_download-url/post.tsx deleted file mode 100644 index 97162405d4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads_download-url/post.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminCreatePresignedDownloadUrl } from "medusa-react" - -const Image = () => { - const createPresignedUrl = useAdminCreatePresignedDownloadUrl() - // ... - - const handlePresignedUrl = (fileKey: string) => { - createPresignedUrl.mutate({ - file_key: fileKey - }, { - onSuccess: ({ download_url }) => { - console.log(download_url) - } - }) - } - - // ... -} - -export default Image diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads_protected/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads_protected/post.tsx deleted file mode 100644 index b2f2016550..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_uploads_protected/post.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useAdminUploadProtectedFile } from "medusa-react" - -const UploadFile = () => { - const uploadFile = useAdminUploadProtectedFile() - // ... - - const handleFileUpload = (file: File) => { - uploadFile.mutate(file, { - onSuccess: ({ uploads }) => { - console.log(uploads[0].key) - } - }) - } - - // ... -} - -export default UploadFile diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users/get.tsx deleted file mode 100644 index 9277ace79e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminUsers } from "medusa-react" - -const Users = () => { - const { users, isLoading } = useAdminUsers() - - return ( -
- {isLoading && Loading...} - {users && !users.length && No Users} - {users && users.length > 0 && ( -
    - {users.map((user) => ( -
  • {user.email}
  • - ))} -
- )} -
- ) -} - -export default Users diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users/post.tsx deleted file mode 100644 index b9a2a0009e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users/post.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useAdminCreateUser } from "medusa-react" - -const CreateUser = () => { - const createUser = useAdminCreateUser() - // ... - - const handleCreateUser = () => { - createUser.mutate({ - email: "user@example.com", - password: "supersecret", - }, { - onSuccess: ({ user }) => { - console.log(user.id) - } - }) - } - - // ... -} - -export default CreateUser diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_password-token/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_password-token/post.tsx deleted file mode 100644 index e38a685370..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_password-token/post.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminSendResetPasswordToken } from "medusa-react" - -const Login = () => { - const requestPasswordReset = useAdminSendResetPasswordToken() - // ... - - const handleResetPassword = ( - email: string - ) => { - requestPasswordReset.mutate({ - email - }, { - onSuccess: () => { - // successful - } - }) - } - - // ... -} - -export default Login diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_reset-password/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_reset-password/post.tsx deleted file mode 100644 index dfd742bfae..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_reset-password/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useAdminResetPassword } from "medusa-react" - -const ResetPassword = () => { - const resetPassword = useAdminResetPassword() - // ... - - const handleResetPassword = ( - token: string, - password: string - ) => { - resetPassword.mutate({ - token, - password, - }, { - onSuccess: ({ user }) => { - console.log(user.id) - } - }) - } - - // ... -} - -export default ResetPassword diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_{id}/delete.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_{id}/delete.tsx deleted file mode 100644 index 14d748a56f..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_{id}/delete.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useAdminDeleteUser } from "medusa-react" - -type Props = { - userId: string -} - -const User = ({ userId }: Props) => { - const deleteUser = useAdminDeleteUser(userId) - // ... - - const handleDeleteUser = () => { - deleteUser.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... -} - -export default User diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_{id}/get.tsx deleted file mode 100644 index 959579302e..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_{id}/get.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminUser } from "medusa-react" - -type Props = { - userId: string -} - -const User = ({ userId }: Props) => { - const { user, isLoading } = useAdminUser( - userId - ) - - return ( -
- {isLoading && Loading...} - {user && {user.first_name} {user.last_name}} -
- ) -} - -export default User diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_{id}/post.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_{id}/post.tsx deleted file mode 100644 index 85b794db22..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_users_{id}/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAdminUpdateUser } from "medusa-react" - -type Props = { - userId: string -} - -const User = ({ userId }: Props) => { - const updateUser = useAdminUpdateUser(userId) - // ... - - const handleUpdateUser = ( - firstName: string - ) => { - updateUser.mutate({ - first_name: firstName, - }, { - onSuccess: ({ user }) => { - console.log(user.first_name) - } - }) - } - - // ... -} - -export default User diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_variants/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_variants/get.tsx deleted file mode 100644 index 8f112134c4..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_variants/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useAdminVariants } from "medusa-react" - -const Variants = () => { - const { variants, isLoading } = useAdminVariants() - - return ( -
- {isLoading && Loading...} - {variants && !variants.length && ( - No Variants - )} - {variants && variants.length > 0 && ( -
    - {variants.map((variant) => ( -
  • {variant.title}
  • - ))} -
- )} -
- ) -} - -export default Variants diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_variants_{id}/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_variants_{id}/get.tsx deleted file mode 100644 index d26d992398..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_variants_{id}/get.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useAdminVariant } from "medusa-react" - -type Props = { - variantId: string -} - -const Variant = ({ variantId }: Props) => { - const { variant, isLoading } = useAdminVariant( - variantId - ) - - return ( -
- {isLoading && Loading...} - {variant && {variant.title}} -
- ) -} - -export default Variant diff --git a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_variants_{id}_inventory/get.tsx b/www/apps/api-reference/specs/admin/code_samples/tsx/admin_variants_{id}_inventory/get.tsx deleted file mode 100644 index 87b00a2827..0000000000 --- a/www/apps/api-reference/specs/admin/code_samples/tsx/admin_variants_{id}_inventory/get.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react" -import { useAdminVariantsInventory } from "medusa-react" - -type Props = { - variantId: string -} - -const VariantInventory = ({ variantId }: Props) => { - const { variant, isLoading } = useAdminVariantsInventory( - variantId - ) - - return ( -
- {isLoading && Loading...} - {variant && variant.inventory.length === 0 && ( - Variant doesn't have inventory details - )} - {variant && variant.inventory.length > 0 && ( -
    - {variant.inventory.map((inventory) => ( -
  • {inventory.title}
  • - ))} -
- )} -
- ) -} - -export default VariantInventory diff --git a/www/apps/api-reference/specs/admin/components/schemas/Address.yaml b/www/apps/api-reference/specs/admin/components/schemas/Address.yaml deleted file mode 100644 index e0aee13932..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Address.yaml +++ /dev/null @@ -1,119 +0,0 @@ -title: Address -description: >- - An address is used across the Medusa backend within other schemas and object - types. For example, a customer's billing and shipping addresses both use the - Address entity. -type: object -required: - - address_1 - - address_2 - - city - - company - - country_code - - created_at - - customer_id - - deleted_at - - first_name - - id - - last_name - - metadata - - phone - - postal_code - - province - - updated_at -properties: - id: - type: string - description: ID of the address - example: addr_01G8ZC9VS1XVE149MGH2J7QSSH - customer_id: - description: ID of the customer this address belongs to - nullable: true - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: Available if the relation `customer` is expanded. - nullable: true - type: object - company: - description: Company name - nullable: true - type: string - example: Acme - first_name: - description: First name - nullable: true - type: string - example: Arno - last_name: - description: Last name - nullable: true - type: string - example: Willms - address_1: - description: Address line 1 - nullable: true - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - nullable: true - type: string - example: Suite 369 - city: - description: City - nullable: true - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - nullable: true - type: string - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - country: - description: A country object. - x-expandable: country - nullable: true - $ref: ./Country.yaml - province: - description: Province - nullable: true - type: string - example: Kentucky - postal_code: - description: Postal Code - nullable: true - type: string - example: 72093 - phone: - description: Phone Number - nullable: true - type: string - example: 16128234334802 - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AddressCreatePayload.yaml b/www/apps/api-reference/specs/admin/components/schemas/AddressCreatePayload.yaml deleted file mode 100644 index 1094c0f176..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AddressCreatePayload.yaml +++ /dev/null @@ -1,57 +0,0 @@ -type: object -description: Address fields used when creating an address. -required: - - first_name - - last_name - - address_1 - - city - - country_code - - postal_code -properties: - first_name: - description: First name - type: string - example: Arno - last_name: - description: Last name - type: string - example: Willms - phone: - type: string - description: Phone Number - example: 16128234334802 - company: - type: string - address_1: - description: Address line 1 - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - type: string - example: Suite 369 - city: - description: City - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - type: string - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - province: - description: Province - type: string - example: Kentucky - postal_code: - description: Postal Code - type: string - example: 72093 - metadata: - type: object - example: - car: white - description: An optional key-value map with additional details diff --git a/www/apps/api-reference/specs/admin/components/schemas/AddressPayload.yaml b/www/apps/api-reference/specs/admin/components/schemas/AddressPayload.yaml deleted file mode 100644 index 826bf11526..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AddressPayload.yaml +++ /dev/null @@ -1,51 +0,0 @@ -type: object -description: Address fields used when creating/updating an address. -properties: - first_name: - description: First name - type: string - example: Arno - last_name: - description: Last name - type: string - example: Willms - phone: - type: string - description: Phone Number - example: 16128234334802 - company: - type: string - description: Company - address_1: - description: Address line 1 - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - type: string - example: Suite 369 - city: - description: City - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - type: string - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - province: - description: Province - type: string - example: Kentucky - postal_code: - description: Postal Code - type: string - example: 72093 - metadata: - type: object - example: - car: white - description: An optional key-value map with additional details diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminAppsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminAppsListRes.yaml deleted file mode 100644 index 8e153ad3a1..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminAppsListRes.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: object -required: - - apps -properties: - apps: - type: array - description: An array of app details. - items: - $ref: ./OAuth.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminAppsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminAppsRes.yaml deleted file mode 100644 index 8fa25e62de..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminAppsRes.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: object -required: - - apps -properties: - apps: - description: App details. - $ref: ./OAuth.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminAuthRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminAuthRes.yaml deleted file mode 100644 index a5f5bcc495..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminAuthRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The user's details. -required: - - user -properties: - user: - description: User details. - $ref: ./User.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchJobListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchJobListRes.yaml deleted file mode 100644 index 52fece9150..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchJobListRes.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -required: - - batch_jobs - - count - - offset - - limit -properties: - batch_jobs: - type: array - description: An array of batch job details. - items: - $ref: ./BatchJob.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of batch jobs skipped when retrieving the batch jobs. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchJobRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchJobRes.yaml deleted file mode 100644 index 38e6af340d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchJobRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The batch job's details. -required: - - batch_job -properties: - batch_job: - description: Batch job details. - $ref: ./BatchJob.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminBearerAuthRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminBearerAuthRes.yaml deleted file mode 100644 index cef364431b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminBearerAuthRes.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: object -description: The access token of the user, if they're authenticated successfully. -properties: - access_token: - description: Access token that can be used to send authenticated requests. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionsDeleteRes.yaml deleted file mode 100644 index d739f50061..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionsDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Collection - object: - type: string - description: The type of the object that was deleted. - default: product-collection - deleted: - type: boolean - description: Whether the collection was deleted successfully or not. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionsListRes.yaml deleted file mode 100644 index 9a61e4fa9c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionsListRes.yaml +++ /dev/null @@ -1,23 +0,0 @@ -type: object -required: - - collections - - count - - offset - - limit -properties: - collections: - type: array - description: an array of collection details - items: - $ref: ./ProductCollection.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: >- - The number of product collections skipped when retrieving the product - collections. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionsRes.yaml deleted file mode 100644 index c68818ac13..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionsRes.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: object -description: The collection's details. -x-expanded-relations: - field: collection - relations: - - products -required: - - collection -properties: - collection: - description: Product Collection details. - $ref: ./ProductCollection.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateUserRequest.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateUserRequest.yaml deleted file mode 100644 index df3db57b09..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateUserRequest.yaml +++ /dev/null @@ -1,28 +0,0 @@ -type: object -required: - - email - - password -properties: - email: - description: The User's email. - type: string - format: email - first_name: - description: The first name of the User. - type: string - last_name: - description: The last name of the User. - type: string - role: - description: >- - The role assigned to the user. These roles don't provide any different - privileges. - type: string - enum: - - admin - - member - - developer - password: - description: The User's password. - type: string - format: password diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrenciesListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCurrenciesListRes.yaml deleted file mode 100644 index baf22c8547..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrenciesListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: List of currencies with pagination fields. -required: - - currencies - - count - - offset - - limit -properties: - currencies: - type: array - description: An array of currency details. - items: - $ref: ./Currency.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of currencies skipped when retrieving the currencies. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrenciesRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCurrenciesRes.yaml deleted file mode 100644 index 6d75dfa3ac..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrenciesRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: A currency's details. -required: - - currency -properties: - currency: - description: Currency details. - $ref: ./Currency.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroupsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroupsDeleteRes.yaml deleted file mode 100644 index c71ac29d49..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroupsDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted customer group. - object: - type: string - description: The type of the object that was deleted. - default: customer_group - deleted: - type: boolean - description: Whether the customer group was deleted successfully or not. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroupsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroupsListRes.yaml deleted file mode 100644 index c776bf16a7..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroupsListRes.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -required: - - customer_groups - - count - - offset - - limit -properties: - customer_groups: - type: array - description: An array of customer group details. - items: - $ref: ./CustomerGroup.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of customer groups skipped when retrieving the customer groups. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroupsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroupsRes.yaml deleted file mode 100644 index 738a35695c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroupsRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The customer group's details. -required: - - customer_group -properties: - customer_group: - description: Customer group details. - $ref: ./CustomerGroup.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomersListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomersListRes.yaml deleted file mode 100644 index bd60809bb7..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomersListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -description: The list of customers with pagination fields. -type: object -required: - - customers - - count - - offset - - limit -properties: - customers: - type: array - description: An array of customer details. - items: - $ref: ./Customer.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of customers skipped when retrieving the customers. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomersRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomersRes.yaml deleted file mode 100644 index 47890d9d0b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomersRes.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -description: The customer's details. -x-expanded-relations: - field: customer - relations: - - orders - - shipping_addresses -required: - - customer -properties: - customer: - description: Customer details. - $ref: ./Customer.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteCustomerGroupsGroupCustomerBatchReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteCustomerGroupsGroupCustomerBatchReq.yaml deleted file mode 100644 index ebd0cf5526..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteCustomerGroupsGroupCustomerBatchReq.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The customers to remove from the customer group. -required: - - customer_ids -properties: - customer_ids: - description: The ids of the customers to remove - type: array - items: - type: object - required: - - id - properties: - id: - description: ID of the customer - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteDiscountsDiscountConditionsConditionBatchReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteDiscountsDiscountConditionsConditionBatchReq.yaml deleted file mode 100644 index 8e3b48b994..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteDiscountsDiscountConditionsConditionBatchReq.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The resources to remove. -required: - - resources -properties: - resources: - description: The resources to be removed from the discount condition - type: array - items: - type: object - required: - - id - properties: - id: - description: The id of the item - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePriceListPricesPricesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePriceListPricesPricesReq.yaml deleted file mode 100644 index 9bc07263fc..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePriceListPricesPricesReq.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The details of the prices to delete. -properties: - price_ids: - description: The IDs of the prices to delete. - type: array - items: - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePriceListsPriceListProductsPricesBatchReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePriceListsPriceListProductsPricesBatchReq.yaml deleted file mode 100644 index b54e2e550f..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePriceListsPriceListProductsPricesBatchReq.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The details of the products' prices to delete. -properties: - product_ids: - description: The IDs of the products to delete their associated prices. - type: array - items: - type: string diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminDeletePricingRuleTypesRuleTypeReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePricingRuleTypesRuleTypeReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminDeletePricingRuleTypesRuleTypeReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminDeletePricingRuleTypesRuleTypeReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteProductCategoriesCategoryProductsBatchReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteProductCategoriesCategoryProductsBatchReq.yaml deleted file mode 100644 index 67764d4914..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteProductCategoriesCategoryProductsBatchReq.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The details of the products to delete from the product category. -required: - - product_ids -properties: - product_ids: - description: The IDs of the products to delete from the product category. - type: array - items: - type: object - required: - - id - properties: - id: - description: The ID of a product - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteProductsFromCollectionReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteProductsFromCollectionReq.yaml deleted file mode 100644 index 2c9d19ccb5..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteProductsFromCollectionReq.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: object -description: The details of the products to remove from the collection. -required: - - product_ids -properties: - product_ids: - description: An array of Product IDs to remove from the Product Collection. - type: array - items: - description: The ID of a Product to add to the Product Collection. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteProductsFromCollectionRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteProductsFromCollectionRes.yaml deleted file mode 100644 index d387516c83..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteProductsFromCollectionRes.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: object -description: Deletion operation details -required: - - id - - object - - removed_products -properties: - id: - type: string - description: The ID of the collection - object: - type: string - description: The type of object the removal was executed on - default: product-collection - removed_products: - description: The IDs of the products removed from the collection - type: array - items: - description: The ID of the Product removed from the Product Collection. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePublishableApiKeySalesChannelsBatchReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePublishableApiKeySalesChannelsBatchReq.yaml deleted file mode 100644 index 3c1afa930c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePublishableApiKeySalesChannelsBatchReq.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The details of the sales channels to remove from the publishable API key. -required: - - sales_channel_ids -properties: - sales_channel_ids: - description: The IDs of the sales channels to remove from the publishable API key - type: array - items: - type: object - required: - - id - properties: - id: - type: string - description: The ID of the sales channel diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteSalesChannelsChannelProductsBatchReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteSalesChannelsChannelProductsBatchReq.yaml deleted file mode 100644 index 38602e26b4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteSalesChannelsChannelProductsBatchReq.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The details of the products to delete from the sales channel. -required: - - product_ids -properties: - product_ids: - description: The IDs of the products to remove from the sales channel. - type: array - items: - type: object - required: - - id - properties: - id: - description: The ID of a product - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteSalesChannelsChannelStockLocationsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteSalesChannelsChannelStockLocationsReq.yaml deleted file mode 100644 index a62aecc7e0..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteSalesChannelsChannelStockLocationsReq.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: object -required: - - location_id -properties: - location_id: - description: The ID of the stock location - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteShippingProfileRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteShippingProfileRes.yaml deleted file mode 100644 index 05b2d2c485..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteShippingProfileRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Shipping Profile. - object: - type: string - description: The type of the object that was deleted. - default: shipping_profile - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteTaxRatesTaxRateProductTypesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteTaxRatesTaxRateProductTypesReq.yaml deleted file mode 100644 index 0323995581..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteTaxRatesTaxRateProductTypesReq.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: object -description: Product types to remove from the tax rates. -required: - - product_types -properties: - product_types: - type: array - description: >- - The IDs of the product types to remove their association with this tax - rate. - items: - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteTaxRatesTaxRateProductsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteTaxRatesTaxRateProductsReq.yaml deleted file mode 100644 index 3e8e2efb14..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteTaxRatesTaxRateProductsReq.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The details of the products to remove their associated with the tax rate. -required: - - products -properties: - products: - type: array - description: The IDs of the products to remove their association with this tax rate. - items: - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteTaxRatesTaxRateShippingOptionsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteTaxRatesTaxRateShippingOptionsReq.yaml deleted file mode 100644 index e383613f0b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteTaxRatesTaxRateShippingOptionsReq.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -description: >- - The details of the shipping options to remove their associate with the tax - rate. -required: - - shipping_options -properties: - shipping_options: - type: array - description: >- - The IDs of the shipping options to remove their association with this tax - rate. - items: - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteUploadsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteUploadsReq.yaml deleted file mode 100644 index 28df01fe62..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteUploadsReq.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The details of the file to delete. -required: - - file_key -properties: - file_key: - description: >- - key of the file to delete. This is obtained when you first uploaded the - file, or by the file service if you used it directly. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteUploadsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteUploadsRes.yaml deleted file mode 100644 index 36c221a599..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteUploadsRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The file key of the upload deleted - object: - type: string - description: The type of the object that was deleted. - default: file - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteUserRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteUserRes.yaml deleted file mode 100644 index 1a0f1e1b90..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeleteUserRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted user. - object: - type: string - description: The type of the object that was deleted. - default: user - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountConditionsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountConditionsDeleteRes.yaml deleted file mode 100644 index f6fd7e7001..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountConditionsDeleteRes.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -required: - - id - - object - - deleted - - discount -properties: - id: - type: string - description: The ID of the deleted Discount Condition - object: - type: string - description: The type of the object that was deleted. - default: discount-condition - deleted: - type: boolean - description: Whether the discount condition was deleted successfully. - default: true - discount: - description: The Discount to which the condition used to belong to. - $ref: ./Discount.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountConditionsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountConditionsRes.yaml deleted file mode 100644 index 1afadae4db..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountConditionsRes.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: object -x-expanded-relations: - field: discount_condition - relations: - - discount_rule -required: - - discount_condition -properties: - discount_condition: - description: Discount condition details. - $ref: ./DiscountCondition.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountsDeleteRes.yaml deleted file mode 100644 index d8db1a7a73..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountsDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Discount - object: - type: string - description: The type of the object that was deleted. - default: discount - deleted: - type: boolean - description: Whether the discount was deleted successfully. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountsListRes.yaml deleted file mode 100644 index 5f027be6e1..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountsListRes.yaml +++ /dev/null @@ -1,29 +0,0 @@ -type: object -description: The list of discounts with pagination fields. -x-expanded-relations: - field: discounts - relations: - - parent_discount - - regions - - rule - - rule.conditions -required: - - discounts - - count - - offset - - limit -properties: - discounts: - type: array - description: The list of discounts. - items: - $ref: ./Discount.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of discounts skipped when retrieving the discounts. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountsRes.yaml deleted file mode 100644 index 55c5640e03..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDiscountsRes.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -description: The discount's details. -x-expanded-relations: - field: discount - relations: - - parent_discount - - regions - - rule - - rule.conditions - eager: - - regions.fulfillment_providers - - regions.payment_providers -required: - - discount -properties: - discount: - description: Discount details. - $ref: ./Discount.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrdersDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrdersDeleteRes.yaml deleted file mode 100644 index b92534f839..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrdersDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Draft Order. - object: - type: string - description: The type of the object that was deleted. - default: draft-order - deleted: - type: boolean - description: Whether the draft order was deleted successfully. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrdersListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrdersListRes.yaml deleted file mode 100644 index 539b3e9204..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrdersListRes.yaml +++ /dev/null @@ -1,29 +0,0 @@ -description: The list of draft orders with pagination fields. -type: object -x-expanded-relations: - field: draft_orders - relations: - - order - - cart - - cart.items - - cart.items.adjustments -required: - - draft_orders - - count - - offset - - limit -properties: - draft_orders: - type: array - description: An array of draft order's details. - items: - $ref: ./DraftOrder.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of draft orders skipped when retrieving the draft orders. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrdersRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrdersRes.yaml deleted file mode 100644 index 20ae557261..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrdersRes.yaml +++ /dev/null @@ -1,67 +0,0 @@ -type: object -description: The list of draft orders. -x-expanded-relations: - field: draft_order - relations: - - order - - cart - - cart.items - - cart.items.adjustments - - cart.billing_address - - cart.customer - - cart.discounts - - cart.discounts.rule - - cart.items - - cart.items.adjustments - - cart.payment - - cart.payment_sessions - - cart.region - - cart.region.payment_providers - - cart.shipping_address - - cart.shipping_methods - - cart.shipping_methods.shipping_option - eager: - - cart.region.fulfillment_providers - - cart.region.payment_providers - - cart.shipping_methods.shipping_option - implicit: - - cart.discounts - - cart.discounts.rule - - cart.gift_cards - - cart.items - - cart.items.adjustments - - cart.items.tax_lines - - cart.items.variant - - cart.items.variant.product - - cart.items.variant.product.profiles - - cart.region - - cart.region.tax_rates - - cart.shipping_address - - cart.shipping_methods - - cart.shipping_methods.tax_lines - totals: - - cart.discount_total - - cart.gift_card_tax_total - - cart.gift_card_total - - cart.item_tax_total - - cart.refundable_amount - - cart.refunded_total - - cart.shipping_tax_total - - cart.shipping_total - - cart.subtotal - - cart.tax_total - - cart.total - - cart.items.discount_total - - cart.items.gift_card_total - - cart.items.original_tax_total - - cart.items.original_total - - cart.items.refundable - - cart.items.subtotal - - cart.items.tax_total - - cart.items.total -required: - - draft_order -properties: - draft_order: - description: Draft order's details. - $ref: ./DraftOrder.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminExtendedStoresRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminExtendedStoresRes.yaml deleted file mode 100644 index b48265c097..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminExtendedStoresRes.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -description: The store's details with additional details like payment and tax providers. -x-expanded-relations: - field: store - relations: - - currencies - - default_currency -required: - - store -properties: - store: - description: Store details. - $ref: ./ExtendedStoreDTO.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminGetPricingRuleTypesParams.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGetPricingRuleTypesParams.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminGetPricingRuleTypesParams.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminGetPricingRuleTypesParams.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminGetPricingRuleTypesRuleTypeParams.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGetPricingRuleTypesRuleTypeParams.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminGetPricingRuleTypesRuleTypeParams.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminGetPricingRuleTypesRuleTypeParams.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminGetProductsParams.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGetProductsParams.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminGetProductsParams.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminGetProductsParams.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminGetPromotionsParams.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGetPromotionsParams.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminGetPromotionsParams.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminGetPromotionsParams.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminGetRegionsRegionFulfillmentOptionsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGetRegionsRegionFulfillmentOptionsRes.yaml deleted file mode 100644 index 122df7072d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminGetRegionsRegionFulfillmentOptionsRes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: object -description: The list of fulfillment options in a region. -required: - - fulfillment_options -properties: - fulfillment_options: - type: array - description: Fulfillment providers details. - items: - type: object - required: - - provider_id - - options - properties: - provider_id: - description: ID of the fulfillment provider - type: string - options: - description: fulfillment provider options - type: array - items: - type: object - example: - - id: manual-fulfillment - - id: manual-fulfillment-return - is_return: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminGetVariantsVariantInventoryRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGetVariantsVariantInventoryRes.yaml deleted file mode 100644 index fa021b68fd..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminGetVariantsVariantInventoryRes.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: object -description: The variant's inventory details. -properties: - variant: - type: object - description: The product variant's inventory details. - $ref: ./VariantInventory.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsDeleteRes.yaml deleted file mode 100644 index 2c6792ccee..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Gift Card - object: - type: string - description: The type of the object that was deleted. - default: gift-card - deleted: - type: boolean - description: Whether the gift card was deleted successfully. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsListRes.yaml deleted file mode 100644 index 4554a7f3f7..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsListRes.yaml +++ /dev/null @@ -1,30 +0,0 @@ -type: object -description: The list of gift cards with pagination fields. -x-expanded-relations: - field: gift_cards - relations: - - order - - region - eager: - - region.fulfillment_providers - - region.payment_providers -required: - - gift_cards - - count - - offset - - limit -properties: - gift_cards: - type: array - description: The list of gift cards. - items: - $ref: ./GiftCard.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of gift cards skipped when retrieving the gift cards. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsRes.yaml deleted file mode 100644 index 6660bb4615..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsRes.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The gift card's details. -x-expanded-relations: - field: gift_card - relations: - - order - - region - eager: - - region.fulfillment_providers - - region.payment_providers -required: - - gift_card -properties: - gift_card: - description: A gift card's details. - $ref: ./GiftCard.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsDeleteRes.yaml deleted file mode 100644 index a0ded8e57a..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Inventory Item. - object: - type: string - description: The type of the object that was deleted. - format: inventory_item - deleted: - type: boolean - description: Whether or not the Inventory Item was deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsListRes.yaml deleted file mode 100644 index facac5fb99..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsListRes.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -required: - - inventory_items - - count - - offset - - limit -properties: - inventory_items: - type: array - description: an array of Inventory Item details - items: - $ref: ./InventoryItemDTO.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of inventory items skipped when retrieving the inventory items. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsListWithVariantsAndLocationLevelsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsListWithVariantsAndLocationLevelsRes.yaml deleted file mode 100644 index 0a8a0fcd33..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsListWithVariantsAndLocationLevelsRes.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -required: - - inventory_items - - count - - offset - - limit -properties: - inventory_items: - type: array - description: an array of Inventory Item details - items: - $ref: ./DecoratedInventoryItemDTO.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of inventory items skipped when retrieving the inventory items. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsLocationLevelsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsLocationLevelsRes.yaml deleted file mode 100644 index 2eae35229b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsLocationLevelsRes.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: object -description: Details of inventory items and their associated location levels. -required: - - inventory_item -properties: - inventory_item: - type: object - description: An inventory item's ID and associated location levels. - required: - - id - - location_levels - properties: - id: - description: The id of the location - type: string - location_levels: - description: List of stock levels at a given location - type: array - items: - $ref: ./InventoryLevelDTO.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsRes.yaml deleted file mode 100644 index 5970f5ad2f..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemsRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The inventory item's details. -required: - - inventory_item -properties: - inventory_item: - description: Inventory Item details - $ref: ./InventoryItemDTO.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminInviteDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminInviteDeleteRes.yaml deleted file mode 100644 index c1a8947cd4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminInviteDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Invite. - object: - type: string - description: The type of the object that was deleted. - default: invite - deleted: - type: boolean - description: Whether or not the invite was deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminListInvitesRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminListInvitesRes.yaml deleted file mode 100644 index 24604800af..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminListInvitesRes.yaml +++ /dev/null @@ -1,10 +0,0 @@ -description: The list of invites. -type: object -required: - - invites -properties: - invites: - type: array - description: An array of invites - items: - $ref: ./Invite.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminNotesDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminNotesDeleteRes.yaml deleted file mode 100644 index 679ce92ba8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminNotesDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Note. - object: - type: string - description: The type of the object that was deleted. - default: note - deleted: - type: boolean - description: Whether or not the Note was deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminNotesListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminNotesListRes.yaml deleted file mode 100644 index a65b53deaf..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminNotesListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The list of notes with pagination fields. -required: - - notes - - count - - offset - - limit -properties: - notes: - type: array - description: An array of notes - items: - $ref: ./Note.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of notes skipped when retrieving the notes. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminNotesRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminNotesRes.yaml deleted file mode 100644 index cb19ac88c4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminNotesRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The note's details. -required: - - note -properties: - note: - description: Note details. - $ref: ./Note.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationsListRes.yaml deleted file mode 100644 index 1cc05a0a14..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationsListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -x-expanded-relations: - field: notifications - relations: - - resends -required: - - notifications -properties: - notifications: - type: array - description: an array of notifications - items: - $ref: ./Notification.yaml - count: - type: integer - description: The total number of notifications - offset: - type: integer - description: The number of notifications skipped when retrieving the notifications. - limit: - type: integer - description: The number of notifications per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationsRes.yaml deleted file mode 100644 index 72d8cd2f2a..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationsRes.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: object -description: The notification's details. -x-expanded-relations: - field: notification - relations: - - resends -required: - - notification -properties: - notification: - description: Notification details - $ref: ./Notification.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditDeleteRes.yaml deleted file mode 100644 index 2435bc0769..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Order Edit. - object: - type: string - description: The type of the object that was deleted. - default: order_edit - deleted: - type: boolean - description: Whether or not the Order Edit was deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditItemChangeDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditItemChangeDeleteRes.yaml deleted file mode 100644 index 3004c5cfd9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditItemChangeDeleteRes.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -description: The details of deleting order edit item changes. -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Order Edit Item Change. - object: - type: string - description: The type of the object that was deleted. - default: item_change - deleted: - type: boolean - description: Whether or not the Order Edit Item Change was deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditsListRes.yaml deleted file mode 100644 index a49569c577..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditsListRes.yaml +++ /dev/null @@ -1,57 +0,0 @@ -type: object -description: The list of order edits with pagination fields. -x-expanded-relations: - field: order_edits - relations: - - changes - - changes.line_item - - changes.line_item.variant - - changes.original_line_item - - changes.original_line_item.variant - - items - - items.adjustments - - items.tax_lines - - items.variant - - payment_collection - implicit: - - items - - items.tax_lines - - items.adjustments - - items.variant - totals: - - difference_due - - discount_total - - gift_card_tax_total - - gift_card_total - - shipping_total - - subtotal - - tax_total - - total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total -required: - - order_edits - - count - - offset - - limit -properties: - order_edits: - type: array - description: An array of order edit details - items: - $ref: ./OrderEdit.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of order edits skipped when retrieving the order edits. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditsRes.yaml deleted file mode 100644 index 77f7749b24..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditsRes.yaml +++ /dev/null @@ -1,43 +0,0 @@ -type: object -description: The order edit details. -x-expanded-relations: - field: order_edit - relations: - - changes - - changes.line_item - - changes.line_item.variant - - changes.original_line_item - - changes.original_line_item.variant - - items - - items.adjustments - - items.tax_lines - - items.variant - - payment_collection - implicit: - - items - - items.tax_lines - - items.adjustments - - items.variant - totals: - - difference_due - - discount_total - - gift_card_tax_total - - gift_card_total - - shipping_total - - subtotal - - tax_total - - total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total -required: - - order_edit -properties: - order_edit: - description: Order edit details - $ref: ./OrderEdit.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrdersListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrdersListRes.yaml deleted file mode 100644 index 05b64d5f94..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrdersListRes.yaml +++ /dev/null @@ -1,126 +0,0 @@ -type: object -description: The list of orders with pagination fields. -x-expanded-relations: - field: orders - relations: - - billing_address - - claims - - claims.additional_items - - claims.additional_items.variant - - claims.claim_items - - claims.claim_items.images - - claims.claim_items.item - - claims.fulfillments - - claims.fulfillments.tracking_links - - claims.return_order - - claims.return_order.shipping_method - - claims.return_order.shipping_method.tax_lines - - claims.shipping_address - - claims.shipping_methods - - customer - - discounts - - discounts.rule - - fulfillments - - fulfillments.items - - fulfillments.tracking_links - - gift_card_transactions - - gift_cards - - items - - payments - - refunds - - region - - returns - - returns.items - - returns.items.reason - - returns.shipping_method - - returns.shipping_method.tax_lines - - shipping_address - - shipping_methods - eager: - - fulfillments.items - - region.fulfillment_providers - - region.payment_providers - - returns.items - - shipping_methods.shipping_option - implicit: - - claims - - claims.additional_items - - claims.additional_items.adjustments - - claims.additional_items.refundable - - claims.additional_items.tax_lines - - discounts - - discounts.rule - - gift_card_transactions - - gift_card_transactions.gift_card - - gift_cards - - items - - items.adjustments - - items.refundable - - items.tax_lines - - items.variant - - items.variant.product - - items.variant.product.profiles - - refunds - - region - - shipping_methods - - shipping_methods.tax_lines - - swaps - - swaps.additional_items - - swaps.additional_items.adjustments - - swaps.additional_items.refundable - - swaps.additional_items.tax_lines - totals: - - discount_total - - gift_card_tax_total - - gift_card_total - - paid_total - - refundable_amount - - refunded_total - - shipping_total - - subtotal - - tax_total - - total - - claims.additional_items.discount_total - - claims.additional_items.gift_card_total - - claims.additional_items.original_tax_total - - claims.additional_items.original_total - - claims.additional_items.refundable - - claims.additional_items.subtotal - - claims.additional_items.tax_total - - claims.additional_items.total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - - swaps.additional_items.discount_total - - swaps.additional_items.gift_card_total - - swaps.additional_items.original_tax_total - - swaps.additional_items.original_total - - swaps.additional_items.refundable - - swaps.additional_items.subtotal - - swaps.additional_items.tax_total - - swaps.additional_items.total -required: - - orders - - count - - offset - - limit -properties: - orders: - type: array - description: An array of order details. - items: - $ref: ./Order.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of orders skipped when retrieving the orders. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrdersOrderLineItemReservationReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrdersOrderLineItemReservationReq.yaml deleted file mode 100644 index c8713b6be9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrdersOrderLineItemReservationReq.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -required: - - location_id -properties: - location_id: - description: The ID of the location of the reservation - type: string - quantity: - description: The quantity to reserve - type: number diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrdersRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrdersRes.yaml deleted file mode 100644 index 15f2179e17..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrdersRes.yaml +++ /dev/null @@ -1,112 +0,0 @@ -type: object -description: The order's details. -x-expanded-relations: - field: order - relations: - - billing_address - - claims - - claims.additional_items - - claims.additional_items.variant - - claims.claim_items - - claims.claim_items.images - - claims.claim_items.item - - claims.fulfillments - - claims.fulfillments.tracking_links - - claims.return_order - - claims.return_order.shipping_method - - claims.return_order.shipping_method.tax_lines - - claims.shipping_address - - claims.shipping_methods - - customer - - discounts - - discounts.rule - - fulfillments - - fulfillments.items - - fulfillments.tracking_links - - gift_card_transactions - - gift_cards - - items - - payments - - refunds - - region - - returns - - returns.items - - returns.items.reason - - returns.shipping_method - - returns.shipping_method.tax_lines - - shipping_address - - shipping_methods - eager: - - fulfillments.items - - region.fulfillment_providers - - region.payment_providers - - returns.items - - shipping_methods.shipping_option - implicit: - - claims - - claims.additional_items - - claims.additional_items.adjustments - - claims.additional_items.refundable - - claims.additional_items.tax_lines - - discounts - - discounts.rule - - gift_card_transactions - - gift_card_transactions.gift_card - - gift_cards - - items - - items.adjustments - - items.refundable - - items.tax_lines - - items.variant - - items.variant.product - - items.variant.product.profiles - - refunds - - region - - shipping_methods - - shipping_methods.tax_lines - - swaps - - swaps.additional_items - - swaps.additional_items.adjustments - - swaps.additional_items.refundable - - swaps.additional_items.tax_lines - totals: - - discount_total - - gift_card_tax_total - - gift_card_total - - paid_total - - refundable_amount - - refunded_total - - shipping_total - - subtotal - - tax_total - - total - - claims.additional_items.discount_total - - claims.additional_items.gift_card_total - - claims.additional_items.original_tax_total - - claims.additional_items.original_total - - claims.additional_items.refundable - - claims.additional_items.subtotal - - claims.additional_items.tax_total - - claims.additional_items.total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - - swaps.additional_items.discount_total - - swaps.additional_items.gift_card_total - - swaps.additional_items.original_tax_total - - swaps.additional_items.original_total - - swaps.additional_items.refundable - - swaps.additional_items.subtotal - - swaps.additional_items.tax_total - - swaps.additional_items.total -required: - - order -properties: - order: - description: Order details. - $ref: ./Order.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentCollectionDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentCollectionDeleteRes.yaml deleted file mode 100644 index a2a7150b53..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentCollectionDeleteRes.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -description: The details of deleting a payment collection. -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Payment Collection. - object: - type: string - description: The type of the object that was deleted. - default: payment_collection - deleted: - type: boolean - description: Whether or not the Payment Collection was deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentCollectionsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentCollectionsRes.yaml deleted file mode 100644 index 690f1daeff..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentCollectionsRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: The payment collection's details. -x-expanded-relations: - field: payment_collection - relations: - - payment_sessions - - payments - - region - eager: - - region.fulfillment_providers - - region.payment_providers -required: - - payment_collection -properties: - payment_collection: - description: Payment Collection details. - $ref: ./PaymentCollection.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentProvidersList.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentProvidersList.yaml deleted file mode 100644 index d0548fb65d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentProvidersList.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The list of payment providers in a store. -required: - - payment_providers -properties: - payment_providers: - type: array - description: An array of payment providers details. - items: - $ref: ./PaymentProvider.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentRes.yaml deleted file mode 100644 index 7d52b01d9a..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPaymentRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The payment's details. -required: - - payment -properties: - payment: - description: Payment details - $ref: ./Payment.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostAppsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostAppsReq.yaml deleted file mode 100644 index 62016f8b7b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostAppsReq.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -required: - - application_name - - state - - code -properties: - application_name: - type: string - description: Name of the application for to generate the token for. - state: - type: string - description: State of the application. - code: - type: string - description: The code for the generated token. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostAuthReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostAuthReq.yaml deleted file mode 100644 index 49793b6181..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostAuthReq.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -description: The admin's credentials used to log in. -required: - - email - - password -properties: - email: - type: string - description: The user's email. - format: email - password: - type: string - description: The user's password. - format: password diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostBatchesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostBatchesReq.yaml deleted file mode 100644 index 7219868bf1..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostBatchesReq.yaml +++ /dev/null @@ -1,37 +0,0 @@ -type: object -description: The details of the batch job to create. -required: - - type - - context -properties: - type: - type: string - description: >- - The type of batch job to start, which is defined by the `batchType` - property of the associated batch job strategy. - example: product-export - context: - type: object - description: Additional infomration regarding the batch to be used for processing. - example: - shape: - prices: - - region: null - currency_code: eur - dynamicImageColumnCount: 4 - dynamicOptionColumnCount: 2 - list_config: - skip: 0 - take: 50 - order: - created_at: DESC - relations: - - variants - - variant.prices - - images - dry_run: - type: boolean - description: >- - Set a batch job in dry_run mode, which would delay executing the batch job - until it's confirmed. - default: false diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostCampaignsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostCampaignsReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostCampaignsReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostCampaignsReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCollectionsCollectionReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostCollectionsCollectionReq.yaml deleted file mode 100644 index 2fd371ac5f..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCollectionsCollectionReq.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -description: The product collection's details to update. -properties: - title: - type: string - description: The title of the collection. - handle: - type: string - description: >- - An optional handle to be used in slugs. If none is provided, the - kebab-case version of the title will be used. - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCollectionsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostCollectionsReq.yaml deleted file mode 100644 index 2b759bb8b8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCollectionsReq.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: object -description: The product collection's details. -required: - - title -properties: - title: - type: string - description: The title of the collection. - handle: - type: string - description: >- - An optional handle to be used in slugs. If none is provided, the - kebab-case version of the title will be used. - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCurrenciesCurrencyReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostCurrenciesCurrencyReq.yaml deleted file mode 100644 index a18f97dea6..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCurrenciesCurrencyReq.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: object -description: The details to update in the currency -properties: - includes_tax: - type: boolean - x-featureFlag: tax_inclusive_pricing - description: Tax included in prices of currency. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml index 001be4ea41..b6d536cac5 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml @@ -1,16 +1,20 @@ type: object -description: The customers to add to the customer group. +description: SUMMARY +x-schemaName: AdminPostCustomerGroupsGroupCustomersBatchReq required: - customer_ids properties: customer_ids: - description: The ids of the customers to add type: array + description: The customer group's customer ids. items: type: object + description: The customer id's customer ids. + x-schemaName: CustomerGroupsBatchCustomer required: - id properties: id: - description: ID of the customer type: string + title: id + description: The customer id's ID. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomerGroupsGroupReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomerGroupsGroupReq.yaml deleted file mode 100644 index 073078c077..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomerGroupsGroupReq.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -description: The details to update in the customer group. -properties: - name: - description: Name of the customer group - type: string - metadata: - description: Metadata of the customer group. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomerGroupsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomerGroupsReq.yaml deleted file mode 100644 index d28a86c9f6..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomerGroupsReq.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: The details of the customer group to create. -required: - - name -properties: - name: - type: string - description: Name of the customer group - metadata: - type: object - description: Metadata of the customer group. - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomersCustomerReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomersCustomerReq.yaml deleted file mode 100644 index 4a5bf522e7..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomersCustomerReq.yaml +++ /dev/null @@ -1,38 +0,0 @@ -type: object -description: The details of the customer to update. -properties: - email: - type: string - description: The Customer's email. You can't update the email of a registered customer. - format: email - first_name: - type: string - description: The Customer's first name. - last_name: - type: string - description: The Customer's last name. - phone: - type: string - description: The Customer's phone number. - password: - type: string - description: The Customer's password. - format: password - groups: - type: array - description: A list of customer groups to which the customer belongs. - items: - type: object - required: - - id - properties: - id: - description: The ID of a customer group - type: string - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomersReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomersReq.yaml deleted file mode 100644 index 724189f931..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostCustomersReq.yaml +++ /dev/null @@ -1,32 +0,0 @@ -type: object -description: The details of the customer to create. -required: - - email - - first_name - - last_name - - password -properties: - email: - type: string - description: The customer's email. - format: email - first_name: - type: string - description: The customer's first name. - last_name: - type: string - description: The customer's last name. - password: - type: string - description: The customer's password. - format: password - phone: - type: string - description: The customer's phone number. - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountConditions.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountConditions.yaml deleted file mode 100644 index 767bd96f4c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountConditions.yaml +++ /dev/null @@ -1,40 +0,0 @@ -type: object -required: - - operator -properties: - operator: - description: >- - Operator of the condition. `in` indicates that discountable resources are - within the specified resources. `not_in` indicates that discountable - resources are everything but the specified resources. - type: string - enum: - - in - - not_in - products: - type: array - description: list of product IDs if the condition's type is `products`. - items: - type: string - product_types: - type: array - description: list of product type IDs if the condition's type is `product_types`. - items: - type: string - product_collections: - type: array - description: >- - list of product collection IDs if the condition's type is - `product_collections`. - items: - type: string - product_tags: - type: array - description: list of product tag IDs if the condition's type is `product_tags`. - items: - type: string - customer_groups: - type: array - description: list of customer group IDs if the condition's type is `customer_groups`. - items: - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountConditionsCondition.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountConditionsCondition.yaml deleted file mode 100644 index 23b5daf95d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountConditionsCondition.yaml +++ /dev/null @@ -1,29 +0,0 @@ -type: object -properties: - products: - type: array - description: list of product IDs if the condition's type is `products`. - items: - type: string - product_types: - type: array - description: list of product type IDs if the condition's type is `product_types`. - items: - type: string - product_collections: - type: array - description: >- - list of product collection IDs if the condition's type is - `product_collections`. - items: - type: string - product_tags: - type: array - description: list of product tag IDs if the condition's type is `product_tags` - items: - type: string - customer_groups: - type: array - description: list of customer group IDs if the condition's type is `customer_groups`. - items: - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountConditionsConditionBatchReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountConditionsConditionBatchReq.yaml deleted file mode 100644 index 592e04144d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountConditionsConditionBatchReq.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The details of the resources to add. -required: - - resources -properties: - resources: - description: The resources to be added to the discount condition - type: array - items: - type: object - required: - - id - properties: - id: - description: The ID of the item - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountDynamicCodesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountDynamicCodesReq.yaml deleted file mode 100644 index 9b8818aae8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountDynamicCodesReq.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: object -description: The details of the dynamic discount to create. -required: - - code -properties: - code: - type: string - description: A unique code that will be used to redeem the Discount - usage_limit: - type: number - description: Maximum number of times the discount code can be used - default: 1 - metadata: - type: object - description: An optional set of key-value pairs to hold additional information. - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountReq.yaml deleted file mode 100644 index 58fd553d1f..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsDiscountReq.yaml +++ /dev/null @@ -1,125 +0,0 @@ -type: object -description: The details of the discount to update. -properties: - code: - type: string - description: A unique code that will be used to redeem the discount - rule: - description: The discount rule that defines how discounts are calculated - type: object - required: - - id - properties: - id: - type: string - description: The ID of the Rule - description: - type: string - description: A short description of the discount - value: - type: number - description: >- - The value that the discount represents. This will depend on the type - of the discount. - allocation: - type: string - description: >- - The scope that the discount should apply to. `total` indicates that - the discount should be applied on the cart total, and `item` indicates - that the discount should be applied to each discountable item in the - cart. - enum: - - total - - item - conditions: - type: array - description: >- - A set of conditions that can be used to limit when the discount can be - used. Only one of `products`, `product_types`, `product_collections`, - `product_tags`, and `customer_groups` should be provided based on the - discount condition's type. - items: - type: object - required: - - operator - properties: - id: - type: string - description: The ID of the condition - operator: - type: string - description: >- - Operator of the condition. `in` indicates that discountable - resources are within the specified resources. `not_in` indicates - that discountable resources are everything but the specified - resources. - enum: - - in - - not_in - products: - type: array - description: list of product IDs if the condition's type is `products`. - items: - type: string - product_types: - type: array - description: >- - list of product type IDs if the condition's type is - `product_types`. - items: - type: string - product_collections: - type: array - description: >- - list of product collection IDs if the condition's type is - `product_collections`. - items: - type: string - product_tags: - type: array - description: >- - list of product tag IDs if the condition's type is - `product_tags`. - items: - type: string - customer_groups: - type: array - description: >- - list of customer group IDs if the condition's type is - `customer_groups`. - items: - type: string - is_disabled: - type: boolean - description: >- - Whether the discount code is disabled on creation. If set to `true`, it - will not be available for customers. - starts_at: - type: string - format: date-time - description: The date and time at which the discount should be available. - ends_at: - type: string - format: date-time - description: The date and time at which the discount should no longer be available. - valid_duration: - type: string - description: The duration the discount runs between - example: P3Y6M4DT12H30M5S - usage_limit: - type: number - description: Maximum number of times the discount can be used - regions: - description: >- - A list of region IDs representing the Regions in which the Discount can be - used. - type: array - items: - type: string - metadata: - description: An object containing metadata of the discount - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsReq.yaml deleted file mode 100644 index 4aca231f7e..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDiscountsReq.yaml +++ /dev/null @@ -1,143 +0,0 @@ -type: object -description: The details of the discount to create. -required: - - code - - rule - - regions -properties: - code: - type: string - description: A unique code that will be used to redeem the discount - is_dynamic: - type: boolean - description: >- - Whether the discount should have multiple instances of itself, each with a - different code. This can be useful for automatically generated discount - codes that all have to follow a common set of rules. - default: false - rule: - description: The discount rule that defines how discounts are calculated - type: object - required: - - type - - value - - allocation - properties: - description: - type: string - description: A short description of the discount - type: - type: string - description: >- - The type of the discount, can be `fixed` for discounts that reduce the - price by a fixed amount, `percentage` for percentage reductions or - `free_shipping` for shipping vouchers. - enum: - - fixed - - percentage - - free_shipping - value: - type: number - description: >- - The value that the discount represents. This will depend on the type - of the discount. - allocation: - type: string - description: >- - The scope that the discount should apply to. `total` indicates that - the discount should be applied on the cart total, and `item` indicates - that the discount should be applied to each discountable item in the - cart. - enum: - - total - - item - conditions: - type: array - description: >- - A set of conditions that can be used to limit when the discount can be - used. Only one of `products`, `product_types`, `product_collections`, - `product_tags`, and `customer_groups` should be provided based on the - discount condition's type. - items: - type: object - required: - - operator - properties: - operator: - type: string - description: >- - Operator of the condition. `in` indicates that discountable - resources are within the specified resources. `not_in` indicates - that discountable resources are everything but the specified - resources. - enum: - - in - - not_in - products: - type: array - description: list of product IDs if the condition's type is `products`. - items: - type: string - product_types: - type: array - description: >- - list of product type IDs if the condition's type is - `product_types`. - items: - type: string - product_collections: - type: array - description: >- - list of product collection IDs if the condition's type is - `product_collections`. - items: - type: string - product_tags: - type: array - description: >- - list of product tag IDs if the condition's type is - `product_tags`. - items: - type: string - customer_groups: - type: array - description: >- - list of customer group IDs if the condition's type is - `customer_groups`. - items: - type: string - is_disabled: - type: boolean - description: >- - Whether the discount code is disabled on creation. If set to `true`, it - will not be available for customers. - default: false - starts_at: - type: string - format: date-time - description: The date and time at which the discount should be available. - ends_at: - type: string - format: date-time - description: The date and time at which the discount should no longer be available. - valid_duration: - type: string - description: The duration the discount runs between - example: P3Y6M4DT12H30M5S - regions: - description: >- - A list of region IDs representing the Regions in which the Discount can be - used. - type: array - items: - type: string - usage_limit: - type: number - description: Maximum number of times the discount can be used - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderLineItemsItemReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderLineItemsItemReq.yaml deleted file mode 100644 index 9eb17a0a8a..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderLineItemsItemReq.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -description: The details to update of the line item. -properties: - unit_price: - description: >- - The custom price of the line item. If a `variant_id` is supplied, the - price provided here will override the variant's price. - type: integer - title: - description: The title of the line item if `variant_id` is not provided. - type: string - quantity: - description: The quantity of the line item. - type: integer - metadata: - description: The optional key-value map with additional details about the Line Item. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderLineItemsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderLineItemsReq.yaml deleted file mode 100644 index eb259a08f5..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderLineItemsReq.yaml +++ /dev/null @@ -1,29 +0,0 @@ -type: object -description: The details of the line item to create. -required: - - quantity -properties: - variant_id: - description: >- - The ID of the Product Variant associated with the line item. If the line - item is custom, the `variant_id` should be omitted. - type: string - unit_price: - description: >- - The custom price of the line item. If a `variant_id` is supplied, the - price provided here will override the variant's price. - type: integer - title: - description: The title of the line item if `variant_id` is not provided. - type: string - default: Custom item - quantity: - description: The quantity of the line item. - type: integer - metadata: - description: The optional key-value map with additional details about the Line Item. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderRegisterPaymentRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderRegisterPaymentRes.yaml deleted file mode 100644 index 949163a867..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderRegisterPaymentRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The order's details. -required: - - order -properties: - order: - description: Order's details. - $ref: ./Order.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderReq.yaml deleted file mode 100644 index 48ac5e452f..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersDraftOrderReq.yaml +++ /dev/null @@ -1,46 +0,0 @@ -type: object -description: The details of the draft order to update. -properties: - region_id: - type: string - description: The ID of the Region to create the Draft Order in. - country_code: - type: string - description: The 2 character ISO code for the Country. - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - email: - type: string - description: An email to be used in the Draft Order. - format: email - billing_address: - description: The Address to be used for billing purposes. - anyOf: - - $ref: ./AddressPayload.yaml - - type: string - shipping_address: - description: The Address to be used for shipping purposes. - anyOf: - - $ref: ./AddressPayload.yaml - - type: string - discounts: - description: An array of Discount codes to add to the Draft Order. - type: array - items: - type: object - required: - - code - properties: - code: - description: The code that a Discount is identifed by. - type: string - no_notification_order: - description: >- - An optional flag passed to the resulting order that indicates whether the - customer should receive notifications about order updates. - type: boolean - customer_id: - description: The ID of the customer this draft order is associated with. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersReq.yaml deleted file mode 100644 index a3e5578924..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostDraftOrdersReq.yaml +++ /dev/null @@ -1,110 +0,0 @@ -type: object -description: The details of the draft order to create. -required: - - email - - region_id - - shipping_methods -properties: - status: - description: >- - The status of the draft order. The draft order's default status is `open`. - It's changed to `completed` when its payment is marked as paid. - type: string - enum: - - open - - completed - email: - description: The email of the customer of the draft order - type: string - format: email - billing_address: - description: The Address to be used for billing purposes. - anyOf: - - $ref: ./AddressPayload.yaml - - type: string - shipping_address: - description: The Address to be used for shipping purposes. - anyOf: - - $ref: ./AddressPayload.yaml - - type: string - items: - description: The draft order's line items. - type: array - items: - type: object - required: - - quantity - properties: - variant_id: - description: >- - The ID of the Product Variant associated with the line item. If the - line item is custom, the `variant_id` should be omitted. - type: string - unit_price: - description: >- - The custom price of the line item. If a `variant_id` is supplied, - the price provided here will override the variant's price. - type: integer - title: - description: The title of the line item if `variant_id` is not provided. - type: string - quantity: - description: The quantity of the line item. - type: integer - metadata: - description: >- - The optional key-value map with additional details about the line - item. - type: object - externalDocs: - description: >- - Learn about the metadata attribute, and how to delete and update - it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - region_id: - description: The ID of the region for the draft order - type: string - discounts: - description: The discounts to add to the draft order - type: array - items: - type: object - required: - - code - properties: - code: - description: The code of the discount to apply - type: string - customer_id: - description: The ID of the customer this draft order is associated with. - type: string - no_notification_order: - description: >- - An optional flag passed to the resulting order that indicates whether the - customer should receive notifications about order updates. - type: boolean - shipping_methods: - description: The shipping methods for the draft order - type: array - items: - type: object - required: - - option_id - properties: - option_id: - description: The ID of the shipping option in use - type: string - data: - description: The optional additional data needed for the shipping method - type: object - price: - description: The price of the shipping method. - type: integer - metadata: - description: The optional key-value map with additional details about the Draft Order. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchAddReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchAddReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchAddReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchAddReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostGiftCardsGiftCardReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostGiftCardsGiftCardReq.yaml deleted file mode 100644 index fe097102c9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostGiftCardsGiftCardReq.yaml +++ /dev/null @@ -1,25 +0,0 @@ -type: object -description: The details to update of the gift card. -properties: - balance: - type: integer - description: The value (excluding VAT) that the Gift Card should represent. - is_disabled: - type: boolean - description: >- - Whether the Gift Card is disabled on creation. If set to `true`, the gift - card will not be available for customers. - ends_at: - type: string - format: date-time - description: The date and time at which the Gift Card should no longer be available. - region_id: - description: The ID of the Region in which the Gift Card can be used. - type: string - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostGiftCardsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostGiftCardsReq.yaml deleted file mode 100644 index 1704d9a3e2..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostGiftCardsReq.yaml +++ /dev/null @@ -1,27 +0,0 @@ -type: object -description: The details of the gift card to create. -required: - - region_id -properties: - value: - type: integer - description: The value (excluding VAT) that the Gift Card should represent. - is_disabled: - type: boolean - description: >- - Whether the Gift Card is disabled on creation. If set to `true`, the gift - card will not be available for customers. - ends_at: - type: string - format: date-time - description: The date and time at which the Gift Card should no longer be available. - region_id: - description: The ID of the Region in which the Gift Card can be used. - type: string - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml index 5d28182435..bf0295b65b 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml @@ -1,57 +1,56 @@ type: object -description: The attributes to update in an inventory item. +description: SUMMARY +x-schemaName: AdminPostInventoryItemsInventoryItemReq properties: - hs_code: - description: >- - The Harmonized System code of the Inventory Item. May be used by - Fulfillment Providers to pass customs information to shipping carriers. + sku: type: string + title: sku + description: The inventory item's sku. origin_country: - description: >- - The country in which the Inventory Item was produced. May be used by - Fulfillment Providers to pass customs information to shipping carriers. type: string + title: origin_country + description: The inventory item's origin country. + hs_code: + type: string + title: hs_code + description: The inventory item's hs code. mid_code: - description: >- - The Manufacturers Identification code that identifies the manufacturer of - the Inventory Item. May be used by Fulfillment Providers to pass customs - information to shipping carriers. type: string + title: mid_code + description: The inventory item's mid code. material: - description: >- - The material and composition that the Inventory Item is made of, May be - used by Fulfillment Providers to pass customs information to shipping - carriers. type: string + title: material + description: The inventory item's material. weight: - description: >- - The weight of the Inventory Item. May be used in shipping rate - calculations. type: number + title: weight + description: The inventory item's weight. height: - description: >- - The height of the Inventory Item. May be used in shipping rate - calculations. - type: number - width: - description: >- - The width of the Inventory Item. May be used in shipping rate - calculations. type: number + title: height + description: The inventory item's height. length: - description: >- - The length of the Inventory Item. May be used in shipping rate - calculations. type: number + title: length + description: The inventory item's length. + width: + type: number + title: width + description: The inventory item's width. title: + type: string + title: title description: The inventory item's title. - type: string description: + type: string + title: description description: The inventory item's description. - type: string thumbnail: - description: The inventory item's thumbnail. type: string + title: thumbnail + description: The inventory item's thumbnail. requires_shipping: - description: Whether the item requires shipping. type: boolean + title: requires_shipping + description: The inventory item's requires shipping. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml index 27f8b44407..444b8870c0 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml @@ -1,8 +1,12 @@ type: object +description: SUMMARY +x-schemaName: AdminPostInventoryItemsItemLocationLevelsLevelReq properties: - stocked_quantity: - description: the total stock quantity of an inventory item at the given location ID - type: number incoming_quantity: - description: the incoming stock quantity of an inventory item at the given location ID type: number + title: incoming_quantity + description: The inventory item's incoming quantity. + stocked_quantity: + type: number + title: stocked_quantity + description: The inventory item's stocked quantity. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml index c7c1dc67ba..0bdd7938fe 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml @@ -1,15 +1,19 @@ type: object -description: The details of the location level to create. +description: SUMMARY +x-schemaName: AdminPostInventoryItemsItemLocationLevelsReq required: - location_id - stocked_quantity properties: location_id: - description: the ID of the stock location type: string + title: location_id + description: The inventory item's location id. stocked_quantity: - description: the stock quantity of the inventory item at this location type: number + title: stocked_quantity + description: The inventory item's stocked quantity. incoming_quantity: - description: the incoming stock quantity of the inventory item at this location type: number + title: incoming_quantity + description: The inventory item's incoming quantity. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsReq.yaml index 1516b42d4a..d97997e360 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsReq.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPostInventoryItemsReq.yaml @@ -1,91 +1,56 @@ type: object -description: The details of the inventory item to create. -required: - - variant_id +description: SUMMARY +x-schemaName: AdminPostInventoryItemsReq properties: - variant_id: - description: The ID of the variant to create the inventory item for. - type: string sku: - description: The unique SKU of the associated Product Variant. - type: string - ean: - description: The EAN number of the item. - type: string - upc: - description: The UPC number of the item. - type: string - barcode: - description: A generic GTIN field for the Product Variant. type: string + title: sku + description: The inventory item's sku. hs_code: - description: >- - The Harmonized System code of the Inventory Item. May be used by - Fulfillment Providers to pass customs information to shipping carriers. type: string - inventory_quantity: - description: The amount of stock kept of the associated Product Variant. - type: integer - default: 0 - allow_backorder: - description: Whether the associated Product Variant can be purchased when out of stock. - type: boolean - manage_inventory: - description: >- - Whether Medusa should keep track of the inventory for the associated - Product Variant. - type: boolean - default: true + title: hs_code + description: The inventory item's hs code. weight: - description: >- - The weight of the Inventory Item. May be used in shipping rate - calculations. type: number + title: weight + description: The inventory item's weight. length: - description: >- - The length of the Inventory Item. May be used in shipping rate - calculations. type: number + title: length + description: The inventory item's length. height: - description: >- - The height of the Inventory Item. May be used in shipping rate - calculations. type: number + title: height + description: The inventory item's height. width: - description: >- - The width of the Inventory Item. May be used in shipping rate - calculations. type: number + title: width + description: The inventory item's width. origin_country: - description: >- - The country in which the Inventory Item was produced. May be used by - Fulfillment Providers to pass customs information to shipping carriers. type: string + title: origin_country + description: The inventory item's origin country. mid_code: - description: >- - The Manufacturers Identification code that identifies the manufacturer of - the Inventory Item. May be used by Fulfillment Providers to pass customs - information to shipping carriers. type: string + title: mid_code + description: The inventory item's mid code. material: - description: >- - The material and composition that the Inventory Item is made of, May be - used by Fulfillment Providers to pass customs information to shipping - carriers. type: string + title: material + description: The inventory item's material. title: + type: string + title: title description: The inventory item's title. - type: string description: + type: string + title: description description: The inventory item's description. - type: string thumbnail: - description: The inventory item's thumbnail. type: string + title: thumbnail + description: The inventory item's thumbnail. metadata: - description: An optional set of key-value pairs with additional information. type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute + description: The inventory item's metadata. + properties: {} diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInvitesInviteAcceptReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostInvitesInviteAcceptReq.yaml index 3e12386930..0843980500 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInvitesInviteAcceptReq.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPostInvitesInviteAcceptReq.yaml @@ -1,29 +1,15 @@ type: object -description: The details of the invite to be accepted. +description: SUMMARY +x-schemaName: AdminPostInvitesInviteAcceptReq required: - - token - - user + - first_name + - last_name properties: - token: - description: >- - The token of the invite to accept. This is a unique token generated when - the invite was created or resent. + first_name: type: string - user: - description: The details of the user to create. - type: object - required: - - first_name - - last_name - - password - properties: - first_name: - type: string - description: the first name of the User - last_name: - type: string - description: the last name of the User - password: - description: The password for the User - type: string - format: password + title: first_name + description: The invite's first name. + last_name: + type: string + title: last_name + description: The invite's last name. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInvitesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostInvitesReq.yaml deleted file mode 100644 index 5cad953bc6..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostInvitesReq.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: object -required: - - user - - role -properties: - user: - description: >- - The email associated with the invite. Once the invite is accepted, the - email will be associated with the created user. - type: string - format: email - role: - description: >- - The role of the user to be created. This does not actually change the - privileges of the user that is eventually created. - type: string - enum: - - admin - - member - - developer diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostNotesNoteReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostNotesNoteReq.yaml deleted file mode 100644 index c275eb99c2..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostNotesNoteReq.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The details to update of the note. -required: - - value -properties: - value: - type: string - description: The description of the Note. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostNotesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostNotesReq.yaml deleted file mode 100644 index 2ece35fa61..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostNotesReq.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -description: The details of the note to be created. -required: - - resource_id - - resource_type - - value -properties: - resource_id: - type: string - description: >- - The ID of the resource which the Note relates to. For example, an order - ID. - resource_type: - type: string - description: The type of resource which the Note relates to. For example, `order`. - value: - type: string - description: The content of the Note to create. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostNotificationsNotificationResendReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostNotificationsNotificationResendReq.yaml deleted file mode 100644 index 8f4484779c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostNotificationsNotificationResendReq.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The resend details. -properties: - to: - description: >- - A new address or user identifier that the Notification should be sent to. - If not provided, the previous `to` field of the notification will be used. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsEditLineItemsLineItemReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsEditLineItemsLineItemReq.yaml deleted file mode 100644 index 988baaa0c3..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsEditLineItemsLineItemReq.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The details to create or update of the line item change. -required: - - quantity -properties: - quantity: - description: The quantity to update - type: number diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsEditLineItemsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsEditLineItemsReq.yaml deleted file mode 100644 index ed5d1236f9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsEditLineItemsReq.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: object -description: The details of the line item change to create. -required: - - variant_id - - quantity -properties: - variant_id: - description: The ID of the product variant associated with the item. - type: string - quantity: - description: The quantity of the item. - type: number - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsOrderEditReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsOrderEditReq.yaml deleted file mode 100644 index 76f864ed6d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsOrderEditReq.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: object -description: The details to update of the order edit. -properties: - internal_note: - description: An optional note to create or update in the order edit. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsReq.yaml deleted file mode 100644 index 5e3b9ce6f1..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrderEditsReq.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: object -description: The details of the order edit to create. -required: - - order_id -properties: - order_id: - description: The ID of the order to create the edit for. - type: string - internal_note: - description: An optional note to associate with the order edit. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsClaimFulfillmentsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsClaimFulfillmentsReq.yaml deleted file mode 100644 index e19eb4e160..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsClaimFulfillmentsReq.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -properties: - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - no_notification: - description: >- - If set to `true`, no notification will be sent to the customer related to - this Claim. - type: boolean - location_id: - description: The ID of the fulfillment's location. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsClaimReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsClaimReq.yaml deleted file mode 100644 index 273c864064..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsClaimReq.yaml +++ /dev/null @@ -1,93 +0,0 @@ -type: object -properties: - claim_items: - description: The Claim Items that the Claim will consist of. - type: array - items: - type: object - required: - - id - - images - - tags - properties: - id: - description: The ID of the Claim Item. - type: string - item_id: - description: The ID of the Line Item that will be claimed. - type: string - quantity: - description: The number of items that will be returned - type: integer - note: - description: Short text describing the Claim Item in further detail. - type: string - reason: - description: The reason for the Claim - type: string - enum: - - missing_item - - wrong_item - - production_failure - - other - tags: - description: A list o tags to add to the Claim Item - type: array - items: - type: object - properties: - id: - type: string - description: Tag ID - value: - type: string - description: Tag value - images: - description: A list of image URL's that will be associated with the Claim - type: array - items: - type: object - properties: - id: - type: string - description: Image ID - url: - type: string - description: Image URL - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: >- - Learn about the metadata attribute, and how to delete and update - it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - shipping_methods: - description: The Shipping Methods to send the additional Line Items with. - type: array - items: - type: object - properties: - id: - description: The ID of an existing Shipping Method - type: string - option_id: - description: The ID of the Shipping Option to create a Shipping Method from - type: string - price: - description: The price to charge for the Shipping Method - type: integer - data: - description: An optional set of key-value pairs to hold additional information. - type: object - no_notification: - description: If set to true no notification will be send related to this Swap. - type: boolean - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsClaimShipmentsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsClaimShipmentsReq.yaml deleted file mode 100644 index 1599973734..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsClaimShipmentsReq.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: object -required: - - fulfillment_id -properties: - fulfillment_id: - description: The ID of the Fulfillment. - type: string - tracking_numbers: - description: An array of tracking numbers for the shipment. - type: array - items: - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsReq.yaml deleted file mode 100644 index ff71675024..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderClaimsReq.yaml +++ /dev/null @@ -1,124 +0,0 @@ -type: object -description: The details of the claim to be created. -required: - - type - - claim_items -properties: - type: - description: >- - The type of the Claim. This will determine how the Claim is treated: - `replace` Claims will result in a Fulfillment with new items being - created, while a `refund` Claim will refund the amount paid for the - claimed items. - type: string - enum: - - replace - - refund - claim_items: - description: The Claim Items that the Claim will consist of. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the Line Item that will be claimed. - type: string - quantity: - description: The number of items that will be returned - type: integer - note: - description: Short text describing the Claim Item in further detail. - type: string - reason: - description: The reason for the Claim - type: string - enum: - - missing_item - - wrong_item - - production_failure - - other - tags: - description: A list of tags to add to the Claim Item - type: array - items: - type: string - images: - description: A list of image URL's that will be associated with the Claim - items: - type: string - return_shipping: - description: >- - Optional details for the Return Shipping Method, if the items are to be - sent back. Providing this field will result in a return being created and - associated with the claim. - type: object - properties: - option_id: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. - price: - type: integer - description: The price to charge for the Shipping Method. - additional_items: - description: >- - The new items to send to the Customer. This is only used if the claim's - type is `replace`. - type: array - items: - type: object - required: - - variant_id - - quantity - properties: - variant_id: - description: The ID of the Product Variant. - type: string - quantity: - description: The quantity of the Product Variant. - type: integer - shipping_methods: - description: >- - The Shipping Methods to send the additional Line Items with. This is only - used if the claim's type is `replace`. - type: array - items: - type: object - properties: - id: - description: The ID of an existing Shipping Method - type: string - option_id: - description: The ID of the Shipping Option to create a Shipping Method from - type: string - price: - description: The price to charge for the Shipping Method - type: integer - data: - description: An optional set of key-value pairs to hold additional information. - type: object - shipping_address: - description: >- - An optional shipping address to send the claimed items to. If not - provided, the parent order's shipping address will be used. - $ref: ./AddressPayload.yaml - refund_amount: - description: >- - The amount to refund the customer. This is used when the claim's type is - `refund`. - type: integer - no_notification: - description: If set to true no notification will be send related to this Claim. - type: boolean - return_location_id: - description: The ID of the location used for the associated return. - type: string - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderFulfillmentsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderFulfillmentsReq.yaml deleted file mode 100644 index 1eb020638b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderFulfillmentsReq.yaml +++ /dev/null @@ -1,35 +0,0 @@ -type: object -description: The details of the fulfillment to be created. -required: - - items -properties: - items: - description: The Line Items to include in the Fulfillment. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the Line Item to fulfill. - type: string - quantity: - description: The quantity of the Line Item to fulfill. - type: integer - location_id: - type: string - description: The ID of the location where the items will be fulfilled from. - no_notification: - description: >- - If set to `true`, no notification will be sent to the customer related to - this fulfillment. - type: boolean - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderRefundsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderRefundsReq.yaml deleted file mode 100644 index 07db31127d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderRefundsReq.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The details of the order refund. -required: - - amount - - reason -properties: - amount: - description: >- - The amount to refund. It should be less than or equal the - `refundable_amount` of the order. - type: integer - reason: - description: The reason for the Refund. - type: string - note: - description: A note with additional details about the Refund. - type: string - no_notification: - description: >- - If set to `true`, no notification will be sent to the customer related to - this Refund. - type: boolean diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderReq.yaml deleted file mode 100644 index fa7a2a7530..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderReq.yaml +++ /dev/null @@ -1,64 +0,0 @@ -type: object -description: The details to update of the order. -properties: - email: - description: The email associated with the order - type: string - billing_address: - description: The order's billing address - $ref: ./AddressPayload.yaml - shipping_address: - description: The order's shipping address - $ref: ./AddressPayload.yaml - items: - description: The line items of the order - type: array - items: - $ref: ./LineItem.yaml - region: - description: ID of the region that the order is associated with. - type: string - discounts: - description: The discounts applied to the order - type: array - items: - $ref: ./Discount.yaml - customer_id: - description: The ID of the customer associated with the order. - type: string - payment_method: - description: The payment method chosen for the order. - type: object - properties: - provider_id: - type: string - description: The ID of the payment provider. - data: - description: Any data relevant for the given payment method. - type: object - shipping_method: - description: The Shipping Method used for shipping the order. - type: object - properties: - provider_id: - type: string - description: The ID of the shipping provider. - profile_id: - type: string - description: The ID of the shipping profile. - price: - type: integer - description: The price of the shipping. - data: - type: object - description: Any data relevant to the specific shipping method. - items: - type: array - items: - $ref: ./LineItem.yaml - description: Items to ship - no_notification: - description: >- - If set to `true`, no notification will be sent to the customer related to - this order. - type: boolean diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderReturnsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderReturnsReq.yaml deleted file mode 100644 index 6526c405a8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderReturnsReq.yaml +++ /dev/null @@ -1,56 +0,0 @@ -type: object -description: The details of the requested return. -required: - - items -properties: - items: - description: The line items that will be returned. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the Line Item. - type: string - reason_id: - description: The ID of the Return Reason to use. - type: string - note: - description: An optional note with information about the Return. - type: string - quantity: - description: The quantity of the Line Item. - type: integer - return_shipping: - description: The Shipping Method to be used to handle the return shipment. - type: object - properties: - option_id: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. - price: - type: integer - description: The price to charge for the Shipping Method. - note: - description: An optional note with information about the Return. - type: string - receive_now: - description: >- - A flag to indicate if the Return should be registerd as received - immediately. - type: boolean - default: false - no_notification: - description: >- - If set to `true`, no notification will be sent to the customer related to - this Return. - type: boolean - refund: - description: The amount to refund. - type: integer - location_id: - description: The ID of the location used for the return. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderShipmentReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderShipmentReq.yaml deleted file mode 100644 index 164ef75638..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderShipmentReq.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The details of the shipment to create. -required: - - fulfillment_id -properties: - fulfillment_id: - description: The ID of the Fulfillment. - type: string - tracking_numbers: - description: The tracking numbers for the shipment. - type: array - items: - type: string - no_notification: - description: If set to true no notification will be send related to this Shipment. - type: boolean diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderShippingMethodsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderShippingMethodsReq.yaml deleted file mode 100644 index ec49d666e9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderShippingMethodsReq.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: The shipping method's details. -required: - - price - - option_id -properties: - price: - type: number - description: The price (excluding VAT) that should be charged for the Shipping Method - option_id: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. - data: - type: object - description: >- - The data required for the Shipping Option to create a Shipping Method. - This depends on the Fulfillment Provider. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderSwapsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderSwapsReq.yaml deleted file mode 100644 index 75ca36674a..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderSwapsReq.yaml +++ /dev/null @@ -1,85 +0,0 @@ -type: object -description: The details of the swap to create. -required: - - return_items -properties: - return_items: - description: The Line Items to associate with the swap's return. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the Line Item that will be returned. - type: string - quantity: - description: The number of items that will be returned - type: integer - reason_id: - description: The ID of the Return Reason to use. - type: string - note: - description: An optional note with information about the Return. - type: string - return_shipping: - description: The shipping method associated with the swap's return. - type: object - required: - - option_id - properties: - option_id: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. - price: - type: integer - description: The price to charge for the Shipping Method. - additional_items: - description: The new items to send to the Customer. - type: array - items: - type: object - required: - - variant_id - - quantity - properties: - variant_id: - description: The ID of the Product Variant. - type: string - quantity: - description: The quantity of the Product Variant. - type: integer - sales_channel_id: - type: string - description: The ID of the sales channel associated with the swap. - custom_shipping_options: - description: >- - An array of custom shipping options to potentially create a Shipping - Method from to send the additional items. - type: array - items: - type: object - required: - - option_id - - price - properties: - option_id: - description: The ID of the Shipping Option. - type: string - price: - description: The custom price of the Shipping Option. - type: integer - no_notification: - description: >- - If set to `true`, no notification will be sent to the customer related to - this Swap. - type: boolean - return_location_id: - type: string - description: The ID of the location used for the associated return. - allow_backorder: - description: If set to `true`, swaps can be completed with items out of stock - type: boolean - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderSwapsSwapFulfillmentsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderSwapsSwapFulfillmentsReq.yaml deleted file mode 100644 index 8bea2ccb6a..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderSwapsSwapFulfillmentsReq.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -properties: - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - no_notification: - description: >- - If set to `true`, no notification will be sent to the customer related to - this swap. - type: boolean - location_id: - description: The ID of the fulfillment's location. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderSwapsSwapShipmentsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderSwapsSwapShipmentsReq.yaml deleted file mode 100644 index fab12e01e5..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostOrdersOrderSwapsSwapShipmentsReq.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -required: - - fulfillment_id -properties: - fulfillment_id: - description: The ID of the Fulfillment. - type: string - tracking_numbers: - description: The tracking numbers for the shipment. - type: array - items: - type: string - no_notification: - description: If set to true no notification will be sent related to this Claim. - type: boolean diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPaymentRefundsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPaymentRefundsReq.yaml deleted file mode 100644 index 25c74f1d4b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPaymentRefundsReq.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: The details of the refund to create. -required: - - amount - - reason -properties: - amount: - description: The amount to refund. - type: integer - reason: - description: The reason for the Refund. - type: string - note: - description: A note with additional details about the Refund. - type: string diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPaymentsCapturesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPaymentsCapturesReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPaymentsCapturesReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostPaymentsCapturesReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPaymentsRefundsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPaymentsRefundsReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPaymentsRefundsReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostPaymentsRefundsReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListPricesPricesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListPricesPricesReq.yaml deleted file mode 100644 index bed0213a0e..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListPricesPricesReq.yaml +++ /dev/null @@ -1,45 +0,0 @@ -type: object -description: The details of the prices to add. -properties: - prices: - description: The prices to update or add. - type: array - items: - type: object - required: - - amount - - variant_id - properties: - id: - description: The ID of the price. - type: string - region_id: - description: >- - The ID of the Region for which the price is used. This is only - required if `currecny_code` is not provided. - type: string - currency_code: - description: >- - The 3 character ISO currency code for which the price will be used. - This is only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - variant_id: - description: The ID of the Variant for which the price is used. - type: string - amount: - description: The amount to charge for the Product Variant. - type: integer - min_quantity: - description: The minimum quantity for which the price will be used. - type: integer - max_quantity: - description: The maximum quantity for which the price will be used. - type: integer - override: - description: >- - If set to `true`, the prices will replace all existing prices associated - with the Price List. - type: boolean diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsPriceListPriceListReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsPriceListPriceListReq.yaml deleted file mode 100644 index e053f0dbf5..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsPriceListPriceListReq.yaml +++ /dev/null @@ -1,83 +0,0 @@ -type: object -description: The details to update of the payment collection. -properties: - name: - description: The name of the Price List - type: string - description: - description: The description of the Price List. - type: string - starts_at: - description: The date with timezone that the Price List starts being valid. - type: string - format: date - ends_at: - description: The date with timezone that the Price List ends being valid. - type: string - format: date - type: - description: The type of the Price List. - type: string - enum: - - sale - - override - status: - description: >- - The status of the Price List. If the status is set to `draft`, the prices - created in the price list will not be available of the customer. - type: string - enum: - - active - - draft - prices: - description: The prices of the Price List. - type: array - items: - type: object - required: - - amount - - variant_id - properties: - id: - description: The ID of the price. - type: string - region_id: - description: >- - The ID of the Region for which the price is used. This is only - required if `currecny_code` is not provided. - type: string - currency_code: - description: >- - The 3 character ISO currency code for which the price will be used. - This is only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - variant_id: - description: The ID of the Variant for which the price is used. - type: string - amount: - description: The amount to charge for the Product Variant. - type: integer - min_quantity: - description: The minimum quantity for which the price will be used. - type: integer - max_quantity: - description: The maximum quantity for which the price will be used. - type: integer - customer_groups: - type: array - description: An array of customer groups that the Price List applies to. - items: - type: object - required: - - id - properties: - id: - description: The ID of a customer group - type: string - includes_tax: - description: Tax included in prices of price list - x-featureFlag: tax_inclusive_pricing - type: boolean diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPriceListsPriceListPricesBatchAddReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsPriceListPricesBatchAddReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPriceListsPriceListPricesBatchAddReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsPriceListPricesBatchAddReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPriceListsPriceListPricesBatchRemoveReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsPriceListPricesBatchRemoveReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPriceListsPriceListPricesBatchRemoveReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsPriceListPricesBatchRemoveReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsPriceListReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsPriceListReq.yaml index ec65faee0a..544cae040d 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsPriceListReq.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsPriceListReq.yaml @@ -1,85 +1,64 @@ type: object -description: The details of the price list to create. +description: SUMMARY +x-schemaName: AdminPostPriceListsPriceListReq required: - - name - - description - - type - prices properties: - name: - description: The name of the Price List. + title: type: string + title: title + description: The price list's title. description: - description: The description of the Price List. type: string + title: description + description: The price list's description. starts_at: - description: The date with timezone that the Price List starts being valid. type: string - format: date + title: starts_at + description: The price list's starts at. ends_at: - description: The date with timezone that the Price List ends being valid. type: string - format: date - type: - description: The type of the Price List. - type: string - enum: - - sale - - override - status: - description: >- - The status of the Price List. If the status is set to `draft`, the prices - created in the price list will not be available of the customer. - type: string - enum: - - active - - draft + title: ends_at + description: The price list's ends at. + status: {} + type: {} prices: - description: The prices of the Price List. type: array + description: The price list's prices. items: type: object + description: The price's prices. + x-schemaName: AdminPriceListPricesCreateReq required: + - currency_code - amount - variant_id properties: - region_id: - description: >- - The ID of the Region for which the price is used. This is only - required if `currecny_code` is not provided. - type: string currency_code: - description: >- - The 3 character ISO currency code for which the price will be used. - This is only required if `region_id` is not provided. type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. + title: currency_code + description: The price's currency code. amount: - description: The amount to charge for the Product Variant. - type: integer + type: number + title: amount + description: The price's amount. variant_id: - description: The ID of the Variant for which the price is used. type: string + title: variant_id + description: The price's variant id. min_quantity: - description: The minimum quantity for which the price will be used. - type: integer + type: number + title: min_quantity + description: The price's min quantity. max_quantity: - description: The maximum quantity for which the price will be used. - type: integer - customer_groups: - type: array - description: An array of customer groups that the Price List applies to. - items: - type: object - required: - - id - properties: - id: - description: The ID of a customer group - type: string - includes_tax: - description: Tax included in prices of price list - x-featureFlag: tax_inclusive_pricing - type: boolean + type: number + title: max_quantity + description: The price's max quantity. + rules: + type: object + description: The price's rules. + properties: {} + rules: + type: object + description: The price list's rules. + properties: {} diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPriceListsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPriceListsReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostPriceListsReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPricingRuleTypesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPricingRuleTypesReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPricingRuleTypesReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostPricingRuleTypesReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPricingRuleTypesRuleTypeReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPricingRuleTypesRuleTypeReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPricingRuleTypesRuleTypeReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostPricingRuleTypesRuleTypeReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductCategoriesCategoryProductsBatchReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductCategoriesCategoryProductsBatchReq.yaml deleted file mode 100644 index 5d95e9141d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductCategoriesCategoryProductsBatchReq.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The details of the products to add to the product category. -required: - - product_ids -properties: - product_ids: - description: The IDs of the products to add to the product category - type: array - items: - type: object - required: - - id - properties: - id: - type: string - description: The ID of the product diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductCategoriesCategoryReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductCategoriesCategoryReq.yaml deleted file mode 100644 index 066991c4c8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductCategoriesCategoryReq.yaml +++ /dev/null @@ -1,31 +0,0 @@ -type: object -description: The details to update of the product category. -properties: - name: - type: string - description: The name to identify the Product Category by. - description: - type: string - description: An optional text field to describe the Product Category by. - handle: - type: string - description: A handle to be used in slugs. - is_internal: - type: boolean - description: A flag to make product category an internal category for admins - is_active: - type: boolean - description: A flag to make product category visible/hidden in the store front - parent_category_id: - type: string - description: The ID of the parent product category - rank: - type: number - description: The rank of the category in the tree node (starting from 0) - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductCategoriesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductCategoriesReq.yaml deleted file mode 100644 index e68357b5d9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductCategoriesReq.yaml +++ /dev/null @@ -1,35 +0,0 @@ -type: object -description: The details of the product category to create. -required: - - name -properties: - name: - type: string - description: The name of the product category - description: - type: string - description: The description of the product category. - handle: - type: string - description: >- - The handle of the product category. If none is provided, the kebab-case - version of the name will be used. This field can be used as a slug in - URLs. - is_internal: - type: boolean - description: If set to `true`, the product category will only be available to admins. - is_active: - type: boolean - description: >- - If set to `false`, the product category will not be available in the - storefront. - parent_category_id: - type: string - description: The ID of the parent product category - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductMetadataReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductMetadataReq.yaml deleted file mode 100644 index bb97fc5ea7..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductMetadataReq.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: object -required: - - key - - value -properties: - key: - description: The metadata key - type: string - value: - description: The metadata value - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductOptionsOption.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductOptionsOption.yaml deleted file mode 100644 index 2e287f30d7..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductOptionsOption.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: object -required: - - title -properties: - title: - description: The title of the Product Option - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductOptionsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductOptionsReq.yaml deleted file mode 100644 index a8aebb777b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductOptionsReq.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: object -description: The details of the product option to create. -required: - - title -properties: - title: - description: The title the Product Option. - type: string - example: Size diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductReq.yaml deleted file mode 100644 index d493778ddf..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductReq.yaml +++ /dev/null @@ -1,268 +0,0 @@ -type: object -description: The details to update of the product. -properties: - title: - description: The title of the Product - type: string - subtitle: - description: The subtitle of the Product - type: string - description: - description: The description of the Product. - type: string - discountable: - description: >- - A flag to indicate if discounts can be applied to the Line Items generated - from this Product - type: boolean - images: - description: >- - An array of images of the Product. Each value in the array is a URL to the - image. You can use the upload API Routes to upload the image and obtain a - URL. - type: array - items: - type: string - thumbnail: - description: >- - The thumbnail to use for the Product. The value is a URL to the thumbnail. - You can use the upload API Routes to upload the thumbnail and obtain a - URL. - type: string - handle: - description: >- - A unique handle to identify the Product by. If not provided, the - kebab-case version of the product title will be used. This can be used as - a slug in URLs. - type: string - status: - description: >- - The status of the product. The product is shown to the customer only if - its status is `published`. - type: string - enum: - - draft - - proposed - - published - - rejected - type: - description: The Product Type to associate the Product with. - type: object - required: - - value - properties: - id: - description: >- - The ID of an existing Product Type. If not provided, a new product - type will be created. - type: string - value: - description: The value of the Product Type. - type: string - collection_id: - description: The ID of the Product Collection the Product belongs to. - type: string - tags: - description: Product Tags to associate the Product with. - type: array - items: - type: object - required: - - value - properties: - id: - description: >- - The ID of an existing Product Tag. If not provided, a new product - tag will be created. - type: string - value: - description: >- - The value of the Tag. If the `id` is provided, the value of the - existing tag will be updated. - type: string - sales_channels: - description: Sales channels to associate the Product with. - type: array - items: - type: object - required: - - id - properties: - id: - description: The ID of an existing Sales channel. - type: string - categories: - description: Product categories to add the Product to. - x-featureFlag: product_categories - type: array - items: - required: - - id - properties: - id: - description: The ID of a Product Category. - type: string - variants: - description: >- - An array of Product Variants to create with the Product. Each product - variant must have a unique combination of Product Option values. - type: array - items: - type: object - properties: - id: - description: >- - The id of an existing product variant. If provided, the details of - the product variant will be updated. If not, a new product variant - will be created. - type: string - title: - description: The title of the product variant. - type: string - sku: - description: The unique SKU of the product variant. - type: string - ean: - description: The EAN number of the product variant. - type: string - upc: - description: The UPC number of the product variant. - type: string - barcode: - description: A generic GTIN field of the product variant. - type: string - hs_code: - description: The Harmonized System code of the product variant. - type: string - inventory_quantity: - description: The amount of stock kept of the product variant. - type: integer - allow_backorder: - description: Whether the product variant can be purchased when out of stock. - type: boolean - manage_inventory: - description: >- - Whether Medusa should keep track of the inventory of this product - variant. - type: boolean - weight: - description: The weight of the product variant. - type: number - length: - description: The length of the product variant. - type: number - height: - description: The height of the product variant. - type: number - width: - description: The width of the product variant. - type: number - origin_country: - description: The country of origin of the product variant. - type: string - mid_code: - description: The Manufacturer Identification code of the product variant. - type: string - material: - description: The material composition of the product variant. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: >- - Learn about the metadata attribute, and how to delete and update - it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - prices: - type: array - description: >- - An array of product variant prices. A product variant can have - different prices for each region or currency code. - externalDocs: - url: >- - https://docs.medusajs.com/modules/products/admin/manage-products#product-variant-prices - description: Product variant pricing. - items: - type: object - required: - - amount - properties: - id: - description: >- - The ID of the Price. If provided, the existing price will be - updated. Otherwise, a new price will be created. - type: string - region_id: - description: >- - The ID of the Region the price will be used in. This is only - required if `currency_code` is not provided. - type: string - currency_code: - description: >- - The 3 character ISO currency code the price will be used in. - This is only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - amount: - description: The price amount. - type: integer - min_quantity: - description: >- - The minimum quantity required to be added to the cart for the - price to be used. - type: integer - max_quantity: - description: >- - The maximum quantity required to be added to the cart for the - price to be used. - type: integer - options: - type: array - description: An array of Product Option values that the variant corresponds to. - items: - type: object - required: - - option_id - - value - properties: - option_id: - description: The ID of the Option. - type: string - value: - description: The value of the Product Option. - type: string - weight: - description: The weight of the Product. - type: number - length: - description: The length of the Product. - type: number - height: - description: The height of the Product. - type: number - width: - description: The width of the Product. - type: number - hs_code: - description: The Harmonized System code of the product variant. - type: string - origin_country: - description: The country of origin of the Product. - type: string - mid_code: - description: The Manufacturer Identification code of the Product. - type: string - material: - description: The material composition of the Product. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductVariantsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductVariantsReq.yaml deleted file mode 100644 index 4714294c7f..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductVariantsReq.yaml +++ /dev/null @@ -1,119 +0,0 @@ -type: object -description: The details of the product variant to create. -required: - - title - - prices - - options -properties: - title: - description: The title of the product variant. - type: string - sku: - description: The unique SKU of the product variant. - type: string - ean: - description: The EAN number of the product variant. - type: string - upc: - description: The UPC number of the product variant. - type: string - barcode: - description: A generic GTIN field of the product variant. - type: string - hs_code: - description: The Harmonized System code of the product variant. - type: string - inventory_quantity: - description: The amount of stock kept of the product variant. - type: integer - default: 0 - allow_backorder: - description: Whether the product variant can be purchased when out of stock. - type: boolean - manage_inventory: - description: Whether Medusa should keep track of the inventory of this product variant. - type: boolean - default: true - weight: - description: The wieght of the product variant. - type: number - length: - description: The length of the product variant. - type: number - height: - description: The height of the product variant. - type: number - width: - description: The width of the product variant. - type: number - origin_country: - description: The country of origin of the product variant. - type: string - mid_code: - description: The Manufacturer Identification code of the product variant. - type: string - material: - description: The material composition of the product variant. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - prices: - type: array - description: >- - An array of product variant prices. A product variant can have different - prices for each region or currency code. - externalDocs: - url: >- - https://docs.medusajs.com/modules/products/admin/manage-products#product-variant-prices - description: Product variant pricing. - items: - type: object - required: - - amount - properties: - region_id: - description: >- - The ID of the Region the price will be used in. This is only - required if `currency_code` is not provided. - type: string - currency_code: - description: >- - The 3 character ISO currency code the price will be used in. This is - only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - amount: - description: The price amount. - type: integer - min_quantity: - description: >- - The minimum quantity required to be added to the cart for the price - to be used. - type: integer - max_quantity: - description: >- - The maximum quantity required to be added to the cart for the price - to be used. - type: integer - options: - type: array - description: An array of Product Option values that the variant corresponds to. - items: - type: object - required: - - option_id - - value - properties: - option_id: - description: The ID of the Product Option. - type: string - value: - description: A value to give to the Product Option. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductVariantsVariantReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductVariantsVariantReq.yaml deleted file mode 100644 index af5c4c58a6..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsProductVariantsVariantReq.yaml +++ /dev/null @@ -1,117 +0,0 @@ -type: object -properties: - title: - description: The title of the product variant. - type: string - sku: - description: The unique SKU of the product variant. - type: string - ean: - description: The EAN number of the item. - type: string - upc: - description: The UPC number of the item. - type: string - barcode: - description: A generic GTIN field of the product variant. - type: string - hs_code: - description: The Harmonized System code of the product variant. - type: string - inventory_quantity: - description: The amount of stock kept of the product variant. - type: integer - allow_backorder: - description: Whether the product variant can be purchased when out of stock. - type: boolean - manage_inventory: - description: Whether Medusa should keep track of the inventory of this product variant. - type: boolean - weight: - description: The weight of the product variant. - type: number - length: - description: The length of the product variant. - type: number - height: - description: The height of the product variant. - type: number - width: - description: The width of the product variant. - type: number - origin_country: - description: The country of origin of the product variant. - type: string - mid_code: - description: The Manufacturer Identification code of the product variant. - type: string - material: - description: The material composition of the product variant. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - prices: - type: array - description: >- - An array of product variant prices. A product variant can have different - prices for each region or currency code. - externalDocs: - url: >- - https://docs.medusajs.com/modules/products/admin/manage-products#product-variant-prices - description: Product variant pricing. - items: - type: object - required: - - amount - properties: - id: - description: >- - The ID of the price. If provided, the existing price will be - updated. Otherwise, a new price will be created. - type: string - region_id: - description: >- - The ID of the Region the price will be used in. This is only - required if `currency_code` is not provided. - type: string - currency_code: - description: >- - The 3 character ISO currency code the price will be used in. This is - only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - amount: - description: The price amount. - type: integer - min_quantity: - description: >- - The minimum quantity required to be added to the cart for the price - to be used. - type: integer - max_quantity: - description: >- - The maximum quantity required to be added to the cart for the price - to be used. - type: integer - options: - type: array - description: An array of Product Option values that the variant corresponds to. - items: - type: object - required: - - option_id - - value - properties: - option_id: - description: The ID of the Product Option. - type: string - value: - description: The value of the Product Option. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsReq.yaml deleted file mode 100644 index 1af53e32cc..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsReq.yaml +++ /dev/null @@ -1,290 +0,0 @@ -type: object -description: The details of the product to create. -required: - - title -properties: - title: - description: The title of the Product - type: string - subtitle: - description: The subtitle of the Product - type: string - description: - description: The description of the Product. - type: string - is_giftcard: - description: >- - A flag to indicate if the Product represents a Gift Card. Purchasing - Products with this flag set to `true` will result in a Gift Card being - created. - type: boolean - default: false - discountable: - description: >- - A flag to indicate if discounts can be applied to the Line Items generated - from this Product - type: boolean - default: true - images: - description: >- - An array of images of the Product. Each value in the array is a URL to the - image. You can use the upload API Routes to upload the image and obtain a - URL. - type: array - items: - type: string - thumbnail: - description: >- - The thumbnail to use for the Product. The value is a URL to the thumbnail. - You can use the upload API Routes to upload the thumbnail and obtain a - URL. - type: string - handle: - description: >- - A unique handle to identify the Product by. If not provided, the - kebab-case version of the product title will be used. This can be used as - a slug in URLs. - type: string - status: - description: >- - The status of the product. The product is shown to the customer only if - its status is `published`. - type: string - enum: - - draft - - proposed - - published - - rejected - default: draft - type: - description: The Product Type to associate the Product with. - type: object - required: - - value - properties: - id: - description: >- - The ID of an existing Product Type. If not provided, a new product - type will be created. - type: string - value: - description: The value of the Product Type. - type: string - collection_id: - description: The ID of the Product Collection the Product belongs to. - type: string - tags: - description: Product Tags to associate the Product with. - type: array - items: - type: object - required: - - value - properties: - id: - description: >- - The ID of an existing Product Tag. If not provided, a new product - tag will be created. - type: string - value: - description: >- - The value of the Tag. If the `id` is provided, the value of the - existing tag will be updated. - type: string - sales_channels: - description: Sales channels to associate the Product with. - type: array - items: - type: object - required: - - id - properties: - id: - description: The ID of an existing Sales channel. - type: string - categories: - description: Product categories to add the Product to. - x-featureFlag: product_categories - type: array - items: - type: object - required: - - id - properties: - id: - description: The ID of a Product Category. - type: string - options: - description: >- - The Options that the Product should have. A new product option will be - created for every item in the array. - type: array - items: - type: object - required: - - title - properties: - title: - description: The title of the Product Option. - type: string - variants: - description: >- - An array of Product Variants to create with the Product. Each product - variant must have a unique combination of Product Option values. - type: array - items: - type: object - required: - - title - properties: - title: - description: The title of the Product Variant. - type: string - sku: - description: The unique SKU of the Product Variant. - type: string - ean: - description: The EAN number of the item. - type: string - upc: - description: The UPC number of the item. - type: string - barcode: - description: A generic GTIN field of the Product Variant. - type: string - hs_code: - description: The Harmonized System code of the Product Variant. - type: string - inventory_quantity: - description: The amount of stock kept of the Product Variant. - type: integer - default: 0 - allow_backorder: - description: Whether the Product Variant can be purchased when out of stock. - type: boolean - manage_inventory: - description: >- - Whether Medusa should keep track of the inventory of this Product - Variant. - type: boolean - weight: - description: The wieght of the Product Variant. - type: number - length: - description: The length of the Product Variant. - type: number - height: - description: The height of the Product Variant. - type: number - width: - description: The width of the Product Variant. - type: number - origin_country: - description: The country of origin of the Product Variant. - type: string - mid_code: - description: The Manufacturer Identification code of the Product Variant. - type: string - material: - description: The material composition of the Product Variant. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: >- - Learn about the metadata attribute, and how to delete and update - it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - prices: - type: array - description: >- - An array of product variant prices. A product variant can have - different prices for each region or currency code. - externalDocs: - url: >- - https://docs.medusajs.com/modules/products/admin/manage-products#product-variant-prices - description: Product variant pricing. - items: - type: object - required: - - amount - properties: - region_id: - description: >- - The ID of the Region the price will be used in. This is only - required if `currency_code` is not provided. - type: string - currency_code: - description: >- - The 3 character ISO currency code the price will be used in. - This is only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - amount: - description: The price amount. - type: integer - min_quantity: - description: >- - The minimum quantity required to be added to the cart for the - price to be used. - type: integer - max_quantity: - description: >- - The maximum quantity required to be added to the cart for the - price to be used. - type: integer - options: - type: array - description: >- - An array of Product Option values that the variant corresponds to. - The option values should be added into the array in the same index - as in the `options` field of the product. - externalDocs: - url: >- - https://docs.medusajs.com/modules/products/admin/manage-products#create-a-product - description: Example of how to create a product with options and variants - items: - type: object - required: - - value - properties: - value: - description: >- - The value to give for the Product Option at the same index in - the Product's `options` field. - type: string - weight: - description: The weight of the Product. - type: number - length: - description: The length of the Product. - type: number - height: - description: The height of the Product. - type: number - width: - description: The width of the Product. - type: number - hs_code: - description: The Harmonized System code of the Product. - type: string - origin_country: - description: The country of origin of the Product. - type: string - mid_code: - description: The Manufacturer Identification code of the Product. - type: string - material: - description: The material composition of the Product. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsToCollectionReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsToCollectionReq.yaml deleted file mode 100644 index 9dea69c4f5..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostProductsToCollectionReq.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: object -description: The details of the products to add to the collection. -required: - - product_ids -properties: - product_ids: - description: An array of Product IDs to add to the Product Collection. - type: array - items: - description: The ID of a Product to add to the Product Collection. - type: string diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPromotionsPromotionReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPromotionsPromotionReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPromotionsPromotionReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostPromotionsPromotionReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchUpdateReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchUpdateReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchUpdateReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostPromotionsPromotionRulesBatchUpdateReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPublishableApiKeySalesChannelsBatchReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPublishableApiKeySalesChannelsBatchReq.yaml deleted file mode 100644 index e4488d0be6..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPublishableApiKeySalesChannelsBatchReq.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The details of the sales channels to add to the publishable API key. -required: - - sales_channel_ids -properties: - sales_channel_ids: - description: The IDs of the sales channels to add to the publishable API key - type: array - items: - type: object - required: - - id - properties: - id: - type: string - description: The ID of the sales channel diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPublishableApiKeysPublishableApiKeyReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPublishableApiKeysPublishableApiKeyReq.yaml deleted file mode 100644 index 7a546010fd..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPublishableApiKeysPublishableApiKeyReq.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: object -description: The details to update of the publishable API key. -properties: - title: - description: The title of the Publishable API Key. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPublishableApiKeysReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostPublishableApiKeysReq.yaml deleted file mode 100644 index 64bce0a179..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostPublishableApiKeysReq.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The details of the publishable API key to create. -required: - - title -properties: - title: - description: The title of the publishable API key - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionCountriesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionCountriesReq.yaml deleted file mode 100644 index 67711cf9c0..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionCountriesReq.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: object -description: The details of the country to add to the region. -required: - - country_code -properties: - country_code: - description: The 2 character ISO code for the Country. - type: string - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionFulfillmentProvidersReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionFulfillmentProvidersReq.yaml deleted file mode 100644 index f952ecb909..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionFulfillmentProvidersReq.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The details of the fulfillment provider to add to the region. -required: - - provider_id -properties: - provider_id: - description: The ID of the Fulfillment Provider. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionPaymentProvidersReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionPaymentProvidersReq.yaml deleted file mode 100644 index eec9ff73b8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionPaymentProvidersReq.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The details of the payment provider to add to the region. -required: - - provider_id -properties: - provider_id: - description: The ID of the Payment Provider. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionReq.yaml deleted file mode 100644 index f979ec56b9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsRegionReq.yaml +++ /dev/null @@ -1,56 +0,0 @@ -type: object -description: The details to update of the regions. -properties: - name: - description: The name of the Region - type: string - currency_code: - description: The 3 character ISO currency code to use in the Region. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - automatic_taxes: - description: >- - If set to `true`, the Medusa backend will automatically calculate taxes - for carts in this region. If set to `false`, the taxes must be calculated - manually. - externalDocs: - url: https://docs.medusajs.com/modules/taxes/storefront/manual-calculation - description: How to calculate taxes in a storefront. - type: boolean - gift_cards_taxable: - description: If set to `true`, taxes will be applied on gift cards. - type: boolean - tax_provider_id: - description: >- - The ID of the tax provider to use. If none provided, the system tax - provider is used. - type: string - tax_code: - description: The tax code of the Region. - type: string - tax_rate: - description: The tax rate to use in the Region. - type: number - includes_tax: - x-featureFlag: tax_inclusive_pricing - description: Whether taxes are included in the prices of the region. - type: boolean - payment_providers: - description: A list of Payment Provider IDs that can be used in the Region - type: array - items: - type: string - fulfillment_providers: - description: A list of Fulfillment Provider IDs that can be used in the Region - type: array - items: - type: string - countries: - description: >- - A list of countries' 2 ISO characters that should be included in the - Region. - type: array - items: - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsReq.yaml deleted file mode 100644 index 7b81a1cf9d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostRegionsReq.yaml +++ /dev/null @@ -1,48 +0,0 @@ -type: object -description: The details of the region to create. -required: - - name - - currency_code - - tax_rate - - payment_providers - - fulfillment_providers - - countries -properties: - name: - description: The name of the Region - type: string - currency_code: - description: The 3 character ISO currency code to use in the Region. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - tax_code: - description: The tax code of the Region. - type: string - tax_rate: - description: The tax rate to use in the Region. - type: number - payment_providers: - description: A list of Payment Provider IDs that can be used in the Region - type: array - items: - type: string - fulfillment_providers: - description: A list of Fulfillment Provider IDs that can be used in the Region - type: array - items: - type: string - countries: - description: >- - A list of countries' 2 ISO characters that should be included in the - Region. - example: - - US - type: array - items: - type: string - includes_tax: - x-featureFlag: tax_inclusive_pricing - description: Whether taxes are included in the prices of the region. - type: boolean diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostReservationsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostReservationsReq.yaml deleted file mode 100644 index 03fe9386f4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostReservationsReq.yaml +++ /dev/null @@ -1,29 +0,0 @@ -type: object -description: The details of the reservation to create. -required: - - location_id - - inventory_item_id - - quantity -properties: - line_item_id: - description: The ID of the line item of the reservation. - type: string - location_id: - description: The ID of the location of the reservation. - type: string - inventory_item_id: - description: The ID of the inventory item the reservation is associated with. - type: string - quantity: - description: The quantity to reserve. - type: number - description: - description: The reservation's description. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostReservationsReservationReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostReservationsReservationReq.yaml deleted file mode 100644 index 87e6d986ca..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostReservationsReservationReq.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: object -description: The details to update of the reservation. -properties: - location_id: - description: The ID of the location associated with the reservation. - type: string - quantity: - description: The quantity to reserve. - type: number - description: - description: The reservation's description. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostReturnReasonsReasonReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostReturnReasonsReasonReq.yaml deleted file mode 100644 index 210fd0ce29..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostReturnReasonsReasonReq.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: object -description: The details to update of the return reason. -properties: - label: - description: The label to display to the Customer. - type: string - value: - description: A unique value of the return reason. - type: string - description: - description: The description of the Reason. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostReturnReasonsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostReturnReasonsReq.yaml deleted file mode 100644 index c279b67d5b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostReturnReasonsReq.yaml +++ /dev/null @@ -1,25 +0,0 @@ -type: object -description: The details of the return reason to create. -required: - - label - - value -properties: - label: - description: The label to display to the Customer. - type: string - value: - description: A unique value of the return reason. - type: string - parent_return_reason_id: - description: The ID of the parent return reason. - type: string - description: - description: The description of the Reason. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostReturnsReturnReceiveReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostReturnsReturnReceiveReq.yaml deleted file mode 100644 index 1df680e512..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostReturnsReturnReceiveReq.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: object -description: The details of the received return. -required: - - items -properties: - items: - description: The Line Items that have been received. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the Line Item. - type: string - quantity: - description: The quantity of the Line Item. - type: integer - refund: - description: The amount to refund. - type: number - location_id: - description: The ID of the location to return items from. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsChannelProductsBatchReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsChannelProductsBatchReq.yaml deleted file mode 100644 index 1ea7c4dccc..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsChannelProductsBatchReq.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The details of the products to add to the sales channel. -required: - - product_ids -properties: - product_ids: - description: The IDs of the products to add to the sales channel - type: array - items: - type: object - required: - - id - properties: - id: - type: string - description: The ID of the product diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsChannelStockLocationsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsChannelStockLocationsReq.yaml deleted file mode 100644 index a62aecc7e0..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsChannelStockLocationsReq.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: object -required: - - location_id -properties: - location_id: - description: The ID of the stock location - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsReq.yaml deleted file mode 100644 index 350e640c6e..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsReq.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -description: The details of the sales channel to create. -required: - - name -properties: - name: - description: The name of the Sales Channel - type: string - description: - description: The description of the Sales Channel - type: string - is_disabled: - description: Whether the Sales Channel is disabled. - type: boolean diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsSalesChannelReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsSalesChannelReq.yaml deleted file mode 100644 index b19fe3093e..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostSalesChannelsSalesChannelReq.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: object -description: The details to update of the sales channel. -properties: - name: - type: string - description: The name of the sales channel - description: - type: string - description: The description of the sales channel. - is_disabled: - type: boolean - description: Whether the Sales Channel is disabled. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingOptionsOptionReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingOptionsOptionReq.yaml deleted file mode 100644 index b203c31f1c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingOptionsOptionReq.yaml +++ /dev/null @@ -1,55 +0,0 @@ -type: object -description: The details to update of the shipping option. -required: - - requirements -properties: - name: - description: The name of the Shipping Option - type: string - amount: - description: >- - The amount to charge for the Shipping Option. If the `price_type` of the - shipping option is `calculated`, this amount will not actually be used. - type: integer - admin_only: - description: >- - If set to `true`, the shipping option can only be used when creating draft - orders. - type: boolean - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - requirements: - description: >- - The requirements that must be satisfied for the Shipping Option to be - available. - type: array - items: - type: object - required: - - type - - amount - properties: - id: - description: >- - The ID of an existing requirement. If an ID is passed, the existing - requirement's details are updated. Otherwise, a new requirement is - created. - type: string - type: - description: The type of the requirement - type: string - enum: - - max_subtotal - - min_subtotal - amount: - description: The amount to compare with. - type: integer - includes_tax: - description: Tax included in prices of shipping option - x-featureFlag: tax_inclusive_pricing - type: boolean diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingOptionsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingOptionsReq.yaml deleted file mode 100644 index ded76946d4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingOptionsReq.yaml +++ /dev/null @@ -1,81 +0,0 @@ -type: object -description: The details of the shipping option to create. -required: - - name - - region_id - - provider_id - - data - - price_type -properties: - name: - description: The name of the Shipping Option - type: string - region_id: - description: The ID of the Region in which the Shipping Option will be available. - type: string - provider_id: - description: The ID of the Fulfillment Provider that handles the Shipping Option. - type: string - profile_id: - description: The ID of the Shipping Profile to add the Shipping Option to. - type: number - data: - description: >- - The data needed for the Fulfillment Provider to handle shipping with this - Shipping Option. - type: object - price_type: - description: >- - The type of the Shipping Option price. `flat_rate` indicates fixed - pricing, whereas `calculated` indicates that the price will be calculated - each time by the fulfillment provider. - type: string - enum: - - flat_rate - - calculated - amount: - description: >- - The amount to charge for the Shipping Option. If the `price_type` is set - to `calculated`, this amount will not actually be used. - type: integer - requirements: - description: >- - The requirements that must be satisfied for the Shipping Option to be - available. - type: array - items: - type: object - required: - - type - - amount - properties: - type: - description: The type of the requirement - type: string - enum: - - max_subtotal - - min_subtotal - amount: - description: The amount to compare with. - type: integer - is_return: - description: Whether the Shipping Option can be used for returns or during checkout. - type: boolean - default: false - admin_only: - description: >- - If set to `true`, the shipping option can only be used when creating draft - orders. - type: boolean - default: false - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - includes_tax: - description: Tax included in prices of shipping option - x-featureFlag: tax_inclusive_pricing - type: boolean diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingProfilesProfileReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingProfilesProfileReq.yaml deleted file mode 100644 index 66706941a7..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingProfilesProfileReq.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: object -description: The detail to update of the shipping profile. -properties: - name: - description: The name of the Shipping Profile - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - type: - description: The type of the Shipping Profile - type: string - enum: - - default - - gift_card - - custom - products: - description: product IDs to associate with the Shipping Profile - type: array - shipping_options: - description: Shipping option IDs to associate with the Shipping Profile - type: array diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingProfilesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingProfilesReq.yaml deleted file mode 100644 index 6811257b50..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostShippingProfilesReq.yaml +++ /dev/null @@ -1,23 +0,0 @@ -type: object -description: The details of the shipping profile to create. -required: - - name - - type -properties: - name: - description: The name of the Shipping Profile - type: string - type: - description: The type of the Shipping Profile - type: string - enum: - - default - - gift_card - - custom - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostStockLocationsLocationReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostStockLocationsLocationReq.yaml deleted file mode 100644 index 58ba572f61..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostStockLocationsLocationReq.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -description: The details to update of the stock location. -properties: - name: - description: the name of the stock location - type: string - address_id: - description: the stock location address ID - type: string - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - address: - description: The data of an associated address to create or update. - $ref: ./StockLocationAddressInput.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostStockLocationsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostStockLocationsReq.yaml index ba6e9ea4d2..a8c1dac40b 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostStockLocationsReq.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPostStockLocationsReq.yaml @@ -1,27 +1,20 @@ type: object -description: The details of the stock location to create. +description: SUMMARY +x-schemaName: AdminPostStockLocationsReq required: - name properties: name: - description: the name of the stock location type: string + title: name + description: The stock location's name. + address: + $ref: ./StockLocationAddress.yaml address_id: - description: >- - the ID of an existing stock location address to associate with the stock - location. Only required if `address` is not provided. type: string + title: address_id + description: The stock location's address id. metadata: type: object - description: An optional key-value map with additional details - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - address: - description: >- - A new stock location address to create and associate with the stock - location. Only required if `address_id` is not provided. - $ref: ./StockLocationAddressInput.yaml + description: The stock location's metadata. + properties: {} diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostStockLocationsReqAddress.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostStockLocationsReqAddress.yaml deleted file mode 100644 index 7d83e82f88..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostStockLocationsReqAddress.yaml +++ /dev/null @@ -1,39 +0,0 @@ -type: object -required: - - address_1 - - country_code -properties: - address_1: - type: string - description: Stock location address - example: 35, Jhon Doe Ave - address_2: - type: string - description: Stock location address' complement - example: apartment 4432 - company: - type: string - description: Stock location address' company - city: - type: string - description: Stock location address' city - example: Mexico city - country_code: - description: The two character ISO code for the country. - type: string - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - phone: - type: string - description: Stock location address' phone number - example: +1 555 61646 - postal_code: - type: string - description: Stock location address' postal code - example: HD3-1G8 - province: - type: string - description: Stock location address' province - example: Sinaloa diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostStoreReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostStoreReq.yaml deleted file mode 100644 index 7cedff30fd..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostStoreReq.yaml +++ /dev/null @@ -1,43 +0,0 @@ -type: object -description: The details to update of the store. -properties: - name: - description: The name of the Store - type: string - swap_link_template: - description: A template for Swap links - use `{{cart_id}}` to insert the Swap Cart ID - type: string - example: http://example.com/swaps/{{cart_id}} - payment_link_template: - description: A template for payment links - use `{{cart_id}}` to insert the Cart ID - example: http://example.com/payments/{{cart_id}} - type: string - invite_link_template: - description: >- - A template for invite links - use `{{invite_token}}` to insert the invite - token - example: http://example.com/invite?token={{invite_token}} - type: string - default_currency_code: - description: The default currency code of the Store. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currencies: - description: >- - Array of available currencies in the store. Each currency is in 3 - character ISO code format. - type: array - items: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesReq.yaml index 380858f256..31f7a9f5ac 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesReq.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesReq.yaml @@ -1,34 +1,54 @@ type: object -description: The details of the tax rate to create. +description: SUMMARY +x-schemaName: AdminPostTaxRatesReq required: - - code - name - - region_id + - tax_region_id properties: - code: - type: string - description: The code of the tax rate. - name: - type: string - description: The name of the tax rate. - region_id: - type: string - description: The ID of the Region that the tax rate belongs to. rate: type: number - description: The numeric rate to charge. - products: + title: rate + description: The tax rate's rate. + code: + type: string + title: code + description: The tax rate's code. + rules: type: array - description: The IDs of the products associated with this tax rate. + description: The tax rate's rules. items: - type: string - shipping_options: - type: array - description: The IDs of the shipping options associated with this tax rate - items: - type: string - product_types: - type: array - description: The IDs of the types of products associated with this tax rate - items: - type: string + type: object + description: The rule's rules. + x-schemaName: CreateTaxRateRule + required: + - reference + - reference_id + properties: + reference: + type: string + title: reference + description: The rule's reference. + reference_id: + type: string + title: reference_id + description: The rule's reference id. + name: + type: string + title: name + description: The tax rate's name. + is_default: + type: boolean + title: is_default + description: The tax rate's is default. + is_combinable: + type: boolean + title: is_combinable + description: The tax rate's is combinable. + tax_region_id: + type: string + title: tax_region_id + description: The tax rate's tax region id. + metadata: + type: object + description: The tax rate's metadata. + properties: {} diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateProductTypesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateProductTypesReq.yaml deleted file mode 100644 index 3d53e43351..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateProductTypesReq.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The product types to add to the tax rate. -required: - - product_types -properties: - product_types: - type: array - description: The IDs of the types of products to associate with this tax rate - items: - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateProductsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateProductsReq.yaml deleted file mode 100644 index fe7852a7a0..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateProductsReq.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The details of the products to associat with the tax rate. -required: - - products -properties: - products: - type: array - description: The IDs of the products to associate with this tax rate - items: - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateReq.yaml index 2ef465db03..a6c334bdc6 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateReq.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateReq.yaml @@ -1,30 +1,41 @@ type: object -description: The details to update of the tax rate. +description: SUMMARY +x-schemaName: AdminPostTaxRatesTaxRateReq properties: code: type: string - description: The code of the tax rate. + title: code + description: The tax rate's code. name: type: string - description: The name of the tax rate. + title: name + description: The tax rate's name. region_id: type: string - description: The ID of the Region that the tax rate belongs to. + title: region_id + description: The tax rate's region id. rate: type: number - description: The numeric rate to charge. + title: rate + description: The tax rate's rate. products: type: array - description: The IDs of the products associated with this tax rate + description: The tax rate's products. items: type: string + title: products + description: The product's products. shipping_options: type: array - description: The IDs of the shipping options associated with this tax rate + description: The tax rate's shipping options. items: type: string + title: shipping_options + description: The shipping option's shipping options. product_types: type: array - description: The IDs of the types of product types associated with this tax rate + description: The tax rate's product types. items: type: string + title: product_types + description: The product type's product types. diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostTaxRatesTaxRateRulesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateRulesReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostTaxRatesTaxRateRulesReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateRulesReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateShippingOptionsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateShippingOptionsReq.yaml deleted file mode 100644 index 8daa099db8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRatesTaxRateShippingOptionsReq.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The details of the shipping options to associate with the tax rate. -required: - - shipping_options -properties: - shipping_options: - type: array - description: The IDs of the shipping options to associate with this tax rate - items: - type: string diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostTaxRegionsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRegionsReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostTaxRegionsReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostTaxRegionsReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPostUploadsDownloadUrlReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostUploadsDownloadUrlReq.yaml deleted file mode 100644 index bb45c04655..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPostUploadsDownloadUrlReq.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The details of the file to retrieve its download URL. -required: - - file_key -properties: - file_key: - description: >- - key of the file to obtain the download link for. This is obtained when you - first uploaded the file, or by the file service if you used it directly. - type: string diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostWorkflowsAsyncResponseReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostWorkflowsAsyncResponseReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostWorkflowsAsyncResponseReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostWorkflowsAsyncResponseReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostWorkflowsRunReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPostWorkflowsRunReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostWorkflowsRunReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/AdminPostWorkflowsRunReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteBatchRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteBatchRes.yaml deleted file mode 100644 index 92ba375b0b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteBatchRes.yaml +++ /dev/null @@ -1,23 +0,0 @@ -type: object -description: The details of deleting a price list. -required: - - ids - - object - - deleted -properties: - ids: - type: array - description: The IDs of the deleted prices. - items: - type: string - description: The ID of a deleted price. - object: - type: string - description: >- - The type of the object that was deleted. A price is also named - `money-amount`. - default: money-amount - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteProductPricesRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteProductPricesRes.yaml deleted file mode 100644 index 28f88ffb6d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteProductPricesRes.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -required: - - ids - - object - - deleted -properties: - ids: - type: array - description: The IDs of the deleted prices. - items: - type: string - object: - type: string - description: >- - The type of the object that was deleted. A price is also named - `money-amount`. - default: money-amount - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteRes.yaml deleted file mode 100644 index 0402210313..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Price List. - object: - type: string - description: The type of the object that was deleted. - default: price-list - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteVariantPricesRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteVariantPricesRes.yaml deleted file mode 100644 index 28f88ffb6d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListDeleteVariantPricesRes.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -required: - - ids - - object - - deleted -properties: - ids: - type: array - description: The IDs of the deleted prices. - items: - type: string - object: - type: string - description: >- - The type of the object that was deleted. A price is also named - `money-amount`. - default: money-amount - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListRes.yaml deleted file mode 100644 index 723aadc472..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListRes.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -description: The price list's details. -x-expanded-relations: - field: price_list - relations: - - customer_groups - - prices -required: - - price_list -properties: - price_list: - description: Price List details. - $ref: ./PriceList.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListsListRes.yaml deleted file mode 100644 index 6a00753e4f..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListsListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The list of price lists with pagination fields. -required: - - price_lists - - count - - offset - - limit -properties: - price_lists: - type: array - description: An array of price lists details. - items: - $ref: ./PriceList.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of price lists skipped when retrieving the price lists. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListsProductsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListsProductsListRes.yaml deleted file mode 100644 index d782773dff..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListsProductsListRes.yaml +++ /dev/null @@ -1,33 +0,0 @@ -type: object -description: The list of products with pagination fields. -x-expanded-relations: - field: products - relations: - - categories - - collection - - images - - options - - tags - - type - - variants - - variants.options -required: - - products - - count - - offset - - limit -properties: - products: - type: array - description: An array of products details. - items: - $ref: ./Product.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of price lists skipped when retrieving the price lists. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoriesCategoryDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoriesCategoryDeleteRes.yaml deleted file mode 100644 index c9acfd91c0..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoriesCategoryDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted product category - object: - type: string - description: The type of the object that was deleted. - default: product-category - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoriesCategoryRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoriesCategoryRes.yaml deleted file mode 100644 index 65073b08a6..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoriesCategoryRes.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -description: The product category's details. -x-expanded-relations: - field: product_category - relations: - - category_children - - parent_category -required: - - product_category -properties: - product_category: - description: Product category details. - $ref: ./ProductCategory.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoriesListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoriesListRes.yaml deleted file mode 100644 index ae632ec86c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoriesListRes.yaml +++ /dev/null @@ -1,29 +0,0 @@ -type: object -description: The list of product categories with pagination fields. -x-expanded-relations: - field: product_categories - relations: - - category_children - - parent_category -required: - - product_categories - - count - - offset - - limit -properties: - product_categories: - type: array - description: An array of product category details. - items: - $ref: ./ProductCategory.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: >- - The number of product categories skipped when retrieving the product - categories. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductTagsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductTagsListRes.yaml deleted file mode 100644 index 2663c80b5a..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductTagsListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The list of product tags with pagination fields. -required: - - product_tags - - count - - offset - - limit -properties: - product_tags: - type: array - description: An array of product tag details. - items: - $ref: ./ProductTag.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product tags skipped when retrieving the product tags. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductTypesListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductTypesListRes.yaml deleted file mode 100644 index 7a6196cb3b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductTypesListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The list of product types with pagination fields. -required: - - product_types - - count - - offset - - limit -properties: - product_types: - type: array - description: An array of product types details. - items: - $ref: ./ProductType.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product types skipped when retrieving the product types. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsDeleteOptionRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductsDeleteOptionRes.yaml deleted file mode 100644 index 5ead8a8fea..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsDeleteOptionRes.yaml +++ /dev/null @@ -1,33 +0,0 @@ -type: object -description: The details of deleting a product's option. -x-expanded-relations: - field: product - relations: - - collection - - images - - options - - tags - - type - - variants - - variants.options - - variants.prices -required: - - option_id - - object - - deleted - - product -properties: - option_id: - type: string - description: The ID of the deleted Product Option - object: - type: string - description: The type of the object that was deleted. - default: option - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - product: - description: Product details. - $ref: ./PricedProduct.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductsDeleteRes.yaml deleted file mode 100644 index 4fc6532608..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsDeleteRes.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -description: The details of deleting a product. -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Product. - object: - type: string - description: The type of the object that was deleted. - default: product - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsDeleteVariantRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductsDeleteVariantRes.yaml deleted file mode 100644 index 46d801216c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsDeleteVariantRes.yaml +++ /dev/null @@ -1,33 +0,0 @@ -type: object -description: The details of deleting a product's variant. -x-expanded-relations: - field: product - relations: - - collection - - images - - options - - tags - - type - - variants - - variants.options - - variants.prices -required: - - variant_id - - object - - deleted - - product -properties: - variant_id: - type: string - description: The ID of the deleted Product Variant. - object: - type: string - description: The type of the object that was deleted. - default: product-variant - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - product: - description: Product details. - $ref: ./PricedProduct.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListRes.yaml deleted file mode 100644 index e841feb40a..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListRes.yaml +++ /dev/null @@ -1,35 +0,0 @@ -type: object -description: The list of products with pagination fields. -x-expanded-relations: - field: products - relations: - - collection - - images - - options - - tags - - type - - variants - - variants.options - - variants.prices - totals: - - variants.purchasable -required: - - products - - count - - offset - - limit -properties: - products: - type: array - description: An array of products details. - items: - $ref: ./PricedProduct.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of products skipped when retrieving the products. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListTagsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListTagsRes.yaml deleted file mode 100644 index b568306f84..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListTagsRes.yaml +++ /dev/null @@ -1,24 +0,0 @@ -type: object -description: The usage details of product tags. -required: - - tags -properties: - tags: - description: An array of product tags details. - type: array - items: - type: object - required: - - id - - usage_count - - value - properties: - id: - description: The ID of the tag. - type: string - usage_count: - description: The number of products that use this tag. - type: string - value: - description: The value of the tag. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListTypesRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListTypesRes.yaml deleted file mode 100644 index fac5b6cfac..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListTypesRes.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: object -required: - - types -properties: - types: - type: array - description: An array of product types details. - items: - $ref: ./ProductType.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListVariantsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListVariantsRes.yaml deleted file mode 100644 index e70bf99b9e..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsListVariantsRes.yaml +++ /dev/null @@ -1,23 +0,0 @@ -type: object -required: - - variants - - count - - offset - - limit -properties: - variants: - type: array - description: An array of product variants details. - items: - $ref: ./ProductVariant.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: >- - The number of product variants skipped when retrieving the product - variants. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductsRes.yaml deleted file mode 100644 index 247e9e3725..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductsRes.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: object -description: The product's details. -x-expanded-relations: - field: product - relations: - - collection - - images - - options - - tags - - type - - variants - - variants.options - - variants.prices -required: - - product -properties: - product: - description: Product details. - $ref: ./PricedProduct.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeyDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeyDeleteRes.yaml deleted file mode 100644 index 5bab265f39..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeyDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted publishable API key. - object: - type: string - description: The type of the object that was deleted. - default: publishable_api_key - deleted: - type: boolean - description: Whether the publishable API key was deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeysListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeysListRes.yaml deleted file mode 100644 index 9d70064441..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeysListRes.yaml +++ /dev/null @@ -1,24 +0,0 @@ -type: object -description: The list of publishable API keys with pagination fields. -required: - - publishable_api_keys - - count - - offset - - limit -properties: - publishable_api_keys: - type: array - description: An array of publishable API keys details. - items: - $ref: ./PublishableApiKey.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: >- - The number of publishable API keys skipped when retrieving the publishable - API keys. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeysListSalesChannelsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeysListSalesChannelsRes.yaml deleted file mode 100644 index 1cfe709ec1..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeysListSalesChannelsRes.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The list of sales channel. -required: - - sales_channels -properties: - sales_channels: - description: An array of sales channels details. - type: array - items: - $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeysRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeysRes.yaml deleted file mode 100644 index e34ea5f2fe..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPublishableApiKeysRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The publishable API key's details. -required: - - publishable_api_key -properties: - publishable_api_key: - description: Publishable API key details. - $ref: ./PublishableApiKey.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminRefundRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminRefundRes.yaml deleted file mode 100644 index df50b7eba4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminRefundRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The refund's details. -required: - - refund -properties: - refund: - description: Refund details. - $ref: ./Refund.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminRegionsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminRegionsDeleteRes.yaml deleted file mode 100644 index 890f5414e2..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminRegionsDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Region. - object: - type: string - description: The type of the object that was deleted. - default: region - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminRegionsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminRegionsListRes.yaml deleted file mode 100644 index 23f457049d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminRegionsListRes.yaml +++ /dev/null @@ -1,31 +0,0 @@ -type: object -description: The list of regions with pagination fields. -x-expanded-relations: - field: regions - relations: - - countries - - fulfillment_providers - - payment_providers - eager: - - fulfillment_providers - - payment_providers -required: - - regions - - count - - offset - - limit -properties: - regions: - type: array - description: An array of regions details. - items: - $ref: ./Region.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of regions skipped when retrieving the regions. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminRegionsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminRegionsRes.yaml deleted file mode 100644 index 6a710c9b74..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminRegionsRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: The region's details. -x-expanded-relations: - field: region - relations: - - countries - - fulfillment_providers - - payment_providers - eager: - - fulfillment_providers - - payment_providers -required: - - region -properties: - region: - description: Region details. - $ref: ./Region.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminReservationsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminReservationsDeleteRes.yaml deleted file mode 100644 index 7b10d15ecd..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminReservationsDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Reservation. - object: - type: string - description: The type of the object that was deleted. - default: reservation - deleted: - type: boolean - description: Whether or not the Reservation was deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminReservationsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminReservationsListRes.yaml deleted file mode 100644 index 8a9afebfba..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminReservationsListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The list of reservations with pagination fields. -required: - - reservations - - count - - offset - - limit -properties: - reservations: - type: array - description: An array of reservations details. - items: - $ref: ./ExtendedReservationItem.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of reservations skipped when retrieving the reservations. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminReservationsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminReservationsRes.yaml deleted file mode 100644 index ab3cc2c88a..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminReservationsRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The reservation's details. -required: - - reservation -properties: - reservation: - description: Reservation details. - $ref: ./ReservationItemDTO.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminResetPasswordRequest.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminResetPasswordRequest.yaml deleted file mode 100644 index 3fa29d4bb2..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminResetPasswordRequest.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: The details of the password reset request. -required: - - token - - password -properties: - email: - description: The User's email. - type: string - format: email - token: - description: The password-reset token generated when the password reset was requested. - type: string - password: - description: The User's new password. - type: string - format: password diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminResetPasswordTokenRequest.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminResetPasswordTokenRequest.yaml deleted file mode 100644 index f2e5b0e6d5..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminResetPasswordTokenRequest.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: object -description: The details of the password reset token request. -required: - - email -properties: - email: - description: The User's email. - type: string - format: email diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonsDeleteRes.yaml deleted file mode 100644 index 424e73dbab..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonsDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted return reason - object: - type: string - description: The type of the object that was deleted. - default: return_reason - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonsListRes.yaml deleted file mode 100644 index 79ddc132d1..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonsListRes.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: The list of return reasons. -x-expanded-relations: - field: return_reasons - relations: - - parent_return_reason - - return_reason_children -required: - - return_reasons -properties: - return_reasons: - type: array - description: The list of return reasons. - items: - $ref: ./ReturnReason.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonsRes.yaml deleted file mode 100644 index 73c0b9a260..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonsRes.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -description: The return reason's details. -x-expanded-relations: - field: return_reason - relations: - - parent_return_reason - - return_reason_children -required: - - return_reason -properties: - return_reason: - description: The return reason's details. - $ref: ./ReturnReason.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnsCancelRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminReturnsCancelRes.yaml deleted file mode 100644 index 5a9946f7a4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnsCancelRes.yaml +++ /dev/null @@ -1,56 +0,0 @@ -type: object -description: The associated order's details. -x-expanded-relations: - field: order - relations: - - billing_address - - claims - - claims.additional_items - - claims.additional_items.variant - - claims.claim_items - - claims.claim_items.images - - claims.claim_items.item - - claims.fulfillments - - claims.fulfillments.tracking_links - - claims.return_order - - claims.return_order.shipping_method - - claims.return_order.shipping_method.tax_lines - - claims.shipping_address - - claims.shipping_methods - - customer - - discounts - - discounts.rule - - fulfillments - - fulfillments.items - - fulfillments.tracking_links - - gift_card_transactions - - gift_cards - - items - - payments - - refunds - - region - - returns - - returns.items - - returns.items.reason - - returns.shipping_method - - returns.shipping_method.tax_lines - - shipping_address - - shipping_methods - - swaps - - swaps.additional_items - - swaps.additional_items.variant - - swaps.fulfillments - - swaps.fulfillments.tracking_links - - swaps.payment - - swaps.return_order - - swaps.return_order.shipping_method - - swaps.return_order.shipping_method.tax_lines - - swaps.shipping_address - - swaps.shipping_methods - - swaps.shipping_methods.tax_lines -required: - - order -properties: - order: - description: Order details. - $ref: ./Order.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminReturnsListRes.yaml deleted file mode 100644 index e40254eb57..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnsListRes.yaml +++ /dev/null @@ -1,27 +0,0 @@ -type: object -description: The list of returns with pagination fields. -x-expanded-relation: - field: returns - relations: - - order - - swap -required: - - returns - - count - - offset - - limit -properties: - returns: - type: array - description: An array of returns details. - items: - $ref: ./Return.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of returns skipped when retrieving the returns. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminReturnsRes.yaml deleted file mode 100644 index 07642af666..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnsRes.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: object -description: The return's details. -x-expanded-relation: - field: return - relations: - - swap -required: - - return -properties: - return: - description: Return details. - $ref: ./Return.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsDeleteLocationRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsDeleteLocationRes.yaml deleted file mode 100644 index 6d12dbbcec..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsDeleteLocationRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the removed stock location from a sales channel - object: - type: string - description: The type of the object that was removed. - default: stock-location - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsDeleteRes.yaml deleted file mode 100644 index c953197736..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted sales channel - object: - type: string - description: The type of the object that was deleted. - default: sales-channel - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsListRes.yaml deleted file mode 100644 index 2bc137e1c7..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The list of sales channels with pagination fields. -required: - - sales_channels - - count - - offset - - limit -properties: - sales_channels: - type: array - description: An array of sales channels details. - items: - $ref: ./SalesChannel.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of items skipped before the returned results - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsRes.yaml deleted file mode 100644 index 0fb4eee0f8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminSalesChannelsRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The sales channel's details. -required: - - sales_channel -properties: - sales_channel: - description: Sales Channel's details. - $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionsDeleteRes.yaml deleted file mode 100644 index e734f894f8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionsDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Shipping Option. - object: - type: string - description: The type of the object that was deleted. - default: shipping-option - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionsListRes.yaml deleted file mode 100644 index db1ab6f304..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionsListRes.yaml +++ /dev/null @@ -1,33 +0,0 @@ -type: object -description: The list of shipping options with pagination fields. -x-expanded-relations: - field: shipping_options - relations: - - profile - - region - - requirements - eager: - - region.fulfillment_providers - - region.payment_providers -required: - - shipping_options - - count - - offset - - limit -properties: - shipping_options: - type: array - description: An array of shipping options details. - items: - $ref: ./ShippingOption.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: >- - The number of shipping options skipped when retrieving the shipping - options. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionsRes.yaml deleted file mode 100644 index 005b91abb2..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionsRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: The shipping option's details. -x-expanded-relations: - field: shipping_option - relations: - - profile - - region - - requirements - eager: - - region.fulfillment_providers - - region.payment_providers -required: - - shipping_option -properties: - shipping_option: - description: Shipping option details. - $ref: ./ShippingOption.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingProfilesListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminShippingProfilesListRes.yaml deleted file mode 100644 index 6026c70ce3..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingProfilesListRes.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The list of shipping profiles. -required: - - shipping_profiles -properties: - shipping_profiles: - type: array - description: An array of shipping profiles details. - items: - $ref: ./ShippingProfile.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingProfilesRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminShippingProfilesRes.yaml deleted file mode 100644 index 78ef8ae7d8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingProfilesRes.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -description: The shipping profile's details. -x-expanded-relations: - field: shipping_profile - relations: - - products - - shipping_options -required: - - shipping_profile -properties: - shipping_profile: - description: Shipping profile details. - $ref: ./ShippingProfile.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationsDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationsDeleteRes.yaml deleted file mode 100644 index 6e5d17e47b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationsDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Stock Location. - object: - type: string - description: The type of the object that was deleted. - default: stock_location - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationsListRes.yaml deleted file mode 100644 index f8fcbd8e39..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationsListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The list of stock locations with pagination fields. -required: - - stock_locations - - count - - offset - - limit -properties: - stock_locations: - type: array - description: The list of stock locations. - items: - $ref: ./StockLocationExpandedDTO.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of stock locations skipped when retrieving the stock locations. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationsRes.yaml deleted file mode 100644 index 2720159825..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationsRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The stock location's details. -required: - - stock_location -properties: - stock_location: - description: Stock location details. - $ref: ./StockLocationExpandedDTO.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminStoresRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminStoresRes.yaml deleted file mode 100644 index ca9362c05e..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminStoresRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The store's details. -required: - - store -properties: - store: - description: Store details. - $ref: ./Store.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminSwapsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminSwapsListRes.yaml deleted file mode 100644 index 36cc47821b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminSwapsListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The list of swaps with pagination fields. -required: - - swaps - - count - - offset - - limit -properties: - swaps: - type: array - description: An array of swaps details. - items: - $ref: ./Swap.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of swaps skipped when retrieving the swaps. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminSwapsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminSwapsRes.yaml deleted file mode 100644 index d0afd6fcc5..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminSwapsRes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: object -description: The swap's details. -x-expanded-relations: - field: swap - relations: - - additional_items - - additional_items.adjustments - - cart - - cart.items - - cart.items.adjustments - - cart.items.variant - - fulfillments - - order - - payment - - return_order - - shipping_address - - shipping_methods - eager: - - fulfillments.items - - shipping_methods.shipping_option -required: - - swap -properties: - swap: - description: Swap details. - $ref: ./Swap.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminTaxProvidersList.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminTaxProvidersList.yaml deleted file mode 100644 index ffd5d3e4a5..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminTaxProvidersList.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The list of tax providers in a store. -required: - - tax_providers -properties: - tax_providers: - type: array - description: An array of tax providers details. - items: - $ref: ./TaxProvider.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminTaxRatesDeleteRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminTaxRatesDeleteRes.yaml deleted file mode 100644 index df9ba39e4d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminTaxRatesDeleteRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - id - - object - - deleted -properties: - id: - type: string - description: The ID of the deleted Shipping Option. - object: - type: string - description: The type of the object that was deleted. - default: tax-rate - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminTaxRatesListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminTaxRatesListRes.yaml deleted file mode 100644 index 576c38f3b4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminTaxRatesListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The list of tax rates with pagination fields. -required: - - tax_rates - - count - - offset - - limit -properties: - tax_rates: - type: array - description: An array of tax rate details. - items: - $ref: ./TaxRate.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of tax rates to skip when retrieving the tax rates. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminTaxRatesRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminTaxRatesRes.yaml deleted file mode 100644 index 3d45207088..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminTaxRatesRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The tax rate's details. -required: - - tax_rate -properties: - tax_rate: - description: Tax rate details. - $ref: ./TaxRate.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminUpdatePaymentCollectionsReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminUpdatePaymentCollectionsReq.yaml deleted file mode 100644 index 61b6570e26..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminUpdatePaymentCollectionsReq.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -description: The details to update of the payment collection. -properties: - description: - description: A description to create or update the payment collection. - type: string - metadata: - description: A set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminUpdateUserRequest.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminUpdateUserRequest.yaml index de06280aed..cf5247c937 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminUpdateUserRequest.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminUpdateUserRequest.yaml @@ -1,27 +1,18 @@ type: object +description: SUMMARY +x-schemaName: AdminUpdateUserRequest +required: + - avatar_url properties: first_name: - description: The first name of the User. type: string + title: first_name + description: The user's first name. last_name: - description: The last name of the User. type: string - role: - description: >- - The role assigned to the user. These roles don't provide any different - privileges. + title: last_name + description: The user's last name. + avatar_url: type: string - enum: - - admin - - member - - developer - api_token: - description: The API token of the User. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute + title: avatar_url + description: The user's avatar url. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminUploadsDownloadUrlRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminUploadsDownloadUrlRes.yaml deleted file mode 100644 index d3cfb785dc..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminUploadsDownloadUrlRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The download URL details. -required: - - download_url -properties: - download_url: - description: The Download URL of the file - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminUploadsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminUploadsRes.yaml deleted file mode 100644 index 556b721195..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminUploadsRes.yaml +++ /dev/null @@ -1,23 +0,0 @@ -type: object -description: The list of uploaded files. -required: - - uploads -properties: - uploads: - type: array - description: Uploaded files details. - items: - type: object - required: - - url - - key - properties: - url: - description: The URL of the uploaded file. - type: string - format: uri - key: - description: >- - The key of the file that is identifiable by the file service. It can - be used later to retrieve or manipulate the file. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminUserRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminUserRes.yaml deleted file mode 100644 index a5f5bcc495..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminUserRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The user's details. -required: - - user -properties: - user: - description: User details. - $ref: ./User.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminUsersListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminUsersListRes.yaml deleted file mode 100644 index 689c7d6608..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminUsersListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The list of users. -required: - - users - - count - - offset - - limit -properties: - users: - type: array - description: An array of users details. - items: - $ref: ./User.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of users skipped when retrieving the users. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminVariantsListRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminVariantsListRes.yaml deleted file mode 100644 index e07d1e752d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminVariantsListRes.yaml +++ /dev/null @@ -1,32 +0,0 @@ -type: object -description: The list of variants with pagination fields. -x-expanded-relations: - field: variants - relations: - - options - - prices - - product - totals: - - purchasable -required: - - variants - - count - - offset - - limit -properties: - variants: - type: array - description: An array of product variant details. - items: - $ref: ./PricedVariant.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: >- - The number of product variants skipped when retrieving the product - variants. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminVariantsRes.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminVariantsRes.yaml deleted file mode 100644 index ce92e0c8c0..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminVariantsRes.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -description: The product variant's details. -x-expanded-relations: - field: variant - relations: - - options - - prices - - product -required: - - variant -properties: - variant: - description: Product variant's details. - $ref: ./PricedVariant.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/ApplicationMethod.yaml b/www/apps/api-reference/specs/admin/components/schemas/ApplicationMethod.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/ApplicationMethod.yaml rename to www/apps/api-reference/specs/admin/components/schemas/ApplicationMethod.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/ApplicationMethodsMethodPostReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/ApplicationMethodsMethodPostReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/ApplicationMethodsMethodPostReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/ApplicationMethodsMethodPostReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/BatchJob.yaml b/www/apps/api-reference/specs/admin/components/schemas/BatchJob.yaml deleted file mode 100644 index a70156fe2c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/BatchJob.yaml +++ /dev/null @@ -1,171 +0,0 @@ -title: Batch Job -description: >- - A Batch Job indicates an asynchronus task stored in the Medusa backend. Its - status determines whether it has been executed or not. -type: object -required: - - canceled_at - - completed_at - - confirmed_at - - context - - created_at - - created_by - - deleted_at - - dry_run - - failed_at - - id - - pre_processed_at - - processing_at - - result - - status - - type - - updated_at -properties: - id: - description: The unique identifier for the batch job. - type: string - example: batch_01G8T782965PYFG0751G0Z38B4 - type: - description: The type of batch job. - type: string - enum: - - product-import - - product-export - status: - description: The status of the batch job. - type: string - enum: - - created - - pre_processed - - confirmed - - processing - - completed - - canceled - - failed - default: created - created_by: - description: The unique identifier of the user that created the batch job. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - created_by_user: - description: The details of the user that created the batch job. - x-expandable: created_by_user - nullable: true - $ref: ./User.yaml - context: - description: >- - The context of the batch job, the type of the batch job determines what - the context should contain. - nullable: true - type: object - example: - shape: - prices: - - region: null - currency_code: eur - dynamicImageColumnCount: 4 - dynamicOptionColumnCount: 2 - list_config: - skip: 0 - take: 50 - order: - created_at: DESC - relations: - - variants - - variant.prices - - images - dry_run: - description: Specify if the job must apply the modifications or not. - type: boolean - default: false - result: - description: The result of the batch job. - nullable: true - allOf: - - type: object - example: {} - - type: object - properties: - count: - type: number - advancement_count: - type: number - progress: - type: number - errors: - type: object - properties: - message: - type: string - code: - oneOf: - - type: string - - type: number - err: - type: array - stat_descriptors: - type: object - properties: - key: - type: string - name: - type: string - message: - type: string - file_key: - type: string - file_size: - type: number - example: - errors: - - err: [] - code: unknown - message: Method not implemented. - stat_descriptors: - - key: product-export-count - name: Product count to export - message: There will be 8 products exported by this action - pre_processed_at: - description: The date from which the job has been pre-processed. - nullable: true - type: string - format: date-time - processing_at: - description: The date the job is processing at. - nullable: true - type: string - format: date-time - confirmed_at: - description: The date when the confirmation has been done. - nullable: true - type: string - format: date-time - completed_at: - description: The date of the completion. - nullable: true - type: string - format: date-time - canceled_at: - description: The date of the concellation. - nullable: true - type: string - format: date-time - failed_at: - description: The date when the job failed. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was last updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/Campaign.yaml b/www/apps/api-reference/specs/admin/components/schemas/Campaign.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/Campaign.yaml rename to www/apps/api-reference/specs/admin/components/schemas/Campaign.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CampaignBudget.yaml b/www/apps/api-reference/specs/admin/components/schemas/CampaignBudget.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CampaignBudget.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CampaignBudget.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/Cart.yaml b/www/apps/api-reference/specs/admin/components/schemas/Cart.yaml deleted file mode 100644 index 4283873041..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Cart.yaml +++ /dev/null @@ -1,243 +0,0 @@ -title: Cart -description: >- - A cart represents a virtual shopping bag. It can be used to complete an order, - a swap, or a claim. -type: object -required: - - billing_address_id - - completed_at - - context - - created_at - - customer_id - - deleted_at - - email - - id - - idempotency_key - - metadata - - payment_authorized_at - - payment_id - - payment_session - - region_id - - shipping_address_id - - type - - updated_at -properties: - id: - description: The cart's ID - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - email: - description: The email associated with the cart - nullable: true - type: string - format: email - billing_address_id: - description: The billing address's ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the cart. - x-expandable: billing_address - nullable: true - $ref: ./Address.yaml - shipping_address_id: - description: The shipping address's ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address associated with the cart. - x-expandable: shipping_address - nullable: true - $ref: ./Address.yaml - items: - description: The line items added to the cart. - type: array - x-expandable: items - items: - $ref: ./LineItem.yaml - region_id: - description: The region's ID - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region associated with the cart. - x-expandable: region - nullable: true - $ref: ./Region.yaml - discounts: - description: An array of details of all discounts applied to the cart. - type: array - x-expandable: discounts - items: - $ref: ./Discount.yaml - gift_cards: - description: An array of details of all gift cards applied to the cart. - type: array - x-expandable: gift_cards - items: - $ref: ./GiftCard.yaml - customer_id: - description: The customer's ID - nullable: true - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer the cart belongs to. - x-expandable: customer - nullable: true - type: object - payment_session: - description: The details of the selected payment session in the cart. - x-expandable: payment_session - nullable: true - type: object - payment_sessions: - description: The details of all payment sessions created on the cart. - type: array - x-expandable: payment_sessions - items: - type: object - payment_id: - description: The payment's ID if available - nullable: true - type: string - example: pay_01G8ZCC5W42ZNY842124G7P5R9 - payment: - description: The details of the payment associated with the cart. - nullable: true - x-expandable: payment - type: object - shipping_methods: - description: The details of the shipping methods added to the cart. - type: array - x-expandable: shipping_methods - items: - $ref: ./ShippingMethod.yaml - type: - description: The cart's type. - type: string - enum: - - default - - swap - - draft_order - - payment_link - - claim - default: default - completed_at: - description: The date with timezone at which the cart was completed. - nullable: true - type: string - format: date-time - payment_authorized_at: - description: The date with timezone at which the payment was authorized. - nullable: true - type: string - format: date-time - idempotency_key: - description: >- - Randomly generated key used to continue the completion of a cart in case - of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - context: - description: The context of the cart which can include info like IP or user agent. - nullable: true - type: object - example: - ip: '::1' - user_agent: PostmanRuntime/7.29.2 - sales_channel_id: - description: The sales channel ID the cart is associated with. - nullable: true - type: string - example: null - sales_channel: - description: The details of the sales channel associated with the cart. - nullable: true - x-expandable: sales_channel - $ref: ./SalesChannel.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - shipping_total: - description: The total of shipping - type: integer - example: 1000 - discount_total: - description: The total of discount rounded - type: integer - example: 800 - raw_discount_total: - description: The total of discount - type: integer - example: 800 - item_tax_total: - description: The total of items with taxes - type: integer - example: 8000 - shipping_tax_total: - description: The total of shipping with taxes - type: integer - example: 1000 - tax_total: - description: The total of tax - type: integer - example: 0 - refunded_total: - description: >- - The total amount refunded if the order associated with this cart is - returned. - type: integer - example: 0 - total: - description: The total amount of the cart - type: integer - example: 8200 - subtotal: - description: The subtotal of the cart - type: integer - example: 8000 - refundable_amount: - description: The amount that can be refunded - type: integer - example: 8200 - gift_card_total: - description: The total of gift cards - type: integer - example: 0 - gift_card_tax_total: - description: The total of gift cards with taxes - type: integer - example: 0 - sales_channels: - description: The associated sales channels. - type: array - nullable: true - x-expandable: sales_channels - items: - $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/ClaimImage.yaml b/www/apps/api-reference/specs/admin/components/schemas/ClaimImage.yaml deleted file mode 100644 index 7b64e6be1d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ClaimImage.yaml +++ /dev/null @@ -1,51 +0,0 @@ -title: Claim Image -description: The details of an image attached to a claim. -type: object -required: - - claim_item_id - - created_at - - deleted_at - - id - - metadata - - updated_at - - url -properties: - id: - description: The claim image's ID - type: string - example: cimg_01G8ZH853Y6TFXWPG5EYE81X63 - claim_item_id: - description: The ID of the claim item associated with the image - type: string - claim_item: - description: The details of the claim item this image is associated with. - nullable: true - x-expandable: claim_item - type: object - url: - description: The URL of the image - type: string - format: uri - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ClaimItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/ClaimItem.yaml deleted file mode 100644 index 6d9a8a9b67..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ClaimItem.yaml +++ /dev/null @@ -1,106 +0,0 @@ -title: Claim Item -description: >- - A claim item is an item created as part of a claim. It references an item in - the order that should be exchanged or refunded. -type: object -required: - - claim_order_id - - created_at - - deleted_at - - id - - item_id - - metadata - - note - - quantity - - reason - - updated_at - - variant_id -properties: - id: - description: The claim item's ID - type: string - example: citm_01G8ZH853Y6TFXWPG5EYE81X63 - images: - description: The claim images that are attached to the claim item. - type: array - x-expandable: images - items: - $ref: ./ClaimImage.yaml - claim_order_id: - description: The ID of the claim this item is associated with. - type: string - claim_order: - description: The details of the claim this item belongs to. - x-expandable: claim_order - nullable: true - type: object - item_id: - description: The ID of the line item that the claim item refers to. - type: string - example: item_01G8ZM25TN49YV9EQBE2NC27KC - item: - description: >- - The details of the line item in the original order that this claim item - refers to. - x-expandable: item - nullable: true - $ref: ./LineItem.yaml - variant_id: - description: The ID of the product variant that is claimed. - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: >- - The details of the product variant to potentially replace the item in the - original order. - x-expandable: variant - nullable: true - $ref: ./ProductVariant.yaml - reason: - description: The reason for the claim - type: string - enum: - - missing_item - - wrong_item - - production_failure - - other - note: - description: An optional note about the claim, for additional information - nullable: true - type: string - example: I don't like it. - quantity: - description: >- - The quantity of the item that is being claimed; must be less than or equal - to the amount purchased in the original order. - type: integer - example: 1 - tags: - description: User defined tags for easy filtering and grouping. - type: array - x-expandable: tags - items: - $ref: ./ClaimTag.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ClaimOrder.yaml b/www/apps/api-reference/specs/admin/components/schemas/ClaimOrder.yaml deleted file mode 100644 index e3de8e9d1b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ClaimOrder.yaml +++ /dev/null @@ -1,157 +0,0 @@ -title: Claim -description: >- - A Claim represents a group of faulty or missing items. It consists of claim - items that refer to items in the original order that should be replaced or - refunded. It also includes details related to shipping and fulfillment. -type: object -required: - - canceled_at - - created_at - - deleted_at - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - order_id - - payment_status - - refund_amount - - shipping_address_id - - type - - updated_at -properties: - id: - description: The claim's ID - type: string - example: claim_01G8ZH853Y6TFXWPG5EYE81X63 - type: - description: The claim's type - type: string - enum: - - refund - - replace - payment_status: - description: The status of the claim's payment - type: string - enum: - - na - - not_refunded - - refunded - default: na - fulfillment_status: - description: The claim's fulfillment status - type: string - enum: - - not_fulfilled - - partially_fulfilled - - fulfilled - - partially_shipped - - shipped - - partially_returned - - returned - - canceled - - requires_action - default: not_fulfilled - claim_items: - description: The details of the items that should be replaced or refunded. - type: array - x-expandable: claim_items - items: - $ref: ./ClaimItem.yaml - additional_items: - description: >- - The details of the new items to be shipped when the claim's type is - `replace` - type: array - x-expandable: additional_items - items: - $ref: ./LineItem.yaml - order_id: - description: The ID of the order that the claim comes from. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that this claim was created for. - x-expandable: order - nullable: true - type: object - return_order: - description: >- - The details of the return associated with the claim if the claim's type is - `replace`. - x-expandable: return_order - nullable: true - type: object - shipping_address_id: - description: The ID of the address that the new items should be shipped to - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the address that new items should be shipped to. - x-expandable: shipping_address - nullable: true - $ref: ./Address.yaml - shipping_methods: - description: >- - The details of the shipping methods that the claim order will be shipped - with. - type: array - x-expandable: shipping_methods - items: - $ref: ./ShippingMethod.yaml - fulfillments: - description: The fulfillments of the new items to be shipped - type: array - x-expandable: fulfillments - items: - type: object - refund_amount: - description: The amount that will be refunded in conjunction with the claim - nullable: true - type: integer - example: 1000 - canceled_at: - description: The date with timezone at which the claim was canceled. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - no_notification: - description: >- - Flag for describing whether or not notifications related to this should be - send. - nullable: true - type: boolean - example: false - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the cart - associated with the claim in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. diff --git a/www/apps/api-reference/specs/admin/components/schemas/ClaimTag.yaml b/www/apps/api-reference/specs/admin/components/schemas/ClaimTag.yaml deleted file mode 100644 index 4c8924448f..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ClaimTag.yaml +++ /dev/null @@ -1,44 +0,0 @@ -title: Claim Tag -description: >- - Claim Tags are user defined tags that can be assigned to claim items for easy - filtering and grouping. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value -properties: - id: - description: The claim tag's ID - type: string - example: ctag_01G8ZCC5Y63B95V6B5SHBZ91S4 - value: - description: The value that the claim tag holds - type: string - example: Damaged - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/Country.yaml b/www/apps/api-reference/specs/admin/components/schemas/Country.yaml deleted file mode 100644 index cfa712f0ff..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Country.yaml +++ /dev/null @@ -1,58 +0,0 @@ -title: Country -description: Country details -type: object -required: - - display_name - - id - - iso_2 - - iso_3 - - name - - num_code - - region_id -properties: - id: - description: The country's ID - type: string - example: 109 - iso_2: - description: The 2 character ISO code of the country in lower case - type: string - example: it - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - iso_3: - description: The 2 character ISO code of the country in lower case - type: string - example: ita - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements - description: See a list of codes. - num_code: - description: The numerical ISO code for the country. - type: string - example: 380 - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_numeric#Officially_assigned_code_elements - description: See a list of codes. - name: - description: The normalized country name in upper case. - type: string - example: ITALY - display_name: - description: The country name appropriate for display. - type: string - example: Italy - region_id: - description: The region ID this country is associated with. - nullable: true - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region the country is associated with. - x-expandable: region - nullable: true - type: object diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateAddress.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateAddress.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateAddress.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateApiKey.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateApiKey.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateApiKey.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateApiKey.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateApplicationMethod.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateApplicationMethod.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateApplicationMethod.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateApplicationMethod.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateCampaign.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateCampaign.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateCampaign.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateCampaign.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateCampaignBudget.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateCampaignBudget.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateCampaignBudget.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateCampaignBudget.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateCartAddress.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateCartAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateCartAddress.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateCartAddress.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateCartCreateLineItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateCartCreateLineItem.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateCartCreateLineItem.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateCartCreateLineItem.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateCartWorkflowInput.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateCartWorkflowInput.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateCartWorkflowInput.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateCartWorkflowInput.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateCustomer.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateCustomer.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateCustomer.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateCustomer.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateCustomerAddress.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateCustomerAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateCustomerAddress.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateCustomerAddress.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateCustomerGroup.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateCustomerGroup.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateCustomerGroup.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateCustomerGroup.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateDefaultTaxRate.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateDefaultTaxRate.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateDefaultTaxRate.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateDefaultTaxRate.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateInvite.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateInvite.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateInvite.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateInvite.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateProduct.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateProduct.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateProduct.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateProduct.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductCollection.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateProductCollection.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductCollection.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateProductCollection.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductOption.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateProductOption.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductOption.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateProductOption.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductTag.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateProductTag.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductTag.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateProductTag.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductType.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateProductType.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductType.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateProductType.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductVariant.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateProductVariant.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductVariant.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateProductVariant.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductVariantOption.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateProductVariantOption.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateProductVariantOption.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateProductVariantOption.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreatePromotion.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreatePromotion.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreatePromotion.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreatePromotion.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreatePromotionRule.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreatePromotionRule.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreatePromotionRule.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreatePromotionRule.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateRegion.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateRegion.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateRegion.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateRegion.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/CreateStockLocationInput.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateStockLocationInput.yaml deleted file mode 100644 index 6a8d7255f5..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/CreateStockLocationInput.yaml +++ /dev/null @@ -1,22 +0,0 @@ -title: Create Stock Location Input -description: Represents the Input to create a Stock Location -type: object -required: - - name -properties: - name: - type: string - description: The stock location name - address_id: - type: string - description: The Stock location address ID - address: - description: Stock location address object - allOf: - - $ref: ./StockLocationAddressInput.yaml - - type: object - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateTaxRateRule.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateTaxRateRule.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateTaxRateRule.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateTaxRateRule.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CreateUser.yaml b/www/apps/api-reference/specs/admin/components/schemas/CreateUser.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CreateUser.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CreateUser.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/Currency.yaml b/www/apps/api-reference/specs/admin/components/schemas/Currency.yaml deleted file mode 100644 index adfb21705c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Currency.yaml +++ /dev/null @@ -1,33 +0,0 @@ -title: Currency -description: Currency -type: object -required: - - code - - name - - symbol - - symbol_native -properties: - code: - description: The 3 character ISO code for the currency. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - symbol: - description: The symbol used to indicate the currency. - type: string - example: $ - symbol_native: - description: The native symbol used to indicate the currency. - type: string - example: $ - name: - description: The written name of the currency - type: string - example: US Dollar - includes_tax: - description: Whether the currency prices include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false diff --git a/www/apps/api-reference/specs/admin/components/schemas/CustomShippingOption.yaml b/www/apps/api-reference/specs/admin/components/schemas/CustomShippingOption.yaml deleted file mode 100644 index 472d04273b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/CustomShippingOption.yaml +++ /dev/null @@ -1,68 +0,0 @@ -title: Custom Shipping Option -description: >- - Custom Shipping Options are overridden Shipping Options. Admins can attach a - Custom Shipping Option to a cart in order to set a custom price for a - particular Shipping Option. -type: object -required: - - cart_id - - created_at - - deleted_at - - id - - metadata - - price - - shipping_option_id - - updated_at -properties: - id: - description: The custom shipping option's ID - type: string - example: cso_01G8X99XNB77DMFBJFWX6DN9V9 - price: - description: >- - The custom price set that will override the shipping option's original - price - type: integer - example: 1000 - shipping_option_id: - description: The ID of the Shipping Option that the custom shipping option overrides - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the overridden shipping options. - x-expandable: shipping_option - nullable: true - $ref: ./ShippingOption.yaml - cart_id: - description: The ID of the Cart that the custom shipping option is attached to - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart this shipping option belongs to. - x-expandable: cart - nullable: true - $ref: ./Cart.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/Customer.yaml b/www/apps/api-reference/specs/admin/components/schemas/Customer.yaml index ecc9c83ee4..063a4ff87a 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/Customer.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/Customer.yaml @@ -1,94 +1,87 @@ -title: Customer -description: A customer can make purchases in your store and manage their profile. type: object -required: - - billing_address_id - - created_at - - deleted_at - - email - - first_name - - has_account - - id - - last_name - - metadata - - phone - - updated_at +description: The context's customer. +x-schemaName: Customer properties: id: - description: The customer's ID type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 + title: id + description: The customer's ID. email: - description: The customer's email type: string + title: email + description: The customer's email. format: email + default_billing_address_id: + type: string + title: default_billing_address_id + description: The customer's default billing address id. + default_shipping_address_id: + type: string + title: default_shipping_address_id + description: The customer's default shipping address id. + company_name: + type: string + title: company_name + description: The customer's company name. first_name: - description: The customer's first name - nullable: true type: string - example: Arno + title: first_name + description: The customer's first name. last_name: - description: The customer's last name - nullable: true type: string - example: Willms - billing_address_id: - description: The customer's billing address ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the customer. - x-expandable: billing_address - nullable: true - $ref: ./Address.yaml - shipping_addresses: - description: The details of the shipping addresses associated with the customer. + title: last_name + description: The customer's last name. + addresses: type: array - x-expandable: shipping_addresses - items: - $ref: ./Address.yaml - phone: - description: The customer's phone number - nullable: true - type: string - example: 16128234334802 - has_account: - description: Whether the customer has an account or not - type: boolean - default: false - orders: - description: The details of the orders this customer placed. - type: array - x-expandable: orders + description: The customer's addresses. items: type: object + description: The address's addresses. + x-schemaName: CustomerAddress + properties: {} + phone: + type: string + title: phone + description: The customer's phone. groups: - description: The customer groups the customer belongs to. type: array - x-expandable: groups + description: The customer's groups. items: - $ref: ./CustomerGroup.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time + type: object + description: The group's groups. + properties: {} metadata: - description: An optional key-value map with additional details - nullable: true type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute + description: The customer's metadata. + properties: {} + created_by: + type: string + title: created_by + description: The customer's created by. + deleted_at: + oneOf: + - type: string + title: deleted_at + description: The customer's deleted at. + - type: string + title: deleted_at + description: The customer's deleted at. + format: date-time + created_at: + oneOf: + - type: string + title: created_at + description: The customer's created at. + - type: string + title: created_at + description: The customer's created at. + format: date-time + updated_at: + oneOf: + - type: string + title: updated_at + description: The customer's updated at. + - type: string + title: updated_at + description: The customer's updated at. + format: date-time diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CustomerAddress.yaml b/www/apps/api-reference/specs/admin/components/schemas/CustomerAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CustomerAddress.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CustomerAddress.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/CustomerGroup.yaml b/www/apps/api-reference/specs/admin/components/schemas/CustomerGroup.yaml deleted file mode 100644 index a572493cad..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/CustomerGroup.yaml +++ /dev/null @@ -1,56 +0,0 @@ -title: Customer Group -description: >- - A customer group that can be used to organize customers into groups of similar - traits. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - name - - updated_at -properties: - id: - description: The customer group's ID - type: string - example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63 - name: - description: The name of the customer group - type: string - example: VIP - customers: - description: The details of the customers that belong to the customer group. - type: array - x-expandable: customers - items: - type: object - price_lists: - description: The price lists that are associated with the customer group. - type: array - x-expandable: price_lists - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CustomerGroupUpdatableFields.yaml b/www/apps/api-reference/specs/admin/components/schemas/CustomerGroupUpdatableFields.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CustomerGroupUpdatableFields.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CustomerGroupUpdatableFields.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CustomerGroupsBatchCustomer.yaml b/www/apps/api-reference/specs/admin/components/schemas/CustomerGroupsBatchCustomer.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CustomerGroupsBatchCustomer.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CustomerGroupsBatchCustomer.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/CustomerUpdatableFields.yaml b/www/apps/api-reference/specs/admin/components/schemas/CustomerUpdatableFields.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/CustomerUpdatableFields.yaml rename to www/apps/api-reference/specs/admin/components/schemas/CustomerUpdatableFields.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/DecoratedInventoryItemDTO.yaml b/www/apps/api-reference/specs/admin/components/schemas/DecoratedInventoryItemDTO.yaml deleted file mode 100644 index a3b200f6e9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/DecoratedInventoryItemDTO.yaml +++ /dev/null @@ -1,24 +0,0 @@ -type: object -allOf: - - $ref: ./InventoryItemDTO.yaml - - type: object - required: - - stocked_quantity - - reserved_quantity - properties: - location_levels: - type: array - description: An array of location level details - items: - $ref: ./InventoryLevelDTO.yaml - variants: - type: array - description: An array of product variant details - items: - $ref: ./ProductVariant.yaml - stocked_quantity: - type: number - description: The total quantity of the item in stock across levels - reserved_quantity: - type: number - description: The total quantity of the item available across levels diff --git a/www/apps/api-reference/specs/admin/components/schemas/Discount.yaml b/www/apps/api-reference/specs/admin/components/schemas/Discount.yaml deleted file mode 100644 index 796477999f..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Discount.yaml +++ /dev/null @@ -1,121 +0,0 @@ -title: Discount -description: A discount can be applied to a cart for promotional purposes. -type: object -required: - - code - - created_at - - deleted_at - - ends_at - - id - - is_disabled - - is_dynamic - - metadata - - parent_discount_id - - rule_id - - starts_at - - updated_at - - usage_count - - usage_limit - - valid_duration -properties: - id: - description: The discount's ID - type: string - example: disc_01F0YESMW10MGHWJKZSDDMN0VN - code: - description: >- - A unique code for the discount - this will be used by the customer to - apply the discount - type: string - example: 10DISC - is_dynamic: - description: >- - A flag to indicate if multiple instances of the discount can be generated. - I.e. for newsletter discounts - type: boolean - example: false - rule_id: - description: >- - The ID of the discount rule that defines how the discount will be applied - to a cart. - nullable: true - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - rule: - description: >- - The details of the discount rule that defines how the discount will be - applied to a cart.. - x-expandable: rule - nullable: true - $ref: ./DiscountRule.yaml - is_disabled: - description: >- - Whether the Discount has been disabled. Disabled discounts cannot be - applied to carts - type: boolean - example: false - parent_discount_id: - description: >- - The Discount that the discount was created from. This will always be a - dynamic discount - nullable: true - type: string - example: disc_01G8ZH853YPY9B94857DY91YGW - parent_discount: - description: The details of the parent discount that this discount was created from. - x-expandable: parent_discount - nullable: true - type: object - starts_at: - description: The time at which the discount can be used. - type: string - format: date-time - ends_at: - description: The time at which the discount can no longer be used. - nullable: true - type: string - format: date-time - valid_duration: - description: Duration the discount runs between - nullable: true - type: string - example: P3Y6M4DT12H30M5S - regions: - description: The details of the regions in which the Discount can be used. - type: array - x-expandable: regions - items: - $ref: ./Region.yaml - usage_limit: - description: The maximum number of times that a discount can be used. - nullable: true - type: integer - example: 100 - usage_count: - description: The number of times a discount has been used. - type: integer - example: 50 - default: 0 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/DiscountCondition.yaml b/www/apps/api-reference/specs/admin/components/schemas/DiscountCondition.yaml deleted file mode 100644 index 4652b43d56..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/DiscountCondition.yaml +++ /dev/null @@ -1,105 +0,0 @@ -title: Discount Condition -description: Holds rule conditions for when a discount is applicable -type: object -required: - - created_at - - deleted_at - - discount_rule_id - - id - - metadata - - operator - - type - - updated_at -properties: - id: - description: The discount condition's ID - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - type: - description: >- - The type of the condition. The type affects the available resources - associated with the condition. For example, if the type is `products`, - that means the `products` relation will hold the products associated with - this condition and other relations will be empty. - type: string - enum: - - products - - product_types - - product_collections - - product_tags - - customer_groups - operator: - description: >- - The operator of the condition. `in` indicates that discountable resources - are within the specified resources. `not_in` indicates that discountable - resources are everything but the specified resources. - type: string - enum: - - in - - not_in - discount_rule_id: - description: The ID of the discount rule associated with the condition - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - discount_rule: - description: The details of the discount rule associated with the condition. - x-expandable: discount_rule - nullable: true - $ref: ./DiscountRule.yaml - products: - description: products associated with this condition if `type` is `products`. - type: array - x-expandable: products - items: - $ref: ./Product.yaml - product_types: - description: Product types associated with this condition if `type` is `product_types`. - type: array - x-expandable: product_types - items: - $ref: ./ProductType.yaml - product_tags: - description: Product tags associated with this condition if `type` is `product_tags`. - type: array - x-expandable: product_tags - items: - $ref: ./ProductTag.yaml - product_collections: - description: >- - Product collections associated with this condition if `type` is - `product_collections`. - type: array - x-expandable: product_collections - items: - $ref: ./ProductCollection.yaml - customer_groups: - description: >- - Customer groups associated with this condition if `type` is - `customer_groups`. - type: array - x-expandable: customer_groups - items: - $ref: ./CustomerGroup.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionCustomerGroup.yaml b/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionCustomerGroup.yaml deleted file mode 100644 index 2f55e79142..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionCustomerGroup.yaml +++ /dev/null @@ -1,44 +0,0 @@ -title: Product Tag Discount Condition -description: Associates a discount condition with a customer group -type: object -required: - - condition_id - - created_at - - customer_group_id - - metadata - - updated_at -properties: - customer_group_id: - description: The ID of the Product Tag - type: string - example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63 - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - customer_group: - description: Available if the relation `customer_group` is expanded. - nullable: true - $ref: ./CustomerGroup.yaml - discount_condition: - description: Available if the relation `discount_condition` is expanded. - nullable: true - $ref: ./DiscountCondition.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProduct.yaml b/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProduct.yaml deleted file mode 100644 index 2fb9699b9e..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProduct.yaml +++ /dev/null @@ -1,46 +0,0 @@ -title: Product Discount Condition -description: This represents the association between a discount condition and a product -type: object -required: - - condition_id - - created_at - - metadata - - product_id - - updated_at -properties: - product_id: - description: The ID of the Product Tag - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product: - description: The details of the product. - x-expandable: product - nullable: true - $ref: ./Product.yaml - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: ./DiscountCondition.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProductCollection.yaml b/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProductCollection.yaml deleted file mode 100644 index 5e8b88b9e3..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProductCollection.yaml +++ /dev/null @@ -1,48 +0,0 @@ -title: Product Collection Discount Condition -description: >- - This represents the association between a discount condition and a product - collection -type: object -required: - - condition_id - - created_at - - metadata - - product_collection_id - - updated_at -properties: - product_collection_id: - description: The ID of the Product Collection - type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_collection: - description: The details of the product collection. - x-expandable: product_collection - nullable: true - $ref: ./ProductCollection.yaml - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: ./DiscountCondition.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProductTag.yaml b/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProductTag.yaml deleted file mode 100644 index 58ba07c6c3..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProductTag.yaml +++ /dev/null @@ -1,46 +0,0 @@ -title: Product Tag Discount Condition -description: This represents the association between a discount condition and a product tag -type: object -required: - - condition_id - - created_at - - metadata - - product_tag_id - - updated_at -properties: - product_tag_id: - description: The ID of the Product Tag - type: string - example: ptag_01F0YESHPZYY3H4SJ3A5918SBN - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_tag: - description: The details of the product tag. - x-expandable: product_tag - nullable: true - $ref: ./ProductTag.yaml - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: ./DiscountCondition.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProductType.yaml b/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProductType.yaml deleted file mode 100644 index d93129494c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/DiscountConditionProductType.yaml +++ /dev/null @@ -1,48 +0,0 @@ -title: Product Type Discount Condition -description: >- - This represents the association between a discount condition and a product - type -type: object -required: - - condition_id - - created_at - - metadata - - product_type_id - - updated_at -properties: - product_type_id: - description: The ID of the Product Tag - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_type: - description: The details of the product type. - x-expandable: product_type - nullable: true - $ref: ./ProductType.yaml - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: ./DiscountCondition.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/DiscountRule.yaml b/www/apps/api-reference/specs/admin/components/schemas/DiscountRule.yaml deleted file mode 100644 index caa7f9d604..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/DiscountRule.yaml +++ /dev/null @@ -1,79 +0,0 @@ -title: Discount Rule -description: A discount rule defines how a Discount is calculated when applied to a Cart. -type: object -required: - - allocation - - created_at - - deleted_at - - description - - id - - metadata - - type - - updated_at - - value -properties: - id: - description: The discount rule's ID - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - type: - description: >- - The type of the Discount, can be `fixed` for discounts that reduce the - price by a fixed amount, `percentage` for percentage reductions or - `free_shipping` for shipping vouchers. - type: string - enum: - - fixed - - percentage - - free_shipping - example: percentage - description: - description: A short description of the discount - nullable: true - type: string - example: 10 Percent - value: - description: >- - The value that the discount represents; this will depend on the type of - the discount - type: integer - example: 10 - allocation: - description: The scope that the discount should apply to. - nullable: true - type: string - enum: - - total - - item - example: total - conditions: - description: >- - The details of the discount conditions associated with the rule. They can - be used to limit when the discount can be used. - type: array - x-expandable: conditions - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/DraftOrder.yaml b/www/apps/api-reference/specs/admin/components/schemas/DraftOrder.yaml deleted file mode 100644 index 86ff90bf25..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/DraftOrder.yaml +++ /dev/null @@ -1,103 +0,0 @@ -title: DraftOrder -description: >- - A draft order is created by an admin without direct involvement of the - customer. Once its payment is marked as captured, it is transformed into an - order. -type: object -required: - - canceled_at - - cart_id - - completed_at - - created_at - - display_id - - id - - idempotency_key - - metadata - - no_notification_order - - order_id - - status - - updated_at -properties: - id: - description: The draft order's ID - type: string - example: dorder_01G8TJFKBG38YYFQ035MSVG03C - status: - description: >- - The status of the draft order. It's changed to `completed` when it's - transformed to an order. - type: string - enum: - - open - - completed - default: open - display_id: - description: The draft order's display ID - type: string - example: 2 - cart_id: - description: The ID of the cart associated with the draft order. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart associated with the draft order. - x-expandable: cart - nullable: true - type: object - order_id: - description: >- - The ID of the order created from the draft order when its payment is - captured. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: >- - The details of the order created from the draft order when its payment is - captured. - x-expandable: order - nullable: true - type: object - canceled_at: - description: The date the draft order was canceled at. - nullable: true - type: string - format: date-time - completed_at: - description: The date the draft order was completed at. - nullable: true - type: string - format: date-time - no_notification_order: - description: Whether to send the customer notifications regarding order updates. - nullable: true - type: boolean - example: false - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the cart - associated with the draft order in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ExtendedReservationItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/ExtendedReservationItem.yaml deleted file mode 100644 index 7c4594004a..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ExtendedReservationItem.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: object -allOf: - - $ref: ./ReservationItemDTO.yaml - - type: object - properties: - line_item: - description: The line item associated with the reservation. - $ref: ./LineItem.yaml - inventory_item: - description: The inventory item associated with the reservation. - $ref: ./InventoryItemDTO.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/ExtendedStoreDTO.yaml b/www/apps/api-reference/specs/admin/components/schemas/ExtendedStoreDTO.yaml deleted file mode 100644 index fe169bafc5..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ExtendedStoreDTO.yaml +++ /dev/null @@ -1,21 +0,0 @@ -allOf: - - $ref: ./Store.yaml - - type: object - required: - - payment_providers - - fulfillment_providers - - feature_flags - - modules - properties: - payment_providers: - description: The store's payment providers. - $ref: ./PaymentProvider.yaml - fulfillment_providers: - description: The store's fulfillment providers. - $ref: ./FulfillmentProvider.yaml - feature_flags: - description: The feature flags enabled in the store's backend. - $ref: ./FeatureFlagsResponse.yaml - modules: - description: The modules installed in the store's backend. - $ref: ./ModulesResponse.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/FeatureFlagsResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/FeatureFlagsResponse.yaml deleted file mode 100644 index ce55d9ccc4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/FeatureFlagsResponse.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: array -items: - type: object - required: - - key - - value - properties: - key: - description: The key of the feature flag. - type: string - value: - description: The value of the feature flag. - type: boolean diff --git a/www/apps/api-reference/specs/admin/components/schemas/Fulfillment.yaml b/www/apps/api-reference/specs/admin/components/schemas/Fulfillment.yaml deleted file mode 100644 index b9f77587a4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Fulfillment.yaml +++ /dev/null @@ -1,151 +0,0 @@ -title: Fulfillment -description: >- - A Fulfillment is created once an admin can prepare the purchased goods. - Fulfillments will eventually be shipped and hold information about how to - track shipments. Fulfillments are created through a fulfillment provider, - which typically integrates a third-party shipping service. Fulfillments can be - associated with orders, claims, swaps, and returns. -type: object -required: - - canceled_at - - claim_order_id - - created_at - - data - - id - - idempotency_key - - location_id - - metadata - - no_notification - - order_id - - provider_id - - shipped_at - - swap_id - - tracking_numbers - - updated_at -properties: - id: - description: The fulfillment's ID - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - claim_order_id: - description: The ID of the Claim that the Fulfillment belongs to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the fulfillment may belong to. - x-expandable: claim_order - nullable: true - type: object - swap_id: - description: The ID of the Swap that the Fulfillment belongs to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the fulfillment may belong to. - x-expandable: swap - nullable: true - type: object - order_id: - description: The ID of the Order that the Fulfillment belongs to. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the fulfillment may belong to. - x-expandable: order - nullable: true - type: object - provider_id: - description: >- - The ID of the Fulfillment Provider responsible for handling the - fulfillment. - type: string - example: manual - provider: - description: >- - The details of the fulfillment provider responsible for handling the - fulfillment. - x-expandable: provider - nullable: true - $ref: ./FulfillmentProvider.yaml - location_id: - description: The ID of the stock location the fulfillment will be shipped from - nullable: true - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK - items: - description: >- - The Fulfillment Items in the Fulfillment. These hold information about how - many of each Line Item has been fulfilled. - type: array - x-expandable: items - items: - $ref: ./FulfillmentItem.yaml - tracking_links: - description: >- - The Tracking Links that can be used to track the status of the - Fulfillment. These will usually be provided by the Fulfillment Provider. - type: array - x-expandable: tracking_links - items: - $ref: ./TrackingLink.yaml - tracking_numbers: - description: >- - The tracking numbers that can be used to track the status of the - fulfillment. - deprecated: true - type: array - items: - type: string - data: - description: >- - This contains all the data necessary for the Fulfillment provider to - handle the fulfillment. - type: object - example: {} - shipped_at: - description: The date with timezone at which the Fulfillment was shipped. - nullable: true - type: string - format: date-time - no_notification: - description: >- - Flag for describing whether or not notifications related to this should be - sent. - nullable: true - type: boolean - example: false - canceled_at: - description: The date with timezone at which the Fulfillment was canceled. - nullable: true - type: string - format: date-time - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the fulfillment - in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/FulfillmentItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/FulfillmentItem.yaml deleted file mode 100644 index 7204760274..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/FulfillmentItem.yaml +++ /dev/null @@ -1,30 +0,0 @@ -title: Fulfillment Item -description: This represents the association between a Line Item and a Fulfillment. -type: object -required: - - fulfillment_id - - item_id - - quantity -properties: - fulfillment_id: - description: The ID of the Fulfillment that the Fulfillment Item belongs to. - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - item_id: - description: The ID of the Line Item that the Fulfillment Item references. - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - fulfillment: - description: The details of the fulfillment. - x-expandable: fulfillment - nullable: true - type: object - item: - description: The details of the line item. - x-expandable: item - nullable: true - $ref: ./LineItem.yaml - quantity: - description: The quantity of the Line Item that is included in the Fulfillment. - type: integer - example: 1 diff --git a/www/apps/api-reference/specs/admin/components/schemas/FulfillmentProvider.yaml b/www/apps/api-reference/specs/admin/components/schemas/FulfillmentProvider.yaml deleted file mode 100644 index 366e045f2f..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/FulfillmentProvider.yaml +++ /dev/null @@ -1,21 +0,0 @@ -title: Fulfillment Provider -description: >- - A fulfillment provider represents a fulfillment service installed in the - Medusa backend, either through a plugin or backend customizations. It holds - the fulfillment service's installation status. -type: object -required: - - id - - is_installed -properties: - id: - description: The ID of the fulfillment provider as given by the fulfillment service. - type: string - example: manual - is_installed: - description: >- - Whether the fulfillment service is installed in the current version. If a - fulfillment service is no longer installed, the `is_installed` attribute - is set to `false`. - type: boolean - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/GiftCard.yaml b/www/apps/api-reference/specs/admin/components/schemas/GiftCard.yaml deleted file mode 100644 index cd3b03dc19..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/GiftCard.yaml +++ /dev/null @@ -1,96 +0,0 @@ -title: Gift Card -description: >- - Gift Cards are redeemable and represent a value that can be used towards the - payment of an Order. -type: object -required: - - balance - - code - - created_at - - deleted_at - - ends_at - - id - - is_disabled - - metadata - - order_id - - region_id - - tax_rate - - updated_at - - value -properties: - id: - description: The gift card's ID - type: string - example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ - code: - description: >- - The unique code that identifies the Gift Card. This is used by the - Customer to redeem the value of the Gift Card. - type: string - example: 3RFT-MH2C-Y4YZ-XMN4 - value: - description: The value that the Gift Card represents. - type: integer - example: 10 - balance: - description: The remaining value on the Gift Card. - type: integer - example: 10 - region_id: - description: The ID of the region this gift card is available in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this gift card is available in. - x-expandable: region - nullable: true - $ref: ./Region.yaml - order_id: - description: The ID of the order that the gift card was purchased in. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the gift card was purchased in. - x-expandable: region - nullable: true - type: object - is_disabled: - description: >- - Whether the Gift Card has been disabled. Disabled Gift Cards cannot be - applied to carts. - type: boolean - default: false - ends_at: - description: The time at which the Gift Card can no longer be used. - nullable: true - type: string - format: date-time - tax_rate: - description: The gift card's tax rate that will be applied on calculating totals - nullable: true - type: number - example: 0 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/GiftCardTransaction.yaml b/www/apps/api-reference/specs/admin/components/schemas/GiftCardTransaction.yaml deleted file mode 100644 index e1f3f9b490..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/GiftCardTransaction.yaml +++ /dev/null @@ -1,54 +0,0 @@ -title: Gift Card Transaction -description: >- - Gift Card Transactions are created once a Customer uses a Gift Card to pay for - their Order. -type: object -required: - - amount - - created_at - - gift_card_id - - id - - is_taxable - - order_id - - tax_rate -properties: - id: - description: The gift card transaction's ID - type: string - example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A - gift_card_id: - description: The ID of the Gift Card that was used in the transaction. - type: string - example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ - gift_card: - description: The details of the gift card associated used in this transaction. - x-expandable: gift_card - nullable: true - type: object - order_id: - description: The ID of the order that the gift card was used for payment. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the gift card was used for payment. - x-expandable: order - nullable: true - type: object - amount: - description: The amount that was used from the Gift Card. - type: integer - example: 10 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - is_taxable: - description: Whether the transaction is taxable or not. - nullable: true - type: boolean - example: false - tax_rate: - description: The tax rate of the transaction - nullable: true - type: number - example: 0 diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/IdObject.yaml b/www/apps/api-reference/specs/admin/components/schemas/IdObject.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/IdObject.yaml rename to www/apps/api-reference/specs/admin/components/schemas/IdObject.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/IdempotencyKey.yaml b/www/apps/api-reference/specs/admin/components/schemas/IdempotencyKey.yaml deleted file mode 100644 index 9a8760eec9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/IdempotencyKey.yaml +++ /dev/null @@ -1,69 +0,0 @@ -title: Idempotency Key -description: >- - Idempotency Key is used to continue a process in case of any failure that - might occur. -type: object -required: - - created_at - - id - - idempotency_key - - locked_at - - recovery_point - - response_code - - response_body - - request_method - - request_params - - request_path -properties: - id: - description: The idempotency key's ID - type: string - example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A - idempotency_key: - description: >- - The unique randomly generated key used to determine the state of a - process. - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: Date which the idempotency key was locked. - type: string - format: date-time - locked_at: - description: Date which the idempotency key was locked. - nullable: true - type: string - format: date-time - request_method: - description: The method of the request - nullable: true - type: string - example: POST - request_params: - description: The parameters passed to the request - nullable: true - type: object - example: - id: cart_01G8ZH853Y6TFXWPG5EYE81X63 - request_path: - description: The request's path - nullable: true - type: string - example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete - response_code: - description: The response's code. - nullable: true - type: string - example: 200 - response_body: - description: The response's body - nullable: true - type: object - example: - id: cart_01G8ZH853Y6TFXWPG5EYE81X63 - recovery_point: - description: Where to continue from. - type: string - default: started diff --git a/www/apps/api-reference/specs/admin/components/schemas/Image.yaml b/www/apps/api-reference/specs/admin/components/schemas/Image.yaml deleted file mode 100644 index c837dd4b5d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Image.yaml +++ /dev/null @@ -1,44 +0,0 @@ -title: Image -description: >- - An Image is used to store details about uploaded images. Images are uploaded - by the File Service, and the URL is provided by the File Service. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - url -properties: - id: - type: string - description: The image's ID - example: img_01G749BFYR6T8JTVW6SGW3K3E6 - url: - description: The URL at which the image file can be found. - type: string - format: uri - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/InventoryItemDTO.yaml b/www/apps/api-reference/specs/admin/components/schemas/InventoryItemDTO.yaml deleted file mode 100644 index 641ec3a26f..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/InventoryItemDTO.yaml +++ /dev/null @@ -1,82 +0,0 @@ -type: object -required: - - sku -properties: - id: - description: The inventory item's ID. - type: string - example: iitem_12334 - sku: - description: The Stock Keeping Unit (SKU) code of the Inventory Item. - type: string - hs_code: - description: >- - The Harmonized System code of the Inventory Item. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - type: string - origin_country: - description: >- - The country in which the Inventory Item was produced. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - type: string - mid_code: - description: >- - The Manufacturers Identification code that identifies the manufacturer of - the Inventory Item. May be used by Fulfillment Providers to pass customs - information to shipping carriers. - type: string - title: - description: Title of the inventory item - type: string - description: - description: Description of the inventory item - type: string - thumbnail: - description: Thumbnail for the inventory item - type: string - material: - description: >- - The material and composition that the Inventory Item is made of, May be - used by Fulfillment Providers to pass customs information to shipping - carriers. - type: string - weight: - description: >- - The weight of the Inventory Item. May be used in shipping rate - calculations. - type: number - height: - description: >- - The height of the Inventory Item. May be used in shipping rate - calculations. - type: number - width: - description: >- - The width of the Inventory Item. May be used in shipping rate - calculations. - type: number - length: - description: >- - The length of the Inventory Item. May be used in shipping rate - calculations. - type: number - requires_shipping: - description: Whether the item requires shipping. - type: boolean - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/InventoryLevelDTO.yaml b/www/apps/api-reference/specs/admin/components/schemas/InventoryLevelDTO.yaml deleted file mode 100644 index 8540f71c95..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/InventoryLevelDTO.yaml +++ /dev/null @@ -1,37 +0,0 @@ -type: object -required: - - inventory_item_id - - location_id - - stocked_quantity - - reserved_quantity - - incoming_quantity -properties: - location_id: - description: the item location ID - type: string - stocked_quantity: - description: the total stock quantity of an inventory item at the given location ID - type: number - reserved_quantity: - description: the reserved stock quantity of an inventory item at the given location ID - type: number - incoming_quantity: - description: the incoming stock quantity of an inventory item at the given location ID - type: number - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/Invite.yaml b/www/apps/api-reference/specs/admin/components/schemas/Invite.yaml deleted file mode 100644 index 4ab1e33195..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Invite.yaml +++ /dev/null @@ -1,68 +0,0 @@ -title: Invite -description: >- - An invite is created when an admin user invites a new user to join the store's - team. Once the invite is accepted, it's deleted. -type: object -required: - - accepted - - created_at - - deleted_at - - expires_at - - id - - metadata - - role - - token - - updated_at - - user_email -properties: - id: - type: string - description: The invite's ID - example: invite_01G8TKE4XYCTHSCK2GDEP47RE1 - user_email: - description: The email of the user being invited. - type: string - format: email - role: - description: The user's role. These roles don't change the privileges of the user. - nullable: true - type: string - enum: - - admin - - member - - developer - default: member - accepted: - description: Whether the invite was accepted or not. - type: boolean - default: false - token: - description: The token used to accept the invite. - type: string - expires_at: - description: The date the invite expires at. - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/LineItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/LineItem.yaml deleted file mode 100644 index 155bafaedd..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/LineItem.yaml +++ /dev/null @@ -1,243 +0,0 @@ -title: Line Item -description: >- - Line Items are created when a product is added to a Cart. When Line Items are - purchased they will get copied to the resulting order, swap, or claim, and can - eventually be referenced in Fulfillments and Returns. Line items may also be - used for order edits. -type: object -required: - - allow_discounts - - cart_id - - claim_order_id - - created_at - - description - - fulfilled_quantity - - has_shipping - - id - - is_giftcard - - is_return - - metadata - - order_edit_id - - order_id - - original_item_id - - quantity - - returned_quantity - - shipped_quantity - - should_merge - - swap_id - - thumbnail - - title - - unit_price - - updated_at - - variant_id -properties: - id: - description: The line item's ID - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - cart_id: - description: The ID of the cart that the line item may belongs to. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the line item may belongs to. - x-expandable: cart - nullable: true - type: object - order_id: - description: The ID of the order that the line item may belongs to. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the line item may belongs to. - x-expandable: order - nullable: true - type: object - swap_id: - description: The ID of the swap that the line item may belong to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the line item may belong to. - x-expandable: swap - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the line item may belong to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the line item may belong to. - x-expandable: claim_order - nullable: true - type: object - tax_lines: - description: The details of the item's tax lines. - x-expandable: tax_lines - type: array - items: - $ref: ./LineItemTaxLine.yaml - adjustments: - description: >- - The details of the item's adjustments, which are available when a discount - is applied on the item. - x-expandable: adjustments - type: array - items: - $ref: ./LineItemAdjustment.yaml - original_item_id: - description: >- - The ID of the original line item. This is useful if the line item belongs - to a resource that references an order, such as a return or an order edit. - nullable: true - type: string - order_edit_id: - description: The ID of the order edit that the item may belong to. - nullable: true - type: string - order_edit: - description: The details of the order edit. - x-expandable: order_edit - nullable: true - type: object - title: - description: The title of the Line Item. - type: string - example: Medusa Coffee Mug - description: - description: A more detailed description of the contents of the Line Item. - nullable: true - type: string - example: One Size - thumbnail: - description: A URL string to a small image of the contents of the Line Item. - nullable: true - type: string - format: uri - example: https://medusa-public-images.s3.eu-west-1.amazonaws.com/coffee-mug.png - is_return: - description: Is the item being returned - type: boolean - default: false - is_giftcard: - description: Flag to indicate if the Line Item is a Gift Card. - type: boolean - default: false - should_merge: - description: >- - Flag to indicate if new Line Items with the same variant should be merged - or added as an additional Line Item. - type: boolean - default: true - allow_discounts: - description: >- - Flag to indicate if the Line Item should be included when doing discount - calculations. - type: boolean - default: true - has_shipping: - description: Flag to indicate if the Line Item has fulfillment associated with it. - nullable: true - type: boolean - example: false - unit_price: - description: >- - The price of one unit of the content in the Line Item. This should be in - the currency defined by the Cart/Order/Swap/Claim that the Line Item - belongs to. - type: integer - example: 8000 - variant_id: - description: The id of the Product Variant contained in the Line Item. - nullable: true - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that this item was created from. - x-expandable: variant - nullable: true - $ref: ./ProductVariant.yaml - quantity: - description: The quantity of the content in the Line Item. - type: integer - example: 1 - fulfilled_quantity: - description: The quantity of the Line Item that has been fulfilled. - nullable: true - type: integer - example: 0 - returned_quantity: - description: The quantity of the Line Item that has been returned. - nullable: true - type: integer - example: 0 - shipped_quantity: - description: The quantity of the Line Item that has been shipped. - nullable: true - type: integer - example: 0 - refundable: - description: >- - The amount that can be refunded from the given Line Item. Takes taxes and - discounts into consideration. - type: integer - example: 0 - subtotal: - description: The subtotal of the line item - type: integer - example: 8000 - tax_total: - description: The total of tax of the line item - type: integer - example: 0 - total: - description: The total amount of the line item - type: integer - example: 8000 - original_total: - description: The original total amount of the line item - type: integer - example: 8000 - original_tax_total: - description: The original tax total amount of the line item - type: integer - example: 0 - discount_total: - description: The total of discount of the line item rounded - type: integer - example: 0 - raw_discount_total: - description: The total of discount of the line item - type: integer - example: 0 - gift_card_total: - description: The total of the gift card of the line item - type: integer - example: 0 - includes_tax: - description: Indicates if the line item unit_price include tax - x-featureFlag: tax_inclusive_pricing - type: boolean - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/LineItemAdjustment.yaml b/www/apps/api-reference/specs/admin/components/schemas/LineItemAdjustment.yaml deleted file mode 100644 index 7d30b61c15..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/LineItemAdjustment.yaml +++ /dev/null @@ -1,52 +0,0 @@ -title: Line Item Adjustment -description: A Line Item Adjustment includes details on discounts applied on a line item. -type: object -required: - - amount - - description - - discount_id - - id - - item_id - - metadata -properties: - id: - description: The Line Item Adjustment's ID - type: string - example: lia_01G8TKE4XYCTHSCK2GDEP47RE1 - item_id: - description: The ID of the line item - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: The details of the line item. - x-expandable: item - nullable: true - type: object - description: - description: The line item's adjustment description - type: string - example: Adjusted item's price. - discount_id: - description: The ID of the discount associated with the adjustment - nullable: true - type: string - example: disc_01F0YESMW10MGHWJKZSDDMN0VN - discount: - description: The details of the discount associated with the adjustment. - x-expandable: discount - nullable: true - $ref: ./Discount.yaml - amount: - description: The adjustment amount - type: number - example: 1000 - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/LineItemTaxLine.yaml b/www/apps/api-reference/specs/admin/components/schemas/LineItemTaxLine.yaml deleted file mode 100644 index 69832cdd1e..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/LineItemTaxLine.yaml +++ /dev/null @@ -1,57 +0,0 @@ -title: Line Item Tax Line -description: A Line Item Tax Line represents the taxes applied on a line item. -type: object -required: - - code - - created_at - - id - - item_id - - metadata - - name - - rate - - updated_at -properties: - id: - description: The line item tax line's ID - type: string - example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - item_id: - description: The ID of the line item - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: The details of the line item. - x-expandable: item - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ModulesResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/ModulesResponse.yaml deleted file mode 100644 index f90e78d9f9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ModulesResponse.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: array -items: - type: object - required: - - module - - resolution - properties: - module: - description: The key of the module. - type: string - resolution: - description: The resolution path of the module or false if module is not installed. - type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/MoneyAmount.yaml b/www/apps/api-reference/specs/admin/components/schemas/MoneyAmount.yaml deleted file mode 100644 index 920f9a3242..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/MoneyAmount.yaml +++ /dev/null @@ -1,101 +0,0 @@ -title: Money Amount -description: >- - A Money Amount represent a price amount, for example, a product variant's - price or a price in a price list. Each Money Amount either has a Currency or - Region associated with it to indicate the pricing in a given Currency or, for - fully region-based pricing, the given price in a specific Region. If - region-based pricing is used, the amount will be in the currency defined for - the Region. -type: object -required: - - amount - - created_at - - currency_code - - deleted_at - - id - - max_quantity - - min_quantity - - price_list_id - - region_id - - updated_at - - variant_id -properties: - id: - description: The money amount's ID - type: string - example: ma_01F0YESHRFQNH5S8Q0PK84YYZN - currency_code: - description: The 3 character currency code that the money amount may belong to. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency that the money amount may belong to. - x-expandable: currency - nullable: true - $ref: ./Currency.yaml - amount: - description: >- - The amount in the smallest currecny unit (e.g. cents 100 cents to charge - $1) that the Product Variant will cost. - type: integer - example: 100 - min_quantity: - description: >- - The minimum quantity that the Money Amount applies to. If this value is - not set, the Money Amount applies to all quantities. - nullable: true - type: integer - example: 1 - max_quantity: - description: >- - The maximum quantity that the Money Amount applies to. If this value is - not set, the Money Amount applies to all quantities. - nullable: true - type: integer - example: 1 - price_list_id: - description: The ID of the price list that the money amount may belong to. - nullable: true - type: string - example: pl_01G8X3CKJXCG5VXVZ87H9KC09W - price_list: - description: The details of the price list that the money amount may belong to. - x-expandable: price_list - nullable: true - type: object - variant_id: - description: The ID of the Product Variant contained in the Line Item. - nullable: true - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that the money amount may belong to. - x-expandable: variant - nullable: true - type: object - region_id: - description: The region's ID - nullable: true - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region that the money amount may belong to. - x-expandable: region - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/Note.yaml b/www/apps/api-reference/specs/admin/components/schemas/Note.yaml deleted file mode 100644 index 9a33972604..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Note.yaml +++ /dev/null @@ -1,62 +0,0 @@ -title: Note -description: >- - A Note is an element that can be used in association with different resources - to allow admin users to describe additional information. For example, they can - be used to add additional information about orders. -type: object -required: - - author_id - - created_at - - deleted_at - - id - - metadata - - resource_id - - resource_type - - updated_at - - value -properties: - id: - description: The note's ID - type: string - example: note_01G8TM8ENBMC7R90XRR1G6H26Q - resource_type: - description: The type of resource that the Note refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Note refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - value: - description: The contents of the note. - type: string - example: This order must be fulfilled on Monday - author_id: - description: The ID of the user that created the note. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - author: - description: The details of the user that created the note. - x-expandable: author - nullable: true - $ref: ./User.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white diff --git a/www/apps/api-reference/specs/admin/components/schemas/Notification.yaml b/www/apps/api-reference/specs/admin/components/schemas/Notification.yaml deleted file mode 100644 index 0d00e6fed4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Notification.yaml +++ /dev/null @@ -1,93 +0,0 @@ -title: Notification -description: >- - A notification is an alert sent, typically to customers, using the installed - Notification Provider as a reaction to internal events such as `order.placed`. - Notifications can be resent. -type: object -required: - - created_at - - customer_id - - data - - event_name - - id - - parent_id - - provider_id - - resource_type - - resource_id - - to - - updated_at -properties: - id: - description: The notification's ID - type: string - example: noti_01G53V9Y6CKMCGBM1P0X7C28RX - event_name: - description: The name of the event that the notification was sent for. - nullable: true - type: string - example: order.placed - resource_type: - description: The type of resource that the Notification refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Notification refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - customer_id: - description: The ID of the customer that this notification was sent to. - nullable: true - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer that this notification was sent to. - x-expandable: customer - nullable: true - $ref: ./Customer.yaml - to: - description: >- - The address that the Notification was sent to. This will usually be an - email address, but can represent other addresses such as a chat bot user - ID. - type: string - example: user@example.com - data: - description: >- - The data that the Notification was sent with. This contains all the data - necessary for the Notification Provider to initiate a resend. - type: object - example: {} - parent_id: - description: The notification's parent ID - nullable: true - type: string - example: noti_01G53V9Y6CKMCGBM1P0X7C28RX - parent_notification: - description: The details of the parent notification. - x-expandable: parent_notification - nullable: true - type: object - resends: - description: The details of all resends of the notification. - type: array - x-expandable: resends - items: - type: object - provider_id: - description: The ID of the notification provider used to send the notification. - nullable: true - type: string - example: sengrid - provider: - description: The notification provider used to send the notification. - x-expandable: provider - nullable: true - $ref: ./NotificationProvider.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/NotificationProvider.yaml b/www/apps/api-reference/specs/admin/components/schemas/NotificationProvider.yaml deleted file mode 100644 index d2d2e53288..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/NotificationProvider.yaml +++ /dev/null @@ -1,21 +0,0 @@ -title: Notification Provider -description: >- - A notification provider represents a notification service installed in the - Medusa backend, either through a plugin or backend customizations. It holds - the notification service's installation status. -type: object -required: - - id - - is_installed -properties: - id: - description: The ID of the notification provider as given by the notification service. - type: string - example: sendgrid - is_installed: - description: >- - Whether the notification service is installed in the current version. If a - notification service is no longer installed, the `is_installed` attribute - is set to `false`. - type: boolean - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/OAuth.yaml b/www/apps/api-reference/specs/admin/components/schemas/OAuth.yaml deleted file mode 100644 index b1ca6bf402..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/OAuth.yaml +++ /dev/null @@ -1,40 +0,0 @@ -title: OAuth -description: >- - An Oauth app is typically created by a plugin to handle authentication to - third-party services. -type: object -required: - - application_name - - data - - display_name - - id - - install_url - - uninstall_url -properties: - id: - description: The app's ID - type: string - example: example_app - display_name: - description: The app's display name - type: string - example: Example app - application_name: - description: The app's name - type: string - example: example - install_url: - description: The URL to install the app - nullable: true - type: string - format: uri - uninstall_url: - description: The URL to uninstall the app - nullable: true - type: string - format: uri - data: - description: Any data necessary to the app. - nullable: true - type: object - example: {} diff --git a/www/apps/api-reference/specs/admin/components/schemas/Order.yaml b/www/apps/api-reference/specs/admin/components/schemas/Order.yaml deleted file mode 100644 index 9fb3daeff9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Order.yaml +++ /dev/null @@ -1,349 +0,0 @@ -title: Order -description: >- - An order is a purchase made by a customer. It holds details about payment and - fulfillment of the order. An order may also be created from a draft order, - which is created by an admin user. -type: object -required: - - billing_address_id - - canceled_at - - cart_id - - created_at - - currency_code - - customer_id - - draft_order_id - - display_id - - email - - external_id - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - object - - payment_status - - region_id - - shipping_address_id - - status - - tax_rate - - updated_at -properties: - id: - description: The order's ID - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - status: - description: The order's status - type: string - enum: - - pending - - completed - - archived - - canceled - - requires_action - default: pending - fulfillment_status: - description: The order's fulfillment status - type: string - enum: - - not_fulfilled - - partially_fulfilled - - fulfilled - - partially_shipped - - shipped - - partially_returned - - returned - - canceled - - requires_action - default: not_fulfilled - payment_status: - description: The order's payment status - type: string - enum: - - not_paid - - awaiting - - captured - - partially_refunded - - refunded - - canceled - - requires_action - default: not_paid - display_id: - description: The order's display ID - type: integer - example: 2 - cart_id: - description: The ID of the cart associated with the order - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart associated with the order. - x-expandable: cart - nullable: true - type: object - customer_id: - description: The ID of the customer associated with the order - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer associated with the order. - x-expandable: customer - nullable: true - type: object - email: - description: The email associated with the order - type: string - format: email - billing_address_id: - description: The ID of the billing address associated with the order - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the order. - x-expandable: billing_address - nullable: true - $ref: ./Address.yaml - shipping_address_id: - description: The ID of the shipping address associated with the order - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address associated with the order. - x-expandable: shipping_address - nullable: true - $ref: ./Address.yaml - region_id: - description: The ID of the region this order was created in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this order was created in. - x-expandable: region - nullable: true - $ref: ./Region.yaml - currency_code: - description: The 3 character currency code that is used in the order - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency used in the order. - x-expandable: currency - nullable: true - $ref: ./Currency.yaml - tax_rate: - description: The order's tax rate - nullable: true - type: number - example: 0 - discounts: - description: The details of the discounts applied on the order. - type: array - x-expandable: discounts - items: - $ref: ./Discount.yaml - gift_cards: - description: The details of the gift card used in the order. - type: array - x-expandable: gift_cards - items: - $ref: ./GiftCard.yaml - shipping_methods: - description: The details of the shipping methods used in the order. - type: array - x-expandable: shipping_methods - items: - $ref: ./ShippingMethod.yaml - payments: - description: The details of the payments used in the order. - type: array - x-expandable: payments - items: - type: object - fulfillments: - description: The details of the fulfillments created for the order. - type: array - x-expandable: fulfillments - items: - type: object - returns: - description: The details of the returns created for the order. - type: array - x-expandable: returns - items: - type: object - claims: - description: The details of the claims created for the order. - type: array - x-expandable: claims - items: - type: object - refunds: - description: The details of the refunds created for the order. - type: array - x-expandable: refunds - items: - type: object - swaps: - description: The details of the swaps created for the order. - type: array - x-expandable: swaps - items: - type: object - draft_order_id: - description: The ID of the draft order this order was created from. - nullable: true - type: string - example: null - draft_order: - description: The details of the draft order this order was created from. - x-expandable: draft_order - nullable: true - type: object - items: - description: The details of the line items that belong to the order. - x-expandable: items - type: array - items: - $ref: ./LineItem.yaml - edits: - description: The details of the order edits done on the order. - type: array - x-expandable: edits - items: - type: object - gift_card_transactions: - description: The gift card transactions made in the order. - type: array - x-expandable: gift_card_transactions - items: - $ref: ./GiftCardTransaction.yaml - canceled_at: - description: The date the order was canceled on. - nullable: true - type: string - format: date-time - no_notification: - description: >- - Flag for describing whether or not notifications related to this should be - send. - nullable: true - type: boolean - example: false - idempotency_key: - description: >- - Randomly generated key used to continue the processing of the order in - case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - external_id: - description: The ID of an external order. - nullable: true - type: string - example: null - sales_channel_id: - description: The ID of the sales channel this order belongs to. - nullable: true - type: string - example: null - sales_channel: - description: The details of the sales channel this order belongs to. - x-expandable: sales_channel - nullable: true - $ref: ./SalesChannel.yaml - shipping_total: - type: integer - description: The total of shipping - example: 1000 - nullable: true - shipping_tax_total: - type: integer - description: The tax total applied on shipping - example: 1000 - raw_discount_total: - description: The total of discount - type: integer - example: 800 - discount_total: - description: The total of discount rounded - type: integer - example: 800 - tax_total: - description: The total of tax - type: integer - example: 0 - item_tax_total: - description: The tax total applied on items - type: integer - example: 0 - nullable: true - refunded_total: - description: The total amount refunded if the order is returned. - type: integer - example: 0 - total: - description: The total amount of the order - type: integer - example: 8200 - subtotal: - description: The subtotal of the order - type: integer - example: 8000 - paid_total: - description: The total amount paid - type: integer - example: 8000 - refundable_amount: - description: The amount that can be refunded - type: integer - example: 8200 - gift_card_total: - description: The total of gift cards - type: integer - example: 0 - gift_card_tax_total: - description: The total of gift cards with taxes - type: integer - example: 0 - returnable_items: - description: >- - The details of the line items that are returnable as part of the order, - swaps, or claims - type: array - x-expandable: returnable_items - items: - $ref: ./LineItem.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - sales_channels: - description: The associated sales channels. - type: array - nullable: true - x-expandable: sales_channels - x-featureFlag: medusa_v2 - items: - $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/OrderEdit.yaml b/www/apps/api-reference/specs/admin/components/schemas/OrderEdit.yaml deleted file mode 100644 index 27f1077bdb..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/OrderEdit.yaml +++ /dev/null @@ -1,170 +0,0 @@ -title: Order Edit -description: >- - Order edit allows modifying items in an order, such as adding, updating, or - deleting items from the original order. Once the order edit is confirmed, the - changes are reflected on the original order. -type: object -required: - - canceled_at - - canceled_by - - confirmed_by - - confirmed_at - - created_at - - created_by - - declined_at - - declined_by - - declined_reason - - id - - internal_note - - order_id - - payment_collection_id - - requested_at - - requested_by - - status - - updated_at -properties: - id: - description: The order edit's ID - type: string - example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK - order_id: - description: The ID of the order that is edited - type: string - example: order_01G2SG30J8C85S4A5CHM2S1NS2 - order: - description: The details of the order that this order edit was created for. - x-expandable: order - nullable: true - type: object - changes: - description: The details of all the changes on the original order's line items. - x-expandable: changes - type: array - items: - $ref: ./OrderItemChange.yaml - internal_note: - description: An optional note with additional details about the order edit. - nullable: true - type: string - example: Included two more items B to the order. - created_by: - description: The unique identifier of the user or customer who created the order edit. - type: string - requested_by: - description: >- - The unique identifier of the user or customer who requested the order - edit. - nullable: true - type: string - requested_at: - description: The date with timezone at which the edit was requested. - nullable: true - type: string - format: date-time - confirmed_by: - description: >- - The unique identifier of the user or customer who confirmed the order - edit. - nullable: true - type: string - confirmed_at: - description: The date with timezone at which the edit was confirmed. - nullable: true - type: string - format: date-time - declined_by: - description: The unique identifier of the user or customer who declined the order edit. - nullable: true - type: string - declined_at: - description: The date with timezone at which the edit was declined. - nullable: true - type: string - format: date-time - declined_reason: - description: An optional note why the order edit is declined. - nullable: true - type: string - canceled_by: - description: >- - The unique identifier of the user or customer who cancelled the order - edit. - nullable: true - type: string - canceled_at: - description: The date with timezone at which the edit was cancelled. - nullable: true - type: string - format: date-time - subtotal: - description: The total of subtotal - type: integer - example: 8000 - discount_total: - description: The total of discount - type: integer - example: 800 - shipping_total: - description: The total of the shipping amount - type: integer - example: 800 - gift_card_total: - description: The total of the gift card amount - type: integer - example: 800 - gift_card_tax_total: - description: The total of the gift card tax amount - type: integer - example: 800 - tax_total: - description: The total of tax - type: integer - example: 0 - total: - description: The total amount of the edited order. - type: integer - example: 8200 - difference_due: - description: >- - The difference between the total amount of the order and total amount of - edited order. - type: integer - example: 8200 - status: - description: The status of the order edit. - type: string - enum: - - confirmed - - declined - - requested - - created - - canceled - items: - description: >- - The details of the cloned items from the original order with the new - changes. Once the order edit is confirmed, these line items are associated - with the original order. - type: array - x-expandable: items - items: - $ref: ./LineItem.yaml - payment_collection_id: - description: The ID of the payment collection - nullable: true - type: string - example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK - payment_collection: - description: >- - The details of the payment collection used to authorize additional payment - if necessary. - x-expandable: payment_collection - nullable: true - $ref: ./PaymentCollection.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/OrderItemChange.yaml b/www/apps/api-reference/specs/admin/components/schemas/OrderItemChange.yaml deleted file mode 100644 index a1cbe55425..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/OrderItemChange.yaml +++ /dev/null @@ -1,73 +0,0 @@ -title: Order Item Change -description: >- - An order item change is a change made within an order edit to an order's - items. These changes are not reflected on the original order until the order - edit is confirmed. -type: object -required: - - created_at - - deleted_at - - id - - line_item_id - - order_edit_id - - original_line_item_id - - type - - updated_at -properties: - id: - description: The order item change's ID - type: string - example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK - type: - description: The order item change's status - type: string - enum: - - item_add - - item_remove - - item_update - order_edit_id: - description: The ID of the order edit - type: string - example: oe_01G2SG30J8C85S4A5CHM2S1NS2 - order_edit: - description: The details of the order edit the item change is associated with. - x-expandable: order_edit - nullable: true - type: object - original_line_item_id: - description: The ID of the original line item in the order - nullable: true - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - original_line_item: - description: >- - The details of the original line item this item change references. This is - used if the item change updates or deletes the original item. - x-expandable: original_line_item - nullable: true - $ref: ./LineItem.yaml - line_item_id: - description: The ID of the cloned line item. - nullable: true - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - line_item: - description: >- - The details of the resulting line item after the item change. This line - item is then used in the original order once the order edit is confirmed. - x-expandable: line_item - nullable: true - $ref: ./LineItem.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/Payment.yaml b/www/apps/api-reference/specs/admin/components/schemas/Payment.yaml deleted file mode 100644 index cf84c788ad..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Payment.yaml +++ /dev/null @@ -1,133 +0,0 @@ -title: Payment -description: >- - A payment is originally created from a payment session. Once a payment session - is authorized, the payment is created to represent the authorized amount with - a given payment method. Payments can be captured, canceled or refunded. - Payments can be made towards orders, swaps, order edits, or other resources. -type: object -required: - - amount - - amount_refunded - - canceled_at - - captured_at - - cart_id - - created_at - - currency_code - - data - - id - - idempotency_key - - metadata - - order_id - - provider_id - - swap_id - - updated_at -properties: - id: - description: The payment's ID - type: string - example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE - swap_id: - description: The ID of the swap that this payment was potentially created for. - nullable: true - type: string - example: null - swap: - description: The details of the swap that this payment was potentially created for. - x-expandable: swap - nullable: true - type: object - cart_id: - description: The ID of the cart that the payment session was potentially created for. - nullable: true - type: string - cart: - description: >- - The details of the cart that the payment session was potentially created - for. - x-expandable: cart - nullable: true - type: object - order_id: - description: The ID of the order that the payment session was potentially created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: >- - The details of the order that the payment session was potentially created - for. - x-expandable: order - nullable: true - type: object - amount: - description: The amount that the Payment has been authorized for. - type: integer - example: 100 - currency_code: - description: The 3 character ISO currency code of the payment. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency of the payment. - x-expandable: currency - nullable: true - $ref: ./Currency.yaml - amount_refunded: - description: >- - The amount of the original Payment amount that has been refunded back to - the Customer. - type: integer - default: 0 - example: 0 - provider_id: - description: The id of the Payment Provider that is responsible for the Payment - type: string - example: manual - data: - description: >- - The data required for the Payment Provider to identify, modify and process - the Payment. Typically this will be an object that holds an id to the - external payment session, but can be an empty object if the Payment - Provider doesn't hold any state. - type: object - example: {} - captured_at: - description: The date with timezone at which the Payment was captured. - nullable: true - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Payment was canceled. - nullable: true - type: string - format: date-time - idempotency_key: - description: >- - Randomly generated key used to continue the completion of a payment in - case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/PaymentCollection.yaml b/www/apps/api-reference/specs/admin/components/schemas/PaymentCollection.yaml deleted file mode 100644 index 4c8342dae9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/PaymentCollection.yaml +++ /dev/null @@ -1,113 +0,0 @@ -title: Payment Collection -description: >- - A payment collection allows grouping and managing a list of payments at one. - This can be helpful when making additional payment for order edits or - integrating installment payments. -type: object -required: - - amount - - authorized_amount - - created_at - - created_by - - currency_code - - deleted_at - - description - - id - - metadata - - region_id - - status - - type - - updated_at -properties: - id: - description: The payment collection's ID - type: string - example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK - type: - description: The type of the payment collection - type: string - enum: - - order_edit - status: - description: The type of the payment collection - type: string - enum: - - not_paid - - awaiting - - authorized - - partially_authorized - - canceled - description: - description: Description of the payment collection - nullable: true - type: string - amount: - description: Amount of the payment collection. - type: integer - authorized_amount: - description: Authorized amount of the payment collection. - nullable: true - type: integer - region_id: - description: The ID of the region this payment collection is associated with. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this payment collection is associated with. - x-expandable: region - nullable: true - $ref: ./Region.yaml - currency_code: - description: >- - The three character ISO code for the currency this payment collection is - associated with. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency this payment collection is associated with. - x-expandable: currency - nullable: true - $ref: ./Currency.yaml - payment_sessions: - description: >- - The details of the payment sessions created as part of the payment - collection. - type: array - x-expandable: payment_sessions - items: - $ref: ./PaymentSession.yaml - payments: - description: The details of the payments created as part of the payment collection. - type: array - x-expandable: payments - items: - $ref: ./Payment.yaml - created_by: - description: The ID of the user that created the payment collection. - type: string - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/PaymentProvider.yaml b/www/apps/api-reference/specs/admin/components/schemas/PaymentProvider.yaml deleted file mode 100644 index 4a54a90729..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/PaymentProvider.yaml +++ /dev/null @@ -1,21 +0,0 @@ -title: Payment Provider -description: >- - A payment provider represents a payment service installed in the Medusa - backend, either through a plugin or backend customizations. It holds the - payment service's installation status. -type: object -required: - - id - - is_installed -properties: - id: - description: The ID of the payment provider as given by the payment service. - type: string - example: manual - is_installed: - description: >- - Whether the payment service is installed in the current version. If a - payment service is no longer installed, the `is_installed` attribute is - set to `false`. - type: boolean - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/PaymentSession.yaml b/www/apps/api-reference/specs/admin/components/schemas/PaymentSession.yaml deleted file mode 100644 index ccf7cbcda8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/PaymentSession.yaml +++ /dev/null @@ -1,105 +0,0 @@ -title: Payment Session -description: >- - A Payment Session is created when a Customer initilizes the checkout flow, and - can be used to hold the state of a payment flow. Each Payment Session is - controlled by a Payment Provider, which is responsible for the communication - with external payment services. Authorized Payment Sessions will eventually - get promoted to Payments to indicate that they are authorized for payment - processing such as capture or refund. Payment sessions can also be used as - part of payment collections. -type: object -required: - - amount - - cart_id - - created_at - - data - - id - - is_initiated - - is_selected - - idempotency_key - - payment_authorized_at - - provider_id - - status - - updated_at -properties: - id: - description: The payment session's ID - type: string - example: ps_01G901XNSRM2YS3ASN9H5KG3FZ - cart_id: - description: The ID of the cart that the payment session was created for. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the payment session was created for. - x-expandable: cart - nullable: true - $ref: ./Cart.yaml - provider_id: - description: The ID of the Payment Provider that is responsible for the Payment Session - type: string - example: manual - is_selected: - description: >- - A flag to indicate if the Payment Session has been selected as the method - that will be used to complete the purchase. - nullable: true - type: boolean - example: true - is_initiated: - description: >- - A flag to indicate if a communication with the third party provider has - been initiated. - type: boolean - default: false - example: true - status: - description: >- - Indicates the status of the Payment Session. Will default to `pending`, - and will eventually become `authorized`. Payment Sessions may have the - status of `requires_more` to indicate that further actions are to be - completed by the Customer. - type: string - enum: - - authorized - - pending - - requires_more - - error - - canceled - example: pending - data: - description: >- - The data required for the Payment Provider to identify, modify and process - the Payment Session. Typically this will be an object that holds an id to - the external payment session, but can be an empty object if the Payment - Provider doesn't hold any state. - type: object - example: {} - idempotency_key: - description: >- - Randomly generated key used to continue the completion of a cart in case - of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - amount: - description: The amount that the Payment Session has been authorized for. - nullable: true - type: integer - example: 100 - payment_authorized_at: - description: The date with timezone at which the Payment Session was authorized. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/PriceList.yaml b/www/apps/api-reference/specs/admin/components/schemas/PriceList.yaml deleted file mode 100644 index cb1f79566a..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/PriceList.yaml +++ /dev/null @@ -1,83 +0,0 @@ -title: Price List -description: >- - A Price List represents a set of prices that override the default price for - one or more product variants. -type: object -required: - - created_at - - deleted_at - - description - - ends_at - - id - - name - - starts_at - - status - - type - - updated_at -properties: - id: - description: The price list's ID - type: string - example: pl_01G8X3CKJXCG5VXVZ87H9KC09W - name: - description: The price list's name - type: string - example: VIP Prices - description: - description: The price list's description - type: string - example: Prices for VIP customers - type: - description: The type of Price List. This can be one of either `sale` or `override`. - type: string - enum: - - sale - - override - default: sale - status: - description: The status of the Price List - type: string - enum: - - active - - draft - default: draft - starts_at: - description: The date with timezone that the Price List starts being valid. - nullable: true - type: string - format: date-time - ends_at: - description: The date with timezone that the Price List stops being valid. - nullable: true - type: string - format: date-time - customer_groups: - description: The details of the customer groups that the Price List can apply to. - type: array - x-expandable: customer_groups - items: - $ref: ./CustomerGroup.yaml - prices: - description: The prices that belong to the price list, represented as a Money Amount. - type: array - x-expandable: prices - items: - $ref: ./MoneyAmount.yaml - includes_tax: - description: Whether the price list prices include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/PricedProduct.yaml b/www/apps/api-reference/specs/admin/components/schemas/PricedProduct.yaml deleted file mode 100644 index aa57632b38..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/PricedProduct.yaml +++ /dev/null @@ -1,11 +0,0 @@ -title: Priced Product -type: object -allOf: - - $ref: ./Product.yaml - - type: object - properties: - variants: - description: The product variants and their prices. - type: array - items: - $ref: ./PricedVariant.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/PricedShippingOption.yaml b/www/apps/api-reference/specs/admin/components/schemas/PricedShippingOption.yaml deleted file mode 100644 index a5f479328b..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/PricedShippingOption.yaml +++ /dev/null @@ -1,27 +0,0 @@ -title: Priced Shipping Option -type: object -allOf: - - $ref: ./ShippingOption.yaml - - type: object - properties: - price_incl_tax: - type: number - description: Price including taxes - tax_rates: - type: array - description: An array of applied tax rates - items: - type: object - properties: - rate: - type: number - description: The tax rate value - name: - type: string - description: The name of the tax rate - code: - type: string - description: The code of the tax rate - tax_amount: - type: number - description: The taxes applied. diff --git a/www/apps/api-reference/specs/admin/components/schemas/PricedVariant.yaml b/www/apps/api-reference/specs/admin/components/schemas/PricedVariant.yaml deleted file mode 100644 index 4b74691549..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/PricedVariant.yaml +++ /dev/null @@ -1,41 +0,0 @@ -title: Priced Product Variant -type: object -allOf: - - $ref: ./ProductVariant.yaml - - type: object - properties: - original_price: - type: number - description: >- - The original price of the variant without any discounted prices - applied. - calculated_price: - type: number - description: The calculated price of the variant. Can be a discounted price. - original_price_incl_tax: - type: number - description: The original price of the variant including taxes. - calculated_price_incl_tax: - type: number - description: The calculated price of the variant including taxes. - original_tax: - type: number - description: The taxes applied on the original price. - calculated_tax: - type: number - description: The taxes applied on the calculated price. - tax_rates: - type: array - description: An array of applied tax rates - items: - type: object - properties: - rate: - type: number - description: The tax rate value - name: - type: string - description: The name of the tax rate - code: - type: string - description: The code of the tax rate diff --git a/www/apps/api-reference/specs/admin/components/schemas/Product.yaml b/www/apps/api-reference/specs/admin/components/schemas/Product.yaml deleted file mode 100644 index d0f98a63f1..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Product.yaml +++ /dev/null @@ -1,253 +0,0 @@ -title: Product -description: >- - A product is a saleable item that holds general information such as name or - description. It must include at least one Product Variant, where each product - variant defines different options to purchase the product with (for example, - different sizes or colors). The prices and inventory of the product are - defined on the variant level. -type: object -required: - - collection_id - - created_at - - deleted_at - - description - - discountable - - external_id - - handle - - height - - hs_code - - id - - is_giftcard - - length - - material - - metadata - - mid_code - - origin_country - - profile_id - - status - - subtitle - - type_id - - thumbnail - - title - - updated_at - - weight - - width -properties: - id: - description: The product's ID - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - title: - description: A title that can be displayed for easy identification of the Product. - type: string - example: Medusa Coffee Mug - subtitle: - description: An optional subtitle that can be used to further specify the Product. - nullable: true - type: string - description: - description: A short description of the Product. - nullable: true - type: string - example: Every programmer's best friend. - handle: - description: A unique identifier for the Product (e.g. for slug structure). - nullable: true - type: string - example: coffee-mug - is_giftcard: - description: >- - Whether the Product represents a Gift Card. Products that represent Gift - Cards will automatically generate a redeemable Gift Card code once they - are purchased. - type: boolean - default: false - status: - description: The status of the product - type: string - enum: - - draft - - proposed - - published - - rejected - default: draft - images: - description: The details of the product's images. - type: array - x-expandable: images - items: - $ref: ./Image.yaml - thumbnail: - description: A URL to an image file that can be used to identify the Product. - nullable: true - type: string - format: uri - options: - description: >- - The details of the Product Options that are defined for the Product. The - product's variants will have a unique combination of values of the - product's options. - type: array - x-expandable: options - items: - $ref: ./ProductOption.yaml - variants: - description: >- - The details of the Product Variants that belong to the Product. Each will - have a unique combination of values of the product's options. - type: array - x-expandable: variants - items: - $ref: ./ProductVariant.yaml - categories: - description: The details of the product categories that this product belongs to. - type: array - x-expandable: categories - x-featureFlag: product_categories - items: - $ref: ./ProductCategory.yaml - profile_id: - description: >- - The ID of the shipping profile that the product belongs to. The shipping - profile has a set of defined shipping options that can be used to fulfill - the product. - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - profile: - description: >- - The details of the shipping profile that the product belongs to. The - shipping profile has a set of defined shipping options that can be used to - fulfill the product. - x-expandable: profile - nullable: true - $ref: ./ShippingProfile.yaml - profiles: - description: Available if the relation `profiles` is expanded. - nullable: true - type: array - items: - $ref: ./ShippingProfile.yaml - weight: - description: >- - The weight of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - length: - description: >- - The length of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - hs_code: - description: >- - The Harmonized System code of the Product Variant. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - origin_country: - description: >- - The country in which the Product Variant was produced. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - mid_code: - description: >- - The Manufacturers Identification code that identifies the manufacturer of - the Product Variant. May be used by Fulfillment Providers to pass customs - information to shipping carriers. - nullable: true - type: string - example: null - material: - description: >- - The material and composition that the Product Variant is made of, May be - used by Fulfillment Providers to pass customs information to shipping - carriers. - nullable: true - type: string - example: null - collection_id: - description: The ID of the product collection that the product belongs to. - nullable: true - type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - collection: - description: The details of the product collection that the product belongs to. - x-expandable: collection - nullable: true - $ref: ./ProductCollection.yaml - type_id: - description: The ID of the product type that the product belongs to. - nullable: true - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - type: - description: The details of the product type that the product belongs to. - x-expandable: type - nullable: true - $ref: ./ProductType.yaml - tags: - description: The details of the product tags used in this product. - type: array - x-expandable: type - items: - $ref: ./ProductTag.yaml - discountable: - description: >- - Whether the Product can be discounted. Discounts will not apply to Line - Items of this Product when this flag is set to `false`. - type: boolean - default: true - external_id: - description: The external ID of the product - nullable: true - type: string - example: null - sales_channels: - description: The details of the sales channels this product is available in. - type: array - x-expandable: sales_channels - items: - $ref: ./SalesChannel.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ProductCategory.yaml b/www/apps/api-reference/specs/admin/components/schemas/ProductCategory.yaml deleted file mode 100644 index 2a9d4d63a0..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ProductCategory.yaml +++ /dev/null @@ -1,97 +0,0 @@ -title: Product Category -description: >- - A product category can be used to categorize products into a hierarchy of - categories. -x-resourceId: ProductCategory -x-featureFlag: product_categories -type: object -required: - - category_children - - created_at - - handle - - id - - is_active - - is_internal - - metadata - - mpath - - name - - parent_category_id - - updated_at -properties: - id: - description: The product category's ID - type: string - example: pcat_01G2SG30J8C85S4A5CHM2S1NS2 - name: - description: The product category's name - type: string - example: Regular Fit - description: - description: The product category's description. - type: string - default: '' - handle: - description: >- - A unique string that identifies the Product Category - can for example be - used in slug structures. - type: string - example: regular-fit - mpath: - description: >- - A string for Materialized Paths - used for finding ancestors and - descendents - nullable: true - type: string - example: pcat_id1.pcat_id2.pcat_id3 - is_internal: - type: boolean - description: A flag to make product category an internal category for admins - default: false - is_active: - type: boolean - description: A flag to make product category visible/hidden in the store front - default: false - rank: - type: integer - description: An integer that depicts the rank of category in a tree node - default: 0 - category_children: - description: The details of the category's children. - type: array - x-expandable: category_children - items: - type: object - parent_category_id: - description: The ID of the parent category. - nullable: true - type: string - default: null - parent_category: - description: The details of the parent of this category. - x-expandable: parent_category - nullable: true - type: object - products: - description: The details of the products that belong to this category. - type: array - x-expandable: products - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ProductCollection.yaml b/www/apps/api-reference/specs/admin/components/schemas/ProductCollection.yaml deleted file mode 100644 index 82b6fbcca8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ProductCollection.yaml +++ /dev/null @@ -1,59 +0,0 @@ -title: Product Collection -description: >- - A Product Collection allows grouping together products for promotional - purposes. For example, an admin can create a Summer collection, add products - to it, and showcase it on the storefront. -type: object -required: - - created_at - - deleted_at - - handle - - id - - metadata - - title - - updated_at -properties: - id: - description: The product collection's ID - type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - title: - description: The title that the Product Collection is identified by. - type: string - example: Summer Collection - handle: - description: >- - A unique string that identifies the Product Collection - can for example - be used in slug structures. - nullable: true - type: string - example: summer-collection - products: - description: The details of the products that belong to this product collection. - type: array - x-expandable: products - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ProductOption.yaml b/www/apps/api-reference/specs/admin/components/schemas/ProductOption.yaml deleted file mode 100644 index 6e2d829a9e..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ProductOption.yaml +++ /dev/null @@ -1,61 +0,0 @@ -title: Product Option -description: >- - A Product Option defines properties that may vary between different variants - of a Product. Common Product Options are "Size" and "Color". Admins are free - to create any product options. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - product_id - - title - - updated_at -properties: - id: - description: The product option's ID - type: string - example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 - title: - description: The title that the Product Option is defined by (e.g. `Size`). - type: string - example: Size - values: - description: The details of the values of the product option. - type: array - x-expandable: values - items: - $ref: ./ProductOptionValue.yaml - product_id: - description: The ID of the product that this product option belongs to. - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product that this product option belongs to. - x-expandable: product - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ProductOptionValue.yaml b/www/apps/api-reference/specs/admin/components/schemas/ProductOptionValue.yaml deleted file mode 100644 index af9257805c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ProductOptionValue.yaml +++ /dev/null @@ -1,69 +0,0 @@ -title: Product Option Value -description: >- - An option value is one of the possible values of a Product Option. Product - Variants specify a unique combination of product option values. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - option_id - - updated_at - - value - - variant_id -properties: - id: - description: The product option value's ID - type: string - example: optval_01F0YESHR7S6ECD03RF6W12DSJ - value: - description: >- - The value that the Product Variant has defined for the specific Product - Option (e.g. if the Product Option is "Size" this value could be `Small`, - `Medium` or `Large`). - type: string - example: large - option_id: - description: The ID of the Product Option that the Product Option Value belongs to. - type: string - example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 - option: - description: >- - The details of the product option that the Product Option Value belongs - to. - x-expandable: option - nullable: true - type: object - variant_id: - description: The ID of the product variant that uses this product option value. - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that uses this product option value. - x-expandable: variant - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ProductTag.yaml b/www/apps/api-reference/specs/admin/components/schemas/ProductTag.yaml deleted file mode 100644 index 829162f285..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ProductTag.yaml +++ /dev/null @@ -1,42 +0,0 @@ -title: Product Tag -description: A Product Tag can be added to Products for easy filtering and grouping. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value -properties: - id: - description: The product tag's ID - type: string - example: ptag_01G8K2MTMG9168F2B70S1TAVK3 - value: - description: The value that the Product Tag represents - type: string - example: Pants - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ProductTaxRate.yaml b/www/apps/api-reference/specs/admin/components/schemas/ProductTaxRate.yaml deleted file mode 100644 index 55292d8e33..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ProductTaxRate.yaml +++ /dev/null @@ -1,48 +0,0 @@ -title: Product Tax Rate -description: >- - This represents the association between a tax rate and a product to indicate - that the product is taxed in a way different than the default. -type: object -required: - - created_at - - metadata - - product_id - - rate_id - - updated_at -properties: - product_id: - description: The ID of the Product - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product. - x-expandable: product - nullable: true - $ref: ./Product.yaml - rate_id: - description: The ID of the Tax Rate - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the tax rate. - x-expandable: tax_rate - nullable: true - $ref: ./TaxRate.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ProductType.yaml b/www/apps/api-reference/specs/admin/components/schemas/ProductType.yaml deleted file mode 100644 index dbdc684090..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ProductType.yaml +++ /dev/null @@ -1,42 +0,0 @@ -title: Product Type -description: A Product Type can be added to Products for filtering and reporting purposes. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value -properties: - id: - description: The product type's ID - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - value: - description: The value that the Product Type represents. - type: string - example: Clothing - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ProductTypeTaxRate.yaml b/www/apps/api-reference/specs/admin/components/schemas/ProductTypeTaxRate.yaml deleted file mode 100644 index 3c641ab1fe..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ProductTypeTaxRate.yaml +++ /dev/null @@ -1,48 +0,0 @@ -title: Product Type Tax Rate -description: >- - This represents the association between a tax rate and a product type to - indicate that the product type is taxed in a different way than the default. -type: object -required: - - created_at - - metadata - - product_type_id - - rate_id - - updated_at -properties: - product_type_id: - description: The ID of the Product type - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - product_type: - description: The details of the product type. - x-expandable: product_type - nullable: true - $ref: ./ProductType.yaml - rate_id: - description: The id of the Tax Rate - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the tax rate. - x-expandable: tax_rate - nullable: true - $ref: ./TaxRate.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ProductVariant.yaml b/www/apps/api-reference/specs/admin/components/schemas/ProductVariant.yaml deleted file mode 100644 index ad7ee83ce8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ProductVariant.yaml +++ /dev/null @@ -1,208 +0,0 @@ -title: Product Variant -description: >- - A Product Variant represents a Product with a specific set of Product Option - configurations. The maximum number of Product Variants that a Product can have - is given by the number of available Product Option combinations. A product - must at least have one product variant. -type: object -required: - - allow_backorder - - barcode - - created_at - - deleted_at - - ean - - height - - hs_code - - id - - inventory_quantity - - length - - manage_inventory - - material - - metadata - - mid_code - - origin_country - - product_id - - sku - - title - - upc - - updated_at - - weight - - width -properties: - id: - description: The product variant's ID - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - title: - description: >- - A title that can be displayed for easy identification of the Product - Variant. - type: string - example: Small - product_id: - description: The ID of the product that the product variant belongs to. - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product that the product variant belongs to. - x-expandable: product - nullable: true - type: object - prices: - description: >- - The details of the prices of the Product Variant, each represented as a - Money Amount. Each Money Amount represents a price in a given currency or - a specific Region. - type: array - x-expandable: prices - items: - $ref: ./MoneyAmount.yaml - sku: - description: >- - The unique stock keeping unit used to identify the Product Variant. This - will usually be a unique identifer for the item that is to be shipped, and - can be referenced across multiple systems. - nullable: true - type: string - example: shirt-123 - barcode: - description: >- - A generic field for a GTIN number that can be used to identify the Product - Variant. - nullable: true - type: string - example: null - ean: - description: An EAN barcode number that can be used to identify the Product Variant. - nullable: true - type: string - example: null - upc: - description: A UPC barcode number that can be used to identify the Product Variant. - nullable: true - type: string - example: null - variant_rank: - description: The ranking of this variant - nullable: true - type: number - default: 0 - inventory_quantity: - description: The current quantity of the item that is stocked. - type: integer - example: 100 - allow_backorder: - description: >- - Whether the Product Variant should be purchasable when - `inventory_quantity` is 0. - type: boolean - default: false - manage_inventory: - description: Whether Medusa should manage inventory for the Product Variant. - type: boolean - default: true - hs_code: - description: >- - The Harmonized System code of the Product Variant. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - origin_country: - description: >- - The country in which the Product Variant was produced. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - mid_code: - description: >- - The Manufacturers Identification code that identifies the manufacturer of - the Product Variant. May be used by Fulfillment Providers to pass customs - information to shipping carriers. - nullable: true - type: string - example: null - material: - description: >- - The material and composition that the Product Variant is made of, May be - used by Fulfillment Providers to pass customs information to shipping - carriers. - nullable: true - type: string - example: null - weight: - description: >- - The weight of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - length: - description: >- - The length of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - options: - description: >- - The details of the product options that this product variant defines - values for. - type: array - x-expandable: options - items: - $ref: ./ProductOptionValue.yaml - inventory_items: - description: The details inventory items of the product variant. - type: array - x-expandable: inventory_items - items: - $ref: ./ProductVariantInventoryItem.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - purchasable: - description: | - Only used with the inventory modules. - A boolean value indicating whether the Product Variant is purchasable. - A variant is purchasable if: - - inventory is not managed - - it has no inventory items - - it is in stock - - it is backorderable. - type: boolean diff --git a/www/apps/api-reference/specs/admin/components/schemas/ProductVariantInventoryItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/ProductVariantInventoryItem.yaml deleted file mode 100644 index 2da5bc3821..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ProductVariantInventoryItem.yaml +++ /dev/null @@ -1,46 +0,0 @@ -title: Product Variant Inventory Item -description: >- - A Product Variant Inventory Item links variants with inventory items and - denotes the required quantity of the variant. -type: object -required: - - created_at - - deleted_at - - id - - inventory_item_id - - required_quantity - - updated_at - - variant_id -properties: - id: - description: The product variant inventory item's ID - type: string - example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A - inventory_item_id: - description: The id of the inventory item - type: string - variant_id: - description: The id of the variant. - type: string - variant: - description: The details of the product variant. - x-expandable: variant - nullable: true - type: object - required_quantity: - description: The quantity of an inventory item required for the variant. - type: integer - default: 1 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/Promotion.yaml b/www/apps/api-reference/specs/admin/components/schemas/Promotion.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/Promotion.yaml rename to www/apps/api-reference/specs/admin/components/schemas/Promotion.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/PromotionRule.yaml b/www/apps/api-reference/specs/admin/components/schemas/PromotionRule.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/PromotionRule.yaml rename to www/apps/api-reference/specs/admin/components/schemas/PromotionRule.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/PublishableApiKey.yaml b/www/apps/api-reference/specs/admin/components/schemas/PublishableApiKey.yaml deleted file mode 100644 index d94df58632..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/PublishableApiKey.yaml +++ /dev/null @@ -1,49 +0,0 @@ -title: Publishable API key -description: >- - A Publishable API key defines scopes that resources are available in. Then, it - can be used in request to infer the resources without having to directly pass - them. For example, a publishable API key can be associated with one or more - sales channels. Then, when the publishable API key is passed in the header of - a request, it is inferred what sales channel is being used without having to - pass the sales channel as a query or body parameter of the request. - Publishable API keys can only be used with sales channels, at the moment. -type: object -required: - - created_at - - created_by - - id - - revoked_by - - revoked_at - - title - - updated_at -properties: - id: - description: The key's ID - type: string - example: pk_01G1G5V27GYX4QXNARRQCW1N8T - created_by: - description: The unique identifier of the user that created the key. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_by: - description: The unique identifier of the user that revoked the key. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_at: - description: The date with timezone at which the key was revoked. - nullable: true - type: string - format: date-time - title: - description: The key's title. - type: string - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/PublishableApiKeySalesChannel.yaml b/www/apps/api-reference/specs/admin/components/schemas/PublishableApiKeySalesChannel.yaml deleted file mode 100644 index fc7419a6d8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/PublishableApiKeySalesChannel.yaml +++ /dev/null @@ -1,37 +0,0 @@ -title: Publishable API Key Sales Channel -description: >- - This represents the association between the Publishable API keys and Sales - Channels -type: object -required: - - publishable_key_id - - sales_channel_id - - created_at - - updated_at - - deleted_at -properties: - id: - description: The relation's ID - type: string - example: pksc_01G8X9A7ESKAJXG2H0E6F1MW7A - sales_channel_id: - description: The sales channel's ID - type: string - example: sc_01G1G5V21KADXNGH29BJMAJ4B4 - publishable_key_id: - description: The publishable API key's ID - type: string - example: pak_01G1G5V21KADXNGH29BJMAJ4B4 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/Refund.yaml b/www/apps/api-reference/specs/admin/components/schemas/Refund.yaml deleted file mode 100644 index 0438bfe295..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Refund.yaml +++ /dev/null @@ -1,90 +0,0 @@ -title: Refund -description: >- - A refund represents an amount of money transfered back to the customer for a - given reason. Refunds may occur in relation to Returns, Swaps and Claims, but - can also be initiated by an admin for an order. -type: object -required: - - amount - - created_at - - id - - idempotency_key - - metadata - - note - - order_id - - payment_id - - reason - - updated_at -properties: - id: - description: The refund's ID - type: string - example: ref_01G1G5V27GYX4QXNARRQCW1N8T - order_id: - description: The ID of the order this refund was created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order this refund was created for. - x-expandable: order - nullable: true - type: object - payment_id: - description: The payment's ID, if available. - nullable: true - type: string - example: pay_01G8ZCC5W42ZNY842124G7P5R9 - payment: - description: The details of the payment associated with the refund. - x-expandable: payment - nullable: true - type: object - amount: - description: The amount that has be refunded to the Customer. - type: integer - example: 1000 - note: - description: An optional note explaining why the amount was refunded. - nullable: true - type: string - example: I didn't like it - reason: - description: >- - The reason given for the Refund, will automatically be set when processed - as part of a Swap, Claim or Return. - type: string - enum: - - discount - - return - - swap - - claim - - other - example: return - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the refund in - case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/Region.yaml b/www/apps/api-reference/specs/admin/components/schemas/Region.yaml deleted file mode 100644 index b9f3b0c9e3..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Region.yaml +++ /dev/null @@ -1,130 +0,0 @@ -title: Region -description: >- - A region holds settings specific to a geographical location, including the - currency, tax rates, and fulfillment and payment providers. A Region can - consist of multiple countries to accomodate common shopping settings across - countries. -type: object -required: - - automatic_taxes - - created_at - - currency_code - - deleted_at - - gift_cards_taxable - - id - - metadata - - name - - tax_code - - tax_provider_id - - tax_rate - - updated_at -properties: - id: - description: The region's ID - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - name: - description: >- - The name of the region as displayed to the customer. If the Region only - has one country it is recommended to write the country name. - type: string - example: EU - currency_code: - description: The three character currency code used in the region. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency used in the region. - x-expandable: currency - nullable: true - $ref: ./Currency.yaml - tax_rate: - description: The tax rate that should be charged on purchases in the Region. - type: number - example: 0 - tax_rates: - description: >- - The details of the tax rates used in the region, aside from the default - rate. - type: array - x-expandable: tax_rates - items: - $ref: ./TaxRate.yaml - tax_code: - description: >- - The tax code used on purchases in the Region. This may be used by other - systems for accounting purposes. - nullable: true - type: string - example: null - gift_cards_taxable: - description: Whether the gift cards are taxable or not in this region. - type: boolean - default: true - automatic_taxes: - description: Whether taxes should be automated in this region. - type: boolean - default: true - countries: - description: The details of the countries included in this region. - type: array - x-expandable: countries - items: - $ref: ./Country.yaml - tax_provider_id: - description: The ID of the tax provider used in this region - nullable: true - type: string - example: null - tax_provider: - description: The details of the tax provider used in the region. - x-expandable: tax_provider - nullable: true - $ref: ./TaxProvider.yaml - payment_providers: - description: >- - The details of the payment providers that can be used to process payments - in the region. - type: array - x-expandable: payment_providers - items: - $ref: ./PaymentProvider.yaml - fulfillment_providers: - description: >- - The details of the fulfillment providers that can be used to fulfill items - of orders and similar resources in the region. - type: array - x-expandable: fulfillment_providers - items: - $ref: ./FulfillmentProvider.yaml - includes_tax: - description: Whether the prices for the region include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ReservationItemDTO.yaml b/www/apps/api-reference/specs/admin/components/schemas/ReservationItemDTO.yaml deleted file mode 100644 index 5e4f31bfec..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ReservationItemDTO.yaml +++ /dev/null @@ -1,44 +0,0 @@ -title: Reservation item -description: Represents a reservation of an inventory item at a stock location -type: object -required: - - id - - location_id - - inventory_item_id - - quantity -properties: - id: - description: The id of the reservation item - type: string - location_id: - description: The id of the location of the reservation - type: string - inventory_item_id: - description: The id of the inventory item the reservation relates to - type: string - description: - description: Description of the reservation item - type: string - created_by: - description: UserId of user who created the reservation item - type: string - quantity: - description: The id of the reservation item - type: number - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/ResponseInventoryItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/ResponseInventoryItem.yaml deleted file mode 100644 index 6a141e4ba9..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ResponseInventoryItem.yaml +++ /dev/null @@ -1,17 +0,0 @@ -allOf: - - $ref: ./InventoryItemDTO.yaml - - type: object - properties: - location_levels: - type: array - description: The inventory's location levels. - items: - allOf: - - $ref: ./InventoryItemDTO.yaml - - type: object - required: - - available_quantity - properties: - available_quantity: - description: The available quantity in the inventory location. - type: number diff --git a/www/apps/api-reference/specs/admin/components/schemas/Return.yaml b/www/apps/api-reference/specs/admin/components/schemas/Return.yaml deleted file mode 100644 index d7145a0dff..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Return.yaml +++ /dev/null @@ -1,132 +0,0 @@ -title: Return -description: >- - A Return holds information about Line Items that a Customer wishes to send - back, along with how the items will be returned. Returns can also be used as - part of a Swap or a Claim. -type: object -required: - - claim_order_id - - created_at - - id - - idempotency_key - - location_id - - metadata - - no_notification - - order_id - - received_at - - refund_amount - - shipping_data - - status - - swap_id - - updated_at -properties: - id: - description: The return's ID - type: string - example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - status: - description: Status of the Return. - type: string - enum: - - requested - - received - - requires_action - - canceled - default: requested - items: - description: The details of the items that the customer is returning. - type: array - x-expandable: items - items: - $ref: ./ReturnItem.yaml - swap_id: - description: The ID of the swap that the return may belong to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the return may belong to. - x-expandable: swap - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the return may belong to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the return may belong to. - x-expandable: claim_order - nullable: true - type: object - order_id: - description: The ID of the order that the return was created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the return was created for. - x-expandable: order - nullable: true - type: object - shipping_method: - description: >- - The details of the Shipping Method that will be used to send the Return - back. Can be null if the Customer will handle the return shipment - themselves. - x-expandable: shipping_method - nullable: true - $ref: ./ShippingMethod.yaml - shipping_data: - description: >- - Data about the return shipment as provided by the Fulfilment Provider that - handles the return shipment. - nullable: true - type: object - example: {} - location_id: - description: The ID of the stock location the return will be added back. - nullable: true - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK - refund_amount: - description: The amount that should be refunded as a result of the return. - type: integer - example: 1000 - no_notification: - description: When set to true, no notification will be sent related to this return. - nullable: true - type: boolean - example: false - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the return in - case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - received_at: - description: The date with timezone at which the return was received. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ReturnItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/ReturnItem.yaml deleted file mode 100644 index cbdf122007..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ReturnItem.yaml +++ /dev/null @@ -1,79 +0,0 @@ -title: Return Item -description: >- - A return item represents a line item in an order that is to be returned. It - includes details related to the return and the reason behind it. -type: object -required: - - is_requested - - item_id - - metadata - - note - - quantity - - reason_id - - received_quantity - - requested_quantity - - return_id -properties: - return_id: - description: The ID of the Return that the Return Item belongs to. - type: string - example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - item_id: - description: The ID of the Line Item that the Return Item references. - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - return_order: - description: Details of the Return that the Return Item belongs to. - x-expandable: return_order - nullable: true - type: object - item: - description: The details of the line item in the original order to be returned. - x-expandable: item - nullable: true - $ref: ./LineItem.yaml - quantity: - description: The quantity of the Line Item to be returned. - type: integer - example: 1 - is_requested: - description: >- - Whether the Return Item was requested initially or received unexpectedly - in the warehouse. - type: boolean - default: true - requested_quantity: - description: The quantity that was originally requested to be returned. - nullable: true - type: integer - example: 1 - received_quantity: - description: The quantity that was received in the warehouse. - nullable: true - type: integer - example: 1 - reason_id: - description: The ID of the reason for returning the item. - nullable: true - type: string - example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - reason: - description: The details of the reason for returning the item. - x-expandable: reason - nullable: true - $ref: ./ReturnReason.yaml - note: - description: An optional note with additional details about the Return. - nullable: true - type: string - example: I didn't like it. - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ReturnReason.yaml b/www/apps/api-reference/specs/admin/components/schemas/ReturnReason.yaml deleted file mode 100644 index 28f6b23324..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ReturnReason.yaml +++ /dev/null @@ -1,70 +0,0 @@ -title: Return Reason -description: >- - A Return Reason is a value defined by an admin. It can be used on Return Items - in order to indicate why a Line Item was returned. -type: object -required: - - created_at - - deleted_at - - description - - id - - label - - metadata - - parent_return_reason_id - - updated_at - - value -properties: - id: - description: The return reason's ID - type: string - example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - value: - description: The value to identify the reason by. - type: string - example: damaged - label: - description: A text that can be displayed to the Customer as a reason. - type: string - example: Damaged goods - description: - description: A description of the Reason. - nullable: true - type: string - example: Items that are damaged - parent_return_reason_id: - description: The ID of the parent reason. - nullable: true - type: string - example: null - parent_return_reason: - description: The details of the parent reason. - x-expandable: parent_return_reason - nullable: true - type: object - return_reason_children: - description: The details of the child reasons. - x-expandable: return_reason_children - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/SalesChannel.yaml b/www/apps/api-reference/specs/admin/components/schemas/SalesChannel.yaml deleted file mode 100644 index 1dc2968f5c..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/SalesChannel.yaml +++ /dev/null @@ -1,84 +0,0 @@ -title: Sales Channel -description: >- - A Sales Channel is a method a business offers its products for purchase for - the customers. For example, a Webshop can be a sales channel, and a mobile app - can be another. -type: object -required: - - created_at - - deleted_at - - description - - id - - is_disabled - - name - - updated_at -properties: - id: - description: The sales channel's ID - type: string - example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A - name: - description: The name of the sales channel. - type: string - example: Market - description: - description: The description of the sales channel. - nullable: true - type: string - example: Multi-vendor market - is_disabled: - description: Specify if the sales channel is enabled or disabled. - type: boolean - default: false - locations: - description: The details of the stock locations related to the sales channel. - type: array - x-expandable: locations - items: - $ref: ./SalesChannelLocation.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - carts: - description: The associated carts. - type: array - nullable: true - x-expandable: carts - x-featureFlag: medusa_v2 - items: - type: object - orders: - description: The associated orders. - type: array - nullable: true - x-expandable: orders - x-featureFlag: medusa_v2 - items: - type: object - publishableKeys: - description: The associated publishable API keys. - type: array - nullable: true - x-expandable: publishableKeys - items: - type: object diff --git a/www/apps/api-reference/specs/admin/components/schemas/SalesChannelLocation.yaml b/www/apps/api-reference/specs/admin/components/schemas/SalesChannelLocation.yaml deleted file mode 100644 index 4936e19986..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/SalesChannelLocation.yaml +++ /dev/null @@ -1,40 +0,0 @@ -title: Sales Channel Stock Location -description: This represents the association between a sales channel and a stock locations. -type: object -required: - - created_at - - deleted_at - - id - - location_id - - sales_channel_id - - updated_at -properties: - id: - description: The Sales Channel Stock Location's ID - type: string - example: scloc_01G8X9A7ESKAJXG2H0E6F1MW7A - sales_channel_id: - description: The ID of the Sales Channel - type: string - example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A - location_id: - description: The ID of the Location Stock. - type: string - sales_channel: - description: The details of the sales channel the location is associated with. - x-expandable: sales_channel - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/ShippingMethod.yaml b/www/apps/api-reference/specs/admin/components/schemas/ShippingMethod.yaml deleted file mode 100644 index 730bf052cd..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ShippingMethod.yaml +++ /dev/null @@ -1,119 +0,0 @@ -title: Shipping Method -description: >- - A Shipping Method represents a way in which an Order or Return can be shipped. - Shipping Methods are created from a Shipping Option, but may contain - additional details that can be necessary for the Fulfillment Provider to - handle the shipment. If the shipping method is created for a return, it may be - associated with a claim or a swap that the return is part of. -type: object -required: - - cart_id - - claim_order_id - - data - - id - - order_id - - price - - return_id - - shipping_option_id - - swap_id -properties: - id: - description: The shipping method's ID - type: string - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_option_id: - description: The ID of the Shipping Option that the Shipping Method is built from. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - order_id: - description: The ID of the order that the shipping method is used in. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the shipping method is used in. - x-expandable: order - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the shipping method is used in. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the shipping method is used in. - x-expandable: claim_order - nullable: true - type: object - cart_id: - description: The ID of the cart that the shipping method is used in. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the shipping method is used in. - x-expandable: cart - nullable: true - type: object - swap_id: - description: The ID of the swap that the shipping method is used in. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the shipping method is used in. - x-expandable: swap - nullable: true - type: object - return_id: - description: The ID of the return that the shipping method is used in. - nullable: true - type: string - example: null - return_order: - description: The details of the return that the shipping method is used in. - x-expandable: return_order - nullable: true - type: object - shipping_option: - description: The details of the shipping option the method was created from. - x-expandable: shipping_option - nullable: true - $ref: ./ShippingOption.yaml - tax_lines: - description: The details of the tax lines applied on the shipping method. - type: array - x-expandable: tax_lines - items: - $ref: ./ShippingMethodTaxLine.yaml - price: - description: >- - The amount to charge for the Shipping Method. The currency of the price is - defined by the Region that the Order that the Shipping Method belongs to - is a part of. - type: integer - example: 200 - data: - description: >- - Additional data that the Fulfillment Provider needs to fulfill the - shipment. This is used in combination with the Shipping Options data, and - may contain information such as a drop point id. - type: object - example: {} - includes_tax: - description: Whether the shipping method price include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - subtotal: - description: The subtotal of the shipping - type: integer - example: 8000 - total: - description: The total amount of the shipping - type: integer - example: 8200 - tax_total: - description: The total of tax - type: integer - example: 0 diff --git a/www/apps/api-reference/specs/admin/components/schemas/ShippingMethodTaxLine.yaml b/www/apps/api-reference/specs/admin/components/schemas/ShippingMethodTaxLine.yaml deleted file mode 100644 index 892b8c06e0..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ShippingMethodTaxLine.yaml +++ /dev/null @@ -1,59 +0,0 @@ -title: Shipping Method Tax Line -description: >- - A Shipping Method Tax Line represents the taxes applied on a shipping method - in a cart. -type: object -required: - - code - - created_at - - id - - shipping_method_id - - metadata - - name - - rate - - updated_at -properties: - id: - description: The line item tax line's ID - type: string - example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - shipping_method_id: - description: The ID of the line item - type: string - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_method: - description: The details of the associated shipping method. - x-expandable: shipping_method - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ShippingOption.yaml b/www/apps/api-reference/specs/admin/components/schemas/ShippingOption.yaml deleted file mode 100644 index fbc4d8ed41..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ShippingOption.yaml +++ /dev/null @@ -1,137 +0,0 @@ -title: Shipping Option -description: >- - A Shipping Option represents a way in which an Order or Return can be shipped. - Shipping Options have an associated Fulfillment Provider that will be used - when the fulfillment of an Order is initiated. Shipping Options themselves - cannot be added to Carts, but serve as a template for Shipping Methods. This - distinction makes it possible to customize individual Shipping Methods with - additional information. -type: object -required: - - admin_only - - amount - - created_at - - data - - deleted_at - - id - - is_return - - metadata - - name - - price_type - - profile_id - - provider_id - - region_id - - updated_at -properties: - id: - description: The shipping option's ID - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - name: - description: >- - The name given to the Shipping Option - this may be displayed to the - Customer. - type: string - example: PostFake Standard - region_id: - description: The ID of the region this shipping option can be used in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this shipping option can be used in. - x-expandable: region - nullable: true - type: object - profile_id: - description: The ID of the Shipping Profile that the shipping option belongs to. - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - profile: - description: The details of the shipping profile that the shipping option belongs to. - x-expandable: profile - nullable: true - $ref: ./ShippingProfile.yaml - provider_id: - description: >- - The ID of the fulfillment provider that will be used to later to process - the shipping method created from this shipping option and its - fulfillments. - type: string - example: manual - provider: - description: >- - The details of the fulfillment provider that will be used to later to - process the shipping method created from this shipping option and its - fulfillments. - x-expandable: provider - nullable: true - $ref: ./FulfillmentProvider.yaml - price_type: - description: >- - The type of pricing calculation that is used when creatin Shipping Methods - from the Shipping Option. Can be `flat_rate` for fixed prices or - `calculated` if the Fulfillment Provider can provide price calulations. - type: string - enum: - - flat_rate - - calculated - example: flat_rate - amount: - description: >- - The amount to charge for shipping when the Shipping Option price type is - `flat_rate`. - nullable: true - type: integer - example: 200 - is_return: - description: Flag to indicate if the Shipping Option can be used for Return shipments. - type: boolean - default: false - admin_only: - description: >- - Flag to indicate if the Shipping Option usage is restricted to admin - users. - type: boolean - default: false - requirements: - description: >- - The details of the requirements that must be satisfied for the Shipping - Option to be available for usage in a Cart. - type: array - x-expandable: requirements - items: - $ref: ./ShippingOptionRequirement.yaml - data: - description: >- - The data needed for the Fulfillment Provider to identify the Shipping - Option. - type: object - example: {} - includes_tax: - description: Whether the shipping option price include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ShippingOptionRequirement.yaml b/www/apps/api-reference/specs/admin/components/schemas/ShippingOptionRequirement.yaml deleted file mode 100644 index 26764f96d0..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ShippingOptionRequirement.yaml +++ /dev/null @@ -1,46 +0,0 @@ -title: Shipping Option Requirement -description: >- - A shipping option requirement defines conditions that a Cart must satisfy for - the Shipping Option to be available for usage in the Cart. -type: object -required: - - amount - - deleted_at - - id - - shipping_option_id - - type -properties: - id: - description: The shipping option requirement's ID - type: string - example: sor_01G1G5V29AB4CTNDRFSRWSRKWD - shipping_option_id: - description: The ID of the shipping option that the requirements belong to. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the shipping option that the requirements belong to. - x-expandable: shipping_option - nullable: true - type: object - type: - description: >- - The type of the requirement, this defines how the value will be compared - to the Cart's total. `min_subtotal` requirements define the minimum - subtotal that is needed for the Shipping Option to be available, while the - `max_subtotal` defines the maximum subtotal that the Cart can have for the - Shipping Option to be available. - type: string - enum: - - min_subtotal - - max_subtotal - example: min_subtotal - amount: - description: The amount to compare the Cart subtotal to. - type: integer - example: 100 - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/ShippingProfile.yaml b/www/apps/api-reference/specs/admin/components/schemas/ShippingProfile.yaml deleted file mode 100644 index 58c9ef4558..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ShippingProfile.yaml +++ /dev/null @@ -1,76 +0,0 @@ -title: Shipping Profile -description: >- - A Shipping Profile has a set of defined Shipping Options that can be used to - fulfill a given set of Products. For example, gift cards are shipped - differently than physical products, so a shipping profile with the type - `gift_card` groups together the shipping options that can only be used for - gift cards. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - name - - type - - updated_at -properties: - id: - description: The shipping profile's ID - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - name: - description: >- - The name given to the Shipping profile - this may be displayed to the - Customer. - type: string - example: Default Shipping Profile - type: - description: >- - The type of the Shipping Profile, may be `default`, `gift_card` or - `custom`. - type: string - enum: - - default - - gift_card - - custom - example: default - products: - description: >- - The details of the products that the Shipping Profile defines Shipping - Options for. Available if the relation `products` is expanded. - type: array - x-expandable: products - items: - type: object - shipping_options: - description: >- - The details of the shipping options that can be used to create shipping - methods for the Products in the Shipping Profile. - type: array - x-expandable: shipping_options - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/ShippingTaxRate.yaml b/www/apps/api-reference/specs/admin/components/schemas/ShippingTaxRate.yaml deleted file mode 100644 index c7b36795be..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/ShippingTaxRate.yaml +++ /dev/null @@ -1,46 +0,0 @@ -title: Shipping Tax Rate -description: This represents the tax rates applied on a shipping option. -type: object -required: - - created_at - - metadata - - rate_id - - shipping_option_id - - updated_at -properties: - shipping_option_id: - description: The ID of the shipping option. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the shipping option. - x-expandable: shipping_option - nullable: true - $ref: ./ShippingOption.yaml - rate_id: - description: The ID of the associated tax rate. - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the associated tax rate. - x-expandable: tax_rate - nullable: true - $ref: ./TaxRate.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/StagedJob.yaml b/www/apps/api-reference/specs/admin/components/schemas/StagedJob.yaml deleted file mode 100644 index adc7c6beab..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/StagedJob.yaml +++ /dev/null @@ -1,25 +0,0 @@ -title: Staged Job -description: A staged job resource -type: object -required: - - data - - event_name - - id - - options -properties: - id: - description: The staged job's ID - type: string - example: job_01F0YET7BZTARY9MKN1SJ7AAXF - event_name: - description: The name of the event - type: string - example: order.placed - data: - description: Data necessary for the job - type: object - example: {} - option: - description: The staged job's option - type: object - example: {} diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/StockLocationAddress.yaml b/www/apps/api-reference/specs/admin/components/schemas/StockLocationAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/StockLocationAddress.yaml rename to www/apps/api-reference/specs/admin/components/schemas/StockLocationAddress.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/StockLocationAddressDTO.yaml b/www/apps/api-reference/specs/admin/components/schemas/StockLocationAddressDTO.yaml deleted file mode 100644 index fa00e2353d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/StockLocationAddressDTO.yaml +++ /dev/null @@ -1,62 +0,0 @@ -title: Stock Location Address -description: Represents a Stock Location Address -type: object -required: - - address_1 - - country_code - - created_at - - updated_at -properties: - id: - type: string - description: The stock location address' ID - example: laddr_51G4ZW853Y6TFXWPG5ENJ81X42 - address_1: - type: string - description: Stock location address - example: 35, Jhon Doe Ave - address_2: - type: string - description: Stock location address' complement - example: apartment 4432 - company: - type: string - description: Stock location company' name - example: Medusa - city: - type: string - description: Stock location address' city - example: Mexico city - country_code: - type: string - description: Stock location address' country - example: MX - phone: - type: string - description: Stock location address' phone number - example: +1 555 61646 - postal_code: - type: string - description: Stock location address' postal code - example: HD3-1G8 - province: - type: string - description: Stock location address' province - example: Sinaloa - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/www/apps/api-reference/specs/admin/components/schemas/StockLocationAddressInput.yaml b/www/apps/api-reference/specs/admin/components/schemas/StockLocationAddressInput.yaml deleted file mode 100644 index 700d86deb8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/StockLocationAddressInput.yaml +++ /dev/null @@ -1,40 +0,0 @@ -title: Stock Location Address Input -description: Represents a Stock Location Address Input -type: object -required: - - address_1 - - country_code -properties: - address_1: - type: string - description: Stock location address - example: 35, Jhon Doe Ave - address_2: - type: string - description: Stock location address' complement - example: apartment 4432 - city: - type: string - description: Stock location address' city - example: Mexico city - country_code: - type: string - description: Stock location address' country - example: MX - phone: - type: string - description: Stock location address' phone number - example: +1 555 61646 - postal_code: - type: string - description: Stock location address' postal code - example: HD3-1G8 - province: - type: string - description: Stock location address' province - example: Sinaloa - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/www/apps/api-reference/specs/admin/components/schemas/StockLocationDTO.yaml b/www/apps/api-reference/specs/admin/components/schemas/StockLocationDTO.yaml deleted file mode 100644 index e4233fd30d..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/StockLocationDTO.yaml +++ /dev/null @@ -1,44 +0,0 @@ -title: Stock Location -description: Represents a Stock Location -type: object -required: - - id - - name - - address_id - - created_at - - updated_at -properties: - id: - type: string - description: The stock location's ID - example: sloc_51G4ZW853Y6TFXWPG5ENJ81X42 - address_id: - type: string - description: Stock location address' ID - example: laddr_05B2ZE853Y6FTXWPW85NJ81A44 - name: - type: string - description: The name of the stock location - example: Main Warehouse - address: - description: The Address of the Stock Location - allOf: - - $ref: ./StockLocationAddressDTO.yaml - - type: object - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/StockLocationExpandedDTO.yaml b/www/apps/api-reference/specs/admin/components/schemas/StockLocationExpandedDTO.yaml deleted file mode 100644 index 993fad1ca8..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/StockLocationExpandedDTO.yaml +++ /dev/null @@ -1,7 +0,0 @@ -allOf: - - $ref: ./StockLocationDTO.yaml - - type: object - properties: - sales_channels: - description: The associated sales channels. - $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/Store.yaml b/www/apps/api-reference/specs/admin/components/schemas/Store.yaml deleted file mode 100644 index e1331293bc..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Store.yaml +++ /dev/null @@ -1,98 +0,0 @@ -title: Store -description: >- - A store holds the main settings of the commerce shop. By default, only one - store is created and used within the Medusa backend. It holds settings related - to the name of the store, available currencies, and more. -type: object -required: - - created_at - - default_currency_code - - default_location_id - - id - - invite_link_template - - metadata - - name - - payment_link_template - - swap_link_template - - updated_at -properties: - id: - description: The store's ID - type: string - example: store_01G1G5V21KADXNGH29BJMAJ4B4 - name: - description: The name of the Store - this may be displayed to the Customer. - type: string - example: Medusa Store - default: Medusa Store - default_currency_code: - description: The three character currency code that is the default of the store. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - default_currency: - description: The details of the store's default currency. - x-expandable: default_currency - default: usd - nullable: true - $ref: ./Currency.yaml - currencies: - description: The details of the enabled currencies in the store. - type: array - x-expandable: currencies - items: - $ref: ./Currency.yaml - swap_link_template: - description: >- - A template to generate Swap links from. Use {{cart_id}} to include the - Swap's `cart_id` in the link. - nullable: true - type: string - example: null - payment_link_template: - description: >- - A template to generate Payment links from. Use {{cart_id}} to include the - payment's `cart_id` in the link. - nullable: true - type: string - example: null - invite_link_template: - description: A template to generate Invite links from - nullable: true - type: string - example: null - default_location_id: - description: The location ID the store is associated with. - nullable: true - type: string - example: null - default_sales_channel_id: - description: The ID of the store's default sales channel. - nullable: true - type: string - example: null - default_sales_channel: - description: The details of the store's default sales channel. - x-expandable: default_sales_channel - nullable: true - $ref: ./SalesChannel.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/StorePostCartsCartTaxesReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/StorePostCartsCartTaxesReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/StorePostCartsCartTaxesReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/StorePostCartsCartTaxesReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/StorePostPaymentCollectionsPaymentSessionReq.yaml b/www/apps/api-reference/specs/admin/components/schemas/StorePostPaymentCollectionsPaymentSessionReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/StorePostPaymentCollectionsPaymentSessionReq.yaml rename to www/apps/api-reference/specs/admin/components/schemas/StorePostPaymentCollectionsPaymentSessionReq.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/Swap.yaml b/www/apps/api-reference/specs/admin/components/schemas/Swap.yaml deleted file mode 100644 index 7e00bf1687..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/Swap.yaml +++ /dev/null @@ -1,186 +0,0 @@ -title: Swap -description: >- - A swap can be created when a Customer wishes to exchange Products that they - have purchased with different Products. It consists of a Return of previously - purchased Products and a Fulfillment of new Products. It also includes - information on any additional payment or refund required based on the - difference between the exchanged products. -type: object -required: - - allow_backorder - - canceled_at - - cart_id - - confirmed_at - - created_at - - deleted_at - - difference_due - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - order_id - - payment_status - - shipping_address_id - - updated_at -properties: - id: - description: The swap's ID - type: string - example: swap_01F0YET86Y9G92D3YDR9Y6V676 - fulfillment_status: - description: The status of the Fulfillment of the Swap. - type: string - enum: - - not_fulfilled - - fulfilled - - shipped - - partially_shipped - - canceled - - requires_action - example: not_fulfilled - payment_status: - description: >- - The status of the Payment of the Swap. The payment may either refer to the - refund of an amount or the authorization of a new amount. - type: string - enum: - - not_paid - - awaiting - - captured - - confirmed - - canceled - - difference_refunded - - partially_refunded - - refunded - - requires_action - example: not_paid - order_id: - description: The ID of the order that the swap belongs to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the swap belongs to. - x-expandable: order - nullable: true - type: object - additional_items: - description: >- - The details of the new products to send to the customer, represented as - line items. - type: array - x-expandable: additional_items - items: - $ref: ./LineItem.yaml - return_order: - description: >- - The details of the return that belongs to the swap, which holds the - details on the items being returned. - x-expandable: return_order - nullable: true - type: object - fulfillments: - description: >- - The details of the fulfillments that are used to send the new items to the - customer. - x-expandable: fulfillments - type: array - items: - type: object - payment: - description: >- - The details of the additional payment authorized by the customer when - `difference_due` is positive. - x-expandable: payment - nullable: true - type: object - difference_due: - description: >- - The difference amount between the order’s original total and the new total - imposed by the swap. If its value is negative, a refund must be issues to - the customer. If it's positive, additional payment must be authorized by - the customer. Otherwise, no payment processing is required. - nullable: true - type: integer - example: 0 - shipping_address_id: - description: >- - The Address to send the new Line Items to - in most cases this will be the - same as the shipping address on the Order. - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address that the new items should be sent to. - x-expandable: shipping_address - nullable: true - $ref: ./Address.yaml - shipping_methods: - description: >- - The details of the shipping methods used to fulfill the additional items - purchased. - type: array - x-expandable: shipping_methods - items: - $ref: ./ShippingMethod.yaml - cart_id: - description: The ID of the cart that the customer uses to complete the swap. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the customer uses to complete the swap. - x-expandable: cart - nullable: true - type: object - confirmed_at: - description: The date with timezone at which the Swap was confirmed by the Customer. - nullable: true - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Swap was canceled. - nullable: true - type: string - format: date-time - no_notification: - description: If set to true, no notification will be sent related to this swap - nullable: true - type: boolean - example: false - allow_backorder: - description: If true, swaps can be completed with items out of stock - type: boolean - default: false - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the swap in case - of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/TaxLine.yaml b/www/apps/api-reference/specs/admin/components/schemas/TaxLine.yaml deleted file mode 100644 index cbdb672a17..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/TaxLine.yaml +++ /dev/null @@ -1,47 +0,0 @@ -title: Tax Line -description: A tax line represents the taxes amount applied to a line item. -type: object -required: - - code - - created_at - - id - - metadata - - name - - rate - - updated_at -properties: - id: - description: The tax line's ID - type: string - example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/TaxProvider.yaml b/www/apps/api-reference/specs/admin/components/schemas/TaxProvider.yaml deleted file mode 100644 index 0abb0ed394..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/TaxProvider.yaml +++ /dev/null @@ -1,21 +0,0 @@ -title: Tax Provider -description: >- - A tax provider represents a tax service installed in the Medusa backend, - either through a plugin or backend customizations. It holds the tax service's - installation status. -type: object -required: - - id - - is_installed -properties: - id: - description: The ID of the tax provider as given by the tax service. - type: string - example: manual - is_installed: - description: >- - Whether the tax service is installed in the current version. If a tax - service is no longer installed, the `is_installed` attribute is set to - `false`. - type: boolean - default: true diff --git a/www/apps/api-reference/specs/admin/components/schemas/TaxRate.yaml b/www/apps/api-reference/specs/admin/components/schemas/TaxRate.yaml deleted file mode 100644 index aaf91c7e76..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/TaxRate.yaml +++ /dev/null @@ -1,90 +0,0 @@ -title: Tax Rate -description: >- - A Tax Rate can be used to define a custom rate to charge on specified - products, product types, and shipping options within a given region. -type: object -required: - - code - - created_at - - id - - metadata - - name - - rate - - region_id - - updated_at -properties: - id: - description: The tax rate's ID - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - rate: - description: The numeric rate to charge - nullable: true - type: number - example: 10 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - region_id: - description: The ID of the region that the rate belongs to. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region that the rate belongs to. - x-expandable: region - nullable: true - type: object - products: - description: The details of the products that belong to this tax rate. - type: array - x-expandable: products - items: - $ref: ./Product.yaml - product_types: - description: The details of the product types that belong to this tax rate. - type: array - x-expandable: product_types - items: - $ref: ./ProductType.yaml - shipping_options: - description: The details of the shipping options that belong to this tax rate. - type: array - x-expandable: shipping_options - items: - $ref: ./ShippingOption.yaml - product_count: - description: The count of products - type: integer - example: 10 - product_type_count: - description: The count of product types - type: integer - example: 2 - shipping_option_count: - description: The count of shipping options - type: integer - example: 1 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/TrackingLink.yaml b/www/apps/api-reference/specs/admin/components/schemas/TrackingLink.yaml deleted file mode 100644 index 2da6690dae..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/TrackingLink.yaml +++ /dev/null @@ -1,72 +0,0 @@ -title: Tracking Link -description: >- - A tracking link holds information about tracking numbers for a Fulfillment. - Tracking Links can optionally contain a URL that can be visited to see the - status of the shipment. Typically, the tracking link is provided from the - third-party service integrated through the used fulfillment provider. -type: object -required: - - created_at - - deleted_at - - fulfillment_id - - id - - idempotency_key - - metadata - - tracking_number - - updated_at - - url -properties: - id: - description: The tracking link's ID - type: string - example: tlink_01G8ZH853Y6TFXWPG5EYE81X63 - url: - description: The URL at which the status of the shipment can be tracked. - nullable: true - type: string - format: uri - tracking_number: - description: The tracking number given by the shipping carrier. - type: string - format: RH370168054CN - fulfillment_id: - description: The ID of the fulfillment that the tracking link belongs to. - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - fulfillment: - description: The details of the fulfillment that the tracking link belongs to. - x-expandable: fulfillment - nullable: true - type: object - idempotency_key: - description: >- - Randomly generated key used to continue the completion of a process in - case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/UpdateAddress.yaml b/www/apps/api-reference/specs/admin/components/schemas/UpdateAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/UpdateAddress.yaml rename to www/apps/api-reference/specs/admin/components/schemas/UpdateAddress.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/UpdateApiKey.yaml b/www/apps/api-reference/specs/admin/components/schemas/UpdateApiKey.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/UpdateApiKey.yaml rename to www/apps/api-reference/specs/admin/components/schemas/UpdateApiKey.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/UpdateCartData.yaml b/www/apps/api-reference/specs/admin/components/schemas/UpdateCartData.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/UpdateCartData.yaml rename to www/apps/api-reference/specs/admin/components/schemas/UpdateCartData.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/UpdateProduct.yaml b/www/apps/api-reference/specs/admin/components/schemas/UpdateProduct.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/UpdateProduct.yaml rename to www/apps/api-reference/specs/admin/components/schemas/UpdateProduct.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/UpdateProductCollection.yaml b/www/apps/api-reference/specs/admin/components/schemas/UpdateProductCollection.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/UpdateProductCollection.yaml rename to www/apps/api-reference/specs/admin/components/schemas/UpdateProductCollection.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/UpdateProductOption.yaml b/www/apps/api-reference/specs/admin/components/schemas/UpdateProductOption.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/UpdateProductOption.yaml rename to www/apps/api-reference/specs/admin/components/schemas/UpdateProductOption.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/UpdateProductVariant.yaml b/www/apps/api-reference/specs/admin/components/schemas/UpdateProductVariant.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/UpdateProductVariant.yaml rename to www/apps/api-reference/specs/admin/components/schemas/UpdateProductVariant.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/UpdateRegion.yaml b/www/apps/api-reference/specs/admin/components/schemas/UpdateRegion.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/UpdateRegion.yaml rename to www/apps/api-reference/specs/admin/components/schemas/UpdateRegion.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/UpdateStockLocationInput.yaml b/www/apps/api-reference/specs/admin/components/schemas/UpdateStockLocationInput.yaml deleted file mode 100644 index 6b14b20a0e..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/UpdateStockLocationInput.yaml +++ /dev/null @@ -1,20 +0,0 @@ -title: Update Stock Location Input -description: Represents the Input to update a Stock Location -type: object -properties: - name: - type: string - description: The stock location name - address_id: - type: string - description: The Stock location address ID - address: - description: Stock location address object - allOf: - - $ref: ./StockLocationAddressInput.yaml - - type: object - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/UpsertProductVariant.yaml b/www/apps/api-reference/specs/admin/components/schemas/UpsertProductVariant.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/UpsertProductVariant.yaml rename to www/apps/api-reference/specs/admin/components/schemas/UpsertProductVariant.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/User.yaml b/www/apps/api-reference/specs/admin/components/schemas/User.yaml deleted file mode 100644 index 33f313d896..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/User.yaml +++ /dev/null @@ -1,69 +0,0 @@ -title: User -description: A User is an administrator who can manage store settings and data. -type: object -required: - - api_token - - created_at - - deleted_at - - email - - first_name - - id - - last_name - - metadata - - role - - updated_at -properties: - id: - description: The user's ID - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - role: - description: The user's role. These roles don't provide any different privileges. - type: string - enum: - - admin - - member - - developer - default: member - email: - description: The email of the User - type: string - format: email - first_name: - description: The first name of the User - nullable: true - type: string - example: Levi - last_name: - description: The last name of the User - nullable: true - type: string - example: Bogan - api_token: - description: An API token associated with the user. - nullable: true - type: string - example: null - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/admin/components/schemas/VariantInventory.yaml b/www/apps/api-reference/specs/admin/components/schemas/VariantInventory.yaml deleted file mode 100644 index 816d5fcbfb..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/VariantInventory.yaml +++ /dev/null @@ -1,31 +0,0 @@ -type: object -required: - - id - - inventory - - sales_channel_availability -properties: - id: - description: the ID of the variant - type: string - inventory: - description: The inventory details. - $ref: ./ResponseInventoryItem.yaml - sales_channel_availability: - type: array - description: Details about the variant's inventory availability in sales channels. - items: - type: object - required: - - channel_name - - channel_id - - available_quantity - properties: - channel_name: - description: Sales channel's name - type: string - channel_id: - description: Sales channel's ID - type: string - available_quantity: - description: Available quantity in the sales channel - type: number diff --git a/www/apps/api-reference/specs/admin/openapi.full.yaml b/www/apps/api-reference/specs/admin/openapi.full.yaml index 5930cedad7..bdf80faa33 100644 --- a/www/apps/api-reference/specs/admin/openapi.full.yaml +++ b/www/apps/api-reference/specs/admin/openapi.full.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: 1.0.0 + version: 2.0.0 title: Medusa Admin API license: name: MIT @@ -9,24 +9,9 @@ servers: - url: http://localhost:9000 - url: https://api.medusa-commerce.com tags: - - name: Apps Oauth - description: | - Some plugins may require to authenticate with third-party services and store authentication details, such as the authentication token. To do that, they can create an Oauth provider within the plugin that handles the authentication. - The Apps Oauth API Routes allows admins to manage and generate token for an app using its oauth provider. - - name: Auth - description: | - Authentication API Routes allow admin users to manage their session, such as login or log out. - When an admin user is logged in, the cookie header is set indicating the admin's login session. - externalDocs: - description: How to implement user profiles - url: https://docs.medusajs.com/modules/users/admin/manage-profile - - name: Batch Jobs - description: | - A batch job is a task that is performed by the Medusa backend asynchronusly. For example, the Import Product feature is implemented using batch jobs. - Batch Job API Routes allow admins to manage the batch jobs and their state. - externalDocs: - description: How to import products - url: https://docs.medusajs.com/modules/products/admin/import-products + - name: Api Keys + - name: Campaigns + - name: Collections - name: Currencies description: | A store can use unlimited currencies, and each region must be associated with at least one currency. @@ -47,26 +32,7 @@ tags: externalDocs: description: How to manage customers url: https://docs.medusajs.com/modules/customers/admin/manage-customers - - name: Discounts - description: | - Admins can create discounts with conditions and rules, providing them with advanced settings for variety of cases. - The Discount API Routes can be used to manage discounts, their conditions, resources, and more. - externalDocs: - description: How to manage discounts - url: https://docs.medusajs.com/modules/discounts/admin/manage-discounts - - name: Draft Orders - description: | - A draft order is an order created manually by the admin. It allows admins to create orders without direct involvement from the customer. - externalDocs: - description: How to manage draft orders - url: https://docs.medusajs.com/modules/orders/admin/manage-draft-orders - - name: Gift Cards - description: | - Admins can create gift cards and send them directly to customers, specifying options like their balance, region, and more. - These gift cards are different than the saleable gift cards in a store, which are created and managed through Product API Routes. - externalDocs: - description: How to manage gift cards - url: https://docs.medusajs.com/modules/gift-cards/admin/manage-gift-cards#manage-custom-gift-cards + - name: Fulfillment - name: Inventory Items description: | Inventory items, provided by the [Inventory Module](https://docs.medusajs.com/modules/multiwarehouse/inventory-module), can be used to manage the inventory of saleable items in your store. @@ -79,29 +45,6 @@ tags: externalDocs: description: How to manage invites url: https://docs.medusajs.com/modules/users/admin/manage-invites - - name: Notes - description: | - Notes are created by admins and can be associated with any resource. For example, an admin can add a note to an order for additional details or remarks. - - name: Notifications - description: | - Notifications are sent to customers to inform them of new updates. For example, a notification can be sent to the customer when their order is place or its state is updated. - The notification's type, such as an email or SMS, is determined by the notification provider installed on the Medusa backend. - - name: Order Edits - description: | - An admin can edit an order to remove, add, or update an item's quantity. When an admin edits an order, they're stored as an `OrderEdit`. - externalDocs: - description: How to edit an order - url: https://docs.medusajs.com/modules/orders/admin/edit-order - - name: Orders - description: | - Orders are purchases made by customers, typically through a storefront using the Store API. Draft orders created by the admin are also transformed to an Order once the payment is captured. - Managing orders include managing fulfillment, payment, claims, reservations, and more. - externalDocs: - description: How to manage orders - url: https://docs.medusajs.com/modules/orders/admin/manage-orders - - name: Payment Collections - description: | - A payment collection is useful for managing additional payments, such as for Order Edits, or installment payments. - name: Payments description: | A payment can be related to an order, swap, return, or more. It can be captured or refunded. @@ -111,45 +54,14 @@ tags: externalDocs: description: How to manage price lists url: https://docs.medusajs.com/modules/price-lists/admin/manage-price-lists - - name: Product Categories - description: | - Products can be categoriezed into categories. A product can be added into more than one category. - externalDocs: - description: How to manage product categories - url: https://docs.medusajs.com/modules/products/admin/manage-categories - - name: Product Collections - description: | - A product collection is used to organize products for different purposes such as marketing or discount purposes. For example, you can create a Summer Collection. - - name: Product Tags - description: | - Product tags are string values created when you create or update a product with a new tag. - Products can have more than one tag, and products can share tags. This allows admins to associate products to similar tags that can be used to filter products. - - name: Product Types - description: | - Product types are string values created when you create or update a product with a new type. - Products can have one type, and products can share types. This allows admins to associate products with a type that can be used to filter products. - - name: Product Variants - description: | - Product variants are the actual salable item in your store. Each variant is a combination of the different option values available on the product. - Product variants can be managed through the Products API Routes. - externalDocs: - description: How to manage product variants - url: https://docs.medusajs.com/modules/products/admin/manage-products#manage-product-variants + - name: Pricing - name: Products description: | Products are saleable items in a store. This also includes [saleable gift cards](https://docs.medusajs.com/modules/gift-cards/admin/manage-gift-cards#manage-gift-card-product) in a store. externalDocs: description: How to manage products url: https://docs.medusajs.com/modules/products/admin/manage-products - - name: Publishable API Keys - description: | - Publishable API Keys can be used to scope Store API calls with an API key, determining what resources are retrieved when querying the API. - For example, a publishable API key can be associated with one or more sales channels. When it is passed in the header of a request to the List Product store API Route, - the sales channels are inferred from the key and only products associated with those sales channels are retrieved. - Admins can manage publishable API keys and their associated resources. Currently, only Sales Channels are supported as a resource. - externalDocs: - description: How to manage publishable API keys - url: https://docs.medusajs.com/development/publishable-api-keys/admin/manage-publishable-api-keys + - name: Promotions - name: Regions description: | Regions are different countries or geographical regions that the commerce store serves customers in. @@ -157,27 +69,6 @@ tags: externalDocs: description: How to manage regions url: https://docs.medusajs.com/modules/regions-and-currencies/admin/manage-regions - - name: Reservations - description: | - Reservations, provided by the [Inventory Module](https://docs.medusajs.com/modules/multiwarehouse/inventory-module), are quantities of an item that are reserved, typically when an order is placed but not yet fulfilled. - Reservations can be associated with any resources, but commonly with line items of an order. - externalDocs: - description: How to manage item allocations in orders - url: https://docs.medusajs.com/modules/multiwarehouse/admin/manage-item-allocations-in-orders - - name: Return Reasons - description: | - Return reasons are key-value pairs that are used to specify why an order return is being created. - Admins can manage available return reasons, and they can be used by both admins and customers when creating a return. - externalDocs: - description: How to manage return reasons - url: https://docs.medusajs.com/modules/orders/admin/manage-returns#manage-return-reasons - - name: Returns - description: | - A return can be created by a customer or an admin to return items in an order. - Admins can manage these returns and change their state. - externalDocs: - description: How to manage returns - url: https://docs.medusajs.com/modules/orders/admin/manage-returns - name: Sales Channels description: | A sales channel indicates a channel where products can be sold in. For example, a webshop or a mobile app. @@ -185,84 +76,43 @@ tags: externalDocs: description: How to manage sales channels url: https://docs.medusajs.com/modules/sales-channels/admin/manage - - name: Shipping Options - description: | - A shipping option is used to define the available shipping methods during checkout or when creating a return. - Admins can create an unlimited number of shipping options, each associated with a shipping profile and fulfillment provider, among other resources. - externalDocs: - description: Shipping Option architecture - url: https://docs.medusajs.com/modules/carts-and-checkout/shipping#shipping-option - - name: Shipping Profiles - description: | - A shipping profile is used to group products that can be shipped in the same manner. - They are created by the admin and they're not associated with a fulfillment provider. - externalDocs: - description: Shipping Profile architecture - url: https://docs.medusajs.com/modules/carts-and-checkout/shipping#shipping-profile - name: Stock Locations - description: | - A stock location, provided by the [Stock Location module](https://docs.medusajs.com/modules/multiwarehouse/stock-location-module), indicates a physical address that stock-kept items, such as physical products, can be stored in. - An admin can create and manage available stock locations. - externalDocs: - description: How to manage stock locations. - url: https://docs.medusajs.com/modules/multiwarehouse/admin/manage-stock-locations - - name: Store - description: | - A store indicates the general configurations and details about the commerce store. By default, there's only one store in the Medusa backend. - Admins can manage the store and its details or configurations. - - name: Swaps - description: | - A swap is created by a customer or an admin to exchange an item with a new one. - Creating a swap implicitely includes creating a return for the item being exchanged. - externalDocs: - description: How to manage swaps - url: https://docs.medusajs.com/modules/orders/admin/manage-swaps + - name: Stores - name: Tax Rates description: | Each region has at least a default tax rate. Admins can create and manage additional tax rates that can be applied for certain conditions, such as for specific product types. externalDocs: description: How to manage tax rates url: https://docs.medusajs.com/modules/taxes/admin/manage-tax-rates - - name: Uploads - description: | - The upload API Routes are used to upload any type of resources. For example, they can be used to upload CSV files that are used to import products into the store. - externalDocs: - description: How to upload CSV file when importing a product. - url: https://docs.medusajs.com/modules/products/admin/import-products#1-upload-csv-file + - name: Tax Regions - name: Users description: | A store can have more than one user, each having the same privileges. Admins can manage users, their passwords, and more. externalDocs: description: How to manage users url: https://docs.medusajs.com/modules/users/admin/manage-users + - name: Workflows Executions paths: - /admin/apps: + /admin/api-keys: get: - operationId: GetApps - summary: List Applications - description: Retrieve a list of applications registered in the Medusa backend. + operationId: GetApiKeys + summary: List Api Keys + 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. x-authenticated: true - x-codegen: - method: list - x-codeSamples: - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/apps' \ - -H 'x-medusa-access-token: {api_token}' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/api-keys' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Apps Oauth + - Api Keys responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminAppsListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -275,44 +125,358 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/apps/authorizations: + requestBody: + content: + application/json: + schema: {} post: - operationId: PostApps - summary: Generate Token for App - description: Use an app's Oauth provider to generate and store a new token for authentication. + operationId: PostApiKeys + summary: Create Api Key + description: Create a api key. x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/api-keys' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Api Keys + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + /admin/api-keys/{id}: + get: + operationId: GetApiKeysId + summary: Get a Api Key + description: Retrieve a api key by its ID. You can expand the api key's relations or select the fields that should be returned. + x-authenticated: true + parameters: + - name: id + in: path + description: The api key's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/api-keys/{id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Api Keys + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + post: + operationId: PostApiKeysId + summary: Update a Api Key + description: Update a api key's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The api key's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/api-keys/{id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Api Keys + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + delete: + operationId: DeleteApiKeysId + summary: Delete a Api Key + description: Delete a api key. + x-authenticated: true + parameters: + - name: id + in: path + description: The api key's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE '{backend_url}/admin/api-keys/{id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Api Keys + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + /admin/api-keys/{id}/revoke: + post: + operationId: PostApiKeysIdRevoke + summary: Add Revokes to Api Key + description: Add a list of revokes to a api key. + x-authenticated: true + parameters: + - name: id + in: path + description: The api key's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/api-keys/{id}/revoke' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Api Keys + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + /admin/campaigns: + get: + operationId: GetCampaigns + summary: List Campaigns + description: Retrieve a list of campaigns. The campaigns can be filtered by fields such as `id`. The campaigns can also be sorted or paginated. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/campaigns' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Campaigns + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + post: + operationId: PostCampaigns + summary: Create Campaign + description: Create a campaign. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/campaigns' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Campaigns + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + /admin/campaigns/{id}: + get: + operationId: GetCampaignsId + summary: Get a Campaign + description: Retrieve a campaign by its ID. You can expand the campaign's relations or select the fields that should be returned. + x-authenticated: true + parameters: + - name: id + in: path + description: The campaign's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/campaigns/{id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Campaigns + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + post: + operationId: PostCampaignsId + summary: Update a Campaign + description: Update a campaign's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The campaign's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdminPostAppsReq' - x-codegen: - method: authorize + $ref: '#/components/schemas/AdminPostCampaignsReq' x-codeSamples: - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/admin/apps/authorizations' \ + source: |- + curl -X POST '{backend_url}/admin/campaigns/{id}' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "application_name": "example", - "state": "ready", - "code": "token" + "name": "Moriah" }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Apps Oauth + - Campaigns responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminAppsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -325,204 +489,31 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/auth: - get: - operationId: GetAuth - summary: Get Current User - x-authenticated: true - description: Get the currently logged in user's details. - x-codegen: - method: getSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.auth.getSession() - .then(({ user }) => { - console.log(user.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminGetSession } from "medusa-react" - - const Profile = () => { - const { user, isLoading } = useAdminGetSession() - - return ( -
- {isLoading && Loading...} - {user && {user.email}} -
- ) - } - - export default Profile - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/auth' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminAuthRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostAuth - summary: User Login - x-authenticated: false - description: Log a User in and includes the Cookie session in the response header. The cookie session can be used in subsequent requests to authorize the user to perform admin functionalities. When using Medusa's JS or Medusa React clients, the cookie is automatically attached to subsequent requests. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostAuthReq' - x-codegen: - method: createSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.admin.auth.createSession({ - email: "user@example.com", - password: "supersecret" - }) - .then(({ user }) => { - console.log(user.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminLogin } from "medusa-react" - - const Login = () => { - const adminLogin = useAdminLogin() - // ... - - const handleLogin = () => { - adminLogin.mutate({ - email: "user@example.com", - password: "supersecret", - }, { - onSuccess: ({ user }) => { - console.log(user) - } - }) - } - - // ... - } - - export default Login - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/auth' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com", - "password": "supersecret" - }' - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminAuthRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/incorrect_credentials' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' delete: - operationId: DeleteAuth - summary: User Logout + operationId: DeleteCampaignsId + summary: Delete a Campaign + description: Delete a campaign. x-authenticated: true - description: Delete the current session for the logged in user. This will only work if you're using Cookie session for authentication. If the API token is still passed in the header, the user is still authorized to perform admin functionalities in other API Routes. - x-codegen: - method: deleteSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in - medusa.admin.auth.deleteSession() - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteSession } from "medusa-react" - - const Logout = () => { - const adminLogout = useAdminDeleteSession() - // ... - - const handleLogout = () => { - adminLogout.mutate(undefined, { - onSuccess: () => { - // user logged out. - } - }) - } - - // ... - } - - export default Logout - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/auth' \ - -H 'x-medusa-access-token: {api_token}' + parameters: + - name: id + in: path + description: The campaign's ID. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE '{backend_url}/admin/campaigns/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Auth + - Campaigns responses: - '200': - description: OK '400': $ref: '#/components/responses/400_error' '401': @@ -535,863 +526,30 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/auth/token: - post: - operationId: PostToken - summary: User Login (JWT) - x-authenticated: false - description: After a successful login, a JWT token is returned, which can be used to send authenticated requests. requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostAuthReq' - x-codegen: - method: getToken - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.admin.auth.getToken({ - email: 'user@example.com', - password: 'supersecret' - }) - .then(({ access_token }) => { - console.log(access_token); - }) - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/auth/token' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com", - "password": "supersecret" - }' - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminBearerAuthRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/incorrect_credentials' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/batch-jobs: - get: - operationId: GetBatchJobs - summary: List Batch Jobs - description: Retrieve a list of Batch Jobs. The batch jobs can be filtered by fields such as `type` or `confirmed_at`. The batch jobs can also be sorted or paginated. - x-authenticated: true - parameters: - - in: query - name: limit - description: Limit the number of batch jobs returned. - schema: - type: integer - default: 10 - - in: query - name: offset - description: The number of batch jobs to skip when retrieving the batch jobs. - schema: - type: integer - default: 0 - - in: query - name: id - style: form - explode: false - description: Filter by the batch ID - schema: - oneOf: - - type: string - description: batch job ID - - type: array - description: multiple batch job IDs - items: - type: string - - in: query - name: type - style: form - explode: false - description: Filter by the batch type - schema: - type: array - items: - type: string - - in: query - name: confirmed_at - style: form - explode: false - description: Filter by a confirmation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: pre_processed_at - style: form - explode: false - description: Filter by a pre-processing date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: completed_at - style: form - explode: false - description: Filter by a completion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: failed_at - style: form - explode: false - description: Filter by a failure date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: canceled_at - style: form - explode: false - description: Filter by a cancelation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: order - description: A batch-job field to sort-order the retrieved batch jobs by. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned batch jobs. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned batch jobs. - schema: - type: string - - in: query - name: created_at - style: form - explode: false - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - style: form - explode: false - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetBatchParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.batchJobs.list() - .then(({ batch_jobs, limit, offset, count }) => { - console.log(batch_jobs.length) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminBatchJobs } from "medusa-react" - - const BatchJobs = () => { - const { - batch_jobs, - limit, - offset, - count, - isLoading - } = useAdminBatchJobs() - - return ( -
- {isLoading && Loading...} - {batch_jobs?.length && ( -
    - {batch_jobs.map((batchJob) => ( -
  • - {batchJob.id} -
  • - ))} -
- )} -
- ) - } - - export default BatchJobs - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/batch-jobs' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Batch Jobs - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminBatchJobListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostBatchJobs - summary: Create a Batch Job - description: Create a Batch Job to be executed asynchronously in the Medusa backend. If `dry_run` is set to `true`, the batch job will not be executed until the it is confirmed, which can be done using the Confirm Batch Job API Route. - externalDocs: - description: How to create a batch job - url: https://docs.medusajs.com/development/batch-jobs/create#create-batch-job - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostBatchesReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.batchJobs.create({ - type: 'product-export', - context: {}, - dry_run: false - }).then((({ batch_job }) => { - console.log(batch_job.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateBatchJob } from "medusa-react" - - const CreateBatchJob = () => { - const createBatchJob = useAdminCreateBatchJob() - // ... - - const handleCreateBatchJob = () => { - createBatchJob.mutate({ - type: "publish-products", - context: {}, - dry_run: true - }, { - onSuccess: ({ batch_job }) => { - console.log(batch_job) - } - }) - } - - // ... - } - - export default CreateBatchJob - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/batch-jobs' \ - -H 'Content-Type: application/json' \ - -H 'x-medusa-access-token: {api_token}' \ - --data-raw '{ - "type": "product-export", - "context": { } - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Batch Jobs - responses: - '201': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminBatchJobRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/batch-jobs/{id}: - get: - operationId: GetBatchJobsBatchJob - summary: Get a Batch Job - description: Retrieve the details of a batch job. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Batch Job - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.batchJobs.retrieve(batchJobId) - .then(({ batch_job }) => { - console.log(batch_job.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminBatchJob } from "medusa-react" - - type Props = { - batchJobId: string - } - - const BatchJob = ({ batchJobId }: Props) => { - const { batch_job, isLoading } = useAdminBatchJob(batchJobId) - - return ( -
- {isLoading && Loading...} - {batch_job && {batch_job.created_by}} -
- ) - } - - export default BatchJob - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/batch-jobs/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Batch Jobs - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminBatchJobRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/batch-jobs/{id}/cancel: - post: - operationId: PostBatchJobsBatchJobCancel - summary: Cancel a Batch Job - description: Mark a batch job as canceled. When a batch job is canceled, the processing of the batch job doesn’t automatically stop. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the batch job. - schema: - type: string - x-codegen: - method: cancel - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.batchJobs.cancel(batchJobId) - .then(({ batch_job }) => { - console.log(batch_job.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCancelBatchJob } from "medusa-react" - - type Props = { - batchJobId: string - } - - const BatchJob = ({ batchJobId }: Props) => { - const cancelBatchJob = useAdminCancelBatchJob(batchJobId) - // ... - - const handleCancel = () => { - cancelBatchJob.mutate(undefined, { - onSuccess: ({ batch_job }) => { - console.log(batch_job) - } - }) - } - - // ... - } - - export default BatchJob - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/batch-jobs/{id}/cancel' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Batch Jobs - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminBatchJobRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/batch-jobs/{id}/confirm: - post: - operationId: PostBatchJobsBatchJobConfirmProcessing - summary: Confirm a Batch Job - description: When a batch job is created, it is not executed automatically if `dry_run` is set to `true`. This API Route confirms that the batch job should be executed. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the batch job. - schema: - type: string - x-codegen: - method: confirm - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.batchJobs.confirm(batchJobId) - .then(({ batch_job }) => { - console.log(batch_job.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminConfirmBatchJob } from "medusa-react" - - type Props = { - batchJobId: string - } - - const BatchJob = ({ batchJobId }: Props) => { - const confirmBatchJob = useAdminConfirmBatchJob(batchJobId) - // ... - - const handleConfirm = () => { - confirmBatchJob.mutate(undefined, { - onSuccess: ({ batch_job }) => { - console.log(batch_job) - } - }) - } - - // ... - } - - export default BatchJob - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/batch-jobs/{id}/confirm' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Batch Jobs - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminBatchJobRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} /admin/collections: get: operationId: GetCollections summary: List Collections - description: Retrieve a list of Product Collection. The product collections can be filtered by fields such as `handle` or `title`. The collections can also be sorted or paginated. + description: Retrieve a list of collections. The collections can be filtered by fields such as `id`. The collections can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: limit - description: The number of collections to return. - schema: - type: integer - default: 10 - - in: query - name: offset - description: The number of collections to skip when retrieving the collections. - schema: - type: integer - default: 0 - - in: query - name: title - description: Filter collections by their title. - schema: - type: string - - in: query - name: handle - description: Filter collections by their handle. - schema: - type: string - - in: query - name: q - description: a term to search collections by their title or handle. - schema: - type: string - - in: query - name: order - description: A field to sort-order the retrieved collections by. - schema: - type: string - - in: query - name: discount_condition_id - description: Filter collections by a discount condition ID associated with them. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetCollectionsParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.collections.list() - .then(({ collections, limit, offset, count }) => { - console.log(collections.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCollections } from "medusa-react" - - const Collections = () => { - const { collections, isLoading } = useAdminCollections() - - return ( -
- {isLoading && Loading...} - {collections && !collections.length && - No Product Collections - } - {collections && collections.length > 0 && ( -
    - {collections.map((collection) => ( -
  • {collection.title}
  • - ))} -
- )} -
- ) - } - - export default Collections - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/collections' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Product Collections + - Collections responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCollectionsListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -1404,77 +562,29 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: operationId: PostCollections - summary: Create a Collection - description: Create a Product Collection. + summary: Create Collection + description: Create a collection. x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostCollectionsReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.collections.create({ - title: "New Collection" - }) - .then(({ collection }) => { - console.log(collection.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateCollection } from "medusa-react" - - const CreateCollection = () => { - const createCollection = useAdminCreateCollection() - // ... - - const handleCreate = (title: string) => { - createCollection.mutate({ - title - }, { - onSuccess: ({ collection }) => { - console.log(collection.id) - } - }) - } - - // ... - } - - export default CreateCollection - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/collections' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "title": "New Collection" - }' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/collections' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Product Collections + - Collections responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCollectionsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -1487,72 +597,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/collections/{id}: get: - operationId: GetCollectionsCollection + operationId: GetCollectionsId summary: Get a Collection - description: Retrieve a Product Collection by its ID. The products associated with it are expanded and returned as well. + description: Retrieve a collection by its ID. You can expand the collection's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The collection's ID. required: true - description: The ID of the Product Collection schema: type: string - x-codegen: - method: retrieve + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.collections.retrieve(collectionId) - .then(({ collection }) => { - console.log(collection.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCollection } from "medusa-react" - - type Props = { - collectionId: string - } - - const Collection = ({ collectionId }: Props) => { - const { collection, isLoading } = useAdminCollection(collectionId) - - return ( -
- {isLoading && Loading...} - {collection && {collection.title}} -
- ) - } - - export default Collection - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/collections/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Product Collections + - Collections responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCollectionsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -1565,88 +639,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostCollectionsCollection - summary: Update a Collection - description: Update a Product Collection's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Collection. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostCollectionsCollectionReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.collections.update(collectionId, { - title: "New Collection" - }) - .then(({ collection }) => { - console.log(collection.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateCollection } from "medusa-react" - - type Props = { - collectionId: string - } - - const Collection = ({ collectionId }: Props) => { - const updateCollection = useAdminUpdateCollection(collectionId) - // ... - - const handleUpdate = (title: string) => { - updateCollection.mutate({ - title - }, { - onSuccess: ({ collection }) => { - console.log(collection.id) - } - }) - } - - // ... - } - - export default Collection - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/collections/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "title": "New Collection" - }' + schema: {} + post: + operationId: PostCollectionsId + summary: Update a Collection + description: Update a collection's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The collection's ID. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/collections/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Product Collections + - Collections responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCollectionsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -1659,75 +680,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteCollectionsCollection + operationId: DeleteCollectionsId summary: Delete a Collection - description: Delete a Product Collection. This does not delete associated products. + description: Delete a collection. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The collection's ID. required: true - description: The ID of the Collection. schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.collections.delete(collectionId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteCollection } from "medusa-react" - - type Props = { - collectionId: string - } - - const Collection = ({ collectionId }: Props) => { - const deleteCollection = useAdminDeleteCollection(collectionId) - // ... - - const handleDelete = (title: string) => { - deleteCollection.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default Collection - lang: Shell label: cURL - source: | + source: |- curl -X DELETE '{backend_url}/admin/collections/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Product Collections + - Collections responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCollectionsDeleteRes' '400': $ref: '#/components/responses/400_error' '401': @@ -1740,304 +721,30 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/collections/{id}/products/batch: - post: - operationId: PostProductsToCollection - summary: Add Products to Collection - description: Add products to a product collection. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the product collection. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostProductsToCollectionReq' - x-codegen: - method: addProducts - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.collections.addProducts(collectionId, { - product_ids: [ - productId1, - productId2 - ] - }) - .then(({ collection }) => { - console.log(collection.products) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminAddProductsToCollection } from "medusa-react" - - type Props = { - collectionId: string - } - - const Collection = ({ collectionId }: Props) => { - const addProducts = useAdminAddProductsToCollection(collectionId) - // ... - - const handleAddProducts = (productIds: string[]) => { - addProducts.mutate({ - product_ids: productIds - }, { - onSuccess: ({ collection }) => { - console.log(collection.products) - } - }) - } - - // ... - } - - export default Collection - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/collections/{id}/products/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "product_ids": [ - "prod_01G1G5V2MBA328390B5AXJ610F" - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCollectionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteProductsFromCollection - summary: Remove Products from Collection - description: Remove a list of products from a collection. This would not delete the product, only the association between the product and the collection. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Product Collection. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteProductsFromCollectionReq' - x-codegen: - method: removeProducts - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.collections.removeProducts(collectionId, { - product_ids: [ - productId1, - productId2 - ] - }) - .then(({ id, object, removed_products }) => { - console.log(removed_products) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminRemoveProductsFromCollection } from "medusa-react" - - type Props = { - collectionId: string - } - - const Collection = ({ collectionId }: Props) => { - const removeProducts = useAdminRemoveProductsFromCollection(collectionId) - // ... - - const handleRemoveProducts = (productIds: string[]) => { - removeProducts.mutate({ - product_ids: productIds - }, { - onSuccess: ({ id, object, removed_products }) => { - console.log(removed_products) - } - }) - } - - // ... - } - - export default Collection - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/collections/{id}/products/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "product_ids": [ - "prod_01G1G5V2MBA328390B5AXJ610F" - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteProductsFromCollectionRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} /admin/currencies: get: operationId: GetCurrencies - summary: List Currency - description: Retrieve a list of currencies. The currencies can be filtered by fields such as `code`. The currencies can also be sorted or paginated. + summary: List Currencies + description: Retrieve a list of currencies. The currencies can be filtered by fields such as `id`. The currencies can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: code - description: filter by currency code. - schema: - type: string - - in: query - name: includes_tax - description: filter currencies by whether they include taxes or not. - schema: - type: boolean - x-featureFlag: tax_inclusive_pricing - - in: query - name: order - description: A field to sort order the retrieved currencies by. - schema: - type: string - - in: query - name: q - description: Term used to search currencies' name and code. - schema: - type: string - - in: query - name: offset - description: The number of currencies to skip when retrieving the currencies. - schema: - type: number - default: '0' - - in: query - name: limit - description: The number of currencies to return. - schema: - type: number - default: '20' - x-codegen: - method: list - queryParams: AdminGetCurrenciesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.currencies.list() - .then(({ currencies, count, offset, limit }) => { - console.log(currencies.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCurrencies } from "medusa-react" - - const Currencies = () => { - const { currencies, isLoading } = useAdminCurrencies() - - return ( -
- {isLoading && Loading...} - {currencies && !currencies.length && ( - No Currencies - )} - {currencies && currencies.length > 0 && ( -
    - {currencies.map((currency) => ( -
  • {currency.name}
  • - ))} -
- )} -
- ) - } - - export default Currencies - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/currencies' \ - -H 'x-medusa-access-token: {api_token}' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/currencies' \ + -H 'x-medusa-access-token: {api_token}' tags: - Currencies responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCurrenciesListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2050,89 +757,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/currencies/{code}: - post: - operationId: PostCurrenciesCurrency - summary: Update a Currency - description: Update a Currency's details. - x-authenticated: true - parameters: - - in: path - name: code - required: true - description: The code of the Currency. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostCurrenciesCurrencyReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.currencies.update(code, { - includes_tax: true - }) - .then(({ currency }) => { - console.log(currency.code); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateCurrency } from "medusa-react" - - type Props = { - currencyCode: string - } - - const Currency = ({ currencyCode }: Props) => { - const updateCurrency = useAdminUpdateCurrency(currencyCode) - // ... - - const handleUpdate = (includes_tax: boolean) => { - updateCurrency.mutate({ - includes_tax, - }, { - onSuccess: ({ currency }) => { - console.log(currency) - } - }) - } - - // ... - } - - export default Currency - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/currencies/{code}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "includes_tax": true - }' + schema: {} + /admin/currencies/{code}: + get: + operationId: GetCurrenciesCode + summary: Get a Currency + description: Retrieve a currency by its ID. You can expand the currency's relations or select the fields that should be returned. + x-authenticated: true + parameters: + - name: code + in: path + description: The currency's code. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/currencies/{code}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Currencies responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCurrenciesRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2145,198 +799,30 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/customer-groups: get: operationId: GetCustomerGroups summary: List Customer Groups - description: Retrieve a list of customer groups. The customer groups can be filtered by fields such as `name` or `id. The customer groups can also be sorted or paginated. + description: Retrieve a list of customer groups. The customer groups can be filtered by fields such as `id`. The customer groups can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: q - description: term to search customer groups by name. - schema: - type: string - - in: query - name: offset - description: The number of customer groups to skip when retrieving the customer groups. - schema: - type: integer - default: 0 - - in: query - name: order - description: A field to sort order the retrieved customer groups by. - schema: - type: string - - in: query - name: discount_condition_id - description: Filter by discount condition ID. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by the customer group ID - schema: - oneOf: - - type: string - description: customer group ID - - type: array - description: an array of customer group IDs - items: - type: string - - type: object - properties: - lt: - type: string - description: filter by IDs less than this ID - gt: - type: string - description: filter by IDs greater than this ID - lte: - type: string - description: filter by IDs less than or equal to this ID - gte: - type: string - description: filter by IDs greater than or equal to this ID - - in: query - name: name - style: form - explode: false - description: Filter by the customer group name - schema: - type: array - description: an array of customer group names - items: - type: string - description: customer group name - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: limit - description: The number of customer groups to return. - schema: - type: integer - default: 10 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned customer groups. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned customer groups. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetCustomerGroupsParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customerGroups.list() - .then(({ customer_groups, limit, offset, count }) => { - console.log(customer_groups.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCustomerGroups } from "medusa-react" - - const CustomerGroups = () => { - const { - customer_groups, - isLoading, - } = useAdminCustomerGroups() - - return ( -
- {isLoading && Loading...} - {customer_groups && !customer_groups.length && ( - No Customer Groups - )} - {customer_groups && customer_groups.length > 0 && ( -
    - {customer_groups.map( - (customerGroup) => ( -
  • - {customerGroup.name} -
  • - ) - )} -
- )} -
- ) - } - - export default CustomerGroups - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/customer-groups' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomerGroupsListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2349,73 +835,29 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: operationId: PostCustomerGroups - summary: Create a Customer Group - description: Create a Customer Group. + summary: Create Customer Group + description: Create a customer group. x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostCustomerGroupsReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customerGroups.create({ - name: "VIP" - }) - .then(({ customer_group }) => { - console.log(customer_group.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateCustomerGroup } from "medusa-react" - - const CreateCustomerGroup = () => { - const createCustomerGroup = useAdminCreateCustomerGroup() - // ... - - const handleCreate = (name: string) => { - createCustomerGroup.mutate({ - name, - }) - } - - // ... - } - - export default CreateCustomerGroup - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/customer-groups' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "VIP" - }' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/customer-groups' \ + -H 'x-medusa-access-token: {api_token}' tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomerGroupsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2428,85 +870,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/customer-groups/{id}: get: - operationId: GetCustomerGroupsGroup + operationId: GetCustomerGroupsId summary: Get a Customer Group - description: Retrieve a Customer Group by its ID. You can expand the customer group's relations or select the fields that should be returned. + description: Retrieve a customer group by its ID. You can expand the customer group's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer group's ID. required: true - description: The ID of the Customer Group. schema: type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned customer group. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned customer group. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetCustomerGroupsGroupParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customerGroups.retrieve(customerGroupId) - .then(({ customer_group }) => { - console.log(customer_group.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCustomerGroup } from "medusa-react" - - type Props = { - customerGroupId: string - } - - const CustomerGroup = ({ customerGroupId }: Props) => { - const { customer_group, isLoading } = useAdminCustomerGroup( - customerGroupId - ) - - return ( -
- {isLoading && Loading...} - {customer_group && {customer_group.name}} -
- ) - } - - export default CustomerGroup - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/customer-groups/{id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/customer-groups/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomerGroupsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2519,86 +912,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostCustomerGroupsGroup - summary: Update a Customer Group - description: Update a Customer Group's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the customer group. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostCustomerGroupsGroupReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customerGroups.update(customerGroupId, { - name: "VIP" - }) - .then(({ customer_group }) => { - console.log(customer_group.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateCustomerGroup } from "medusa-react" - - type Props = { - customerGroupId: string - } - - const CustomerGroup = ({ customerGroupId }: Props) => { - const updateCustomerGroup = useAdminUpdateCustomerGroup( - customerGroupId - ) - // .. - - const handleUpdate = (name: string) => { - updateCustomerGroup.mutate({ - name, - }) - } - - // ... - } - - export default CustomerGroup - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/customer-groups/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "VIP" - }' + schema: {} + post: + operationId: PostCustomerGroupsId + summary: Update a Customer Group + description: Update a customer group's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The customer group's ID. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/customer-groups/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomerGroupsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2611,73 +953,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteCustomerGroupsCustomerGroup + operationId: DeleteCustomerGroupsId summary: Delete a Customer Group - description: Delete a customer group. This doesn't delete the customers associated with the customer group. + description: Delete a customer group. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer group's ID. required: true - description: The ID of the Customer Group schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customerGroups.delete(customerGroupId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteCustomerGroup } from "medusa-react" - - type Props = { - customerGroupId: string - } - - const CustomerGroup = ({ customerGroupId }: Props) => { - const deleteCustomerGroup = useAdminDeleteCustomerGroup( - customerGroupId - ) - // ... - - const handleDeleteCustomerGroup = () => { - deleteCustomerGroup.mutate() - } - - // ... - } - - export default CustomerGroup - lang: Shell label: cURL - source: | + source: |- curl -X DELETE '{backend_url}/admin/customer-groups/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomerGroupsDeleteRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2690,109 +994,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/customer-groups/{id}/customers: get: - operationId: GetCustomerGroupsGroupCustomers + operationId: GetCustomerGroupsIdCustomers summary: List Customers - description: Retrieve a list of customers in a customer group. The customers can be filtered by the `q` field. The customers can also be paginated. + description: Retrieve a list of customers in a customer group. The customers can be filtered by fields like FILTER FIELDS. The customers can also be paginated. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer group's ID. required: true - description: The ID of the customer group. schema: type: string - - in: query - name: limit - description: The number of customers to return. - schema: - type: integer - default: 50 - - in: query - name: offset - description: The number of customers to skip when retrieving the customers. - schema: - type: integer - default: 0 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned customers. - schema: - type: string - - in: query - name: q - description: a term to search customers by email, first_name, and last_name. - schema: - type: string - x-codegen: - method: listCustomers - queryParams: AdminGetGroupsGroupCustomersParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customerGroups.listCustomers(customerGroupId) - .then(({ customers }) => { - console.log(customers.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCustomerGroupCustomers } from "medusa-react" - - type Props = { - customerGroupId: string - } - - const CustomerGroup = ({ customerGroupId }: Props) => { - const { - customers, - isLoading, - } = useAdminCustomerGroupCustomers( - customerGroupId - ) - - return ( -
- {isLoading && Loading...} - {customers && !customers.length && ( - No customers - )} - {customers && customers.length > 0 && ( -
    - {customers.map((customer) => ( -
  • {customer.first_name}
  • - ))} -
- )} -
- ) - } - - export default CustomerGroup - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/customer-groups/{id}/customers' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/customer-groups/{id}/customers' \ + -H 'x-medusa-access-token: {api_token}' tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomersListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2805,101 +1036,49 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/customer-groups/{id}/customers/batch: post: - operationId: PostCustomerGroupsGroupCustomersBatch - summary: Add Customers to Group + operationId: PostCustomerGroupsIdCustomersBatch + summary: Add Customers to Customer Group description: Add a list of customers to a customer group. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer group's ID. required: true - description: The ID of the customer group. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq' - x-codegen: - method: addCustomers x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customerGroups.addCustomers(customerGroupId, { - customer_ids: [ - { - id: customerId - } - ] - }) - .then(({ customer_group }) => { - console.log(customer_group.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminAddCustomersToCustomerGroup, - } from "medusa-react" - - type Props = { - customerGroupId: string - } - - const CustomerGroup = ({ customerGroupId }: Props) => { - const addCustomers = useAdminAddCustomersToCustomerGroup( - customerGroupId - ) - // ... - - const handleAddCustomers= (customerId: string) => { - addCustomers.mutate({ - customer_ids: [ - { - id: customerId, - }, - ], - }) - } - - // ... - } - - export default CustomerGroup - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/customer-groups/{id}/customers/batch' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "customer_ids": [ - { - "id": "cus_01G2Q4BS9GAHDBMDEN4ZQZCJB2" - } - ] + "customer_ids": [ + { + "id": "id_dx2Wieq4uGG" + } + ] }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomerGroupsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2912,101 +1091,45 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - delete: - operationId: DeleteCustomerGroupsGroupCustomerBatch - summary: Remove Customers from Group - description: Remove a list of customers from a customer group. This doesn't delete the customer, only the association between the customer and the customer group. + /admin/customer-groups/{id}/customers/remove: + post: + operationId: PostCustomerGroupsIdCustomersRemove + summary: Add Removes to Customer Group + description: Add a list of removes to a customer group. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer group's ID. required: true - description: The ID of the customer group. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteCustomerGroupsGroupCustomerBatchReq' - x-codegen: - method: removeCustomers - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customerGroups.removeCustomers(customerGroupId, { - customer_ids: [ - { - id: customerId - } - ] - }) - .then(({ customer_group }) => { - console.log(customer_group.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminRemoveCustomersFromCustomerGroup, - } from "medusa-react" - - type Props = { - customerGroupId: string - } - - const CustomerGroup = ({ customerGroupId }: Props) => { - const removeCustomers = - useAdminRemoveCustomersFromCustomerGroup( - customerGroupId - ) - // ... - - const handleRemoveCustomer = (customerId: string) => { - removeCustomers.mutate({ - customer_ids: [ - { - id: customerId, - }, - ], - }) - } - - // ... - } - - export default CustomerGroup - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/customer-groups/{id}/customers/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "customer_ids": [ - { - "id": "cus_01G2Q4BS9GAHDBMDEN4ZQZCJB2" - } - ] - }' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/customer-groups/{id}/customers/remove' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "customer_ids": [ + { + "id": "id_oAhMZi39hsjIOqPA6" + } + ] + }' tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomerGroupsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -3023,158 +1146,22 @@ paths: get: operationId: GetCustomers summary: List Customers - description: Retrieve a list of Customers. The customers can be filtered by fields such as `q` or `groups`. The customers can also be paginated. + description: Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: limit - description: The number of customers to return. - schema: - type: integer - default: 50 - - in: query - name: offset - description: The number of customers to skip when retrieving the customers. - schema: - type: integer - default: 0 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned customers. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned customers. - schema: - type: string - - in: query - name: q - description: term to search customers' email, first_name, and last_name fields. - schema: - type: string - - in: query - name: has_account - description: Filter customers by whether they have an account. - schema: - type: boolean - - in: query - name: order - description: A field to sort-order the retrieved customers by. - schema: - type: string - - in: query - name: groups - style: form - explode: false - description: Filter by customer group IDs. - schema: - type: array - items: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetCustomersParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customers.list() - .then(({ customers, limit, offset, count }) => { - console.log(customers.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCustomers } from "medusa-react" - - const Customers = () => { - const { customers, isLoading } = useAdminCustomers() - - return ( -
- {isLoading && Loading...} - {customers && !customers.length && ( - No customers - )} - {customers && customers.length > 0 && ( -
    - {customers.map((customer) => ( -
  • {customer.first_name}
  • - ))} -
- )} -
- ) - } - - export default Customers - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/customers' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomersListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -3187,88 +1174,29 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: operationId: PostCustomers - summary: Create a Customer - description: Create a customer as an admin. + summary: Create Customer + description: Create a customer. x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostCustomersReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customers.create({ - email: "user@example.com", - first_name: "Caterina", - last_name: "Yost", - password: "supersecret" - }) - .then(({ customer }) => { - console.log(customer.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateCustomer } from "medusa-react" - - type CustomerData = { - first_name: string - last_name: string - email: string - password: string - } - - const CreateCustomer = () => { - const createCustomer = useAdminCreateCustomer() - // ... - - const handleCreate = (customerData: CustomerData) => { - createCustomer.mutate(customerData, { - onSuccess: ({ customer }) => { - console.log(customer.id) - } - }) - } - - // ... - } - - export default CreateCustomer - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/customers' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com", - "first_name": "Caterina", - "last_name": "Yost", - "password": "supersecret" - }' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/customers' \ + -H 'x-medusa-access-token: {api_token}' tags: - Customers responses: - '201': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomersRes' '400': $ref: '#/components/responses/400_error' '401': @@ -3281,84 +1209,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/customers/{id}: get: - operationId: GetCustomersCustomer + operationId: GetCustomersId summary: Get a Customer - description: Retrieve the details of a customer. + description: Retrieve a customer by its ID. You can expand the customer's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer's ID. required: true - description: The ID of the Customer. schema: type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned customer. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned customer. - schema: - type: string - x-codegen: - method: retrieve + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customers.retrieve(customerId) - .then(({ customer }) => { - console.log(customer.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCustomer } from "medusa-react" - - type Props = { - customerId: string - } - - const Customer = ({ customerId }: Props) => { - const { customer, isLoading } = useAdminCustomer( - customerId - ) - - return ( -
- {isLoading && Loading...} - {customer && {customer.first_name}} -
- ) - } - - export default Customer - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/customers/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomersRes' '400': $ref: '#/components/responses/400_error' '401': @@ -3371,99 +1251,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: - operationId: PostCustomersCustomer + operationId: PostCustomersId summary: Update a Customer - description: Update a Customer's details. + description: Update a customer's details. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer's ID. required: true - description: The ID of the Customer. schema: type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned customer. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be retrieved in the returned customer. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostCustomersCustomerReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.customers.update(customerId, { - first_name: "Dolly" - }) - .then(({ customer }) => { - console.log(customer.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateCustomer } from "medusa-react" - - type CustomerData = { - first_name: string - last_name: string - email: string - password: string - } - - type Props = { - customerId: string - } - - const Customer = ({ customerId }: Props) => { - const updateCustomer = useAdminUpdateCustomer(customerId) - // ... - - const handleUpdate = (customerData: CustomerData) => { - updateCustomer.mutate(customerData) - } - - // ... - } - - export default Customer - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/customers/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "first_name": "Dolly" - }' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/customers/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCustomersRes' '400': $ref: '#/components/responses/400_error' '401': @@ -3476,172 +1292,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/discounts: - get: - operationId: GetDiscounts - summary: List Discounts + requestBody: + content: + application/json: + schema: {} + delete: + operationId: DeleteCustomersId + summary: Delete a Customer + description: Delete a customer. x-authenticated: true - description: Retrieve a list of Discounts. The discounts can be filtered by fields such as `rule` or `is_dynamic`. The discounts can also be paginated. parameters: - - in: query - name: q - description: term to search discounts' code field. + - name: id + in: path + description: The customer's ID. + required: true schema: type: string - - in: query - name: rule - description: Filter discounts by rule fields. - schema: - type: object - properties: - type: - type: string - enum: - - fixed - - percentage - - free_shipping - description: Filter discounts by type. - allocation: - type: string - enum: - - total - - item - description: Filter discounts by allocation type. - - in: query - name: is_dynamic - description: Filter discounts by whether they're dynamic or not. - schema: - type: boolean - - in: query - name: is_disabled - description: Filter discounts by whether they're disabled or not. - schema: - type: boolean - - in: query - name: limit - description: The number of discounts to return - schema: - type: number - default: '20' - - in: query - name: offset - description: The number of discounts to skip when retrieving the discounts. - schema: - type: number - default: '0' - - in: query - name: expand - description: Comma-separated relations that should be expanded in each returned discount. - schema: - type: string - - in: query - name: order - description: A discount field to sort-order the retrieved discounts by. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetDiscountsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.list() - .then(({ discounts, limit, offset, count }) => { - console.log(discounts.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDiscounts } from "medusa-react" - - const Discounts = () => { - const { discounts, isLoading } = useAdminDiscounts() - - return ( -
- {isLoading && Loading...} - {discounts && !discounts.length && ( - No customers - )} - {discounts && discounts.length > 0 && ( -
    - {discounts.map((discount) => ( -
  • {discount.code}
  • - ))} -
- )} -
- ) - } - - export default Discounts - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/discounts' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE '{backend_url}/admin/customers/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Discounts + - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -3654,555 +1333,274 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostDiscounts - summary: Create a Discount + requestBody: + content: + application/json: + schema: {} + /admin/customers/{id}/addresses: + get: + operationId: GetCustomersIdAddresses + summary: List Addresses + description: Retrieve a list of addresses in a customer. The addresses can be filtered by fields like FILTER FIELDS. The addresses can also be paginated. x-authenticated: true - description: Create a Discount with a given set of rules that defines how the Discount is applied. parameters: - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned discount. + - name: id + in: path + description: The customer's ID. + required: true schema: type: string - - in: query - name: fields - description: Comma-separated fields that should be retrieved in the returned discount. + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/customers/{id}/addresses' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Customers + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + post: + operationId: PostCustomersIdAddresses + summary: Add Addresses to Customer + description: Add a list of addresses to a customer. + x-authenticated: true + parameters: + - name: id + in: path + description: The customer's ID. + required: true schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/customers/{id}/addresses' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Customers + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + /admin/customers/{id}/addresses/{address_id}: + get: + operationId: GetCustomersIdAddressesAddress_id + summary: List Addresses + description: Retrieve a list of addresses in a customer. The addresses can be filtered by fields like FILTER FIELDS. The addresses can also be paginated. + x-authenticated: true + parameters: + - name: id + in: path + description: The customer's ID. + required: true + schema: + type: string + - name: address_id + in: path + description: The customer's address id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/customers/{id}/addresses/{address_id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Customers + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + post: + operationId: PostCustomersIdAddressesAddress_id + summary: Add Addresses to Customer + description: Add a list of addresses to a customer. + x-authenticated: true + parameters: + - name: id + in: path + description: The customer's ID. + required: true + schema: + type: string + - name: address_id + in: path + description: The customer's address id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/customers/{id}/addresses/{address_id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Customers + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + delete: + operationId: DeleteCustomersIdAddressesAddress_id + summary: Remove Addresses from Customer + description: Remove a list of addresses from a customer. This doesn't delete the Address, only the association between the Address and the customer. + x-authenticated: true + parameters: + - name: id + in: path + description: The customer's ID. + required: true + schema: + type: string + - name: address_id + in: path + description: The customer's address id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE '{backend_url}/admin/customers/{id}/addresses/{address_id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Customers + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + /admin/fulfillment/shipping-options/{id}/rules/batch/add: + post: + operationId: PostFulfillmentShippingOptionsIdRulesBatchAdd + summary: Add Adds to Fulfillment + description: Add a list of adds to a fulfillment. + x-authenticated: true + parameters: + - name: id + in: path + description: The fulfillment's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdminPostDiscountsReq' - x-codegen: - method: create - queryParams: AdminPostDiscountsParams + $ref: '#/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchAddReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - import { AllocationType, DiscountRuleType } from "@medusajs/medusa" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.create({ - code: "TEST", - rule: { - type: DiscountRuleType.FIXED, - value: 10, - allocation: AllocationType.ITEM - }, - regions: ["reg_XXXXXXXX"], - is_dynamic: false, - is_disabled: false - }) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminCreateDiscount, - } from "medusa-react" - import { - AllocationType, - DiscountRuleType, - } from "@medusajs/medusa" - - const CreateDiscount = () => { - const createDiscount = useAdminCreateDiscount() - // ... - - const handleCreate = ( - currencyCode: string, - regionId: string - ) => { - // ... - createDiscount.mutate({ - code: currencyCode, - rule: { - type: DiscountRuleType.FIXED, - value: 10, - allocation: AllocationType.ITEM, - }, - regions: [ - regionId, - ], - is_dynamic: false, - is_disabled: false, - }) - } - - // ... - } - - export default CreateDiscount - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/admin/discounts' \ + source: |- + curl -X POST '{backend_url}/admin/fulfillment/shipping-options/{id}/rules/batch/add' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "code": "TEST", - "rule": { - "type": "fixed", - "value": 10, - "allocation": "item" - }, - "regions": ["reg_XXXXXXXX"] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/discounts/code/{code}: - get: - operationId: GetDiscountsDiscountCode - summary: Get Discount by Code - description: Retrieve a Discount's details by its discount code - x-authenticated: true - parameters: - - in: path - name: code - required: true - description: The code of the Discount - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - x-codegen: - method: retrieveByCode - queryParams: AdminGetDiscountsDiscountCodeParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.retrieveByCode(code) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminGetDiscountByCode } from "medusa-react" - - type Props = { - discountCode: string - } - - const Discount = ({ discountCode }: Props) => { - const { discount, isLoading } = useAdminGetDiscountByCode( - discountCode - ) - - return ( -
- {isLoading && Loading...} - {discount && {discount.code}} -
- ) - } - - export default Discount - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/discounts/code/{code}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/discounts/{discount_id}/conditions: - post: - operationId: PostDiscountsDiscountConditions - summary: Create a Condition - description: Create a Discount Condition. Only one of `products`, `product_types`, `product_collections`, `product_tags`, and `customer_groups` should be provided, based on the type of discount condition. For example, if the discount condition's type is `products`, the `products` field should be provided in the request body. - x-authenticated: true - parameters: - - in: path - name: discount_id - required: true - description: The ID of the discount. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostDiscountsDiscountConditions' - x-codegen: - method: createCondition - queryParams: AdminPostDiscountsDiscountConditionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - import { DiscountConditionOperator } from "@medusajs/medusa" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.createCondition(discountId, { - operator: DiscountConditionOperator.IN, - products: [productId] - }) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { DiscountConditionOperator } from "@medusajs/medusa" - import { useAdminDiscountCreateCondition } from "medusa-react" - - type Props = { - discountId: string - } - - const Discount = ({ discountId }: Props) => { - const createCondition = useAdminDiscountCreateCondition(discountId) - // ... - - const handleCreateCondition = ( - operator: DiscountConditionOperator, - products: string[] - ) => { - createCondition.mutate({ - operator, - products - }, { - onSuccess: ({ discount }) => { - console.log(discount.id) - } - }) - } - - // ... - } - - export default Discount - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/discounts/{id}/conditions' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "operator": "in" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/discounts/{discount_id}/conditions/{condition_id}: - get: - operationId: GetDiscountsDiscountConditionsCondition - summary: Get a Condition - description: Retrieve a Discount Condition's details. - x-authenticated: true - parameters: - - in: path - name: discount_id - required: true - description: The ID of the Discount. - schema: - type: string - - in: path - name: condition_id - required: true - description: The ID of the Discount Condition. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned discount condition. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount condition. - schema: - type: string - x-codegen: - method: getCondition - queryParams: AdminGetDiscountsDiscountConditionsConditionParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.getCondition(discountId, conditionId) - .then(({ discount_condition }) => { - console.log(discount_condition.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminGetDiscountCondition } from "medusa-react" - - type Props = { - discountId: string - discountConditionId: string - } - - const DiscountCondition = ({ - discountId, - discountConditionId - }: Props) => { - const { - discount_condition, - isLoading - } = useAdminGetDiscountCondition( - discountId, - discountConditionId - ) - - return ( -
- {isLoading && Loading...} - {discount_condition && ( - {discount_condition.type} - )} -
- ) - } - - export default DiscountCondition - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/discounts/{id}/conditions/{condition_id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountConditionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostDiscountsDiscountConditionsCondition - summary: Update a Condition - description: Update a Discount Condition. Only one of `products`, `product_types`, `product_collections`, `product_tags`, and `customer_groups` should be provided, based on the type of discount condition. For example, if the discount condition's type is `products`, the `products` field should be provided in the request body. - x-authenticated: true - parameters: - - in: path - name: discount_id - required: true - description: The ID of the Discount. - schema: - type: string - - in: path - name: condition_id - required: true - description: The ID of the Discount Condition. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostDiscountsDiscountConditionsCondition' - x-codegen: - method: updateCondition - queryParams: AdminPostDiscountsDiscountConditionsConditionParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.updateCondition(discountId, conditionId, { - products: [ - productId + "rules": [ + { + "attribute": "{value}" + } ] - }) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDiscountUpdateCondition } from "medusa-react" - - type Props = { - discountId: string - conditionId: string - } - - const DiscountCondition = ({ - discountId, - conditionId - }: Props) => { - const update = useAdminDiscountUpdateCondition( - discountId, - conditionId - ) - // ... - - const handleUpdate = ( - products: string[] - ) => { - update.mutate({ - products - }, { - onSuccess: ({ discount }) => { - console.log(discount.id) - } - }) - } - - // ... - } - - export default DiscountCondition - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/discounts/{id}/conditions/{condition}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "products": [ - "prod_01G1G5V2MBA328390B5AXJ610F" - ] }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Discounts + - Fulfillment responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -4215,2335 +1613,43 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - delete: - operationId: DeleteDiscountsDiscountConditionsCondition - summary: Delete a Condition - description: Delete a Discount Condition. This does not delete resources associated to the discount condition. - x-authenticated: true - parameters: - - in: path - name: discount_id - required: true - description: The ID of the Discount - schema: - type: string - - in: path - name: condition_id - required: true - description: The ID of the Discount Condition - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - x-codegen: - method: deleteCondition - queryParams: AdminDeleteDiscountsDiscountConditionsConditionParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.deleteCondition(discountId, conditionId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminDiscountRemoveCondition - } from "medusa-react" - - type Props = { - discountId: string - } - - const Discount = ({ discountId }: Props) => { - const deleteCondition = useAdminDiscountRemoveCondition( - discountId - ) - // ... - - const handleDelete = ( - conditionId: string - ) => { - deleteCondition.mutate(conditionId, { - onSuccess: ({ id, object, deleted }) => { - console.log(deleted) - } - }) - } - - // ... - } - - export default Discount - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/discounts/{id}/conditions/{condition_id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountConditionsDeleteRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/discounts/{discount_id}/conditions/{condition_id}/batch: + /admin/fulfillment/shipping-options/{id}/rules/batch/remove: post: - operationId: PostDiscountsDiscountConditionsConditionBatch - summary: Add Batch Resources - description: Add a batch of resources to a discount condition. The type of resource depends on the type of discount condition. For example, if the discount condition's type is `products`, the resources being added should be products. + operationId: PostFulfillmentShippingOptionsIdRulesBatchRemove + summary: Add Removes to Fulfillment + description: Add a list of removes to a fulfillment. x-authenticated: true parameters: - - in: path - name: discount_id + - name: id + in: path + description: The fulfillment's ID. required: true - description: The ID of the discount the condition belongs to. - schema: - type: string - - in: path - name: condition_id - required: true - description: The ID of the discount condition on which to add the item. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdminPostDiscountsDiscountConditionsConditionBatchReq' - x-codegen: - method: addConditionResourceBatch - queryParams: AdminPostDiscountsDiscountConditionsConditionBatchParams + $ref: '#/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.addConditionResourceBatch(discountId, conditionId, { - resources: [{ id: itemId }] - }) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminAddDiscountConditionResourceBatch - } from "medusa-react" - - type Props = { - discountId: string - conditionId: string - } - - const DiscountCondition = ({ - discountId, - conditionId - }: Props) => { - const addConditionResources = useAdminAddDiscountConditionResourceBatch( - discountId, - conditionId - ) - // ... - - const handleAdd = (itemId: string) => { - addConditionResources.mutate({ - resources: [ - { - id: itemId - } - ] - }, { - onSuccess: ({ discount }) => { - console.log(discount.id) - } - }) - } - - // ... - } - - export default DiscountCondition - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/admin/discounts/{id}/conditions/{condition_id}/batch' \ + source: |- + curl -X POST '{backend_url}/admin/fulfillment/shipping-options/{id}/rules/batch/remove' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "resources": [{ "id": "item_id" }] + "rule_ids": [ + "{value}" + ] }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Discounts + - Fulfillment responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteDiscountsDiscountConditionsConditionBatch - summary: Remove Batch Resources - description: Remove a batch of resources from a discount condition. This will only remove the association between the resource and the discount condition, not the resource itself. - x-authenticated: true - parameters: - - in: path - name: discount_id - required: true - description: The ID of the discount. - schema: - type: string - - in: path - name: condition_id - required: true - description: The ID of the condition to remove the resources from. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteDiscountsDiscountConditionsConditionBatchReq' - x-codegen: - method: deleteConditionResourceBatch - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.deleteConditionResourceBatch(discountId, conditionId, { - resources: [{ id: itemId }] - }) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminDeleteDiscountConditionResourceBatch - } from "medusa-react" - - type Props = { - discountId: string - conditionId: string - } - - const DiscountCondition = ({ - discountId, - conditionId - }: Props) => { - const deleteConditionResource = useAdminDeleteDiscountConditionResourceBatch( - discountId, - conditionId, - ) - // ... - - const handleDelete = (itemId: string) => { - deleteConditionResource.mutate({ - resources: [ - { - id: itemId - } - ] - }, { - onSuccess: ({ discount }) => { - console.log(discount.id) - } - }) - } - - // ... - } - - export default DiscountCondition - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/discounts/{id}/conditions/{condition_id}/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "resources": [{ "id": "item_id" }] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/discounts/{id}: - get: - operationId: GetDiscountsDiscount - summary: Get a Discount - description: Retrieve a Discount. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetDiscountParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.retrieve(discountId) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDiscount } from "medusa-react" - - type Props = { - discountId: string - } - - const Discount = ({ discountId }: Props) => { - const { discount, isLoading } = useAdminDiscount( - discountId - ) - - return ( -
- {isLoading && Loading...} - {discount && {discount.code}} -
- ) - } - - export default Discount - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/discounts/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostDiscountsDiscount - summary: Update a Discount - description: Update a Discount with a given set of rules that define how the Discount is applied. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be retrieved in the returned discount. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostDiscountsDiscountReq' - x-codegen: - method: update - queryParams: AdminPostDiscountsDiscountParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.update(discountId, { - code: "TEST" - }) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateDiscount } from "medusa-react" - - type Props = { - discountId: string - } - - const Discount = ({ discountId }: Props) => { - const updateDiscount = useAdminUpdateDiscount(discountId) - // ... - - const handleUpdate = (isDisabled: boolean) => { - updateDiscount.mutate({ - is_disabled: isDisabled, - }) - } - - // ... - } - - export default Discount - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/discounts/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "code": "TEST" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteDiscountsDiscount - summary: Delete a Discount - description: Delete a Discount. Deleting the discount will make it unavailable for customers to use. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.delete(discountId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteDiscount } from "medusa-react" - - const Discount = () => { - const deleteDiscount = useAdminDeleteDiscount(discount_id) - // ... - - const handleDelete = () => { - deleteDiscount.mutate() - } - - // ... - } - - export default Discount - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/discounts/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsDeleteRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/discounts/{id}/dynamic-codes: - post: - operationId: PostDiscountsDiscountDynamicCodes - summary: Create a Dynamic Code - description: Create a dynamic unique code that can map to a parent Discount. This is useful if you want to automatically generate codes with the same rules and conditions. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount to create the dynamic code for." - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostDiscountsDiscountDynamicCodesReq' - x-codegen: - method: createDynamicCode - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.createDynamicCode(discountId, { - code: "TEST", - usage_limit: 1 - }) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateDynamicDiscountCode } from "medusa-react" - - type Props = { - discountId: string - } - - const Discount = ({ discountId }: Props) => { - const createDynamicDiscount = useAdminCreateDynamicDiscountCode(discountId) - // ... - - const handleCreate = ( - code: string, - usageLimit: number - ) => { - createDynamicDiscount.mutate({ - code, - usage_limit: usageLimit - }, { - onSuccess: ({ discount }) => { - console.log(discount.is_dynamic) - } - }) - } - - // ... - } - - export default Discount - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/discounts/{id}/dynamic-codes' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "code": "TEST" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/discounts/{id}/dynamic-codes/{code}: - delete: - operationId: DeleteDiscountsDiscountDynamicCodesCode - summary: Delete a Dynamic Code - description: Delete a dynamic code from a Discount. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount - schema: - type: string - - in: path - name: code - required: true - description: The dynamic code to delete - schema: - type: string - x-codegen: - method: deleteDynamicCode - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.deleteDynamicCode(discountId, code) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteDynamicDiscountCode } from "medusa-react" - - type Props = { - discountId: string - } - - const Discount = ({ discountId }: Props) => { - const deleteDynamicDiscount = useAdminDeleteDynamicDiscountCode(discountId) - // ... - - const handleDelete = (code: string) => { - deleteDynamicDiscount.mutate(code, { - onSuccess: ({ discount }) => { - console.log(discount.is_dynamic) - } - }) - } - - // ... - } - - export default Discount - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/discounts/{id}/dynamic-codes/{code}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/discounts/{id}/regions/{region_id}: - post: - operationId: PostDiscountsDiscountRegionsRegion - summary: Add Region to Discount - description: Add a Region to the list of Regions a Discount can be used in. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount. - schema: - type: string - - in: path - name: region_id - required: true - description: The ID of the Region. - schema: - type: string - x-codegen: - method: addRegion - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.addRegion(discountId, regionId) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDiscountAddRegion } from "medusa-react" - - type Props = { - discountId: string - } - - const Discount = ({ discountId }: Props) => { - const addRegion = useAdminDiscountAddRegion(discountId) - // ... - - const handleAdd = (regionId: string) => { - addRegion.mutate(regionId, { - onSuccess: ({ discount }) => { - console.log(discount.regions) - } - }) - } - - // ... - } - - export default Discount - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/discounts/{id}/regions/{region_id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteDiscountsDiscountRegionsRegion - summary: Remove Region - x-authenticated: true - description: Remove a Region from the list of Regions that a Discount can be used in. This does not delete a region, only the association between it and the discount. - parameters: - - in: path - name: id - required: true - description: The ID of the Discount. - schema: - type: string - - in: path - name: region_id - required: true - description: The ID of the Region. - schema: - type: string - x-codegen: - method: removeRegion - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.discounts.removeRegion(discountId, regionId) - .then(({ discount }) => { - console.log(discount.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDiscountRemoveRegion } from "medusa-react" - - type Props = { - discountId: string - } - - const Discount = ({ discountId }: Props) => { - const deleteRegion = useAdminDiscountRemoveRegion(discountId) - // ... - - const handleDelete = (regionId: string) => { - deleteRegion.mutate(regionId, { - onSuccess: ({ discount }) => { - console.log(discount.regions) - } - }) - } - - // ... - } - - export default Discount - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/discounts/{id}/regions/{region_id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDiscountsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/draft-orders: - get: - operationId: GetDraftOrders - summary: List Draft Orders - description: Retrieve an list of Draft Orders. The draft orders can be filtered by fields such as `q`. The draft orders can also paginated. - x-authenticated: true - parameters: - - in: query - name: offset - description: The number of draft orders to skip when retrieving the draft orders. - schema: - type: number - default: '0' - - in: query - name: limit - description: Limit the number of draft orders returned. - schema: - type: number - default: '50' - - in: query - name: q - description: a term to search draft orders' display IDs and emails in the draft order's cart - schema: - type: string - - in: query - name: order - description: Field to sort retrieved draft orders by. - schema: - type: string - - in: query - name: expand - description: A comma-separated list of fields to expand. - schema: - type: string - - in: query - name: fields - description: A comma-separated list of fields to include in the response. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: status - style: form - explode: false - description: Filter by status - schema: - type: array - items: - type: string - enum: - - open - - completed - x-codegen: - method: list - queryParams: AdminGetDraftOrdersParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.draftOrders.list() - .then(({ draft_orders, limit, offset, count }) => { - console.log(draft_orders.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDraftOrders } from "medusa-react" - - const DraftOrders = () => { - const { draft_orders, isLoading } = useAdminDraftOrders() - - return ( -
- {isLoading && Loading...} - {draft_orders && !draft_orders.length && ( - No Draft Orders - )} - {draft_orders && draft_orders.length > 0 && ( -
    - {draft_orders.map((order) => ( -
  • {order.display_id}
  • - ))} -
- )} -
- ) - } - - export default DraftOrders - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/draft-orders' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDraftOrdersListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostDraftOrders - summary: Create a Draft Order - description: Create a Draft Order. A draft order is not transformed into an order until payment is captured. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostDraftOrdersReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.draftOrders.create({ - email: "user@example.com", - region_id, - items: [ - { - quantity: 1 - } - ], - shipping_methods: [ - { - option_id - } - ], - }) - .then(({ draft_order }) => { - console.log(draft_order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateDraftOrder } from "medusa-react" - - type DraftOrderData = { - email: string - region_id: string - items: { - quantity: number, - variant_id: string - }[] - shipping_methods: { - option_id: string - price: number - }[] - } - - const CreateDraftOrder = () => { - const createDraftOrder = useAdminCreateDraftOrder() - // ... - - const handleCreate = (data: DraftOrderData) => { - createDraftOrder.mutate(data, { - onSuccess: ({ draft_order }) => { - console.log(draft_order.id) - } - }) - } - - // ... - } - - export default CreateDraftOrder - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/draft-orders' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com", - "region_id": "{region_id}" - "items": [ - { - "quantity": 1 - } - ], - "shipping_methods": [ - { - "option_id": "{option_id}" - } - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDraftOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/draft-orders/{id}: - get: - operationId: GetDraftOrdersDraftOrder - summary: Get a Draft Order - description: Retrieve a Draft Order's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.draftOrders.retrieve(draftOrderId) - .then(({ draft_order }) => { - console.log(draft_order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDraftOrder } from "medusa-react" - - type Props = { - draftOrderId: string - } - - const DraftOrder = ({ draftOrderId }: Props) => { - const { - draft_order, - isLoading, - } = useAdminDraftOrder(draftOrderId) - - return ( -
- {isLoading && Loading...} - {draft_order && {draft_order.display_id}} - -
- ) - } - - export default DraftOrder - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/draft-orders/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDraftOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostDraftOrdersDraftOrder - summary: Update a Draft Order - description: Update a Draft Order's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostDraftOrdersDraftOrderReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.draftOrders.update(draftOrderId, { - email: "user@example.com" - }) - .then(({ draft_order }) => { - console.log(draft_order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateDraftOrder } from "medusa-react" - - type Props = { - draftOrderId: string - } - - const DraftOrder = ({ draftOrderId }: Props) => { - const updateDraftOrder = useAdminUpdateDraftOrder( - draftOrderId - ) - // ... - - const handleUpdate = (email: string) => { - updateDraftOrder.mutate({ - email, - }, { - onSuccess: ({ draft_order }) => { - console.log(draft_order.id) - } - }) - } - - // ... - } - - export default DraftOrder - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/draft-orders/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDraftOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteDraftOrdersDraftOrder - summary: Delete a Draft Order - description: Delete a Draft Order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.draftOrders.delete(draftOrderId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteDraftOrder } from "medusa-react" - - type Props = { - draftOrderId: string - } - - const DraftOrder = ({ draftOrderId }: Props) => { - const deleteDraftOrder = useAdminDeleteDraftOrder( - draftOrderId - ) - // ... - - const handleDelete = () => { - deleteDraftOrder.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default DraftOrder - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/draft-orders/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDraftOrdersDeleteRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/draft-orders/{id}/line-items: - post: - operationId: PostDraftOrdersDraftOrderLineItems - summary: Create a Line Item - description: Create a Line Item in the Draft Order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostDraftOrdersDraftOrderLineItemsReq' - x-codegen: - method: addLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.draftOrders.addLineItem(draftOrderId, { - quantity: 1 - }) - .then(({ draft_order }) => { - console.log(draft_order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDraftOrderAddLineItem } from "medusa-react" - - type Props = { - draftOrderId: string - } - - const DraftOrder = ({ draftOrderId }: Props) => { - const addLineItem = useAdminDraftOrderAddLineItem( - draftOrderId - ) - // ... - - const handleAdd = (quantity: number) => { - addLineItem.mutate({ - quantity, - }, { - onSuccess: ({ draft_order }) => { - console.log(draft_order.cart) - } - }) - } - - // ... - } - - export default DraftOrder - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/draft-orders/{id}/line-items' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "quantity": 1 - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDraftOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/draft-orders/{id}/line-items/{line_id}: - post: - operationId: PostDraftOrdersDraftOrderLineItemsItem - summary: Update a Line Item - description: Update a Line Item in a Draft Order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - - in: path - name: line_id - required: true - description: The ID of the Line Item. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostDraftOrdersDraftOrderLineItemsItemReq' - x-codegen: - method: updateLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.draftOrders.updateLineItem(draftOrderId, lineId, { - quantity: 1 - }) - .then(({ draft_order }) => { - console.log(draft_order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDraftOrderUpdateLineItem } from "medusa-react" - - type Props = { - draftOrderId: string - } - - const DraftOrder = ({ draftOrderId }: Props) => { - const updateLineItem = useAdminDraftOrderUpdateLineItem( - draftOrderId - ) - // ... - - const handleUpdate = ( - itemId: string, - quantity: number - ) => { - updateLineItem.mutate({ - item_id: itemId, - quantity, - }) - } - - // ... - } - - export default DraftOrder - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/draft-orders/{id}/line-items/{line_id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "quantity": 1 - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDraftOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteDraftOrdersDraftOrderLineItemsItem - summary: Delete a Line Item - description: Delete a Line Item from a Draft Order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - - in: path - name: line_id - required: true - description: The ID of the line item. - schema: - type: string - x-codegen: - method: removeLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.draftOrders.removeLineItem(draftOrderId, itemId) - .then(({ draft_order }) => { - console.log(draft_order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDraftOrderRemoveLineItem } from "medusa-react" - - type Props = { - draftOrderId: string - } - - const DraftOrder = ({ draftOrderId }: Props) => { - const deleteLineItem = useAdminDraftOrderRemoveLineItem( - draftOrderId - ) - // ... - - const handleDelete = (itemId: string) => { - deleteLineItem.mutate(itemId, { - onSuccess: ({ draft_order }) => { - console.log(draft_order.cart) - } - }) - } - - // ... - } - - export default DraftOrder - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/draft-orders/{id}/line-items/{line_id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDraftOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/draft-orders/{id}/pay: - post: - summary: Mark Paid - operationId: PostDraftOrdersDraftOrderRegisterPayment - description: Capture the draft order's payment. This will also set the draft order's status to `completed` and create an Order from the draft order. The payment is captured through Medusa's system payment, which is manual payment that isn't integrated with any third-party payment provider. It is assumed that the payment capturing is handled manually by the admin. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The Draft Order ID. - schema: - type: string - x-codegen: - method: markPaid - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.draftOrders.markPaid(draftOrderId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDraftOrderRegisterPayment } from "medusa-react" - - type Props = { - draftOrderId: string - } - - const DraftOrder = ({ draftOrderId }: Props) => { - const registerPayment = useAdminDraftOrderRegisterPayment( - draftOrderId - ) - // ... - - const handlePayment = () => { - registerPayment.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.id) - } - }) - } - - // ... - } - - export default DraftOrder - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/draft-orders/{id}/pay' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostDraftOrdersDraftOrderRegisterPaymentRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/gift-cards: - get: - operationId: GetGiftCards - summary: List Gift Cards - description: Retrieve a list of Gift Cards. The gift cards can be filtered by fields such as `q`. The gift cards can also paginated. - x-authenticated: true - parameters: - - in: query - name: offset - description: The number of gift cards to skip when retrieving the gift cards. - schema: - type: number - default: '0' - - in: query - name: limit - description: Limit the number of gift cards returned. - schema: - type: number - default: '50' - - in: query - name: q - description: a term to search gift cards' code or display ID - schema: - type: string - - in: query - name: order - description: A gift card field to sort-order the retrieved gift cards by. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetGiftCardsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.giftCards.list() - .then(({ gift_cards, limit, offset, count }) => { - console.log(gift_cards.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { GiftCard } from "@medusajs/medusa" - import { useAdminGiftCards } from "medusa-react" - - const CustomGiftCards = () => { - const { gift_cards, isLoading } = useAdminGiftCards() - - return ( -
- {isLoading && Loading...} - {gift_cards && !gift_cards.length && ( - No custom gift cards... - )} - {gift_cards && gift_cards.length > 0 && ( -
    - {gift_cards.map((giftCard: GiftCard) => ( -
  • {giftCard.code}
  • - ))} -
- )} -
- ) - } - - export default CustomGiftCards - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/gift-cards' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminGiftCardsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostGiftCards - summary: Create a Gift Card - description: Create a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostGiftCardsReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.giftCards.create({ - region_id - }) - .then(({ gift_card }) => { - console.log(gift_card.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateGiftCard } from "medusa-react" - - const CreateCustomGiftCards = () => { - const createGiftCard = useAdminCreateGiftCard() - // ... - - const handleCreate = ( - regionId: string, - value: number - ) => { - createGiftCard.mutate({ - region_id: regionId, - value, - }, { - onSuccess: ({ gift_card }) => { - console.log(gift_card.id) - } - }) - } - - // ... - } - - export default CreateCustomGiftCards - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/gift-cards' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "region_id": "{region_id}" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminGiftCardsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/gift-cards/{id}: - get: - operationId: GetGiftCardsGiftCard - summary: Get a Gift Card - description: Retrieve a Gift Card's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Gift Card. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.giftCards.retrieve(giftCardId) - .then(({ gift_card }) => { - console.log(gift_card.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminGiftCard } from "medusa-react" - - type Props = { - giftCardId: string - } - - const CustomGiftCard = ({ giftCardId }: Props) => { - const { gift_card, isLoading } = useAdminGiftCard(giftCardId) - - return ( -
- {isLoading && Loading...} - {gift_card && {gift_card.code}} -
- ) - } - - export default CustomGiftCard - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/gift-cards/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminGiftCardsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostGiftCardsGiftCard - summary: Update a Gift Card - description: Update a Gift Card's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Gift Card. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostGiftCardsGiftCardReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.giftCards.update(giftCardId, { - region_id - }) - .then(({ gift_card }) => { - console.log(gift_card.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateGiftCard } from "medusa-react" - - type Props = { - customGiftCardId: string - } - - const CustomGiftCard = ({ customGiftCardId }: Props) => { - const updateGiftCard = useAdminUpdateGiftCard( - customGiftCardId - ) - // ... - - const handleUpdate = (regionId: string) => { - updateGiftCard.mutate({ - region_id: regionId, - }, { - onSuccess: ({ gift_card }) => { - console.log(gift_card.id) - } - }) - } - - // ... - } - - export default CustomGiftCard - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/gift-cards/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "region_id": "{region_id}" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminGiftCardsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteGiftCardsGiftCard - summary: Delete a Gift Card - description: Delete a Gift Card. Once deleted, it can't be used by customers. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Gift Card to delete. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.giftCards.delete(giftCardId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteGiftCard } from "medusa-react" - - type Props = { - customGiftCardId: string - } - - const CustomGiftCard = ({ customGiftCardId }: Props) => { - const deleteGiftCard = useAdminDeleteGiftCard( - customGiftCardId - ) - // ... - - const handleDelete = () => { - deleteGiftCard.mutate(void 0, { - onSuccess: ({ id, object, deleted}) => { - console.log(id) - } - }) - } - - // ... - } - - export default CustomGiftCard - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/gift-cards/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminGiftCardsDeleteRes' '400': $ref: '#/components/responses/400_error' '401': @@ -6560,177 +1666,22 @@ paths: get: operationId: GetInventoryItems summary: List Inventory Items - description: Retrieve a list of inventory items. The inventory items can be filtered by fields such as `q` or `location_id`. The inventory items can also be paginated. + description: Retrieve a list of inventory items. The inventory items can be filtered by fields such as `id`. The inventory items can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: offset - description: The number of inventory items to skip when retrieving the inventory items. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of inventory items returned. - schema: - type: integer - default: 20 - - in: query - name: expand - description: Comma-separated relations that should be expanded in each returned inventory item. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned inventory item. - schema: - type: string - - in: query - name: q - description: term to search inventory item's sku, title, and description. - schema: - type: string - - in: query - name: order - description: Field to sort-order inventory items by. - schema: - type: string - - in: query - name: location_id - style: form - explode: false - description: Filter by location IDs. - schema: - type: array - items: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by the inventory ID - schema: - oneOf: - - type: string - description: inventory ID - - type: array - description: an array of inventory IDs - items: - type: string - - in: query - name: sku - description: Filter by SKU - schema: - type: string - - in: query - name: origin_country - description: Filter by origin country - schema: - type: string - - in: query - name: mid_code - description: Filter by MID code - schema: - type: string - - in: query - name: material - description: Filter by material - schema: - type: string - - in: query - name: hs_code - description: Filter by HS Code - schema: - type: string - - in: query - name: weight - description: Filter by weight - schema: - type: string - - in: query - name: length - description: Filter by length - schema: - type: string - - in: query - name: height - description: Filter by height - schema: - type: string - - in: query - name: width - description: Filter by width - schema: - type: string - - in: query - name: requires_shipping - description: Filter by whether the item requires shipping - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetInventoryItemsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.inventoryItems.list() - .then(({ inventory_items, count, offset, limit }) => { - console.log(inventory_items.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminInventoryItems } from "medusa-react" - - function InventoryItems() { - const { - inventory_items, - isLoading - } = useAdminInventoryItems() - - return ( -
- {isLoading && Loading...} - {inventory_items && !inventory_items.length && ( - No Items - )} - {inventory_items && inventory_items.length > 0 && ( -
    - {inventory_items.map( - (item) => ( -
  • {item.id}
  • - ) - )} -
- )} -
- ) - } - - export default InventoryItems - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/inventory-items' \ - -H 'x-medusa-access-token: {api_token}' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/inventory-items' \ + -H 'x-medusa-access-token: {api_token}' tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminInventoryItemsListWithVariantsAndLocationLevelsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -6743,89 +1694,34 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: operationId: PostInventoryItems - summary: Create an Inventory Item - description: Create an Inventory Item for a product variant. + summary: Create Inventory Item + description: Create a inventory item. x-authenticated: true - parameters: - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned inventory item. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned inventory item. - schema: - type: string + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AdminPostInventoryItemsReq' - x-codegen: - method: create - queryParams: AdminPostInventoryItemsParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.inventoryItems.create({ - variant_id: "variant_123", - }) - .then(({ inventory_item }) => { - console.log(inventory_item.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateInventoryItem } from "medusa-react" - - const CreateInventoryItem = () => { - const createInventoryItem = useAdminCreateInventoryItem() - // ... - - const handleCreate = (variantId: string) => { - createInventoryItem.mutate({ - variant_id: variantId, - }, { - onSuccess: ({ inventory_item }) => { - console.log(inventory_item.id) - } - }) - } - - // ... - } - - export default CreateInventoryItem - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/inventory-items' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "variant_id": "variant_123", - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] + -H 'x-medusa-access-token: {api_token}' tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminInventoryItemsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -6840,86 +1736,30 @@ paths: $ref: '#/components/responses/500_error' /admin/inventory-items/{id}: get: - operationId: GetInventoryItemsInventoryItem - summary: Get an Inventory Item - description: Retrieve an Inventory Item's details. + operationId: GetInventoryItemsId + summary: Get a Inventory Item + description: Retrieve a inventory item by its ID. You can expand the inventory item's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item. schema: type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned inventory item. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned inventory item. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetInventoryItemsItemParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.inventoryItems.retrieve(inventoryItemId) - .then(({ inventory_item }) => { - console.log(inventory_item.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminInventoryItem } from "medusa-react" - - type Props = { - inventoryItemId: string - } - - const InventoryItem = ({ inventoryItemId }: Props) => { - const { - inventory_item, - isLoading - } = useAdminInventoryItem(inventoryItemId) - - return ( -
- {isLoading && Loading...} - {inventory_item && ( - {inventory_item.sku} - )} -
- ) - } - - export default InventoryItem - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/inventory-items/{id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/inventory-items/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminInventoryItemsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -6932,101 +1772,42 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: - operationId: PostInventoryItemsInventoryItem - summary: Update an Inventory Item - description: Update an Inventory Item's details. + operationId: PostInventoryItemsId + summary: Update a Inventory Item + description: Update a inventory item's details. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned inventory level. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned inventory level. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AdminPostInventoryItemsInventoryItemReq' - x-codegen: - method: update - queryParams: AdminPostInventoryItemsInventoryItemParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.inventoryItems.update(inventoryItemId, { - origin_country: "US", - }) - .then(({ inventory_item }) => { - console.log(inventory_item.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateInventoryItem } from "medusa-react" - - type Props = { - inventoryItemId: string - } - - const InventoryItem = ({ inventoryItemId }: Props) => { - const updateInventoryItem = useAdminUpdateInventoryItem( - inventoryItemId - ) - // ... - - const handleUpdate = (origin_country: string) => { - updateInventoryItem.mutate({ - origin_country, - }, { - onSuccess: ({ inventory_item }) => { - console.log(inventory_item.origin_country) - } - }) - } - - // ... - } - - export default InventoryItem - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/inventory-items/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "origin_country": "US" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] + -H 'x-medusa-access-token: {api_token}' tags: - Inventory Items responses: '200': description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminInventoryItemsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -7040,171 +1821,30 @@ paths: '500': $ref: '#/components/responses/500_error' delete: - operationId: DeleteInventoryItemsInventoryItem - summary: Delete an Inventory Item - description: Delete an Inventory Item. This does not delete the associated product variant. + operationId: DeleteInventoryItemsId + summary: Delete a Inventory Item + description: Delete a inventory item. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item to delete. schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.inventoryItems.delete(inventoryItemId) - .then(({ id, object, deleted }) => { - console.log(id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteInventoryItem } from "medusa-react" - - type Props = { - inventoryItemId: string - } - - const InventoryItem = ({ inventoryItemId }: Props) => { - const deleteInventoryItem = useAdminDeleteInventoryItem( - inventoryItemId - ) - // ... - - const handleDelete = () => { - deleteInventoryItem.mutate() - } - - // ... - } - - export default InventoryItem - lang: Shell label: cURL - source: | + source: |- curl -X DELETE '{backend_url}/admin/inventory-items/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminInventoryItemsDeleteRes' - '400': - $ref: '#/components/responses/400_error' - /admin/inventory-items/{id}/location-levels: - get: - operationId: GetInventoryItemsInventoryItemLocationLevels - summary: List Inventory Level - description: Retrieve a list of inventory levels of an inventory item. The inventory levels can be filtered by fields such as `location_id`. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Inventory Item the locations are associated with. - schema: - type: string - - in: query - name: location_id - style: form - explode: false - description: Filter by location IDs. - schema: - type: array - items: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned inventory levels. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned inventory levels. - schema: - type: string - x-codegen: - method: listLocationLevels - queryParams: AdminGetInventoryItemsItemLocationLevelsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.inventoryItems.listLocationLevels(inventoryItemId) - .then(({ inventory_item }) => { - console.log(inventory_item.location_levels); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminInventoryItemLocationLevels, - } from "medusa-react" - - type Props = { - inventoryItemId: string - } - - const InventoryItem = ({ inventoryItemId }: Props) => { - const { - inventory_item, - isLoading, - } = useAdminInventoryItemLocationLevels(inventoryItemId) - - return ( -
- {isLoading && Loading...} - {inventory_item && ( -
    - {inventory_item.location_levels.map((level) => ( - {level.stocked_quantity} - ))} -
- )} -
- ) - } - - export default InventoryItem - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/inventory-items/{id}/location-levels' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Inventory Items - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminInventoryItemsLocationLevelsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -7217,107 +1857,46 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + /admin/inventory-items/{id}/location-levels: post: - operationId: PostInventoryItemsInventoryItemLocationLevels - summary: Create a Location Level - description: Create a Location Level for a given Inventory Item. + operationId: PostInventoryItemsIdLocationLevels + summary: Add Location Levels to Inventory Item + description: Add a list of location levels to a inventory item. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned inventory item. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned inventory item. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq' - x-codegen: - method: createLocationLevel - queryParams: AdminPostInventoryItemsItemLocationLevelsParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.inventoryItems.createLocationLevel(inventoryItemId, { - location_id: "sloc_123", - stocked_quantity: 10, - }) - .then(({ inventory_item }) => { - console.log(inventory_item.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateLocationLevel } from "medusa-react" - - type Props = { - inventoryItemId: string - } - - const InventoryItem = ({ inventoryItemId }: Props) => { - const createLocationLevel = useAdminCreateLocationLevel( - inventoryItemId - ) - // ... - - const handleCreateLocationLevel = ( - locationId: string, - stockedQuantity: number - ) => { - createLocationLevel.mutate({ - location_id: locationId, - stocked_quantity: stockedQuantity, - }, { - onSuccess: ({ inventory_item }) => { - console.log(inventory_item.id) - } - }) - } - - // ... - } - - export default InventoryItem - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "location_id": "sloc_123", - "stocked_quantity": 10 + "location_id": "{value}", + "stocked_quantity": 1506469662949376 }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminInventoryItemsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -7332,110 +1911,43 @@ paths: $ref: '#/components/responses/500_error' /admin/inventory-items/{id}/location-levels/{location_id}: post: - operationId: PostInventoryItemsInventoryItemLocationLevelsLocationLevel - summary: Update a Location Level - description: Update a Location Level's details for a given Inventory Item. + operationId: PostInventoryItemsIdLocationLevelsLocation_id + summary: Add Location Levels to Inventory Item + description: Add a list of location levels to a inventory item. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item that the location is associated with. schema: type: string - - in: path - name: location_id + - name: location_id + in: path + description: The inventory item's location id. required: true - description: The ID of the Location to update. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned location level. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned location level. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq' - x-codegen: - method: updateLocationLevel - queryParams: AdminPostInventoryItemsItemLocationLevelsLevelParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.inventoryItems.updateLocationLevel(inventoryItemId, locationId, { - stocked_quantity: 15, - }) - .then(({ inventory_item }) => { - console.log(inventory_item.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateLocationLevel } from "medusa-react" - - type Props = { - inventoryItemId: string - } - - const InventoryItem = ({ inventoryItemId }: Props) => { - const updateLocationLevel = useAdminUpdateLocationLevel( - inventoryItemId - ) - // ... - - const handleUpdate = ( - stockLocationId: string, - stocked_quantity: number - ) => { - updateLocationLevel.mutate({ - stockLocationId, - stocked_quantity, - }, { - onSuccess: ({ inventory_item }) => { - console.log(inventory_item.id) - } - }) - } - - // ... - } - - export default InventoryItem - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "stocked_quantity": 15 - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] + -H 'x-medusa-access-token: {api_token}' tags: - Inventory Items responses: '200': description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminInventoryItemsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -7449,80 +1961,36 @@ paths: '500': $ref: '#/components/responses/500_error' delete: - operationId: DeleteInventoryItemsInventoryIteLocationLevelsLocation - summary: Delete a Location Level - description: Delete a location level of an Inventory Item. + operationId: DeleteInventoryItemsIdLocationLevelsLocation_id + summary: Remove Location Levels from Inventory Item + description: Remove a list of location levels from a inventory item. This doesn't delete the Location Level, only the association between the Location Level and the inventory item. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item. schema: type: string - - in: path - name: location_id + - name: location_id + in: path + description: The inventory item's location id. required: true - description: The ID of the location. schema: type: string - x-codegen: - method: deleteLocationLevel - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.inventoryItems.deleteLocationLevel(inventoryItemId, locationId) - .then(({ inventory_item }) => { - console.log(inventory_item.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteLocationLevel } from "medusa-react" - - type Props = { - inventoryItemId: string - } - - const InventoryItem = ({ inventoryItemId }: Props) => { - const deleteLocationLevel = useAdminDeleteLocationLevel( - inventoryItemId - ) - // ... - - const handleDelete = ( - locationId: string - ) => { - deleteLocationLevel.mutate(locationId) - } - - // ... - } - - export default InventoryItem - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminInventoryItemsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -7535,103 +2003,30 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/invites: - get: - operationId: GetInvites - summary: Lists Invites - description: Retrieve a list of invites. - x-authenticated: true - x-codegen: - method: list - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.invites.list() - .then(({ invites }) => { - console.log(invites.length); - }) - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/invites' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Invites - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminListInvitesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostInvites - summary: Create an Invite - description: Create an Invite. This will generate a token associated with the invite and trigger an `invite.created` event. If you have a Notification Provider installed that handles this event, a notification should be sent to the email associated with the invite to allow them to accept the invite. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostInvitesReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.invites.create({ - user: "user@example.com", - role: "admin" - }) - .then(() => { - // successful - }) - .catch(() => { - // an error occurred - }) - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/invites' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "user": "user@example.com", - "role": "admin" - }' + schema: {} + /admin/invites: + get: + operationId: GetInvites + summary: List Invites + description: Retrieve a list of invites. The invites can be filtered by fields such as `id`. The invites can also be sorted or paginated. + x-authenticated: true + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/invites' \ + -H 'x-medusa-access-token: {api_token}' tags: - Invites responses: - '200': - description: OK '400': $ref: '#/components/responses/400_error' '401': @@ -7644,96 +2039,75 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + post: + operationId: PostInvites + summary: Create Invite + description: Create a invite. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/invites' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Invites + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/invites/accept: post: - operationId: PostInvitesInviteAccept - summary: Accept an Invite - description: Accept an Invite. This will also delete the invite and create a new user that can log in and perform admin functionalities. The user will have the email associated with the invite, and the password provided in the request body. + operationId: PostInvitesAccept + summary: Create Invite + description: Create a invite. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AdminPostInvitesInviteAcceptReq' - x-codegen: - method: accept x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.invites.accept({ - token, - user: { - first_name: "Brigitte", - last_name: "Collier", - password: "supersecret" - } - }) - .then(() => { - // successful - }) - .catch(() => { - // an error occurred - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminAcceptInvite } from "medusa-react" - - const AcceptInvite = () => { - const acceptInvite = useAdminAcceptInvite() - // ... - - const handleAccept = ( - token: string, - firstName: string, - lastName: string, - password: string - ) => { - acceptInvite.mutate({ - token, - user: { - first_name: firstName, - last_name: lastName, - password, - }, - }, { - onSuccess: () => { - // invite accepted successfully. - } - }) - } - - // ... - } - - export default AcceptInvite - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/invites/accept' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "token": "{token}", - "user": { - "first_name": "Brigitte", - "last_name": "Collier", - "password": "supersecret" - } + "first_name": "{value}", + "last_name": "{value}" }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Invites responses: - '200': - description: OK '400': $ref: '#/components/responses/400_error' '401': @@ -7746,76 +2120,32 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/invites/{invite_id}: - delete: - operationId: DeleteInvitesInvite - summary: Delete an Invite - description: Delete an Invite. Only invites that weren't accepted can be deleted. + /admin/invites/{id}: + get: + operationId: GetInvitesId + summary: Get a Invite + description: Retrieve a invite by its ID. You can expand the invite's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: invite_id + - name: id + in: path + description: The invite's ID. required: true - description: The ID of the Invite schema: type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.invites.delete(inviteId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteInvite } from "medusa-react" - - type Props = { - inviteId: string - } - - const DeleteInvite = ({ inviteId }: Props) => { - const deleteInvite = useAdminDeleteInvite(inviteId) - // ... - - const handleDelete = () => { - deleteInvite.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default Invite - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/invites/{invite_id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/invites/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Invites responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminInviteDeleteRes' '400': $ref: '#/components/responses/400_error' '401': @@ -7828,75 +2158,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/invites/{invite_id}/resend: - post: - operationId: PostInvitesInviteResend - summary: Resend an Invite - description: Resend an Invite. This renews the expiry date by 7 days and generates a new token for the invite. It also triggers the `invite.created` event, so if you have a Notification Provider installed that handles this event, a notification should be sent to the email associated with the invite to allow them to accept the invite. + requestBody: + content: + application/json: + schema: {} + delete: + operationId: DeleteInvitesId + summary: Delete a Invite + description: Delete a invite. x-authenticated: true parameters: - - in: path - name: invite_id + - name: id + in: path + description: The invite's ID. required: true - description: The ID of the Invite schema: type: string - x-codegen: - method: resend - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.invites.resend(inviteId) - .then(() => { - // successful - }) - .catch(() => { - // an error occurred - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminResendInvite } from "medusa-react" - - type Props = { - inviteId: string - } - - const ResendInvite = ({ inviteId }: Props) => { - const resendInvite = useAdminResendInvite(inviteId) - // ... - - const handleResend = () => { - resendInvite.mutate(void 0, { - onSuccess: () => { - // invite resent successfully - } - }) - } - - // ... - } - - export default ResendInvite - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/invites/{invite_id}/resend' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE '{backend_url}/admin/invites/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Invites responses: - '200': - description: OK '400': $ref: '#/components/responses/400_error' '401': @@ -7909,87 +2199,72 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/notes: + requestBody: + content: + application/json: + schema: {} + /admin/invites/{id}/resend: + post: + operationId: PostInvitesIdResend + summary: Add Resends to Invite + description: Add a list of resends to a invite. + x-authenticated: true + parameters: + - name: id + in: path + description: The invite's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/invites/{id}/resend' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Invites + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + /admin/payments: get: - operationId: GetNotes - summary: List Notes + operationId: GetPayments + summary: List Payments + description: Retrieve a list of payments. The payments can be filtered by fields such as `id`. The payments can also be sorted or paginated. x-authenticated: true - description: Retrieve a list of notes. The notes can be filtered by fields such as `resource_id`. The notes can also be paginated. - parameters: - - in: query - name: limit - description: Limit the number of notes returned. - schema: - type: number - default: '50' - - in: query - name: offset - description: The number of notes to skip when retrieving the notes. - schema: - type: number - default: '0' - - in: query - name: resource_id - description: Filter by resource ID - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetNotesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.notes.list() - .then(({ notes, limit, offset, count }) => { - console.log(notes.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminNotes } from "medusa-react" - - const Notes = () => { - const { notes, isLoading } = useAdminNotes() - - return ( -
- {isLoading && Loading...} - {notes && !notes.length && No Notes} - {notes && notes.length > 0 && ( -
    - {notes.map((note) => ( -
  • {note.resource_type}
  • - ))} -
- )} -
- ) - } - - export default Notes - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/notes' \ - -H 'x-medusa-access-token: {api_token}' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/payments' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Notes + - Payments responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminNotesListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -8002,5124 +2277,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostNotes - summary: Create a Note - description: Create a Note which can be associated with any resource. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostNotesReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.notes.create({ - resource_id, - resource_type: "order", - value: "We delivered this order" - }) - .then(({ note }) => { - console.log(note.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateNote } from "medusa-react" - - const CreateNote = () => { - const createNote = useAdminCreateNote() - // ... - - const handleCreate = () => { - createNote.mutate({ - resource_id: "order_123", - resource_type: "order", - value: "We delivered this order" - }, { - onSuccess: ({ note }) => { - console.log(note.id) - } - }) - } - - // ... - } - - export default CreateNote - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/notes' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "resource_id": "{resource_id}", - "resource_type": "order", - "value": "We delivered this order" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notes - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminNotesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/notes/{id}: - get: - operationId: GetNotesNote - summary: Get a Note - description: Retrieve a note's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the note. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.notes.retrieve(noteId) - .then(({ note }) => { - console.log(note.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminNote } from "medusa-react" - - type Props = { - noteId: string - } - - const Note = ({ noteId }: Props) => { - const { note, isLoading } = useAdminNote(noteId) - - return ( -
- {isLoading && Loading...} - {note && {note.resource_type}} -
- ) - } - - export default Note - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/notes/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notes - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminNotesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostNotesNote - summary: Update a Note - x-authenticated: true - description: Update a Note's details. - parameters: - - in: path - name: id - required: true - description: The ID of the Note - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostNotesNoteReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.notes.update(noteId, { - value: "We delivered this order" - }) - .then(({ note }) => { - console.log(note.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateNote } from "medusa-react" - - type Props = { - noteId: string - } - - const Note = ({ noteId }: Props) => { - const updateNote = useAdminUpdateNote(noteId) - // ... - - const handleUpdate = ( - value: string - ) => { - updateNote.mutate({ - value - }, { - onSuccess: ({ note }) => { - console.log(note.value) - } - }) - } - - // ... - } - - export default Note - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/notes/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "value": "We delivered this order" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notes - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminNotesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteNotesNote - summary: Delete a Note - description: Delete a Note. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Note to delete. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.notes.delete(noteId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteNote } from "medusa-react" - - type Props = { - noteId: string - } - - const Note = ({ noteId }: Props) => { - const deleteNote = useAdminDeleteNote(noteId) - // ... - - const handleDelete = () => { - deleteNote.mutate() - } - - // ... - } - - export default Note - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/notes/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notes - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminNotesDeleteRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/notifications: - get: - operationId: GetNotifications - summary: List Notifications - description: Retrieve a list of notifications. The notifications can be filtered by fields such as `event_name` or `resource_type`. The notifications can also be paginated. - x-authenticated: true - parameters: - - in: query - name: offset - description: The number of inventory items to skip when retrieving the inventory items. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of notifications returned. - schema: - type: integer - default: 50 - - in: query - name: fields - description: Comma-separated fields that should be included in each returned notification. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in each returned notification. - schema: - type: string - - in: query - name: event_name - description: Filter by the name of the event that triggered sending this notification. - schema: - type: string - - in: query - name: resource_type - description: Filter by the resource type. - schema: - type: string - - in: query - name: resource_id - description: Filter by the resource ID. - schema: - type: string - - in: query - name: to - description: Filter by the address that the Notification was sent to. This will usually be an email address, but it can also represent other addresses such as a chat bot user id. - schema: - type: string - - in: query - name: include_resends - description: A boolean indicating whether the result set should include resent notifications or not - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetNotificationsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.notifications.list() - .then(({ notifications }) => { - console.log(notifications.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminNotifications } from "medusa-react" - - const Notifications = () => { - const { notifications, isLoading } = useAdminNotifications() - - return ( -
- {isLoading && Loading...} - {notifications && !notifications.length && ( - No Notifications - )} - {notifications && notifications.length > 0 && ( -
    - {notifications.map((notification) => ( -
  • {notification.to}
  • - ))} -
- )} -
- ) - } - - export default Notifications - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/notifications' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notifications - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminNotificationsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/notifications/{id}/resend: - post: - operationId: PostNotificationsNotificationResend - summary: Resend Notification - description: Resend a previously sent notifications, with the same data but optionally to a different address. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Notification - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostNotificationsNotificationResendReq' - x-codegen: - method: resend - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.notifications.resend(notificationId) - .then(({ notification }) => { - console.log(notification.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminResendNotification } from "medusa-react" - - type Props = { - notificationId: string - } - - const Notification = ({ notificationId }: Props) => { - const resendNotification = useAdminResendNotification( - notificationId - ) - // ... - - const handleResend = () => { - resendNotification.mutate({}, { - onSuccess: ({ notification }) => { - console.log(notification.id) - } - }) - } - - // ... - } - - export default Notification - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/notifications/{id}/resend' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notifications - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminNotificationsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/order-edits: - get: - operationId: GetOrderEdits - summary: List Order Edits - description: Retrieve a list of order edits. The order edits can be filtered by fields such as `q` or `order_id`. The order edits can also be paginated. - x-authenticated: true - parameters: - - in: query - name: q - description: term to search order edits' internal note. - schema: - type: string - - in: query - name: order_id - description: Filter by order ID - schema: - type: string - - in: query - name: limit - description: Limit the number of order edits returned. - schema: - type: number - default: '20' - - in: query - name: offset - description: The number of order edits to skip when retrieving the order edits. - schema: - type: number - default: '0' - - in: query - name: expand - description: Comma-separated relations that should be expanded in each returned order edit. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in each returned order edit. - schema: - type: string - x-codegen: - method: list - queryParams: GetOrderEditsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.list() - .then(({ order_edits, count, limit, offset }) => { - console.log(order_edits.length) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminOrderEdits } from "medusa-react" - - const OrderEdits = () => { - const { order_edits, isLoading } = useAdminOrderEdits() - - return ( -
- {isLoading && Loading...} - {order_edits && !order_edits.length && ( - No Order Edits - )} - {order_edits && order_edits.length > 0 && ( -
    - {order_edits.map((orderEdit) => ( -
  • - {orderEdit.status} -
  • - ))} -
- )} -
- ) - } - - export default OrderEdits - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/order-edits' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostOrderEdits - summary: Create an OrderEdit - description: Create an Order Edit. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrderEditsReq' - x-authenticated: true - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.create({ orderId }) - .then(({ order_edit }) => { - console.log(order_edit.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateOrderEdit } from "medusa-react" - - const CreateOrderEdit = () => { - const createOrderEdit = useAdminCreateOrderEdit() - - const handleCreateOrderEdit = (orderId: string) => { - createOrderEdit.mutate({ - order_id: orderId, - }, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.id) - } - }) - } - - // ... - } - - export default CreateOrderEdit - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/order-edits' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ "order_id": "my_order_id", "internal_note": "my_optional_note" }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/order-edits/{id}: - get: - operationId: GetOrderEditsOrderEdit - summary: Get an Order Edit - description: Retrieve an Order Edit's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the OrderEdit. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in each returned order edit. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order edit. - schema: - type: string - x-codegen: - method: retrieve - queryParams: GetOrderEditsOrderEditParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.retrieve(orderEditId) - .then(({ order_edit }) => { - console.log(order_edit.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminOrderEdit } from "medusa-react" - - type Props = { - orderEditId: string - } - - const OrderEdit = ({ orderEditId }: Props) => { - const { - order_edit, - isLoading, - } = useAdminOrderEdit(orderEditId) - - return ( -
- {isLoading && Loading...} - {order_edit && {order_edit.status}} -
- ) - } - - export default OrderEdit - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/order-edits/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostOrderEditsOrderEdit - summary: Update an Order Edit - description: Update an Order Edit's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the OrderEdit. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrderEditsOrderEditReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.update(orderEditId, { - internal_note: "internal reason XY" - }) - .then(({ order_edit }) => { - console.log(order_edit.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateOrderEdit } from "medusa-react" - - type Props = { - orderEditId: string - } - - const OrderEdit = ({ orderEditId }: Props) => { - const updateOrderEdit = useAdminUpdateOrderEdit( - orderEditId, - ) - - const handleUpdate = ( - internalNote: string - ) => { - updateOrderEdit.mutate({ - internal_note: internalNote - }, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.internal_note) - } - }) - } - - // ... - } - - export default OrderEdit - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/order-edits/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "internal_note": "internal reason XY" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteOrderEditsOrderEdit - summary: Delete an Order Edit - description: Delete an Order Edit. Only order edits that have the status `created` can be deleted. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit to delete. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.delete(orderEditId) - .then(({ id, object, deleted }) => { - console.log(id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteOrderEdit } from "medusa-react" - - type Props = { - orderEditId: string - } - - const OrderEdit = ({ orderEditId }: Props) => { - const deleteOrderEdit = useAdminDeleteOrderEdit( - orderEditId - ) - - const handleDelete = () => { - deleteOrderEdit.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default OrderEdit - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/order-edits/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditDeleteRes' - '400': - $ref: '#/components/responses/400_error' - /admin/order-edits/{id}/cancel: - post: - operationId: PostOrderEditsOrderEditCancel - summary: Cancel an Order Edit - description: Cancel an Order Edit. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the OrderEdit. - schema: - type: string - x-codegen: - method: cancel - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.cancel(orderEditId) - .then(({ order_edit }) => { - console.log(order_edit.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminCancelOrderEdit - } from "medusa-react" - - type Props = { - orderEditId: string - } - - const OrderEdit = ({ orderEditId }: Props) => { - const cancelOrderEdit = - useAdminCancelOrderEdit( - orderEditId - ) - - const handleCancel = () => { - cancelOrderEdit.mutate(void 0, { - onSuccess: ({ order_edit }) => { - console.log( - order_edit.id - ) - } - }) - } - - // ... - } - - export default OrderEdit - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/order-edits/{id}/cancel' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '500': - $ref: '#/components/responses/500_error' - /admin/order-edits/{id}/changes/{change_id}: - delete: - operationId: DeleteOrderEditsOrderEditItemChange - summary: Delete a Line Item Change - description: Delete a line item change that indicates the addition, deletion, or update of a line item in the original order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - - in: path - name: change_id - required: true - description: The ID of the Line Item Change to delete. - schema: - type: string - x-codegen: - method: deleteItemChange - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.deleteItemChange(orderEdit_id, itemChangeId) - .then(({ id, object, deleted }) => { - console.log(id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteOrderEditItemChange } from "medusa-react" - - type Props = { - orderEditId: string - itemChangeId: string - } - - const OrderEditItemChange = ({ - orderEditId, - itemChangeId - }: Props) => { - const deleteItemChange = useAdminDeleteOrderEditItemChange( - orderEditId, - itemChangeId - ) - - const handleDeleteItemChange = () => { - deleteItemChange.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default OrderEditItemChange - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/order-edits/{id}/changes/{change_id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditItemChangeDeleteRes' - '400': - $ref: '#/components/responses/400_error' - /admin/order-edits/{id}/confirm: - post: - operationId: PostOrderEditsOrderEditConfirm - summary: Confirm an OrderEdit - description: Confirm an Order Edit. This will reflect the changes in the order edit on the associated order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the order edit. - schema: - type: string - x-codegen: - method: confirm - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.confirm(orderEditId) - .then(({ order_edit }) => { - console.log(order_edit.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminConfirmOrderEdit } from "medusa-react" - - type Props = { - orderEditId: string - } - - const OrderEdit = ({ orderEditId }: Props) => { - const confirmOrderEdit = useAdminConfirmOrderEdit( - orderEditId - ) - - const handleConfirmOrderEdit = () => { - confirmOrderEdit.mutate(void 0, { - onSuccess: ({ order_edit }) => { - console.log( - order_edit.confirmed_at, - order_edit.confirmed_by - ) - } - }) - } - - // ... - } - - export default OrderEdit - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/order-edits/{id}/confirm' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '500': - $ref: '#/components/responses/500_error' - /admin/order-edits/{id}/items: - post: - operationId: PostOrderEditsEditLineItems - summary: Add a Line Item - description: Create a line item change in the order edit that indicates adding an item in the original order. The item will not be added to the original order until the order edit is confirmed. - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrderEditsEditLineItemsReq' - x-authenticated: true - x-codegen: - method: addLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.addLineItem(orderEditId, { - variant_id, - quantity - }) - .then(({ order_edit }) => { - console.log(order_edit.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminOrderEditAddLineItem } from "medusa-react" - - type Props = { - orderEditId: string - } - - const OrderEdit = ({ orderEditId }: Props) => { - const addLineItem = useAdminOrderEditAddLineItem( - orderEditId - ) - - const handleAddLineItem = - (quantity: number, variantId: string) => { - addLineItem.mutate({ - quantity, - variant_id: variantId, - }, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.changes) - } - }) - } - - // ... - } - - export default OrderEdit - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/order-edits/{id}/items' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ "variant_id": "variant_01G1G5V2MRX2V3PVSR2WXYPFB6", "quantity": 3 }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/order-edits/{id}/items/{item_id}: - post: - operationId: PostOrderEditsEditLineItemsLineItem - summary: Upsert Line Item Change - description: Create or update a line item change in the order edit that indicates addition, deletion, or update of a line item into an original order. Line item changes are only reflected on the original order after the order edit is confirmed. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - - in: path - name: item_id - required: true - description: The ID of the line item in the original order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrderEditsEditLineItemsLineItemReq' - x-codegen: - method: updateLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.updateLineItem(orderEditId, lineItemId, { - quantity: 5 - }) - .then(({ order_edit }) => { - console.log(order_edit.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminOrderEditUpdateLineItem } from "medusa-react" - - type Props = { - orderEditId: string - itemId: string - } - - const OrderEditItemChange = ({ - orderEditId, - itemId - }: Props) => { - const updateLineItem = useAdminOrderEditUpdateLineItem( - orderEditId, - itemId - ) - - const handleUpdateLineItem = (quantity: number) => { - updateLineItem.mutate({ - quantity, - }, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.items) - } - }) - } - - // ... - } - - export default OrderEditItemChange - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/order-edits/{id}/items/{item_id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ "quantity": 5 }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteOrderEditsOrderEditLineItemsLineItem - summary: Delete Line Item - description: Create a line item change in the order edit that indicates deleting an item in the original order. The item in the original order will not be deleted until the order edit is confirmed. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - - in: path - name: item_id - required: true - description: The ID of line item in the original order. - schema: - type: string - x-codegen: - method: removeLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.removeLineItem(orderEditId, lineItemId) - .then(({ order_edit }) => { - console.log(order_edit.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminOrderEditDeleteLineItem } from "medusa-react" - - type Props = { - orderEditId: string - itemId: string - } - - const OrderEditLineItem = ({ - orderEditId, - itemId - }: Props) => { - const removeLineItem = useAdminOrderEditDeleteLineItem( - orderEditId, - itemId - ) - - const handleRemoveLineItem = () => { - removeLineItem.mutate(void 0, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.changes) - } - }) - } - - // ... - } - - export default OrderEditLineItem - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/order-edits/{id}/items/{item_id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/order-edits/{id}/request: - post: - operationId: PostOrderEditsOrderEditRequest - summary: Request Confirmation - description: Request customer confirmation of an Order Edit. This would emit the event `order-edit.requested` which Notification Providers listen to and send a notification to the customer about the order edit. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - x-codegen: - method: requestConfirmation - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orderEdits.requestConfirmation(orderEditId) - .then({ order_edit }) => { - console.log(order_edit.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminRequestOrderEditConfirmation, - } from "medusa-react" - - type Props = { - orderEditId: string - } - - const OrderEdit = ({ orderEditId }: Props) => { - const requestOrderConfirmation = - useAdminRequestOrderEditConfirmation( - orderEditId - ) - - const handleRequestConfirmation = () => { - requestOrderConfirmation.mutate(void 0, { - onSuccess: ({ order_edit }) => { - console.log( - order_edit.requested_at, - order_edit.requested_by - ) - } - }) - } - - // ... - } - - export default OrderEdit - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/order-edits/{id}/request' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders: - get: - operationId: GetOrders - summary: List Orders - description: Retrieve a list of Orders. The orders can be filtered by fields such as `status` or `display_id`. The order can also be paginated. - x-authenticated: true - parameters: - - in: query - name: q - description: term to search orders' shipping address, first name, email, and display ID - schema: - type: string - - in: query - name: id - description: Filter by ID. - schema: - type: string - - in: query - name: status - style: form - explode: false - description: Filter by status - schema: - type: array - items: - type: string - enum: - - pending - - completed - - archived - - canceled - - requires_action - - in: query - name: fulfillment_status - style: form - explode: false - description: Filter by fulfillment status - schema: - type: array - items: - type: string - enum: - - not_fulfilled - - fulfilled - - partially_fulfilled - - shipped - - partially_shipped - - canceled - - returned - - partially_returned - - requires_action - - in: query - name: payment_status - style: form - explode: false - description: Filter by payment status - schema: - type: array - items: - type: string - enum: - - captured - - awaiting - - not_paid - - refunded - - partially_refunded - - canceled - - requires_action - - in: query - name: display_id - description: Filter by display ID - schema: - type: string - - in: query - name: cart_id - description: Filter by cart ID - schema: - type: string - - in: query - name: customer_id - description: Filter by customer ID - schema: - type: string - - in: query - name: email - description: Filter by email - schema: - type: string - - in: query - name: region_id - style: form - explode: false - description: Filter by region IDs. - schema: - oneOf: - - type: string - description: ID of a Region. - - type: array - items: - type: string - description: ID of a Region. - - in: query - name: currency_code - style: form - explode: false - description: Filter by currency codes. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - - in: query - name: tax_rate - description: Filter by tax rate. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: canceled_at - description: Filter by a cancelation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: sales_channel_id - style: form - explode: false - description: Filter by Sales Channel IDs - schema: - type: array - items: - type: string - description: The ID of a Sales Channel - - in: query - name: offset - description: The number of orders to skip when retrieving the orders. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of orders returned. - schema: - type: integer - default: 50 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - - in: query - name: order - description: Field to sort retrieved orders by. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetOrdersParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.list() - .then(({ orders, limit, offset, count }) => { - console.log(orders.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminOrders } from "medusa-react" - - const Orders = () => { - const { orders, isLoading } = useAdminOrders() - - return ( -
- {isLoading && Loading...} - {orders && !orders.length && No Orders} - {orders && orders.length > 0 && ( -
    - {orders.map((order) => ( -
  • {order.display_id}
  • - ))} -
- )} -
- ) - } - - export default Orders - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/orders' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}: - get: - operationId: GetOrdersOrder - summary: Get an Order - description: Retrieve an Order's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetOrdersOrderParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.retrieve(orderId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminOrder } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const { - order, - isLoading, - } = useAdminOrder(orderId) - - return ( -
- {isLoading && Loading...} - {order && {order.display_id}} - -
- ) - } - - export default Order - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/orders/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostOrdersOrder - summary: Update an Order - description: Update and order's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderReq' - x-codegen: - method: update - params: AdminPostOrdersOrderParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.update(orderId, { - email: "user@example.com" - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateOrder } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const updateOrder = useAdminUpdateOrder( - orderId - ) - - const handleUpdate = ( - email: string - ) => { - updateOrder.mutate({ - email, - }, { - onSuccess: ({ order }) => { - console.log(order.email) - } - }) - } - - // ... - } - - export default Order - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/adasda' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/archive: - post: - operationId: PostOrdersOrderArchive - summary: Archive Order - description: Archive an order and change its status. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: archive - params: AdminPostOrdersOrderArchiveParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.archive(orderId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminArchiveOrder } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const archiveOrder = useAdminArchiveOrder( - orderId - ) - // ... - - const handleArchivingOrder = () => { - archiveOrder.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.status) - } - }) - } - - // ... - } - - export default Order - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/archive' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/cancel: - post: - operationId: PostOrdersOrderCancel - summary: Cancel an Order - description: Cancel an order and change its status. This will also cancel any associated Fulfillments and Payments, and it may fail if the Payment or Fulfillment Provider is unable to cancel the Payment/Fulfillment. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancel - params: AdminPostOrdersOrderCancel - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.cancel(orderId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCancelOrder } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const cancelOrder = useAdminCancelOrder( - orderId - ) - // ... - - const handleCancel = () => { - cancelOrder.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.status) - } - }) - } - - // ... - } - - export default Order - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/cancel' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/capture: - post: - operationId: PostOrdersOrderCapture - summary: Capture an Order's Payments - description: Capture all the Payments associated with an Order. The payment of canceled orders can't be captured. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: capturePayment - params: AdminPostOrdersOrderCaptureParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.capturePayment(orderId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCapturePayment } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const capturePayment = useAdminCapturePayment( - orderId - ) - // ... - - const handleCapture = () => { - capturePayment.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.status) - } - }) - } - - // ... - } - - export default Order - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/capture' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/claims: - post: - operationId: PostOrdersOrderClaims - summary: Create a Claim - description: Create a Claim for an order. If a return shipping method is specified, a return will also be created and associated with the claim. If the claim's type is `refund`, the refund is processed as well. - externalDocs: - description: How are claims created - url: https://docs.medusajs.com/modules/orders/claims#how-are-claims-created - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderClaimsReq' - x-codegen: - method: createClaim - params: AdminPostOrdersOrderClaimsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.createClaim(orderId, { - type: 'refund', - claim_items: [ - { - item_id, - quantity: 1 - } - ] - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateClaim } from "medusa-react" - - type Props = { - orderId: string - } - - const CreateClaim = ({ orderId }: Props) => { - - const CreateClaim = (orderId: string) => { - const createClaim = useAdminCreateClaim(orderId) - // ... - - const handleCreate = (itemId: string) => { - createClaim.mutate({ - type: "refund", - claim_items: [ - { - item_id: itemId, - quantity: 1, - }, - ], - }, { - onSuccess: ({ order }) => { - console.log(order.claims) - } - }) - } - - // ... - } - - export default CreateClaim - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/claims' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "type": "refund", - "claim_items": [ - { - "item_id": "asdsd", - "quantity": 1 - } - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/claims/{claim_id}: - post: - operationId: PostOrdersOrderClaimsClaim - summary: Update a Claim - description: Update a Claim's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order associated with the claim. - schema: - type: string - - in: path - name: claim_id - required: true - description: The ID of the Claim. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderClaimsClaimReq' - x-codegen: - method: updateClaim - params: AdminPostOrdersOrderClaimsClaimParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.updateClaim(orderId, claimId, { - no_notification: true - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateClaim } from "medusa-react" - - type Props = { - orderId: string - claimId: string - } - - const Claim = ({ orderId, claimId }: Props) => { - const updateClaim = useAdminUpdateClaim(orderId) - // ... - - const handleUpdate = () => { - updateClaim.mutate({ - claim_id: claimId, - no_notification: false - }, { - onSuccess: ({ order }) => { - console.log(order.claims) - } - }) - } - - // ... - } - - export default Claim - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/claims/{claim_id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "no_notification": true - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/claims/{claim_id}/cancel: - post: - operationId: PostOrdersClaimCancel - summary: Cancel a Claim - description: Cancel a Claim and change its status. A claim can't be canceled if it has a refund, if its fulfillments haven't been canceled, of if its associated return hasn't been canceled. - x-authenticated: true - externalDocs: - description: Canceling a claim - url: https://docs.medusajs.com/modules/orders/claims#cancel-a-claim - parameters: - - in: path - name: id - required: true - description: The ID of the order the claim is associated with. - schema: - type: string - - in: path - name: claim_id - required: true - description: The ID of the Claim. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancelClaim - params: AdminPostOrdersClaimCancel - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.cancelClaim(orderId, claimId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCancelClaim } from "medusa-react" - - type Props = { - orderId: string - claimId: string - } - - const Claim = ({ orderId, claimId }: Props) => { - const cancelClaim = useAdminCancelClaim(orderId) - // ... - - const handleCancel = () => { - cancelClaim.mutate(claimId) - } - - // ... - } - - export default Claim - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/claims/{claim_id}/cancel' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/claims/{claim_id}/fulfillments: - post: - operationId: PostOrdersOrderClaimsClaimFulfillments - summary: Create a Claim Fulfillment - description: Create a Fulfillment for a Claim, and change its fulfillment status to `partially_fulfilled` or `fulfilled` depending on whether all the items were fulfilled. It may also change the status to `requires_action` if any actions are required. - x-authenticated: true - externalDocs: - description: Fulfill a claim - url: https://docs.medusajs.com/modules/orders/claims#fulfill-a-claim - parameters: - - in: path - name: id - required: true - description: The ID of the Order the claim is associated with. - schema: - type: string - - in: path - name: claim_id - required: true - description: The ID of the Claim. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderClaimsClaimFulfillmentsReq' - x-codegen: - method: fulfillClaim - params: AdminPostOrdersOrderClaimsClaimFulfillmentsReq - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.fulfillClaim(orderId, claimId, { - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminFulfillClaim } from "medusa-react" - - type Props = { - orderId: string - claimId: string - } - - const Claim = ({ orderId, claimId }: Props) => { - const fulfillClaim = useAdminFulfillClaim(orderId) - // ... - - const handleFulfill = () => { - fulfillClaim.mutate({ - claim_id: claimId, - }, { - onSuccess: ({ order }) => { - console.log(order.claims) - } - }) - } - - // ... - } - - export default Claim - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/claims/{claim_id}/fulfillments' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/claims/{claim_id}/fulfillments/{fulfillment_id}/cancel: - post: - operationId: PostOrdersClaimFulfillmentsCancel - summary: Cancel Claim's Fulfillment - description: Cancel a claim's fulfillment and change its fulfillment status to `canceled`. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the order the claim is associated with. - schema: - type: string - - in: path - name: claim_id - required: true - description: The ID of the claim. - schema: - type: string - - in: path - name: fulfillment_id - required: true - description: The ID of the fulfillment. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancelClaimFulfillment - params: AdminPostOrdersClaimFulfillmentsCancelParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.cancelClaimFulfillment(orderId, claimId, fulfillmentId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCancelClaimFulfillment } from "medusa-react" - - type Props = { - orderId: string - claimId: string - } - - const Claim = ({ orderId, claimId }: Props) => { - const cancelFulfillment = useAdminCancelClaimFulfillment( - orderId - ) - // ... - - const handleCancel = (fulfillmentId: string) => { - cancelFulfillment.mutate({ - claim_id: claimId, - fulfillment_id: fulfillmentId, - }, { - onSuccess: ({ order }) => { - console.log(order.claims) - } - }) - } - - // ... - } - - export default Claim - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/claims/{claim_id}/fulfillments/{fulfillment_id}/cancel' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/claims/{claim_id}/shipments: - post: - operationId: PostOrdersOrderClaimsClaimShipments - summary: Ship a Claim's Fulfillment - description: Create a shipment for the claim and mark its fulfillment as shipped. This changes the claim's fulfillment status to either `partially_shipped` or `shipped`, depending on whether all the items were shipped. - x-authenticated: true - externalDocs: - description: Fulfill a claim - url: https://docs.medusajs.com/modules/orders/claims#fulfill-a-claim - parameters: - - in: path - name: id - required: true - description: The ID of the Order the claim is associated with. - schema: - type: string - - in: path - name: claim_id - required: true - description: The ID of the Claim. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderClaimsClaimShipmentsReq' - x-codegen: - method: createClaimShipment - params: AdminPostOrdersOrderClaimsClaimShipmentsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.createClaimShipment(orderId, claimId, { - fulfillment_id - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateClaimShipment } from "medusa-react" - - type Props = { - orderId: string - claimId: string - } - - const Claim = ({ orderId, claimId }: Props) => { - const createShipment = useAdminCreateClaimShipment(orderId) - // ... - - const handleCreateShipment = (fulfillmentId: string) => { - createShipment.mutate({ - claim_id: claimId, - fulfillment_id: fulfillmentId, - }, { - onSuccess: ({ order }) => { - console.log(order.claims) - } - }) - } - - // ... - } - - export default Claim - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/claims/{claim_id}/shipments' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "fulfillment_id": "{fulfillment_id}" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/complete: - post: - operationId: PostOrdersOrderComplete - summary: Complete an Order - description: Complete an Order and change its status. A canceled order can't be completed. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: complete - params: AdminPostOrdersOrderCompleteParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.complete(orderId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCompleteOrder } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const completeOrder = useAdminCompleteOrder( - orderId - ) - // ... - - const handleComplete = () => { - completeOrder.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.status) - } - }) - } - - // ... - } - - export default Order - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/complete' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/fulfillment: - post: - operationId: PostOrdersOrderFulfillments - summary: Create a Fulfillment - description: Create a Fulfillment of an Order using the fulfillment provider, and change the order's fulfillment status to either `partially_fulfilled` or `fulfilled`, depending on whether all the items were fulfilled. - x-authenticated: true - externalDocs: - description: Fulfillments of orders - url: https://docs.medusajs.com/modules/orders/#fulfillments-in-orders - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderFulfillmentsReq' - x-codegen: - method: createFulfillment - params: AdminPostOrdersOrderFulfillmentsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.createFulfillment(orderId, { - items: [ - { - item_id, - quantity: 1 - } - ] - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateFulfillment } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const createFulfillment = useAdminCreateFulfillment( - orderId - ) - // ... - - const handleCreateFulfillment = ( - itemId: string, - quantity: number - ) => { - createFulfillment.mutate({ - items: [ - { - item_id: itemId, - quantity, - }, - ], - }, { - onSuccess: ({ order }) => { - console.log(order.fulfillments) - } - }) - } - - // ... - } - - export default Order - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/fulfillment' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "items": [ - { - "item_id": "{item_id}", - "quantity": 1 - } - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/fulfillments/{fulfillment_id}/cancel: - post: - operationId: PostOrdersOrderFulfillmentsCancel - summary: Cancel a Fulfilmment - description: Cancel an order's fulfillment and change its fulfillment status to `canceled`. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: path - name: fulfillment_id - required: true - description: The ID of the Fulfillment. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancelFulfillment - params: AdminPostOrdersOrderFulfillementsCancelParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.cancelFulfillment(orderId, fulfillmentId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCancelFulfillment } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const cancelFulfillment = useAdminCancelFulfillment( - orderId - ) - // ... - - const handleCancel = ( - fulfillmentId: string - ) => { - cancelFulfillment.mutate(fulfillmentId, { - onSuccess: ({ order }) => { - console.log(order.fulfillments) - } - }) - } - - // ... - } - - export default Order - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/fulfillments/{fulfillment_id}/cancel' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/line-items/{line_item_id}/reserve: - post: - operationId: PostOrdersOrderLineItemReservations - summary: Create a Reservation - description: Create a Reservation for a line item at a specified location, optionally for a partial quantity. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: path - name: line_item_id - required: true - description: The ID of the Line item. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersOrderLineItemReservationReq' - x-codeSamples: - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/line-items/{line_item_id}/reserve' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "location_id": "loc_1" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostReservationsReq' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/refund: - post: - operationId: PostOrdersOrderRefunds - summary: Create a Refund - description: Refund an amount for an order. The amount must be less than or equal the `refundable_amount` of the order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderRefundsReq' - x-codegen: - method: refundPayment - params: AdminPostOrdersOrderRefundsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.refundPayment(orderId, { - amount: 1000, - reason: "Do not like it" - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminRefundPayment } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const refundPayment = useAdminRefundPayment( - orderId - ) - // ... - - const handleRefund = ( - amount: number, - reason: string - ) => { - refundPayment.mutate({ - amount, - reason, - }, { - onSuccess: ({ order }) => { - console.log(order.refunds) - } - }) - } - - // ... - } - - export default Order - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/adasda/refund' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "amount": 1000, - "reason": "Do not like it" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/reservations: - get: - operationId: GetOrdersOrderReservations - summary: Get Order Reservations - description: Retrieve the list of reservations of an Order - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: offset - description: The number of reservations to skip when retrieving the reservations. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of reservations returned. - schema: - type: integer - default: 20 - x-codeSamples: - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/orders/{id}/reservations' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReservationsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/return: - post: - operationId: PostOrdersOrderReturns - summary: Request a Return - description: Request and create a Return for items in an order. If the return shipping method is specified, it will be automatically fulfilled. - x-authenticated: true - externalDocs: - description: Return creation process - url: https://docs.medusajs.com/modules/orders/returns#returns-process - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderReturnsReq' - x-codegen: - method: requestReturn - params: AdminPostOrdersOrderReturnsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.requestReturn(orderId, { - items: [ - { - item_id, - quantity: 1 - } - ] - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminRequestReturn } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const requestReturn = useAdminRequestReturn( - orderId - ) - // ... - - const handleRequestingReturn = ( - itemId: string, - quantity: number - ) => { - requestReturn.mutate({ - items: [ - { - item_id: itemId, - quantity - } - ] - }, { - onSuccess: ({ order }) => { - console.log(order.returns) - } - }) - } - - // ... - } - - export default Order - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/return' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "items": [ - { - "item_id": "{item_id}", - "quantity": 1 - } - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/shipment: - post: - operationId: PostOrdersOrderShipment - summary: Ship a Fulfillment - description: Create a shipment and mark a fulfillment as shipped. This changes the order's fulfillment status to either `partially_shipped` or `shipped`, depending on whether all the items were shipped. - x-authenticated: true - externalDocs: - description: Fulfillments of orders - url: https://docs.medusajs.com/modules/orders/#fulfillments-in-orders - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderShipmentReq' - x-codegen: - method: createShipment - params: AdminPostOrdersOrderShipmentParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.createShipment(order_id, { - fulfillment_id - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateShipment } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const createShipment = useAdminCreateShipment( - orderId - ) - // ... - - const handleCreate = ( - fulfillmentId: string - ) => { - createShipment.mutate({ - fulfillment_id: fulfillmentId, - }, { - onSuccess: ({ order }) => { - console.log(order.fulfillment_status) - } - }) - } - - // ... - } - - export default Order - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/shipment' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "fulfillment_id": "{fulfillment_id}" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/shipping-methods: - post: - operationId: PostOrdersOrderShippingMethods - summary: Add a Shipping Method - description: Add a Shipping Method to an Order. If another Shipping Method exists with the same Shipping Profile, the previous Shipping Method will be replaced. - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderShippingMethodsReq' - x-authenticated: true - x-codegen: - method: addShippingMethod - params: AdminPostOrdersOrderShippingMethodsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.addShippingMethod(orderId, { - price: 1000, - option_id - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminAddShippingMethod } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const addShippingMethod = useAdminAddShippingMethod( - orderId - ) - // ... - - const handleAddShippingMethod = ( - optionId: string, - price: number - ) => { - addShippingMethod.mutate({ - option_id: optionId, - price - }, { - onSuccess: ({ order }) => { - console.log(order.shipping_methods) - } - }) - } - - // ... - } - - export default Order - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/shipping-methods' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "price": 1000, - "option_id": "{option_id}" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/swaps: - post: - operationId: PostOrdersOrderSwaps - summary: Create a Swap - description: Create a Swap. This includes creating a return that is associated with the swap. - x-authenticated: true - externalDocs: - description: How are swaps created - url: https://docs.medusajs.com/modules/orders/swaps#how-are-swaps-created - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderSwapsReq' - x-codegen: - method: createSwap - queryParams: AdminPostOrdersOrderSwapsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.createSwap(orderId, { - return_items: [ - { - item_id, - quantity: 1 - } - ] - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateSwap } from "medusa-react" - - type Props = { - orderId: string - } - - const CreateSwap = ({ orderId }: Props) => { - const createSwap = useAdminCreateSwap(orderId) - // ... - - const handleCreate = ( - returnItems: { - item_id: string, - quantity: number - }[] - ) => { - createSwap.mutate({ - return_items: returnItems - }, { - onSuccess: ({ order }) => { - console.log(order.swaps) - } - }) - } - - // ... - } - - export default CreateSwap - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/swaps' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "return_items": [ - { - "item_id": "asfasf", - "quantity": 1 - } - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/swaps/{swap_id}/cancel: - post: - operationId: PostOrdersSwapCancel - summary: Cancel a Swap - description: Cancel a Swap and change its status. - x-authenticated: true - externalDocs: - description: Canceling a swap - url: https://docs.medusajs.com/modules/orders/swaps#canceling-a-swap - parameters: - - in: path - name: id - required: true - description: The ID of the Order the swap is associated with. - schema: - type: string - - in: path - name: swap_id - required: true - description: The ID of the Swap. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancelSwap - params: AdminPostOrdersSwapCancelParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.cancelSwap(orderId, swapId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCancelSwap } from "medusa-react" - - type Props = { - orderId: string, - swapId: string - } - - const Swap = ({ - orderId, - swapId - }: Props) => { - const cancelSwap = useAdminCancelSwap( - orderId - ) - // ... - - const handleCancel = () => { - cancelSwap.mutate(swapId, { - onSuccess: ({ order }) => { - console.log(order.swaps) - } - }) - } - - // ... - } - - export default Swap - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{order_id}/swaps/{swap_id}/cancel' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/swaps/{swap_id}/fulfillments: - post: - operationId: PostOrdersOrderSwapsSwapFulfillments - summary: Create a Swap Fulfillment - description: Create a Fulfillment for a Swap and change its fulfillment status to `fulfilled`. If it requires any additional actions, its fulfillment status may change to `requires_action`. - x-authenticated: true - externalDocs: - description: Handling a swap's fulfillment - url: https://docs.medusajs.com/modules/orders/swaps#handling-swap-fulfillment - parameters: - - in: path - name: id - required: true - description: The ID of the Order the swap is associated with. - schema: - type: string - - in: path - name: swap_id - required: true - description: The ID of the Swap. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderSwapsSwapFulfillmentsReq' - x-codegen: - method: fulfillSwap - params: AdminPostOrdersOrderSwapsSwapFulfillmentsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.fulfillSwap(orderId, swapId, { - - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminFulfillSwap } from "medusa-react" - - type Props = { - orderId: string, - swapId: string - } - - const Swap = ({ - orderId, - swapId - }: Props) => { - const fulfillSwap = useAdminFulfillSwap( - orderId - ) - // ... - - const handleFulfill = () => { - fulfillSwap.mutate({ - swap_id: swapId, - }, { - onSuccess: ({ order }) => { - console.log(order.swaps) - } - }) - } - - // ... - } - - export default Swap - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/swaps/{swap_id}/fulfillments' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/swaps/{swap_id}/fulfillments/{fulfillment_id}/cancel: - post: - operationId: PostOrdersSwapFulfillmentsCancel - summary: Cancel Swap's Fulfilmment - description: Cancel a swap's fulfillment and change its fulfillment status to `canceled`. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the order the swap is associated with. - schema: - type: string - - in: path - name: swap_id - required: true - description: The ID of the swap. - schema: - type: string - - in: path - name: fulfillment_id - required: true - description: The ID of the fulfillment. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancelSwapFulfillment - params: AdminPostOrdersSwapFulfillementsCancelParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.cancelSwapFulfillment(orderId, swapId, fulfillmentId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCancelSwapFulfillment } from "medusa-react" - - type Props = { - orderId: string, - swapId: string - } - - const Swap = ({ - orderId, - swapId - }: Props) => { - const cancelFulfillment = useAdminCancelSwapFulfillment( - orderId - ) - // ... - - const handleCancelFulfillment = ( - fulfillmentId: string - ) => { - cancelFulfillment.mutate({ - swap_id: swapId, - fulfillment_id: fulfillmentId, - }) - } - - // ... - } - - export default Swap - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/swaps/{swap_id}/fulfillments/{fulfillment_id}/cancel' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/swaps/{swap_id}/process-payment: - post: - operationId: PostOrdersOrderSwapsSwapProcessPayment - summary: Process a Swap Payment - description: Process a swap's payment either by refunding or issuing a payment. This depends on the `difference_due` of the swap. If `difference_due` is negative, the amount is refunded. If `difference_due` is positive, the amount is captured. - x-authenticated: true - externalDocs: - description: Handling a swap's payment - url: https://docs.medusajs.com/modules/orders/swaps#handling-swap-payment - parameters: - - in: path - name: id - required: true - description: The ID of the order the swap is associated with. - schema: - type: string - - in: path - name: swap_id - required: true - description: The ID of the swap. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: processSwapPayment - params: AdminPostOrdersOrderSwapsSwapProcessPaymentParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.processSwapPayment(orderId, swapId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminProcessSwapPayment } from "medusa-react" - - type Props = { - orderId: string, - swapId: string - } - - const Swap = ({ - orderId, - swapId - }: Props) => { - const processPayment = useAdminProcessSwapPayment( - orderId - ) - // ... - - const handleProcessPayment = () => { - processPayment.mutate(swapId, { - onSuccess: ({ order }) => { - console.log(order.swaps) - } - }) - } - - // ... - } - - export default Swap - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/swaps/{swap_id}/process-payment' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/orders/{id}/swaps/{swap_id}/shipments: - post: - operationId: PostOrdersOrderSwapsSwapShipments - summary: Ship a Swap's Fulfillment - description: Create a shipment for a swap and mark its fulfillment as shipped. This changes the swap's fulfillment status to either `partially_shipped` or `shipped`, depending on whether all the items were shipped. - x-authenticated: true - externalDocs: - description: Handling swap fulfillments - url: https://docs.medusajs.com/modules/orders/swaps#handling-swap-fulfillment - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: path - name: swap_id - required: true - description: The ID of the Swap. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostOrdersOrderSwapsSwapShipmentsReq' - x-codegen: - method: createSwapShipment - params: AdminPostOrdersOrderSwapsSwapShipmentsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.orders.createSwapShipment(orderId, swapId, { - fulfillment_id - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateSwapShipment } from "medusa-react" - - type Props = { - orderId: string, - swapId: string - } - - const Swap = ({ - orderId, - swapId - }: Props) => { - const createShipment = useAdminCreateSwapShipment( - orderId - ) - // ... - - const handleCreateShipment = ( - fulfillmentId: string - ) => { - createShipment.mutate({ - swap_id: swapId, - fulfillment_id: fulfillmentId, - }, { - onSuccess: ({ order }) => { - console.log(order.swaps) - } - }) - } - - // ... - } - - export default Swap - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/orders/{id}/swaps/{swap_id}/shipments' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "fulfillment_id": "{fulfillment_id}" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/payment-collections/{id}: - get: - operationId: GetPaymentCollectionsPaymentCollection - summary: Get a Payment Collection - description: Retrieve a Payment Collection's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned payment collection. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned payment collection. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetPaymentCollectionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.paymentCollections.retrieve(paymentCollectionId) - .then(({ payment_collection }) => { - console.log(payment_collection.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminPaymentCollection } from "medusa-react" - - type Props = { - paymentCollectionId: string - } - - const PaymentCollection = ({ paymentCollectionId }: Props) => { - const { - payment_collection, - isLoading, - } = useAdminPaymentCollection(paymentCollectionId) - - return ( -
- {isLoading && Loading...} - {payment_collection && ( - {payment_collection.status} - )} - -
- ) - } - - export default PaymentCollection - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/payment-collections/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPaymentCollectionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostPaymentCollectionsPaymentCollection - summary: Update Payment Collection - description: Update a Payment Collection's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminUpdatePaymentCollectionsReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.paymentCollections.update(paymentCollectionId, { - description - }) - .then(({ payment_collection }) => { - console.log(payment_collection.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdatePaymentCollection } from "medusa-react" - - type Props = { - paymentCollectionId: string - } - - const PaymentCollection = ({ paymentCollectionId }: Props) => { - const updateCollection = useAdminUpdatePaymentCollection( - paymentCollectionId - ) - // ... - - const handleUpdate = ( - description: string - ) => { - updateCollection.mutate({ - description - }, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.description) - } - }) - } - - // ... - } - - export default PaymentCollection - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/payment-collections/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "description": "Description of payment collection" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPaymentCollectionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeletePaymentCollectionsPaymentCollection - summary: Delete a Payment Collection - description: Delete a Payment Collection. Only payment collections with the statuses `canceled` or `not_paid` can be deleted. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.paymentCollections.delete(paymentCollectionId) - .then(({ id, object, deleted }) => { - console.log(id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeletePaymentCollection } from "medusa-react" - - type Props = { - paymentCollectionId: string - } - - const PaymentCollection = ({ paymentCollectionId }: Props) => { - const deleteCollection = useAdminDeletePaymentCollection( - paymentCollectionId - ) - // ... - - const handleDelete = () => { - deleteCollection.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default PaymentCollection - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/payment-collections/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPaymentCollectionDeleteRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - /admin/payment-collections/{id}/authorize: - post: - operationId: PostPaymentCollectionsPaymentCollectionAuthorize - summary: Mark Authorized - description: Set the status of a Payment Collection as `authorized`. This will also change the `authorized_amount` of the payment collection. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - x-codegen: - method: markAsAuthorized - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.paymentCollections.markAsAuthorized(paymentCollectionId) - .then(({ payment_collection }) => { - console.log(payment_collection.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminMarkPaymentCollectionAsAuthorized } from "medusa-react" - - type Props = { - paymentCollectionId: string - } - - const PaymentCollection = ({ paymentCollectionId }: Props) => { - const markAsAuthorized = useAdminMarkPaymentCollectionAsAuthorized( - paymentCollectionId - ) - // ... - - const handleAuthorization = () => { - markAsAuthorized.mutate(void 0, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.status) - } - }) - } - - // ... - } - - export default PaymentCollection - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/payment-collections/{id}/authorize' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPaymentCollectionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} /admin/payments/{id}: get: - operationId: GetPaymentsPayment - summary: Get Payment details - description: Retrieve a Payment's details. + operationId: GetPaymentsId + summary: Get a Payment + description: Retrieve a payment by its ID. You can expand the payment's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The payment's ID. required: true - description: The ID of the Payment. schema: type: string - x-codegen: - method: retrieve - queryParams: GetPaymentsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.payments.retrieve(paymentId) - .then(({ payment }) => { - console.log(payment.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminPayment } from "medusa-react" - - type Props = { - paymentId: string - } - - const Payment = ({ paymentId }: Props) => { - const { - payment, - isLoading, - } = useAdminPayment(paymentId) - - return ( -
- {isLoading && Loading...} - {payment && {payment.amount}} - -
- ) - } - - export default Payment - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/payments/{id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/payments/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Payments responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPaymentRes' '400': $ref: '#/components/responses/400_error' '401': @@ -13132,78 +2319,41 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/payments/{id}/capture: post: - operationId: PostPaymentsPaymentCapture - summary: Capture a Payment - description: Capture a Payment. + operationId: PostPaymentsIdCapture + summary: Add Captures to Payment + description: Add a list of captures to a payment. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The payment's ID. required: true - description: The ID of the Payment. schema: type: string - x-codegen: - method: capturePayment - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.payments.capturePayment(paymentId) - .then(({ payment }) => { - console.log(payment.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminPaymentsCapturePayment } from "medusa-react" - - type Props = { - paymentId: string - } - - const Payment = ({ paymentId }: Props) => { - const capture = useAdminPaymentsCapturePayment( - paymentId - ) - // ... - - const handleCapture = () => { - capture.mutate(void 0, { - onSuccess: ({ payment }) => { - console.log(payment.amount) - } - }) - } - - // ... - } - - export default Payment - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/payments/{id}/capture' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPaymentsCapturesReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/payments/{id}/capture' \ + -H 'x-medusa-access-token: {api_token}' tags: - Payments responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPaymentRes' '400': $ref: '#/components/responses/400_error' '401': @@ -13218,100 +2368,35 @@ paths: $ref: '#/components/responses/500_error' /admin/payments/{id}/refund: post: - operationId: PostPaymentsPaymentRefunds - summary: Refund Payment - description: Refund a payment. The payment must be captured first. + operationId: PostPaymentsIdRefund + summary: Add Refunds to Payment + description: Add a list of refunds to a payment. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The payment's ID. required: true - description: The ID of the Payment. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPaymentRefundsReq' - x-codegen: - method: refundPayment - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.payments.refundPayment(paymentId, { - amount: 1000, - reason: "return", - note: "Do not like it", - }) - .then(({ payment }) => { - console.log(payment.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { RefundReason } from "@medusajs/medusa" - import { useAdminPaymentsRefundPayment } from "medusa-react" - - type Props = { - paymentId: string - } - - const Payment = ({ paymentId }: Props) => { - const refund = useAdminPaymentsRefundPayment( - paymentId - ) - // ... - - const handleRefund = ( - amount: number, - reason: RefundReason, - note: string - ) => { - refund.mutate({ - amount, - reason, - note - }, { - onSuccess: ({ refund }) => { - console.log(refund.amount) - } - }) - } - - // ... - } - - export default Payment - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/payments/pay_123/refund' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "amount": 1000, - "reason": "return", - "note": "Do not like it" - }' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPaymentsRefundsReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/payments/{id}/refund' \ + -H 'x-medusa-access-token: {api_token}' tags: - Payments responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRefundRes' '400': $ref: '#/components/responses/400_error' '401': @@ -13328,209 +2413,22 @@ paths: get: operationId: GetPriceLists summary: List Price Lists - description: Retrieve a list of price lists. The price lists can be filtered by fields such as `q` or `status`. The price lists can also be sorted or paginated. + description: Retrieve a list of price lists. The price lists can be filtered by fields such as `id`. The price lists can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: limit - description: Limit the number of price lists returned. - schema: - type: number - default: '10' - - in: query - name: offset - description: The number of price lists to skip when retrieving the price lists. - schema: - type: number - default: '0' - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned price lists. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned price lists. - schema: - type: string - - in: query - name: order - description: A price-list field to sort-order the retrieved price lists by. - schema: - type: string - - in: query - name: id - description: Filter by ID - schema: - type: string - - in: query - name: q - description: term to search price lists' description, name, and customer group's name. - schema: - type: string - - in: query - name: status - style: form - explode: false - description: Filter by status. - schema: - type: array - items: - type: string - enum: - - active - - draft - - in: query - name: name - description: Filter by name - schema: - type: string - - in: query - name: customer_groups - style: form - explode: false - description: Filter by customer-group IDs. - schema: - type: array - items: - type: string - - in: query - name: type - style: form - explode: false - description: Filter by type. - schema: - type: array - items: - type: string - enum: - - sale - - override - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetPriceListPaginationParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.priceLists.list() - .then(({ price_lists, limit, offset, count }) => { - console.log(price_lists.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminPriceLists } from "medusa-react" - - const PriceLists = () => { - const { price_lists, isLoading } = useAdminPriceLists() - - return ( -
- {isLoading && Loading...} - {price_lists && !price_lists.length && ( - No Price Lists - )} - {price_lists && price_lists.length > 0 && ( -
    - {price_lists.map((price_list) => ( -
  • {price_list.name}
  • - ))} -
- )} -
- ) - } - - export default PriceLists - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/price-lists' \ - -H 'x-medusa-access-token: {api_token}' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/price-lists' \ + -H 'x-medusa-access-token: {api_token}' tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPriceListsListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -13543,113 +2441,46 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostPriceListsPriceList - summary: Create a Price List - description: Create a Price List. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostPriceListsPriceListReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - import { PriceListType } from "@medusajs/medusa" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.priceLists.create({ - name: "New Price List", - description: "A new price list", - type: PriceListType.SALE, - prices: [ - { - amount: 1000, - variant_id, - currency_code: "eur" - } - ] - }) - .then(({ price_list }) => { - console.log(price_list.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - PriceListStatus, - PriceListType, - } from "@medusajs/medusa" - import { useAdminCreatePriceList } from "medusa-react" - - type CreateData = { - name: string - description: string - type: PriceListType - status: PriceListStatus - prices: { - amount: number - variant_id: string - currency_code: string - max_quantity: number - }[] - } - - const CreatePriceList = () => { - const createPriceList = useAdminCreatePriceList() - // ... - - const handleCreate = ( - data: CreateData - ) => { - createPriceList.mutate(data, { - onSuccess: ({ price_list }) => { - console.log(price_list.id) - } - }) - } - - // ... - } - - export default CreatePriceList - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/price-lists' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "New Price List", - "description": "A new price list", - "type": "sale", - "prices": [ - { - "amount": 1000, - "variant_id": "afafa", - "currency_code": "eur" - } - ] - }' + schema: {} + post: + operationId: PostPriceLists + summary: Create Price List + description: Create a price list. + x-authenticated: true + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPriceListsReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/price-lists' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "title": "{value}", + "description": "{value}", + "prices": [ + { + "currency_code": "{value}", + "amount": 1270314195484672, + "variant_id": "{value}" + } + ] + }' tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPriceListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -13664,75 +2495,30 @@ paths: $ref: '#/components/responses/500_error' /admin/price-lists/{id}: get: - operationId: GetPriceListsPriceList + operationId: GetPriceListsId summary: Get a Price List - description: Retrieve a Price List's details. + description: Retrieve a price list by its ID. You can expand the price list's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The price list's ID. required: true - description: The ID of the Price List. schema: type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.priceLists.retrieve(priceListId) - .then(({ price_list }) => { - console.log(price_list.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminPriceList } from "medusa-react" - - type Props = { - priceListId: string - } - - const PriceList = ({ - priceListId - }: Props) => { - const { - price_list, - isLoading, - } = useAdminPriceList(priceListId) - - return ( -
- {isLoading && Loading...} - {price_list && {price_list.name}} -
- ) - } - - export default PriceList - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/price-lists/{id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/price-lists/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPriceListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -13745,92 +2531,50 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: - operationId: PostPriceListsPriceListPriceList + operationId: PostPriceListsId summary: Update a Price List - description: Update a Price List's details. + description: Update a price list's details. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The price list's ID. required: true - description: The ID of the Price List. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdminPostPriceListsPriceListPriceListReq' - x-codegen: - method: update + $ref: '#/components/schemas/AdminPostPriceListsPriceListReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.priceLists.update(priceListId, { - name: "New Price List" - }) - .then(({ price_list }) => { - console.log(price_list.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdatePriceList } from "medusa-react" - - type Props = { - priceListId: string - } - - const PriceList = ({ - priceListId - }: Props) => { - const updatePriceList = useAdminUpdatePriceList(priceListId) - // ... - - const handleUpdate = ( - endsAt: Date - ) => { - updatePriceList.mutate({ - ends_at: endsAt, - }, { - onSuccess: ({ price_list }) => { - console.log(price_list.ends_at) - } - }) - } - - // ... - } - - export default PriceList - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/price-lists/{id}' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "name": "New Price List" + "prices": [ + { + "currency_code": "{value}", + "amount": 1670236243755008, + "variant_id": "{value}" + } + ] }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPriceListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -13844,76 +2588,30 @@ paths: '500': $ref: '#/components/responses/500_error' delete: - operationId: DeletePriceListsPriceList + operationId: DeletePriceListsId summary: Delete a Price List - description: Delete a Price List and its associated prices. + description: Delete a price list. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The price list's ID. required: true - description: The ID of the Price List. schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.priceLists.delete(priceListId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeletePriceList } from "medusa-react" - - type Props = { - priceListId: string - } - - const PriceList = ({ - priceListId - }: Props) => { - const deletePriceList = useAdminDeletePriceList(priceListId) - // ... - - const handleDelete = () => { - deletePriceList.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default PriceList - lang: Shell label: cURL - source: | + source: |- curl -X DELETE '{backend_url}/admin/price-lists/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPriceListDeleteRes' '400': $ref: '#/components/responses/400_error' '401': @@ -13926,109 +2624,51 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/price-lists/{id}/prices/batch: + requestBody: + content: + application/json: + schema: {} + /admin/price-lists/{id}/prices/batch/add: post: - operationId: PostPriceListsPriceListPricesBatch - summary: Add or Update Prices - description: Add or update a list of prices in a Price List. + operationId: PostPriceListsIdPricesBatchAdd + summary: Add Adds to Price List + description: Add a list of adds to a price list. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The price list's ID. required: true - description: The ID of the Price List. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdminPostPriceListPricesPricesReq' - x-codegen: - method: addPrices + $ref: '#/components/schemas/AdminPostPriceListsPriceListPricesBatchAddReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.priceLists.addPrices(priceListId, { - prices: [ + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/price-lists/{id}/prices/batch/add' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "prices": [ { - amount: 1000, - variant_id, - currency_code: "eur" + "currency_code": "{value}", + "amount": 6595965345595392, + "variant_id": "{value}" } ] - }) - .then(({ price_list }) => { - console.log(price_list.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreatePriceListPrices } from "medusa-react" - - type PriceData = { - amount: number - variant_id: string - currency_code: string - } - - type Props = { - priceListId: string - } - - const PriceList = ({ - priceListId - }: Props) => { - const addPrices = useAdminCreatePriceListPrices(priceListId) - // ... - - const handleAddPrices = (prices: PriceData[]) => { - addPrices.mutate({ - prices - }, { - onSuccess: ({ price_list }) => { - console.log(price_list.prices) - } - }) - } - - // ... - } - - export default PriceList - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/price-lists/{id}/prices/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "prices": [ - { - "amount": 100, - "variant_id": "afasfa", - "currency_code": "eur" - } - ] }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPriceListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -14041,450 +2681,43 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - delete: - operationId: DeletePriceListsPriceListPricesBatch - summary: Delete Prices - description: Delete a list of prices in a Price List + /admin/price-lists/{id}/prices/batch/remove: + post: + operationId: PostPriceListsIdPricesBatchRemove + summary: Add Removes to Price List + description: Add a list of removes to a price list. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The price list's ID. required: true - description: The ID of the Price List schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdminDeletePriceListPricesPricesReq' - x-codegen: - method: deletePrices + $ref: '#/components/schemas/AdminPostPriceListsPriceListPricesBatchRemoveReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.priceLists.deletePrices(priceListId, { - price_ids: [ - price_id - ] - }) - .then(({ ids, object, deleted }) => { - console.log(ids.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeletePriceListPrices } from "medusa-react" - - const PriceList = ( - priceListId: string - ) => { - const deletePrices = useAdminDeletePriceListPrices(priceListId) - // ... - - const handleDeletePrices = (priceIds: string[]) => { - deletePrices.mutate({ - price_ids: priceIds - }, { - onSuccess: ({ ids, deleted, object }) => { - console.log(ids) - } - }) - } - - // ... - } - - export default PriceList - lang: Shell label: cURL - source: | - curl -X DELETE '{backend_url}/admin/price-lists/{id}/prices/batch' \ + source: |- + curl -X POST '{backend_url}/admin/price-lists/{id}/prices/batch/remove' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "price_ids": [ - "adasfa" - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Price Lists - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPriceListDeleteBatchRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/price-lists/{id}/products: - get: - operationId: GetPriceListsPriceListProducts - summary: List Products - description: Retrieve a price list's products. The products can be filtered by fields such as `q` or `status`. The products can also be sorted or paginated. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: ID of the price list. - schema: - type: string - - in: query - name: q - description: term used to search products' title, description, product variant's title and sku, and product collection's title. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by product IDs. - schema: - oneOf: - - type: string - description: ID of the product. - - type: array - items: - type: string - description: ID of a product. - - in: query - name: status - description: Filter by product status - style: form - explode: false - schema: - type: array - items: - type: string - enum: - - draft - - proposed - - published - - rejected - - in: query - name: collection_id - description: Filter by product collection ID. Only products in the specified collections are retrieved. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: tags - description: Filter by tag IDs. Only products having the specified tags are retrieved. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: title - description: Filter by title - schema: - type: string - - in: query - name: description - description: Filter by description - schema: - type: string - - in: query - name: handle - description: Filter by handle - schema: - type: string - - in: query - name: is_giftcard - description: A boolean value to filter by whether the product is a gift card or not. - schema: - type: boolean - - in: query - name: type - description: Filter product type. - schema: - type: string - - in: query - name: order - description: A product field to sort-order the retrieved products by. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of products to skip when retrieving the products. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of products returned. - schema: - type: integer - default: 50 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned products. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned products. - schema: - type: string - x-codegen: - method: listProducts - queryParams: AdminGetPriceListsPriceListProductsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.priceLists.listProducts(priceListId) - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminPriceListProducts } from "medusa-react" - - type Props = { - priceListId: string - } - - const PriceListProducts = ({ - priceListId - }: Props) => { - const { products, isLoading } = useAdminPriceListProducts( - priceListId - ) - - return ( -
- {isLoading && Loading...} - {products && !products.length && ( - No Price Lists - )} - {products && products.length > 0 && ( -
    - {products.map((product) => ( -
  • {product.title}
  • - ))} -
- )} -
- ) - } - - export default PriceListProducts - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/price-lists/{id}/products' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Price Lists - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPriceListsProductsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/price-lists/{id}/products/prices/batch: - delete: - operationId: DeletePriceListsPriceListProductsPricesBatch - summary: Delete Product Prices - description: Delete all the prices associated with multiple products in a price list. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Price List - schema: - type: string - x-codegen: - method: deleteProductsPrices - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.priceLists.deleteProductsPrices(priceListId, { - product_ids: [ - productId1, - productId2, + "ids": [ + "{value}" ] - }) - .then(({ ids, object, deleted }) => { - console.log(ids.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeletePriceListProductsPrices } from "medusa-react" - - type Props = { - priceListId: string - } - - const PriceList = ({ - priceListId - }: Props) => { - const deleteProductsPrices = useAdminDeletePriceListProductsPrices( - priceListId - ) - // ... - - const handleDeleteProductsPrices = (productIds: string[]) => { - deleteProductsPrices.mutate({ - product_ids: productIds - }, { - onSuccess: ({ ids, deleted, object }) => { - console.log(ids) - } - }) - } - - // ... - } - - export default PriceList - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/price-lists/{id}/products/prices/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "product_ids": [ - "prod_1", - "prod_2" - ] }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPriceListDeleteProductPricesRes' '400': $ref: '#/components/responses/400_error' '401': @@ -14497,324 +2730,31 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/price-lists/{id}/products/{product_id}/prices: - delete: - operationId: DeletePriceListsPriceListProductsProductPrices - summary: Delete a Product's Prices - description: Delete all the prices related to a specific product in a price list. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Price List. - schema: - type: string - - in: path - name: product_id - required: true - description: The ID of the product from which the prices will be deleted. - schema: - type: string - x-codegen: - method: deleteProductPrices - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.priceLists.deleteProductPrices(priceListId, productId) - .then(({ ids, object, deleted }) => { - console.log(ids.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminDeletePriceListProductPrices - } from "medusa-react" - - type Props = { - priceListId: string - productId: string - } - - const PriceListProduct = ({ - priceListId, - productId - }: Props) => { - const deleteProductPrices = useAdminDeletePriceListProductPrices( - priceListId, - productId - ) - // ... - - const handleDeleteProductPrices = () => { - deleteProductPrices.mutate(void 0, { - onSuccess: ({ ids, deleted, object }) => { - console.log(ids) - } - }) - } - - // ... - } - - export default PriceListProduct - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/price-lists/{id}/products/{product_id}/prices' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Price Lists - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPriceListDeleteProductPricesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/price-lists/{id}/variants/{variant_id}/prices: - delete: - operationId: DeletePriceListsPriceListVariantsVariantPrices - summary: Delete a Variant's Prices - description: Delete all the prices related to a specific variant in a price list. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Price List. - schema: - type: string - - in: path - name: variant_id - required: true - description: The ID of the variant. - schema: - type: string - x-codegen: - method: deleteVariantPrices - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.priceLists.deleteVariantPrices(priceListId, variantId) - .then(({ ids, object, deleted }) => { - console.log(ids); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminDeletePriceListVariantPrices - } from "medusa-react" - - type Props = { - priceListId: string - variantId: string - } - - const PriceListVariant = ({ - priceListId, - variantId - }: Props) => { - const deleteVariantPrices = useAdminDeletePriceListVariantPrices( - priceListId, - variantId - ) - // ... - - const handleDeleteVariantPrices = () => { - deleteVariantPrices.mutate(void 0, { - onSuccess: ({ ids, deleted, object }) => { - console.log(ids) - } - }) - } - - // ... - } - - export default PriceListVariant - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/price-lists/{id}/variants/{variant_id}/prices' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Price Lists - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPriceListDeleteVariantPricesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/product-categories: + /admin/pricing/rule-types: get: - operationId: GetProductCategories - summary: List Product Categories - description: Retrieve a list of product categories. The product categories can be filtered by fields such as `q` or `handle`. The product categories can also be paginated. + operationId: GetPricingRuleTypes + summary: List Pricing + description: Retrieve a list of pricing. The pricing can be filtered by fields such as `id`. The pricing can also be sorted or paginated. x-authenticated: true - x-featureFlag: product_categories - parameters: - - in: query - name: q - description: term to search product categories' names and handles. - schema: - type: string - - in: query - name: handle - description: Filter by handle. - schema: - type: string - - in: query - name: is_internal - description: Filter by whether the category is internal or not. - schema: - type: boolean - - in: query - name: is_active - description: Filter by whether the category is active or not. - schema: - type: boolean - - in: query - name: include_descendants_tree - description: If set to `true`, all nested descendants of a category are included in the response. - schema: - type: boolean - - in: query - name: parent_category_id - description: Filter by the ID of a parent category. - schema: - type: string - - in: query - name: offset - description: The number of product categories to skip when retrieving the product categories. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of product categories returned. - schema: - type: integer - default: 100 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned product categories. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned product categories. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetProductCategoriesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.productCategories.list() - .then(({ product_categories, limit, offset, count }) => { - console.log(product_categories.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminProductCategories } from "medusa-react" - - function Categories() { - const { - product_categories, - isLoading - } = useAdminProductCategories() - - return ( -
- {isLoading && Loading...} - {product_categories && !product_categories.length && ( - No Categories - )} - {product_categories && product_categories.length > 0 && ( -
    - {product_categories.map( - (category) => ( -
  • {category.name}
  • - ) - )} -
- )} -
- ) - } - - export default Categories - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/product-categories' \ - -H 'x-medusa-access-token: {api_token}' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminGetPricingRuleTypesParams' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/pricing/rule-types' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Product Categories + - Pricing responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductCategoriesListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -14828,91 +2768,35 @@ paths: '500': $ref: '#/components/responses/500_error' post: - operationId: PostProductCategories - summary: Create a Product Category - description: Create a Product Category. + operationId: PostPricingRuleTypes + summary: Create Pricing + description: Create a pricing. x-authenticated: true - x-featureFlag: product_categories - parameters: - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned product category. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned product category. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostProductCategoriesReq' - x-codegen: - method: create - queryParams: AdminPostProductCategoriesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.productCategories.create({ - name: "Skinny Jeans", - }) - .then(({ product_category }) => { - console.log(product_category.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateProductCategory } from "medusa-react" - - const CreateCategory = () => { - const createCategory = useAdminCreateProductCategory() - // ... - - const handleCreate = ( - name: string - ) => { - createCategory.mutate({ - name, - }, { - onSuccess: ({ product_category }) => { - console.log(product_category.id) - } - }) - } - - // ... - } - - export default CreateCategory - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/product-categories' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Skinny Jeans" - }' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPricingRuleTypesReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/pricing/rule-types' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "name": "Thurman", + "rule_attribute": "{value}", + "default_priority": 4640267816665088 + }' tags: - - Product Categories + - Pricing responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductCategoriesCategoryRes' '400': $ref: '#/components/responses/400_error' '401': @@ -14925,92 +2809,37 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/product-categories/{id}: + /admin/pricing/rule-types/{id}: get: - operationId: GetProductCategoriesCategory - summary: Get a Product Category - description: Retrieve a Product Category's details. + operationId: GetPricingRuleTypesId + summary: List Rule Types + description: Retrieve a list of rule types in a pricing. The rule types can be filtered by fields like FILTER FIELDS. The rule types can also be paginated. x-authenticated: true - x-featureFlag: product_categories parameters: - - in: path - name: id + - name: id + in: path + description: The pricing's ID. required: true - description: The ID of the Product Category schema: type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned product category. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned product category. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetProductCategoryParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.productCategories.retrieve(productCategoryId) - .then(({ product_category }) => { - console.log(product_category.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminProductCategory } from "medusa-react" - - type Props = { - productCategoryId: string - } - - const Category = ({ - productCategoryId - }: Props) => { - const { - product_category, - isLoading, - } = useAdminProductCategory(productCategoryId) - - return ( -
- {isLoading && Loading...} - {product_category && ( - {product_category.name} - )} - -
- ) - } - - export default Category - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/product-categories/{id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminGetPricingRuleTypesRuleTypeParams' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/pricing/rule-types/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Product Categories + - Pricing responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductCategoriesCategoryRes' '400': $ref: '#/components/responses/400_error' '401': @@ -15024,105 +2853,35 @@ paths: '500': $ref: '#/components/responses/500_error' post: - operationId: PostProductCategoriesCategory - summary: Update a Product Category - description: Updates a Product Category. + operationId: PostPricingRuleTypesId + summary: Add Rule Types to Pricing + description: Add a list of rule types to a pricing. x-authenticated: true - x-featureFlag: product_categories parameters: - - in: path - name: id + - name: id + in: path + description: The pricing's ID. required: true - description: The ID of the Product Category. schema: type: string - - in: query - name: expand - description: (Comma separated) Which fields should be expanded in each product category. - schema: - type: string - - in: query - name: fields - description: (Comma separated) Which fields should be retrieved in each product category. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostProductCategoriesCategoryReq' - x-codegen: - method: update - queryParams: AdminPostProductCategoriesCategoryParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.productCategories.update(productCategoryId, { - name: "Skinny Jeans" - }) - .then(({ product_category }) => { - console.log(product_category.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateProductCategory } from "medusa-react" - - type Props = { - productCategoryId: string - } - - const Category = ({ - productCategoryId - }: Props) => { - const updateCategory = useAdminUpdateProductCategory( - productCategoryId - ) - // ... - - const handleUpdate = ( - name: string - ) => { - updateCategory.mutate({ - name, - }, { - onSuccess: ({ product_category }) => { - console.log(product_category.id) - } - }) - } - - // ... - } - - export default Category - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/product-categories/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Skinny Jeans" - }' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPricingRuleTypesRuleTypeReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/pricing/rule-types/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Product Categories + - Pricing responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductCategoriesCategoryRes' '400': $ref: '#/components/responses/400_error' '401': @@ -15136,672 +2895,35 @@ paths: '500': $ref: '#/components/responses/500_error' delete: - operationId: DeleteProductCategoriesCategory - summary: Delete a Product Category - description: Delete a Product Category. This does not delete associated products. + operationId: DeletePricingRuleTypesId + summary: Remove Rule Types from Pricing + description: Remove a list of rule types from a pricing. This doesn't delete the Rule Type, only the association between the Rule Type and the pricing. x-authenticated: true - x-featureFlag: product_categories parameters: - - in: path - name: id + - name: id + in: path + description: The pricing's ID. required: true - description: The ID of the Product Category schema: type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.productCategories.delete(productCategoryId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteProductCategory } from "medusa-react" - - type Props = { - productCategoryId: string - } - - const Category = ({ - productCategoryId - }: Props) => { - const deleteCategory = useAdminDeleteProductCategory( - productCategoryId - ) - // ... - - const handleDelete = () => { - deleteCategory.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default Category - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/product-categories/{id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductCategoriesCategoryDeleteRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/product-categories/{id}/products/batch: - post: - operationId: PostProductCategoriesCategoryProductsBatch - summary: Add Products to a Category - description: Add a list of products to a product category. - x-authenticated: true - x-featureFlag: product_categories - parameters: - - in: path - name: id - required: true - description: The ID of the Product Category. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned product category. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned product category. - schema: - type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdminPostProductCategoriesCategoryProductsBatchReq' - x-codegen: - method: addProducts - queryParams: AdminPostProductCategoriesCategoryProductsBatchParams + $ref: '#/components/schemas/AdminDeletePricingRuleTypesRuleTypeReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.productCategories.addProducts(productCategoryId, { - product_ids: [ - { - id: productId - } - ] - }) - .then(({ product_category }) => { - console.log(product_category.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminAddProductsToCategory } from "medusa-react" - - type ProductsData = { - id: string - } - - type Props = { - productCategoryId: string - } - - const Category = ({ - productCategoryId - }: Props) => { - const addProducts = useAdminAddProductsToCategory( - productCategoryId - ) - // ... - - const handleAddProducts = ( - productIds: ProductsData[] - ) => { - addProducts.mutate({ - product_ids: productIds - }, { - onSuccess: ({ product_category }) => { - console.log(product_category.products) - } - }) - } - - // ... - } - - export default Category - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/admin/product-categories/{id}/products/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "product_ids": [ - { - "id": "{product_id}" - } - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductCategoriesCategoryRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteProductCategoriesCategoryProductsBatch - summary: Remove Products from Category - description: Remove a list of products from a product category. - x-authenticated: true - x-featureFlag: product_categories - parameters: - - in: path - name: id - required: true - description: The ID of the Product Category. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned product category. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned product category. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteProductCategoriesCategoryProductsBatchReq' - x-codegen: - method: removeProducts - queryParams: AdminDeleteProductCategoriesCategoryProductsBatchParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.productCategories.removeProducts(productCategoryId, { - product_ids: [ - { - id: productId - } - ] - }) - .then(({ product_category }) => { - console.log(product_category.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteProductsFromCategory } from "medusa-react" - - type ProductsData = { - id: string - } - - type Props = { - productCategoryId: string - } - - const Category = ({ - productCategoryId - }: Props) => { - const deleteProducts = useAdminDeleteProductsFromCategory( - productCategoryId - ) - // ... - - const handleDeleteProducts = ( - productIds: ProductsData[] - ) => { - deleteProducts.mutate({ - product_ids: productIds - }, { - onSuccess: ({ product_category }) => { - console.log(product_category.products) - } - }) - } - - // ... - } - - export default Category - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/product-categories/{id}/products/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "product_ids": [ - { - "id": "{product_id}" - } - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductCategoriesCategoryRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/product-tags: - get: - operationId: GetProductTags - summary: List Product Tags - description: Retrieve a list of product tags. The product tags can be filtered by fields such as `q` or `value`. The product tags can also be sorted or paginated. - x-authenticated: true - parameters: - - in: query - name: limit - description: Limit the number of product tags returned. - schema: - type: integer - default: 10 - - in: query - name: offset - description: The number of product tags to skip when retrieving the product tags. - schema: - type: integer - default: 0 - - in: query - name: order - description: A product tag field to sort-order the retrieved product tags by. - schema: - type: string - - in: query - name: discount_condition_id - description: Filter by the ID of a discount condition. Only product tags that this discount condition is applied to will be retrieved. - schema: - type: string - - in: query - name: value - style: form - explode: false - description: Filter by tag value. - schema: - type: array - items: - type: string - - in: query - name: q - description: term to search product tags' values. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by tag IDs. - schema: - type: array - items: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetProductTagsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.productTags.list() - .then(({ product_tags }) => { - console.log(product_tags.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminProductTags } from "medusa-react" - - function ProductTags() { - const { - product_tags, - isLoading - } = useAdminProductTags() - - return ( -
- {isLoading && Loading...} - {product_tags && !product_tags.length && ( - No Product Tags - )} - {product_tags && product_tags.length > 0 && ( -
    - {product_tags.map( - (tag) => ( -
  • {tag.value}
  • - ) - )} -
- )} -
- ) - } - - export default ProductTags - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/product-tags' \ + source: |- + curl -X DELETE '{backend_url}/admin/pricing/rule-types/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Product Tags + - Pricing responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductTagsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/product-types: - get: - operationId: GetProductTypes - summary: List Product Types - description: Retrieve a list of product types. The product types can be filtered by fields such as `q` or `value`. The product types can also be sorted or paginated. - x-authenticated: true - parameters: - - in: query - name: limit - description: Limit the number of product types returned. - schema: - type: integer - default: 20 - - in: query - name: offset - description: The number of product types to skip when retrieving the product types. - schema: - type: integer - default: 0 - - in: query - name: order - description: A product type field to sort-order the retrieved product types by. - schema: - type: string - - in: query - name: discount_condition_id - description: Filter by the ID of a discount condition. Only product types that this discount condition is applied to will be retrieved. - schema: - type: string - - in: query - name: value - style: form - explode: false - description: Filter by value. - schema: - type: array - items: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by product type IDs. - schema: - type: array - items: - type: string - - in: query - name: q - description: term to search product types' values. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetProductTypesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.productTypes.list() - .then(({ product_types }) => { - console.log(product_types.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminProductTypes } from "medusa-react" - - function ProductTypes() { - const { - product_types, - isLoading - } = useAdminProductTypes() - - return ( -
- {isLoading && Loading...} - {product_types && !product_types.length && ( - No Product Tags - )} - {product_types && product_types.length > 0 && ( -
    - {product_types.map( - (type) => ( -
  • {type.value}
  • - ) - )} -
- )} -
- ) - } - - export default ProductTypes - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/product-types' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Types - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductTypesListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -15818,279 +2940,27 @@ paths: get: operationId: GetProducts summary: List Products - description: Retrieve a list of products. The products can be filtered by fields such as `q` or `status`. The products can also be sorted or paginated. + description: Retrieve a list of products. The products can be filtered by fields such as `id`. The products can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: q - description: term to search products' title, description, variants' title and sku, and collections' title. - schema: - type: string - - in: query - name: discount_condition_id - description: Filter by the ID of a discount condition. Only products that this discount condition is applied to will be retrieved. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by product IDs. - schema: - oneOf: - - type: string - description: ID of the product. - - type: array - items: - type: string - description: ID of a product. - - in: query - name: status - style: form - explode: false - description: Filter by status. - schema: - type: array - items: - type: string - enum: - - draft - - proposed - - published - - rejected - - in: query - name: collection_id - style: form - explode: false - description: Filter by product collection IDs. Only products that are associated with the specified collections will be retrieved. - schema: - type: array - items: - type: string - - in: query - name: tags - style: form - explode: false - description: Filter by product tag IDs. Only products that are associated with the specified tags will be retrieved. - schema: - type: array - items: - type: string - - in: query - name: price_list_id - style: form - explode: false - description: Filter by IDs of price lists. Only products that these price lists are applied to will be retrieved. - schema: - type: array - items: - type: string - - in: query - name: sales_channel_id - style: form - explode: false - description: Filter by sales channel IDs. Only products that are available in the specified sales channels will be retrieved. - schema: - type: array - items: - type: string - - in: query - name: type_id - style: form - explode: false - description: Filter by product type IDs. Only products that are associated with the specified types will be retrieved. - schema: - type: array - items: - type: string - - in: query - name: category_id - style: form - explode: false - description: Filter by product category IDs. Only products that are associated with the specified categories will be retrieved. - schema: - type: array - x-featureFlag: product_categories - items: - type: string - - in: query - name: include_category_children - style: form - explode: false - description: whether to include product category children when filtering by `category_id` - schema: - type: boolean - x-featureFlag: product_categories - - in: query - name: title - description: Filter by title. - schema: - type: string - - in: query - name: description - description: Filter by description. - schema: - type: string - - in: query - name: handle - description: Filter by handle. - schema: - type: string - - in: query - name: is_giftcard - description: Whether to retrieve gift cards or regular products. - schema: - type: boolean - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of products to skip when retrieving the products. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of products returned. - schema: - type: integer - default: 50 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned products. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned products. - schema: - type: string - - in: query - name: order - description: A product field to sort-order the retrieved products by. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetProductsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.list() - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useAdminProducts() - - return ( -
- {isLoading && Loading...} - {products && !products.length && No Products} - {products && products.length > 0 && ( -
    - {products.map((product) => ( -
  • {product.title}
  • - ))} -
- )} -
- ) - } - - export default Products - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/products' \ - -H 'x-medusa-access-token: {api_token}' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminGetProductsParams' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/products' \ + -H 'x-medusa-access-token: {api_token}' tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -16105,310 +2975,65 @@ paths: $ref: '#/components/responses/500_error' post: operationId: PostProducts - summary: Create a Product + summary: Create Product + description: Create a product. x-authenticated: true - description: Create a new Product. This API Route can also be used to create a gift card if the `is_giftcard` field is set to `true`. + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/products' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Products + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostProductsReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.create({ - title: "Shirt", - is_giftcard: false, - discountable: true - }) - .then(({ product }) => { - console.log(product.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateProduct } from "medusa-react" - - type CreateProductData = { - title: string - is_giftcard: boolean - discountable: boolean - options: { - title: string - }[] - variants: { - title: string - prices: { - amount: number - currency_code :string - }[] - options: { - value: string - }[] - }[], - collection_id: string - categories: { - id: string - }[] - type: { - value: string - } - tags: { - value: string - }[] - } - - const CreateProduct = () => { - const createProduct = useAdminCreateProduct() - // ... - - const handleCreate = (productData: CreateProductData) => { - createProduct.mutate(productData, { - onSuccess: ({ product }) => { - console.log(product.id) - } - }) - } - - // ... - } - - export default CreateProduct - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/products' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "title": "Shirt" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/products/tag-usage: - get: - operationId: GetProductsTagUsage - summary: List Tags Usage Number - description: Retrieve a list of Product Tags with how many times each is used in products. - x-authenticated: true - x-codegen: - method: listTags - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.listTags() - .then(({ tags }) => { - console.log(tags.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminProductTagUsage } from "medusa-react" - - const ProductTags = (productId: string) => { - const { tags, isLoading } = useAdminProductTagUsage() - - return ( -
- {isLoading && Loading...} - {tags && !tags.length && No Product Tags} - {tags && tags.length > 0 && ( -
    - {tags.map((tag) => ( -
  • {tag.value} - {tag.usage_count}
  • - ))} -
- )} -
- ) - } - - export default ProductTags - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/products/tag-usage' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsListTagsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/products/types: - get: - deprecated: true - operationId: GetProductsTypes - summary: List Product Types - description: Retrieve a list of Product Types. - x-authenticated: true - x-codegen: - method: listTypes - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.listTypes() - .then(({ types }) => { - console.log(types.length); - }) - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/products/types' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsListTypesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} /admin/products/{id}: get: - operationId: GetProductsProduct + operationId: GetProductsId summary: Get a Product - description: Retrieve a Product's details. + description: Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string - x-codegen: - method: retrieve + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.retrieve(productId) - .then(({ product }) => { - console.log(product.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminProduct } from "medusa-react" - - type Props = { - productId: string - } - - const Product = ({ productId }: Props) => { - const { - product, - isLoading, - } = useAdminProduct(productId) - - return ( -
- {isLoading && Loading...} - {product && {product.title}} - -
- ) - } - - export default Product - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/products/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -16421,92 +3046,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostProductsProduct - summary: Update a Product - description: Update a Product's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Product. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostProductsProductReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.update(productId, { - title: "Shirt", - }) - .then(({ product }) => { - console.log(product.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateProduct } from "medusa-react" - - type Props = { - productId: string - } - - const Product = ({ productId }: Props) => { - const updateProduct = useAdminUpdateProduct( - productId - ) - // ... - - const handleUpdate = ( - title: string - ) => { - updateProduct.mutate({ - title, - }, { - onSuccess: ({ product }) => { - console.log(product.id) - } - }) - } - - // ... - } - - export default Product - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/products/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "title": "Size" - }' + schema: {} + post: + operationId: PostProductsId + summary: Update a Product + description: Update a product's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/products/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -16519,77 +3087,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteProductsProduct + operationId: DeleteProductsId summary: Delete a Product - description: Delete a Product and its associated product variants and options. + description: Delete a product. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.delete(productId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteProduct } from "medusa-react" - - type Props = { - productId: string - } - - const Product = ({ productId }: Props) => { - const deleteProduct = useAdminDeleteProduct( - productId - ) - // ... - - const handleDelete = () => { - deleteProduct.mutate(void 0, { - onSuccess: ({ id, object, deleted}) => { - console.log(id) - } - }) - } - - // ... - } - - export default Product - lang: Shell label: cURL - source: | + source: |- curl -X DELETE '{backend_url}/admin/products/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsDeleteRes' '400': $ref: '#/components/responses/400_error' '401': @@ -16602,165 +3128,77 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/products/{id}/metadata: - post: - operationId: PostProductsProductMetadata - summary: Set Metadata - description: Set the metadata of a Product. It can be any key-value pair, which allows adding custom data to a product. - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Product. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostProductsProductMetadataReq' - x-codegen: - method: setMetadata - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.setMetadata(productId, { - key: "test", - value: "true" - }) - .then(({ product }) => { - console.log(product.id); - }) - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/products/{id}/metadata' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "key": "test", - "value": "true" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} /admin/products/{id}/options: - post: - operationId: PostProductsProductOptions - summary: Add a Product Option - description: Add a Product Option to a Product. + get: + operationId: GetProductsIdOptions + summary: List Options + description: Retrieve a list of options in a product. The options can be filtered by fields like FILTER FIELDS. The options can also be paginated. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/products/{id}/options' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Products + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostProductsProductOptionsReq' - x-codegen: - method: addOption + schema: {} + post: + operationId: PostProductsIdOptions + summary: Add Options to Product + description: Add a list of options to a product. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.addOption(productId, { - title: "Size" - }) - .then(({ product }) => { - console.log(product.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateProductOption } from "medusa-react" - - type Props = { - productId: string - } - - const CreateProductOption = ({ productId }: Props) => { - const createOption = useAdminCreateProductOption( - productId - ) - // ... - - const handleCreate = ( - title: string - ) => { - createOption.mutate({ - title - }, { - onSuccess: ({ product }) => { - console.log(product.options) - } - }) - } - - // ... - } - - export default CreateProductOption - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/products/{id}/options' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "title": "Size" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] + -H 'x-medusa-access-token: {api_token}' tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -16773,104 +3211,42 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/products/{id}/options/{option_id}: - post: - operationId: PostProductsProductOptionsOption - summary: Update a Product Option - description: Update a Product Option's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Product. - schema: - type: string - - in: path - name: option_id - required: true - description: The ID of the Product Option. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostProductsProductOptionsOption' - x-codegen: - method: updateOption - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.updateOption(productId, optionId, { - title: "Size" - }) - .then(({ product }) => { - console.log(product.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateProductOption } from "medusa-react" - - type Props = { - productId: string - optionId: string - } - - const ProductOption = ({ - productId, - optionId - }: Props) => { - const updateOption = useAdminUpdateProductOption( - productId - ) - // ... - - const handleUpdate = ( - title: string - ) => { - updateOption.mutate({ - option_id: optionId, - title, - }, { - onSuccess: ({ product }) => { - console.log(product.options) - } - }) - } - - // ... - } - - export default ProductOption - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/products/{id}/options/{option_id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "title": "Size" - }' + schema: {} + /admin/products/{id}/options/{option_id}: + get: + operationId: GetProductsIdOptionsOption_id + summary: List Options + description: Retrieve a list of options in a product. The options can be filtered by fields like FILTER FIELDS. The options can also be paginated. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string + - name: option_id + in: path + description: The product's option id. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/products/{id}/options/{option_id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -16883,87 +3259,88 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - delete: - operationId: DeleteProductsProductOptionsOption - summary: Delete a Product Option - description: Delete a Product Option. If there are product variants that use this product option, they must be deleted before deleting the product option. + requestBody: + content: + application/json: + schema: {} + post: + operationId: PostProductsIdOptionsOption_id + summary: Add Options to Product + description: Add a list of options to a product. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string - - in: path - name: option_id + - name: option_id + in: path + description: The product's option id. required: true - description: The ID of the Product Option. schema: type: string - x-codegen: - method: deleteOption + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.deleteOption(productId, optionId) - .then(({ option_id, object, deleted, product }) => { - console.log(product.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteProductOption } from "medusa-react" - - type Props = { - productId: string - optionId: string - } - - const ProductOption = ({ - productId, - optionId - }: Props) => { - const deleteOption = useAdminDeleteProductOption( - productId - ) - // ... - - const handleDelete = () => { - deleteOption.mutate(optionId, { - onSuccess: ({ option_id, object, deleted, product }) => { - console.log(product.options) - } - }) - } - - // ... - } - - export default ProductOption - lang: Shell label: cURL - source: | + source: |- + curl -X POST '{backend_url}/admin/products/{id}/options/{option_id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Products + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + delete: + operationId: DeleteProductsIdOptionsOption_id + summary: Remove Options from Product + description: Remove a list of options from a product. This doesn't delete the Option, only the association between the Option and the product. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string + - name: option_id + in: path + description: The product's option id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- curl -X DELETE '{backend_url}/admin/products/{id}/options/{option_id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsDeleteOptionRes' '400': $ref: '#/components/responses/400_error' '401': @@ -16976,155 +3353,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/products/{id}/variants: get: - operationId: GetProductsProductVariants - summary: List a Product's Variants - description: | - Retrieve a list of Product Variants associated with a Product. The variants can be paginated. + operationId: GetProductsIdVariants + summary: List Variants + description: Retrieve a list of variants in a product. The variants can be filtered by fields like FILTER FIELDS. The variants can also be paginated. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: ID of the product. schema: type: string - - in: query - name: id - description: IDs to filter product variants by. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned product variants. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned product variants. - schema: - type: string - - in: query - name: offset - description: The number of product variants to skip when retrieving the product variants. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of product variants returned. - schema: - type: integer - default: 100 - - in: query - name: q - description: Search term to search product variants' title, sku, and products' title. - schema: - type: string - - in: query - name: order - 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 `-`. - schema: - type: string - - in: query - name: manage_inventory - description: Filter product variants by whether their inventory is managed or not. - schema: - type: boolean - - in: query - name: allow_backorder - description: Filter product variants by whether they are allowed to be backordered or not. - schema: - type: boolean - - in: query - name: inventory_quantity - description: Filter by available inventory quantity - schema: - oneOf: - - type: number - description: a specific number to filter by. - - type: object - description: filter using less and greater than comparisons. - properties: - lt: - type: number - description: filter by inventory quantity less than this number - gt: - type: number - description: filter by inventory quantity greater than this number - lte: - type: number - description: filter by inventory quantity less than or equal to this number - gte: - type: number - description: filter by inventory quantity greater than or equal to this number - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: listVariants - queryParams: AdminGetProductsVariantsParams + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/products/{id}/variants' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsListVariantsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -17137,127 +3395,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostProductsProductVariants - summary: Create a Product Variant - description: Create a Product Variant associated with a Product. Each product variant must have a unique combination of Product Option values. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Product. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostProductsProductVariantsReq' - x-codegen: - method: createVariant + schema: {} + post: + operationId: PostProductsIdVariants + summary: Add Variants to Product + description: Add a list of variants to a product. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.createVariant(productId, { - title: "Color", - prices: [ - { - amount: 1000, - currency_code: "eur" - } - ], - options: [ - { - option_id, - value: "S" - } - ], - inventory_quantity: 100 - }) - .then(({ product }) => { - console.log(product.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateVariant } from "medusa-react" - - type CreateVariantData = { - title: string - prices: { - amount: number - currency_code: string - }[] - options: { - option_id: string - value: string - }[] - } - - type Props = { - productId: string - } - - const CreateProductVariant = ({ productId }: Props) => { - const createVariant = useAdminCreateVariant( - productId - ) - // ... - - const handleCreate = ( - variantData: CreateVariantData - ) => { - createVariant.mutate(variantData, { - onSuccess: ({ product }) => { - console.log(product.variants) - } - }) - } - - // ... - } - - export default CreateProductVariant - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/products/{id}/variants' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "title": "Color", - "prices": [ - { - "amount": 1000, - "currency_code": "eur" - } - ], - "options": [ - { - "option_id": "asdasf", - "value": "S" - } - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] + -H 'x-medusa-access-token: {api_token}' tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -17270,121 +3436,42 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/products/{id}/variants/{variant_id}: - post: - operationId: PostProductsProductVariantsVariant - summary: Update a Product Variant - description: Update a Product Variant's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Product. - schema: - type: string - - in: path - name: variant_id - required: true - description: The ID of the Product Variant. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostProductsProductVariantsVariantReq' - x-codegen: - method: updateVariant - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.updateVariant(productId, variantId, { - title: "Color", - prices: [ - { - amount: 1000, - currency_code: "eur" - } - ], - options: [ - { - option_id, - value: "S" - } - ], - inventory_quantity: 100 - }) - .then(({ product }) => { - console.log(product.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateVariant } from "medusa-react" - - type Props = { - productId: string - variantId: string - } - - const ProductVariant = ({ - productId, - variantId - }: Props) => { - const updateVariant = useAdminUpdateVariant( - productId - ) - // ... - - const handleUpdate = (title: string) => { - updateVariant.mutate({ - variant_id: variantId, - title, - }, { - onSuccess: ({ product }) => { - console.log(product.variants) - } - }) - } - - // ... - } - - export default ProductVariant - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/products/{id}/variants/{variant_id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "title": "Color", - "prices": [ - { - "amount": 1000, - "currency_code": "eur" - } - ] - }' + schema: {} + /admin/products/{id}/variants/{variant_id}: + get: + operationId: GetProductsIdVariantsVariant_id + summary: List Variants + description: Retrieve a list of variants in a product. The variants can be filtered by fields like FILTER FIELDS. The variants can also be paginated. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string + - name: variant_id + in: path + description: The product's variant id. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/products/{id}/variants/{variant_id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -17397,87 +3484,88 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - delete: - operationId: DeleteProductsProductVariantsVariant - summary: Delete a Product Variant - description: Delete a Product Variant. + requestBody: + content: + application/json: + schema: {} + post: + operationId: PostProductsIdVariantsVariant_id + summary: Add Variants to Product + description: Add a list of variants to a product. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string - - in: path - name: variant_id + - name: variant_id + in: path + description: The product's variant id. required: true - description: The ID of the Product Variant. schema: type: string - x-codegen: - method: deleteVariant + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.products.deleteVariant(productId, variantId) - .then(({ variant_id, object, deleted, product }) => { - console.log(product.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteVariant } from "medusa-react" - - type Props = { - productId: string - variantId: string - } - - const ProductVariant = ({ - productId, - variantId - }: Props) => { - const deleteVariant = useAdminDeleteVariant( - productId - ) - // ... - - const handleDelete = () => { - deleteVariant.mutate(variantId, { - onSuccess: ({ variant_id, object, deleted, product }) => { - console.log(product.variants) - } - }) - } - - // ... - } - - export default ProductVariant - lang: Shell label: cURL - source: | + source: |- + curl -X POST '{backend_url}/admin/products/{id}/variants/{variant_id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Products + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + delete: + operationId: DeleteProductsIdVariantsVariant_id + summary: Remove Variants from Product + description: Remove a list of variants from a product. This doesn't delete the Variant, only the association between the Variant and the product. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string + - name: variant_id + in: path + description: The product's variant id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- curl -X DELETE '{backend_url}/admin/products/{id}/variants/{variant_id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminProductsDeleteVariantRes' '400': $ref: '#/components/responses/400_error' '401': @@ -17490,180 +3578,112 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/publishable-api-keys: + requestBody: + content: + application/json: + schema: {} + /admin/promotions: get: - operationId: GetPublishableApiKeys - summary: List Publishable API keys - description: Retrieve a list of publishable API keys. The publishable API keys can be filtered by fields such as `q`. The publishable API keys can also be paginated. + operationId: GetPromotions + summary: List Promotions + description: Retrieve a list of promotions. The promotions can be filtered by fields such as `id`. The promotions can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: q - description: term to search publishable API keys' titles. - schema: - type: string - - in: query - name: limit - description: Limit the number of publishable API keys returned. - schema: - type: number - default: '20' - - in: query - name: offset - description: The number of publishable API keys to skip when retrieving the publishable API keys. - schema: - type: number - default: '0' - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned publishable API keys. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned publishable API keys. - schema: - type: string - - in: query - name: order - description: A field to sort-order the retrieved publishable API keys by. - schema: - type: string - - in: query - name: created_at - required: false - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - required: false - description: Filter by a update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: revoked_at - required: false - description: Filter by a revocation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: GetPublishableApiKeysParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.publishableApiKeys.list() - .then(({ publishable_api_keys, count, limit, offset }) => { - console.log(publishable_api_keys) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { PublishableApiKey } from "@medusajs/medusa" - import { useAdminPublishableApiKeys } from "medusa-react" - - const PublishableApiKeys = () => { - const { publishable_api_keys, isLoading } = - useAdminPublishableApiKeys() - - return ( -
- {isLoading && Loading...} - {publishable_api_keys && !publishable_api_keys.length && ( - No Publishable API Keys - )} - {publishable_api_keys && - publishable_api_keys.length > 0 && ( -
    - {publishable_api_keys.map( - (publishableApiKey: PublishableApiKey) => ( -
  • - {publishableApiKey.title} -
  • - ) - )} -
- )} -
- ) - } - - export default PublishableApiKeys - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/publishable-api-keys' \ - -H 'x-medusa-access-token: {api_token}' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/promotions' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Publishable Api Keys + - Promotions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + post: + operationId: PostPromotions + summary: Create Promotion + description: Create a promotion. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/promotions' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Promotions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + /admin/promotions/{id}: + get: + operationId: GetPromotionsId + summary: Get a Promotion + description: Retrieve a promotion by its ID. You can expand the promotion's relations or select the fields that should be returned. + x-authenticated: true + parameters: + - name: id + in: path + description: The promotion's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminGetPromotionsParams' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/promotions/{id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Promotions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPublishableApiKeysListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -17677,260 +3697,35 @@ paths: '500': $ref: '#/components/responses/500_error' post: - operationId: PostPublishableApiKeys - summary: Create Publishable API Key - description: Create a Publishable API Key. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPublishableApiKeysReq' + operationId: PostPromotionsId + summary: Update a Promotion + description: Update a promotion's details. x-authenticated: true - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.publishableApiKeys.create({ - title - }) - .then(({ publishable_api_key }) => { - console.log(publishable_api_key.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreatePublishableApiKey } from "medusa-react" - - const CreatePublishableApiKey = () => { - const createKey = useAdminCreatePublishableApiKey() - // ... - - const handleCreate = (title: string) => { - createKey.mutate({ - title, - }, { - onSuccess: ({ publishable_api_key }) => { - console.log(publishable_api_key.id) - } - }) - } - - // ... - } - - export default CreatePublishableApiKey - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/publishable-api-keys' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "title": "Web API Key" - }' + parameters: + - name: id + in: path + description: The promotion's ID. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPublishableApiKeysRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/publishable-api-keys/{id}: - get: - operationId: GetPublishableApiKeysPublishableApiKey - summary: Get a Publishable API Key - description: Retrieve a publishable API key's details. - parameters: - - in: path - name: id - required: true - description: The ID of the Publishable API Key. - schema: - type: string - x-authenticated: true - x-codegen: - method: retrieve + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPromotionsPromotionReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.publishableApiKeys.retrieve(publishableApiKeyId) - .then(({ publishable_api_key }) => { - console.log(publishable_api_key.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminPublishableApiKey, - } from "medusa-react" - - type Props = { - publishableApiKeyId: string - } - - const PublishableApiKey = ({ - publishableApiKeyId - }: Props) => { - const { publishable_api_key, isLoading } = - useAdminPublishableApiKey( - publishableApiKeyId - ) - - - return ( -
- {isLoading && Loading...} - {publishable_api_key && {publishable_api_key.title}} -
- ) - } - - export default PublishableApiKey - lang: Shell label: cURL - source: | - curl '{backend_url}/admin/publishable-api-keys/{id}' \ + source: |- + curl -X POST '{backend_url}/admin/promotions/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Publishable Api Keys + - Promotions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPublishableApiKeysRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostPublishableApiKysPublishableApiKey - summary: Update Publishable API Key - description: Update a Publishable API Key's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Publishable API Key. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostPublishableApiKeysPublishableApiKeyReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.publishableApiKeys.update(publishableApiKeyId, { - title: "new title" - }) - .then(({ publishable_api_key }) => { - console.log(publishable_api_key.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdatePublishableApiKey } from "medusa-react" - - type Props = { - publishableApiKeyId: string - } - - const PublishableApiKey = ({ - publishableApiKeyId - }: Props) => { - const updateKey = useAdminUpdatePublishableApiKey( - publishableApiKeyId - ) - // ... - - const handleUpdate = (title: string) => { - updateKey.mutate({ - title, - }, { - onSuccess: ({ publishable_api_key }) => { - console.log(publishable_api_key.id) - } - }) - } - - // ... - } - - export default PublishableApiKey - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/publishable-api-key/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "title": "new title" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPublishableApiKeysRes' '400': $ref: '#/components/responses/400_error' '401': @@ -17944,154 +3739,30 @@ paths: '500': $ref: '#/components/responses/500_error' delete: - operationId: DeletePublishableApiKeysPublishableApiKey - summary: Delete Publishable API Key - description: Delete a Publishable API Key. Associated resources, such as sales channels, are not deleted. + operationId: DeletePromotionsId + summary: Delete a Promotion + description: Delete a promotion. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The promotion's ID. required: true - description: The ID of the Publishable API Key to delete. schema: type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.publishableApiKeys.delete(publishableApiKeyId) - .then(({ id, object, deleted }) => { - console.log(id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeletePublishableApiKey } from "medusa-react" - - type Props = { - publishableApiKeyId: string - } - - const PublishableApiKey = ({ - publishableApiKeyId - }: Props) => { - const deleteKey = useAdminDeletePublishableApiKey( - publishableApiKeyId - ) - // ... - - const handleDelete = () => { - deleteKey.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default PublishableApiKey - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/publishable-api-key/{id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPublishableApiKeyDeleteRes' - '400': - $ref: '#/components/responses/400_error' - /admin/publishable-api-keys/{id}/revoke: - post: - operationId: PostPublishableApiKeysPublishableApiKeyRevoke - summary: Revoke a Publishable API Key - description: Revoke a Publishable API Key. Revoking the publishable API Key can't be undone, and the key can't be used in future requests. - parameters: - - in: path - name: id - required: true - description: The ID of the Publishable API Key. - schema: - type: string - x-authenticated: true - x-codegen: - method: revoke x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.publishableApiKeys.revoke(publishableApiKeyId) - .then(({ publishable_api_key }) => { - console.log(publishable_api_key.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminRevokePublishableApiKey } from "medusa-react" - - type Props = { - publishableApiKeyId: string - } - - const PublishableApiKey = ({ - publishableApiKeyId - }: Props) => { - const revokeKey = useAdminRevokePublishableApiKey( - publishableApiKeyId - ) - // ... - - const handleRevoke = () => { - revokeKey.mutate(void 0, { - onSuccess: ({ publishable_api_key }) => { - console.log(publishable_api_key.revoked_at) - } - }) - } - - // ... - } - - export default PublishableApiKey - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/admin/publishable-api-keys/{id}/revoke' \ + source: |- + curl -X DELETE '{backend_url}/admin/promotions/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Publishable Api Keys + - Promotions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPublishableApiKeysRes' '400': $ref: '#/components/responses/400_error' '401': @@ -18104,208 +3775,52 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/publishable-api-keys/{id}/sales-channels: - get: - operationId: GetPublishableApiKeySalesChannels - summary: List Sales Channels - description: List the sales channels associated with a publishable API key. The sales channels can be filtered by fields such as `q`. + requestBody: + content: + application/json: + schema: {} + /admin/promotions/{id}/buy-rules/batch/add: + post: + operationId: PostPromotionsIdBuyRulesBatchAdd + summary: Add Adds to Promotion + description: Add a list of adds to a promotion. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The promotion's ID. required: true - description: The ID of the publishable API key. schema: type: string - - in: query - name: q - description: query to search sales channels' names and descriptions. - schema: - type: string - x-codegen: - method: listSalesChannels - queryParams: GetPublishableApiKeySalesChannelsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.publishableApiKeys.listSalesChannels() - .then(({ sales_channels }) => { - console.log(sales_channels.length) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminPublishableApiKeySalesChannels, - } from "medusa-react" - - type Props = { - publishableApiKeyId: string - } - - const SalesChannels = ({ - publishableApiKeyId - }: Props) => { - const { sales_channels, isLoading } = - useAdminPublishableApiKeySalesChannels( - publishableApiKeyId - ) - - return ( -
- {isLoading && Loading...} - {sales_channels && !sales_channels.length && ( - No Sales Channels - )} - {sales_channels && sales_channels.length > 0 && ( -
    - {sales_channels.map((salesChannel) => ( -
  • {salesChannel.name}
  • - ))} -
- )} -
- ) - } - - export default SalesChannels - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/publishable-api-keys/{id}/sales-channels' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPublishableApiKeysListSalesChannelsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/publishable-api-keys/{id}/sales-channels/batch: - post: - operationId: PostPublishableApiKeySalesChannelsChannelsBatch - summary: Add Sales Channels - description: Add a list of sales channels to a publishable API key. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Publishable Api Key. - schema: - type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdminPostPublishableApiKeySalesChannelsBatchReq' - x-codegen: - method: addSalesChannelsBatch + $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.publishableApiKeys.addSalesChannelsBatch(publishableApiKeyId, { - sales_channel_ids: [ - { - id: channelId - } - ] - }) - .then(({ publishable_api_key }) => { - console.log(publishable_api_key.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminAddPublishableKeySalesChannelsBatch, - } from "medusa-react" - - type Props = { - publishableApiKeyId: string - } - - const PublishableApiKey = ({ - publishableApiKeyId - }: Props) => { - const addSalesChannels = - useAdminAddPublishableKeySalesChannelsBatch( - publishableApiKeyId - ) - // ... - - const handleAdd = (salesChannelId: string) => { - addSalesChannels.mutate({ - sales_channel_ids: [ - { - id: salesChannelId, - }, - ], - }, { - onSuccess: ({ publishable_api_key }) => { - console.log(publishable_api_key.id) - } - }) - } - - // ... - } - - export default PublishableApiKey - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/admin/publishable-api-keys/{pak_id}/batch' \ + source: |- + curl -X POST '{backend_url}/admin/promotions/{id}/buy-rules/batch/add' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "sales_channel_ids": [ - { - "id": "{sales_channel_id}" - } - ] + "rules": [ + { + "attribute": "{value}", + "values": [ + "{value}" + ] + } + ] }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Publishable Api Keys + - Promotions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPublishableApiKeysRes' '400': $ref: '#/components/responses/400_error' '401': @@ -18318,107 +3833,304 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - delete: - operationId: DeletePublishableApiKeySalesChannelsChannelsBatch - summary: Remove Sales Channels - description: Remove a list of sales channels from a publishable API key. This doesn't delete the sales channels and only removes the association between them and the publishable API key. + /admin/promotions/{id}/buy-rules/batch/remove: + post: + operationId: PostPromotionsIdBuyRulesBatchRemove + summary: Add Removes to Promotion + description: Add a list of removes to a promotion. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The promotion's ID. required: true - description: The ID of the Publishable API Key. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeletePublishableApiKeySalesChannelsBatchReq' - x-codegen: - method: deleteSalesChannelsBatch - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.publishableApiKeys.deleteSalesChannelsBatch(publishableApiKeyId, { - sales_channel_ids: [ - { - id: channelId - } - ] - }) - .then(({ publishable_api_key }) => { - console.log(publishable_api_key.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminRemovePublishableKeySalesChannelsBatch, - } from "medusa-react" - - type Props = { - publishableApiKeyId: string - } - - const PublishableApiKey = ({ - publishableApiKeyId - }: Props) => { - const deleteSalesChannels = - useAdminRemovePublishableKeySalesChannelsBatch( - publishableApiKeyId - ) - // ... - - const handleDelete = (salesChannelId: string) => { - deleteSalesChannels.mutate({ - sales_channel_ids: [ - { - id: salesChannelId, - }, - ], - }, { - onSuccess: ({ publishable_api_key }) => { - console.log(publishable_api_key.id) - } - }) - } - - // ... - } - - export default PublishableApiKey - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/publishable-api-keys/{id}/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "sales_channel_ids": [ - { - "id": "{sales_channel_id}" - } - ] - }' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/promotions/{id}/buy-rules/batch/remove' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "rule_ids": [ + "{value}" + ] + }' tags: - - Publishable Api Keys + - Promotions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + /admin/promotions/{id}/rules/batch/add: + post: + operationId: PostPromotionsIdRulesBatchAdd + summary: Add Adds to Promotion + description: Add a list of adds to a promotion. + x-authenticated: true + parameters: + - name: id + in: path + description: The promotion's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/promotions/{id}/rules/batch/add' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "rules": [ + { + "attribute": "{value}", + "values": [ + "{value}" + ] + } + ] + }' + tags: + - Promotions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + /admin/promotions/{id}/rules/batch/remove: + post: + operationId: PostPromotionsIdRulesBatchRemove + summary: Add Removes to Promotion + description: Add a list of removes to a promotion. + x-authenticated: true + parameters: + - name: id + in: path + description: The promotion's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/promotions/{id}/rules/batch/remove' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "rule_ids": [ + "{value}" + ] + }' + tags: + - Promotions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + /admin/promotions/{id}/rules/batch/update: + post: + operationId: PostPromotionsIdRulesBatchUpdate + summary: Add Updates to Promotion + description: Add a list of updates to a promotion. + x-authenticated: true + parameters: + - name: id + in: path + description: The promotion's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchUpdateReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/promotions/{id}/rules/batch/update' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "rules": [ + { + "id": "id_orjnxCxIQlJAp4", + "attribute": "{value}", + "values": [ + "{value}" + ] + } + ] + }' + tags: + - Promotions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + /admin/promotions/{id}/target-rules/batch/add: + post: + operationId: PostPromotionsIdTargetRulesBatchAdd + summary: Add Adds to Promotion + description: Add a list of adds to a promotion. + x-authenticated: true + parameters: + - name: id + in: path + description: The promotion's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/promotions/{id}/target-rules/batch/add' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "rules": [ + { + "attribute": "{value}", + "values": [ + "{value}" + ] + } + ] + }' + tags: + - Promotions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + /admin/promotions/{id}/target-rules/batch/remove: + post: + operationId: PostPromotionsIdTargetRulesBatchRemove + summary: Add Removes to Promotion + description: Add a list of removes to a promotion. + x-authenticated: true + parameters: + - name: id + in: path + description: The promotion's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/promotions/{id}/target-rules/batch/remove' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "rule_ids": [ + "{value}" + ] + }' + tags: + - Promotions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPublishableApiKeysRes' '400': $ref: '#/components/responses/400_error' '401': @@ -18435,159 +4147,22 @@ paths: get: operationId: GetRegions summary: List Regions - description: Retrieve a list of Regions. The regions can be filtered by fields such as `created_at`. The regions can also be paginated. + description: Retrieve a list of regions. The regions can be filtered by fields such as `id`. The regions can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: q - description: Term used to search regions' name. - schema: - type: string - - in: query - name: order - description: A field to sort-order the retrieved regions by. - schema: - type: string - - in: query - name: limit - schema: - type: integer - default: 50 - required: false - description: Limit the number of regions returned. - - in: query - name: offset - schema: - type: integer - default: 0 - required: false - description: The number of regions to skip when retrieving the regions. - - in: query - name: created_at - required: false - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - required: false - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - required: false - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetRegionsParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.list() - .then(({ regions, limit, offset, count }) => { - console.log(regions.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminRegions } from "medusa-react" - - const Regions = () => { - const { regions, isLoading } = useAdminRegions() - - return ( -
- {isLoading && Loading...} - {regions && !regions.length && No Regions} - {regions && regions.length > 0 && ( -
    - {regions.map((region) => ( -
  • {region.name}
  • - ))} -
- )} -
- ) - } - - export default Regions - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/regions' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRegionsListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -18600,106 +4175,29 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: operationId: PostRegions - summary: Create a Region - description: Create a Region. + summary: Create Region + description: Create a region. x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostRegionsReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.create({ - name: "Europe", - currency_code: "eur", - tax_rate: 0, - payment_providers: [ - "manual" - ], - fulfillment_providers: [ - "manual" - ], - countries: [ - "DK" - ] - }) - .then(({ region }) => { - console.log(region.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateRegion } from "medusa-react" - - type CreateData = { - name: string - currency_code: string - tax_rate: number - payment_providers: string[] - fulfillment_providers: string[] - countries: string[] - } - - const CreateRegion = () => { - const createRegion = useAdminCreateRegion() - // ... - - const handleCreate = (regionData: CreateData) => { - createRegion.mutate(regionData, { - onSuccess: ({ region }) => { - console.log(region.id) - } - }) - } - - // ... - } - - export default CreateRegion - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/regions' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Europe", - "currency_code": "eur", - "tax_rate": 0, - "payment_providers": [ - "manual" - ], - "fulfillment_providers": [ - "manual" - ], - "countries": [ - "DK" - ] - }' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/regions' \ + -H 'x-medusa-access-token: {api_token}' tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRegionsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -18712,76 +4210,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/regions/{id}: get: - operationId: GetRegionsRegion + operationId: GetRegionsId summary: Get a Region - description: Retrieve a Region's details. + description: Retrieve a region by its ID. You can expand the region's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The region's ID. required: true - description: The ID of the Region. schema: type: string - x-codegen: - method: retrieve + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.retrieve(regionId) - .then(({ region }) => { - console.log(region.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminRegion } from "medusa-react" - - type Props = { - regionId: string - } - - const Region = ({ - regionId - }: Props) => { - const { region, isLoading } = useAdminRegion( - regionId - ) - - return ( -
- {isLoading && Loading...} - {region && {region.name}} -
- ) - } - - export default Region - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/regions/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRegionsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -18794,92 +4252,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostRegionsRegion - summary: Update a Region - description: Update a Region's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostRegionsRegionReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.update(regionId, { - name: "Europe" - }) - .then(({ region }) => { - console.log(region.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateRegion } from "medusa-react" - - type Props = { - regionId: string - } - - const Region = ({ - regionId - }: Props) => { - const updateRegion = useAdminUpdateRegion(regionId) - // ... - - const handleUpdate = ( - countries: string[] - ) => { - updateRegion.mutate({ - countries, - }, { - onSuccess: ({ region }) => { - console.log(region.id) - } - }) - } - - // ... - } - - export default Region - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/regions/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Europe" - }' + schema: {} + post: + operationId: PostRegionsId + summary: Update a Region + description: Update a region's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The region's ID. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/regions/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRegionsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -18892,77 +4293,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteRegionsRegion + operationId: DeleteRegionsId summary: Delete a Region - description: Delete a Region. Associated resources, such as providers or currencies are not deleted. Associated tax rates are deleted. + description: Delete a region. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The region's ID. required: true - description: The ID of the Region. schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.delete(regionId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteRegion } from "medusa-react" - - type Props = { - regionId: string - } - - const Region = ({ - regionId - }: Props) => { - const deleteRegion = useAdminDeleteRegion(regionId) - // ... - - const handleDelete = () => { - deleteRegion.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default Region - lang: Shell label: cURL - source: | + source: |- curl -X DELETE '{backend_url}/admin/regions/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRegionsDeleteRes' '400': $ref: '#/components/responses/400_error' '401': @@ -18975,2114 +4334,30 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/regions/{id}/countries: - post: - operationId: PostRegionsRegionCountries - summary: Add Country - description: Add a Country to the list of Countries in a Region. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostRegionsRegionCountriesReq' - x-codegen: - method: addCountry - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.addCountry(regionId, { - country_code: "dk" - }) - .then(({ region }) => { - console.log(region.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminRegionAddCountry } from "medusa-react" - - type Props = { - regionId: string - } - - const Region = ({ - regionId - }: Props) => { - const addCountry = useAdminRegionAddCountry(regionId) - // ... - - const handleAddCountry = ( - countryCode: string - ) => { - addCountry.mutate({ - country_code: countryCode - }, { - onSuccess: ({ region }) => { - console.log(region.countries) - } - }) - } - - // ... - } - - export default Region - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/regions/{region_id}/countries' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "country_code": "dk" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRegionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/regions/{id}/countries/{country_code}: - delete: - operationId: PostRegionsRegionCountriesCountry - summary: Remove Country - x-authenticated: true - description: Remove a Country from the list of Countries in a Region. The country will still be available in the system, and it can be used in other regions. - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - - in: path - name: country_code - description: The 2 character ISO code for the Country. - required: true - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: deleteCountry - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.deleteCountry(regionId, "dk") - .then(({ region }) => { - console.log(region.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminRegionRemoveCountry } from "medusa-react" - - type Props = { - regionId: string - } - - const Region = ({ - regionId - }: Props) => { - const removeCountry = useAdminRegionRemoveCountry(regionId) - // ... - - const handleRemoveCountry = ( - countryCode: string - ) => { - removeCountry.mutate(countryCode, { - onSuccess: ({ region }) => { - console.log(region.countries) - } - }) - } - - // ... - } - - export default Region - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/regions/{id}/countries/{country_code}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRegionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/regions/{id}/fulfillment-options: - get: - operationId: GetRegionsRegionFulfillmentOptions - summary: List Fulfillment Options - description: Retrieve a list of fulfillment options available in a Region. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - x-codegen: - method: retrieveFulfillmentOptions - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.retrieveFulfillmentOptions(regionId) - .then(({ fulfillment_options }) => { - console.log(fulfillment_options.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminRegionFulfillmentOptions } from "medusa-react" - - type Props = { - regionId: string - } - - const Region = ({ - regionId - }: Props) => { - const { - fulfillment_options, - isLoading - } = useAdminRegionFulfillmentOptions( - regionId - ) - - return ( -
- {isLoading && Loading...} - {fulfillment_options && !fulfillment_options.length && ( - No Regions - )} - {fulfillment_options && - fulfillment_options.length > 0 && ( -
    - {fulfillment_options.map((option) => ( -
  • - {option.provider_id} -
  • - ))} -
- )} -
- ) - } - - export default Region - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/regions/{id}/fulfillment-options' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminGetRegionsRegionFulfillmentOptionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/regions/{id}/fulfillment-providers: - post: - operationId: PostRegionsRegionFulfillmentProviders - summary: Add Fulfillment Provider - description: Add a Fulfillment Provider to the list of fulfullment providers in a Region. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostRegionsRegionFulfillmentProvidersReq' - x-codegen: - method: addFulfillmentProvider - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.addFulfillmentProvider(regionId, { - provider_id: "manual" - }) - .then(({ region }) => { - console.log(region.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminRegionAddFulfillmentProvider - } from "medusa-react" - - type Props = { - regionId: string - } - - const Region = ({ - regionId - }: Props) => { - const addFulfillmentProvider = - useAdminRegionAddFulfillmentProvider(regionId) - // ... - - const handleAddFulfillmentProvider = ( - providerId: string - ) => { - addFulfillmentProvider.mutate({ - provider_id: providerId - }, { - onSuccess: ({ region }) => { - console.log(region.fulfillment_providers) - } - }) - } - - // ... - } - - export default Region - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/regions/{id}/fulfillment-providers' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "provider_id": "manual" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRegionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/regions/{id}/fulfillment-providers/{provider_id}: - delete: - operationId: PostRegionsRegionFulfillmentProvidersProvider - summary: Remove Fulfillment Provider - description: Remove a Fulfillment Provider from a Region. The fulfillment provider will still be available for usage in other regions. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - - in: path - name: provider_id - required: true - description: The ID of the Fulfillment Provider. - schema: - type: string - x-codegen: - method: deleteFulfillmentProvider - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.deleteFulfillmentProvider(regionId, "manual") - .then(({ region }) => { - console.log(region.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminRegionDeleteFulfillmentProvider - } from "medusa-react" - - type Props = { - regionId: string - } - - const Region = ({ - regionId - }: Props) => { - const removeFulfillmentProvider = - useAdminRegionDeleteFulfillmentProvider(regionId) - // ... - - const handleRemoveFulfillmentProvider = ( - providerId: string - ) => { - removeFulfillmentProvider.mutate(providerId, { - onSuccess: ({ region }) => { - console.log(region.fulfillment_providers) - } - }) - } - - // ... - } - - export default Region - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/regions/{id}/fulfillment-providers/{provider_id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRegionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/regions/{id}/payment-providers: - post: - operationId: PostRegionsRegionPaymentProviders - summary: Add Payment Provider - description: Add a Payment Provider to the list of payment providers in a Region. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostRegionsRegionPaymentProvidersReq' - x-codegen: - method: addPaymentProvider - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.addPaymentProvider(regionId, { - provider_id: "manual" - }) - .then(({ region }) => { - console.log(region.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminRegionAddPaymentProvider - } from "medusa-react" - - type Props = { - regionId: string - } - - const Region = ({ - regionId - }: Props) => { - const addPaymentProvider = - useAdminRegionAddPaymentProvider(regionId) - // ... - - const handleAddPaymentProvider = ( - providerId: string - ) => { - addPaymentProvider.mutate({ - provider_id: providerId - }, { - onSuccess: ({ region }) => { - console.log(region.payment_providers) - } - }) - } - - // ... - } - - export default Region - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/regions/{id}/payment-providers' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "provider_id": "manual" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRegionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/regions/{id}/payment-providers/{provider_id}: - delete: - operationId: PostRegionsRegionPaymentProvidersProvider - summary: Remove Payment Provider - description: Remove a Payment Provider from a Region. The payment provider will still be available for usage in other regions. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - - in: path - name: provider_id - required: true - description: The ID of the Payment Provider. - schema: - type: string - x-codegen: - method: deletePaymentProvider - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.regions.deletePaymentProvider(regionId, "manual") - .then(({ region }) => { - console.log(region.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminRegionDeletePaymentProvider - } from "medusa-react" - - type Props = { - regionId: string - } - - const Region = ({ - regionId - }: Props) => { - const removePaymentProvider = - useAdminRegionDeletePaymentProvider(regionId) - // ... - - const handleRemovePaymentProvider = ( - providerId: string - ) => { - removePaymentProvider.mutate(providerId, { - onSuccess: ({ region }) => { - console.log(region.payment_providers) - } - }) - } - - // ... - } - - export default Region - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/regions/{id}/payment-providers/{provider_id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminRegionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/reservations: - get: - operationId: GetReservations - summary: List Reservations - description: Retrieve a list of Reservations. The reservations can be filtered by fields such as `location_id` or `quantity`. The reservations can also be paginated. - x-authenticated: true - parameters: - - in: query - name: location_id - style: form - explode: false - description: Filter by location ID - schema: - type: array - items: - type: string - - in: query - name: inventory_item_id - style: form - explode: false - description: Filter by inventory item ID. - schema: - type: array - items: - type: string - - in: query - name: line_item_id - style: form - explode: false - description: Filter by line item ID. - schema: - type: array - items: - type: string - - in: query - name: quantity - description: Filter by reservation quantity - schema: - type: object - properties: - lt: - type: number - description: filter by reservation quantity less than this number - gt: - type: number - description: filter by reservation quantity greater than this number - lte: - type: number - description: filter by reservation quantity less than or equal to this number - gte: - type: number - description: filter by reservation quantity greater than or equal to this number - - in: query - name: description - description: Filter by description. - schema: - oneOf: - - type: string - description: description value to filter by. - - type: object - properties: - contains: - type: string - description: filter by reservation description containing search string. - starts_with: - type: string - description: filter by reservation description starting with search string. - ends_with: - type: string - description: filter by reservation description ending with search string. - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of reservations to skip when retrieving the reservations. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of reservations returned. - schema: - type: integer - default: 20 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned reservations. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned reservations. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetReservationsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.reservations.list() - .then(({ reservations, count, limit, offset }) => { - console.log(reservations.length) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminReservations } from "medusa-react" - - const Reservations = () => { - const { reservations, isLoading } = useAdminReservations() - - return ( -
- {isLoading && Loading...} - {reservations && !reservations.length && ( - No Reservations - )} - {reservations && reservations.length > 0 && ( -
    - {reservations.map((reservation) => ( -
  • {reservation.quantity}
  • - ))} -
- )} -
- ) - } - - export default Reservations - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/product-categories' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Reservations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReservationsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostReservations - summary: Create a Reservation - description: Create a Reservation which can be associated with any resource, such as an order's line item. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostReservationsReq' - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.reservations.create({ - line_item_id: "item_123", - location_id: "loc_123", - inventory_item_id: "iitem_123", - quantity: 1 - }) - .then(({ reservation }) => { - console.log(reservation.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateReservation } from "medusa-react" - - const CreateReservation = () => { - const createReservation = useAdminCreateReservation() - // ... - - const handleCreate = ( - locationId: string, - inventoryItemId: string, - quantity: number - ) => { - createReservation.mutate({ - location_id: locationId, - inventory_item_id: inventoryItemId, - quantity, - }, { - onSuccess: ({ reservation }) => { - console.log(reservation.id) - } - }) - } - - // ... - } - - export default CreateReservation - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/reservations' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "line_item_id": "item_123", - "location_id": "loc_123", - "inventory_item_id": "iitem_123", - "quantity": 1 - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Reservations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReservationsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/reservations/{id}: - get: - operationId: GetReservationsReservation - summary: Get a Reservation - description: Retrieve a reservation's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the reservation. - schema: - type: string - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.reservations.retrieve(reservationId) - .then(({ reservation }) => { - console.log(reservation.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminReservation } from "medusa-react" - - type Props = { - reservationId: string - } - - const Reservation = ({ reservationId }: Props) => { - const { reservation, isLoading } = useAdminReservation( - reservationId - ) - - return ( -
- {isLoading && Loading...} - {reservation && {reservation.inventory_item_id}} -
- ) - } - - export default Reservation - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/reservations/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Reservations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReservationsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostReservationsReservation - summary: Update a Reservation - description: Update a Reservation's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Reservation. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostReservationsReservationReq' - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.reservations.update(reservationId, { - quantity: 3 - }) - .then(({ reservation }) => { - console.log(reservation.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateReservation } from "medusa-react" - - type Props = { - reservationId: string - } - - const Reservation = ({ reservationId }: Props) => { - const updateReservation = useAdminUpdateReservation( - reservationId - ) - // ... - - const handleUpdate = ( - quantity: number - ) => { - updateReservation.mutate({ - quantity, - }) - } - - // ... - } - - export default Reservation - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/reservations/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "quantity": 3, - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Reservations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReservationsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteReservationsReservation - summary: Delete a Reservation - description: Delete a Reservation. Associated resources, such as the line item, will not be deleted. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Reservation to delete. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.reservations.delete(reservationId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteReservation } from "medusa-react" - - type Props = { - reservationId: string - } - - const Reservation = ({ reservationId }: Props) => { - const deleteReservation = useAdminDeleteReservation( - reservationId - ) - // ... - - const handleDelete = () => { - deleteReservation.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default Reservation - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/reservations/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Reservations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReservationsDeleteRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/return-reasons: - get: - operationId: GetReturnReasons - summary: List Return Reasons - description: Retrieve a list of Return Reasons. - x-authenticated: true - x-codegen: - method: list - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.returnReasons.list() - .then(({ return_reasons }) => { - console.log(return_reasons.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminReturnReasons } from "medusa-react" - - const ReturnReasons = () => { - const { return_reasons, isLoading } = useAdminReturnReasons() - - return ( -
- {isLoading && Loading...} - {return_reasons && !return_reasons.length && ( - No Return Reasons - )} - {return_reasons && return_reasons.length > 0 && ( -
    - {return_reasons.map((reason) => ( -
  • - {reason.label}: {reason.value} -
  • - ))} -
- )} -
- ) - } - - export default ReturnReasons - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/return-reasons' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReturnReasonsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostReturnReasons - summary: Create a Return Reason - description: Create a Return Reason. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostReturnReasonsReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.returnReasons.create({ - label: "Damaged", - value: "damaged" - }) - .then(({ return_reason }) => { - console.log(return_reason.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateReturnReason } from "medusa-react" - - const CreateReturnReason = () => { - const createReturnReason = useAdminCreateReturnReason() - // ... - - const handleCreate = ( - label: string, - value: string - ) => { - createReturnReason.mutate({ - label, - value, - }, { - onSuccess: ({ return_reason }) => { - console.log(return_reason.id) - } - }) - } - - // ... - } - - export default CreateReturnReason - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/return-reasons' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "label": "Damaged", - "value": "damaged" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReturnReasonsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/return-reasons/{id}: - get: - operationId: GetReturnReasonsReason - summary: Get a Return Reason - description: Retrieve a Return Reason's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Return Reason. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.returnReasons.retrieve(returnReasonId) - .then(({ return_reason }) => { - console.log(return_reason.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminReturnReason } from "medusa-react" - - type Props = { - returnReasonId: string - } - - const ReturnReason = ({ returnReasonId }: Props) => { - const { return_reason, isLoading } = useAdminReturnReason( - returnReasonId - ) - - return ( -
- {isLoading && Loading...} - {return_reason && {return_reason.label}} -
- ) - } - - export default ReturnReason - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/return-reasons/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReturnReasonsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostReturnReasonsReason - summary: Update a Return Reason - description: Update a Return Reason's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Return Reason. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostReturnReasonsReasonReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.returnReasons.update(returnReasonId, { - label: "Damaged" - }) - .then(({ return_reason }) => { - console.log(return_reason.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateReturnReason } from "medusa-react" - - type Props = { - returnReasonId: string - } - - const ReturnReason = ({ returnReasonId }: Props) => { - const updateReturnReason = useAdminUpdateReturnReason( - returnReasonId - ) - // ... - - const handleUpdate = ( - label: string - ) => { - updateReturnReason.mutate({ - label, - }, { - onSuccess: ({ return_reason }) => { - console.log(return_reason.label) - } - }) - } - - // ... - } - - export default ReturnReason - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/return-reasons/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "label": "Damaged" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReturnReasonsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteReturnReason - summary: Delete a Return Reason - description: Delete a return reason. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the return reason - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.returnReasons.delete(returnReasonId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteReturnReason } from "medusa-react" - - type Props = { - returnReasonId: string - } - - const ReturnReason = ({ returnReasonId }: Props) => { - const deleteReturnReason = useAdminDeleteReturnReason( - returnReasonId - ) - // ... - - const handleDelete = () => { - deleteReturnReason.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default ReturnReason - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/return-reasons/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReturnReasonsDeleteRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/returns: - get: - operationId: GetReturns - summary: List Returns - description: Retrieve a list of Returns. The returns can be paginated. - parameters: - - in: query - name: limit - description: Limit the number of Returns returned. - schema: - type: number - default: '50' - - in: query - name: offset - description: The number of Returns to skip when retrieving the Returns. - schema: - type: number - default: '0' - x-codegen: - method: list - queryParams: AdminGetReturnsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.returns.list() - .then(({ returns, limit, offset, count }) => { - console.log(returns.length) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminReturns } from "medusa-react" - - const Returns = () => { - const { returns, isLoading } = useAdminReturns() - - return ( -
- {isLoading && Loading...} - {returns && !returns.length && ( - No Returns - )} - {returns && returns.length > 0 && ( -
    - {returns.map((returnData) => ( -
  • - {returnData.status} -
  • - ))} -
- )} -
- ) - } - - export default Returns - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/returns' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Returns - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReturnsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/returns/{id}/cancel: - post: - operationId: PostReturnsReturnCancel - summary: Cancel a Return - description: Registers a Return as canceled. The return can be associated with an order, claim, or swap. - parameters: - - in: path - name: id - required: true - description: The ID of the Return. - schema: - type: string - x-codegen: - method: cancel - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.returns.cancel(returnId) - .then(({ order }) => { - console.log(order.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCancelReturn } from "medusa-react" - - type Props = { - returnId: string - } - - const Return = ({ returnId }: Props) => { - const cancelReturn = useAdminCancelReturn( - returnId - ) - // ... - - const handleCancel = () => { - cancelReturn.mutate(void 0, { - onSuccess: ({ order }) => { - console.log(order.returns) - } - }) - } - - // ... - } - - export default Return - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/returns/{id}/cancel' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Returns - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReturnsCancelRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/returns/{id}/receive: - post: - operationId: PostReturnsReturnReceive - summary: Receive a Return - description: Mark a Return as received. This also updates the status of associated order, claim, or swap accordingly. - parameters: - - in: path - name: id - required: true - description: The ID of the Return. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostReturnsReturnReceiveReq' - x-codegen: - method: receive - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.returns.receive(returnId, { - items: [ - { - item_id, - quantity: 1 - } - ] - }) - .then((data) => { - console.log(data.return.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminReceiveReturn } from "medusa-react" - - type ReceiveReturnData = { - items: { - item_id: string - quantity: number - }[] - } - - type Props = { - returnId: string - } - - const Return = ({ returnId }: Props) => { - const receiveReturn = useAdminReceiveReturn( - returnId - ) - // ... - - const handleReceive = (data: ReceiveReturnData) => { - receiveReturn.mutate(data, { - onSuccess: ({ return: dataReturn }) => { - console.log(dataReturn.status) - } - }) - } - - // ... - } - - export default Return - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/returns/{id}/receive' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "items": [ - { - "item_id": "asafg", - "quantity": 1 - } - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Returns - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminReturnsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} /admin/sales-channels: get: operationId: GetSalesChannels summary: List Sales Channels - description: Retrieve a list of sales channels. The sales channels can be filtered by fields such as `q` or `name`. The sales channels can also be sorted or paginated. + description: Retrieve a list of sales channels. The sales channels can be filtered by fields such as `id`. The sales channels can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: id - description: Filter by a sales channel ID. - schema: - type: string - - in: query - name: name - description: Filter by name. - schema: - type: string - - in: query - name: description - description: Filter by description. - schema: - type: string - - in: query - name: q - description: term used to search sales channels' names and descriptions. - schema: - type: string - - in: query - name: order - description: A sales-channel field to sort-order the retrieved sales channels by. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of sales channels to skip when retrieving the sales channels. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of sales channels returned. - schema: - type: integer - default: 20 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned sales channels. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned sales channels. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetSalesChannelsParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.salesChannels.list() - .then(({ sales_channels, limit, offset, count }) => { - console.log(sales_channels.length) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminSalesChannels } from "medusa-react" - - const SalesChannels = () => { - const { sales_channels, isLoading } = useAdminSalesChannels() - - return ( -
- {isLoading && Loading...} - {sales_channels && !sales_channels.length && ( - No Sales Channels - )} - {sales_channels && sales_channels.length > 0 && ( -
    - {sales_channels.map((salesChannel) => ( -
  • {salesChannel.name}
  • - ))} -
- )} -
- ) - } - - export default SalesChannels - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/sales-channels' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Sales Channels responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminSalesChannelsListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -21095,79 +4370,29 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: operationId: PostSalesChannels - summary: Create a Sales Channel - description: Create a Sales Channel. + summary: Create Sales Channel + description: Create a sales channel. x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostSalesChannelsReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.salesChannels.create({ - name: "App", - description: "Mobile app" - }) - .then(({ sales_channel }) => { - console.log(sales_channel.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateSalesChannel } from "medusa-react" - - const CreateSalesChannel = () => { - const createSalesChannel = useAdminCreateSalesChannel() - // ... - - const handleCreate = (name: string, description: string) => { - createSalesChannel.mutate({ - name, - description, - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.id) - } - }) - } - - // ... - } - - export default CreateSalesChannel - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/sales-channels' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "App" - }' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/sales-channels' \ + -H 'x-medusa-access-token: {api_token}' tags: - Sales Channels responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminSalesChannelsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -21180,75 +4405,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/sales-channels/{id}: get: - operationId: GetSalesChannelsSalesChannel + operationId: GetSalesChannelsId summary: Get a Sales Channel - description: Retrieve a sales channel's details. + description: Retrieve a sales channel by its ID. You can expand the sales channel's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The sales channel's ID. required: true - description: The ID of the Sales channel. schema: type: string - x-codegen: - method: retrieve + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.salesChannels.retrieve(salesChannelId) - .then(({ sales_channel }) => { - console.log(sales_channel.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminSalesChannel } from "medusa-react" - - type Props = { - salesChannelId: string - } - - const SalesChannel = ({ salesChannelId }: Props) => { - const { - sales_channel, - isLoading, - } = useAdminSalesChannel(salesChannelId) - - return ( -
- {isLoading && Loading...} - {sales_channel && {sales_channel.name}} -
- ) - } - - export default SalesChannel - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/sales-channels/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Sales Channels responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminSalesChannelsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -21261,92 +4447,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostSalesChannelsSalesChannel - summary: Update a Sales Channel - description: Update a Sales Channel's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Sales Channel. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostSalesChannelsSalesChannelReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.salesChannels.update(salesChannelId, { - name: "App" - }) - .then(({ sales_channel }) => { - console.log(sales_channel.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateSalesChannel } from "medusa-react" - - type Props = { - salesChannelId: string - } - - const SalesChannel = ({ salesChannelId }: Props) => { - const updateSalesChannel = useAdminUpdateSalesChannel( - salesChannelId - ) - // ... - - const handleUpdate = ( - is_disabled: boolean - ) => { - updateSalesChannel.mutate({ - is_disabled, - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.is_disabled) - } - }) - } - - // ... - } - - export default SalesChannel - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/sales-channels/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "App" - }' + schema: {} + post: + operationId: PostSalesChannelsId + summary: Update a Sales Channel + description: Update a sales channel's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The sales channel's ID. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/sales-channels/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Sales Channels responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminSalesChannelsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -21359,77 +4488,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteSalesChannelsSalesChannel + operationId: DeleteSalesChannelsId summary: Delete a Sales Channel - description: Delete a sales channel. Associated products, stock locations, and other resources are not deleted. + description: Delete a sales channel. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The sales channel's ID. required: true - description: The ID of the Sales channel. schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.salesChannels.delete(salesChannelId) - .then(({ id, object, deleted }) => { - console.log(id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteSalesChannel } from "medusa-react" - - type Props = { - salesChannelId: string - } - - const SalesChannel = ({ salesChannelId }: Props) => { - const deleteSalesChannel = useAdminDeleteSalesChannel( - salesChannelId - ) - // ... - - const handleDelete = () => { - deleteSalesChannel.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default SalesChannel - lang: Shell label: cURL - source: | + source: |- curl -X DELETE '{backend_url}/admin/sales-channels/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Sales Channels responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminSalesChannelsDeleteRes' '400': $ref: '#/components/responses/400_error' '401': @@ -21442,103 +4529,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/sales-channels/{id}/products/batch: - post: - operationId: PostSalesChannelsChannelProductsBatch - summary: Add Products to Sales Channel - description: Add a list of products to a sales channel. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Sales channel. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostSalesChannelsChannelProductsBatchReq' - x-codegen: - method: addProducts - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.salesChannels.addProducts(salesChannelId, { - product_ids: [ - { - id: productId - } - ] - }) - .then(({ sales_channel }) => { - console.log(sales_channel.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminAddProductsToSalesChannel } from "medusa-react" - - type Props = { - salesChannelId: string - } - - const SalesChannel = ({ salesChannelId }: Props) => { - const addProducts = useAdminAddProductsToSalesChannel( - salesChannelId - ) - // ... - - const handleAddProducts = (productId: string) => { - addProducts.mutate({ - product_ids: [ - { - id: productId, - }, - ], - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.id) - } - }) - } - - // ... - } - - export default SalesChannel - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/sales-channels/{id}/products/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "product_ids": [ - { - "id": "{product_id}" - } - ] - }' + schema: {} + /admin/sales-channels/{id}/products/batch/add: + post: + operationId: PostSalesChannelsIdProductsBatchAdd + summary: Add Adds to Sales Channel + description: Add a list of adds to a sales channel. + x-authenticated: true + parameters: + - name: id + in: path + description: The sales channel's ID. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/sales-channels/{id}/products/batch/add' \ + -H 'x-medusa-access-token: {api_token}' tags: - Sales Channels responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminSalesChannelsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -21551,1615 +4571,41 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - delete: - operationId: DeleteSalesChannelsChannelProductsBatch - summary: Remove Products from Sales Channel - description: Remove a list of products from a sales channel. This does not delete the product. It only removes the association between the product and the sales channel. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Sales Channel - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminDeleteSalesChannelsChannelProductsBatchReq' - x-codegen: - method: removeProducts - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.salesChannels.removeProducts(salesChannelId, { - product_ids: [ - { - id: productId - } - ] - }) - .then(({ sales_channel }) => { - console.log(sales_channel.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminDeleteProductsFromSalesChannel, - } from "medusa-react" - - type Props = { - salesChannelId: string - } - - const SalesChannel = ({ salesChannelId }: Props) => { - const deleteProducts = useAdminDeleteProductsFromSalesChannel( - salesChannelId - ) - // ... - - const handleDeleteProducts = (productId: string) => { - deleteProducts.mutate({ - product_ids: [ - { - id: productId, - }, - ], - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.id) - } - }) - } - - // ... - } - - export default SalesChannel - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/sales-channels/{id}/products/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "product_ids": [ - { - "id": "{product_id}" - } - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Sales Channels - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminSalesChannelsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/sales-channels/{id}/stock-locations: - post: - operationId: PostSalesChannelsSalesChannelStockLocation - summary: Associate a Stock Location - description: Associate a stock location with a Sales Channel. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Sales Channel. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostSalesChannelsChannelStockLocationsReq' - x-codegen: - method: addLocation - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.salesChannels.addLocation(salesChannelId, { - location_id: "loc_123" - }) - .then(({ sales_channel }) => { - console.log(sales_channel.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminAddLocationToSalesChannel - } from "medusa-react" - - type Props = { - salesChannelId: string - } - - const SalesChannel = ({ salesChannelId }: Props) => { - const addLocation = useAdminAddLocationToSalesChannel() - // ... - - const handleAddLocation = (locationId: string) => { - addLocation.mutate({ - sales_channel_id: salesChannelId, - location_id: locationId - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.locations) - } - }) - } - - // ... - } - - export default SalesChannel - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/sales-channels/{id}/stock-locations' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "locaton_id": "loc_123" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Sales Channels - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminSalesChannelsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteSalesChannelsSalesChannelStockLocation - summary: Remove Stock Location from Sales Channels. - description: Remove a stock location from a Sales Channel. This only removes the association between the stock location and the sales channel. It does not delete the stock location. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Sales Channel. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteSalesChannelsChannelStockLocationsReq' - x-codegen: - method: removeLocation - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.salesChannels.removeLocation(salesChannelId, { - location_id: "loc_id" - }) - .then(({ sales_channel }) => { - console.log(sales_channel.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminRemoveLocationFromSalesChannel - } from "medusa-react" - - type Props = { - salesChannelId: string - } - - const SalesChannel = ({ salesChannelId }: Props) => { - const removeLocation = useAdminRemoveLocationFromSalesChannel() - // ... - - const handleRemoveLocation = (locationId: string) => { - removeLocation.mutate({ - sales_channel_id: salesChannelId, - location_id: locationId - }, { - onSuccess: ({ sales_channel }) => { - console.log(sales_channel.locations) - } - }) - } - - // ... - } - - export default SalesChannel - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/sales-channels/{id}/stock-locations' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "locaton_id": "loc_id" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Sales Channels - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminSalesChannelsDeleteLocationRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/shipping-options: - get: - operationId: GetShippingOptions - summary: List Shipping Options - description: Retrieve a list of Shipping Options. The shipping options can be filtered by fields such as `region_id` or `is_return`. The shipping options can also be sorted or paginated. - x-authenticated: true - parameters: - - in: query - name: name - description: Filter by name. - schema: - type: string - - in: query - name: region_id - description: Filter by the ID of the region the shipping options belong to. - schema: - type: string - - in: query - name: is_return - description: Filter by whether the shipping options are return shipping options. - schema: - type: boolean - - in: query - name: admin_only - description: Filter by whether the shipping options are available for admin users only. - schema: - type: boolean - - in: query - name: q - description: Term used to search shipping options' name. - schema: - type: string - - in: query - name: order - description: A shipping option field to sort-order the retrieved shipping options by. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by shipping option IDs. - schema: - oneOf: - - type: string - description: ID of the shipping option. - - type: array - items: - type: string - description: ID of a shipping option. - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of users to skip when retrieving the shipping options. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of shipping options returned. - schema: - type: integer - default: 20 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned shipping options. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned shipping options. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetShippingOptionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.shippingOptions.list() - .then(({ shipping_options, count }) => { - console.log(shipping_options.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminShippingOptions } from "medusa-react" - - const ShippingOptions = () => { - const { - shipping_options, - isLoading - } = useAdminShippingOptions() - - return ( -
- {isLoading && Loading...} - {shipping_options && !shipping_options.length && ( - No Shipping Options - )} - {shipping_options && shipping_options.length > 0 && ( -
    - {shipping_options.map((option) => ( -
  • {option.name}
  • - ))} -
- )} -
- ) - } - - export default ShippingOptions - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/shipping-options' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminShippingOptionsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostShippingOptions - summary: Create Shipping Option - description: Create a Shipping Option. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostShippingOptionsReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.shippingOptions.create({ - name: "PostFake", - region_id, - provider_id, - data: { - }, - price_type: "flat_rate" - }) - .then(({ shipping_option }) => { - console.log(shipping_option.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateShippingOption } from "medusa-react" - - type CreateShippingOption = { - name: string - provider_id: string - data: Record - price_type: string - amount: number - } - - type Props = { - regionId: string - } - - const Region = ({ regionId }: Props) => { - const createShippingOption = useAdminCreateShippingOption() - // ... - - const handleCreate = ( - data: CreateShippingOption - ) => { - createShippingOption.mutate({ - ...data, - region_id: regionId - }, { - onSuccess: ({ shipping_option }) => { - console.log(shipping_option.id) - } - }) - } - - // ... - } - - export default Region - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/shipping-options' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "PostFake", - "region_id": "afasf", - "provider_id": "manual", - "data": {}, - "price_type": "flat_rate" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminShippingOptionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/shipping-options/{id}: - get: - operationId: GetShippingOptionsOption - summary: Get a Shipping Option - description: Retrieve a Shipping Option's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Option. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.shippingOptions.retrieve(optionId) - .then(({ shipping_option }) => { - console.log(shipping_option.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminShippingOption } from "medusa-react" - - type Props = { - shippingOptionId: string - } - - const ShippingOption = ({ shippingOptionId }: Props) => { - const { - shipping_option, - isLoading - } = useAdminShippingOption( - shippingOptionId - ) - - return ( -
- {isLoading && Loading...} - {shipping_option && {shipping_option.name}} -
- ) - } - - export default ShippingOption - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/shipping-options/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminShippingOptionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostShippingOptionsOption - summary: Update Shipping Option - description: Update a Shipping Option's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Option. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostShippingOptionsOptionReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.shippingOptions.update(optionId, { - name: "PostFake", - requirements: [ - { - id, - type: "max_subtotal", - amount: 1000 - } - ] - }) - .then(({ shipping_option }) => { - console.log(shipping_option.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateShippingOption } from "medusa-react" - - type Props = { - shippingOptionId: string - } - - const ShippingOption = ({ shippingOptionId }: Props) => { - const updateShippingOption = useAdminUpdateShippingOption( - shippingOptionId - ) - // ... - - const handleUpdate = ( - name: string, - requirements: { - id: string, - type: string, - amount: number - }[] - ) => { - updateShippingOption.mutate({ - name, - requirements - }, { - onSuccess: ({ shipping_option }) => { - console.log(shipping_option.requirements) - } - }) - } - - // ... - } - - export default ShippingOption - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/shipping-options/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "requirements": [ - { - "type": "max_subtotal", - "amount": 1000 - } - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminShippingOptionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteShippingOptionsOption - summary: Delete Shipping Option - description: Delete a Shipping Option. Once deleted, it can't be used when creating orders or returns. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Option. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.shippingOptions.delete(optionId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteShippingOption } from "medusa-react" - - type Props = { - shippingOptionId: string - } - - const ShippingOption = ({ shippingOptionId }: Props) => { - const deleteShippingOption = useAdminDeleteShippingOption( - shippingOptionId - ) - // ... - - const handleDelete = () => { - deleteShippingOption.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default ShippingOption - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/shipping-options/{option_id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminShippingOptionsDeleteRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/shipping-profiles: - get: - operationId: GetShippingProfiles - summary: List Shipping Profiles - description: Retrieve a list of Shipping Profiles. - x-authenticated: true - x-codegen: - method: list - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.shippingProfiles.list() - .then(({ shipping_profiles }) => { - console.log(shipping_profiles.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminShippingProfiles } from "medusa-react" - - const ShippingProfiles = () => { - const { - shipping_profiles, - isLoading - } = useAdminShippingProfiles() - - return ( -
- {isLoading && Loading...} - {shipping_profiles && !shipping_profiles.length && ( - No Shipping Profiles - )} - {shipping_profiles && shipping_profiles.length > 0 && ( -
    - {shipping_profiles.map((profile) => ( -
  • {profile.name}
  • - ))} -
- )} -
- ) - } - - export default ShippingProfiles - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/shipping-profiles' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Profiles - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminShippingProfilesListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostShippingProfiles - summary: Create a Shipping Profile - description: Create a Shipping Profile. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostShippingProfilesReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.shippingProfiles.create({ - name: "Large Products" - }) - .then(({ shipping_profile }) => { - console.log(shipping_profile.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { ShippingProfileType } from "@medusajs/medusa" - import { useAdminCreateShippingProfile } from "medusa-react" - - const CreateShippingProfile = () => { - const createShippingProfile = useAdminCreateShippingProfile() - // ... - - const handleCreate = ( - name: string, - type: ShippingProfileType - ) => { - createShippingProfile.mutate({ - name, - type - }, { - onSuccess: ({ shipping_profile }) => { - console.log(shipping_profile.id) - } - }) - } - - // ... - } - - export default CreateShippingProfile - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/shipping-profiles' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Large Products" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Profiles - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminShippingProfilesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/shipping-profiles/{id}: - get: - operationId: GetShippingProfilesProfile - summary: Get a Shipping Profile - description: Retrieve a Shipping Profile's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Profile. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.shippingProfiles.retrieve(profileId) - .then(({ shipping_profile }) => { - console.log(shipping_profile.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminShippingProfile } from "medusa-react" - - type Props = { - shippingProfileId: string - } - - const ShippingProfile = ({ shippingProfileId }: Props) => { - const { - shipping_profile, - isLoading - } = useAdminShippingProfile( - shippingProfileId - ) - - return ( -
- {isLoading && Loading...} - {shipping_profile && ( - {shipping_profile.name} - )} -
- ) - } - - export default ShippingProfile - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/shipping-profiles/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Profiles - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminShippingProfilesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostShippingProfilesProfile - summary: Update a Shipping Profile - description: Update a Shipping Profile's details. - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Profile. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostShippingProfilesProfileReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.shippingProfiles.update(shippingProfileId, { - name: 'Large Products' - }) - .then(({ shipping_profile }) => { - console.log(shipping_profile.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { ShippingProfileType } from "@medusajs/medusa" - import { useAdminUpdateShippingProfile } from "medusa-react" - - type Props = { - shippingProfileId: string - } - - const ShippingProfile = ({ shippingProfileId }: Props) => { - const updateShippingProfile = useAdminUpdateShippingProfile( - shippingProfileId - ) - // ... - - const handleUpdate = ( - name: string, - type: ShippingProfileType - ) => { - updateShippingProfile.mutate({ - name, - type - }, { - onSuccess: ({ shipping_profile }) => { - console.log(shipping_profile.name) - } - }) - } - - // ... - } - - export default ShippingProfile - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/shipping-profiles/{id} \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Large Products" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Profiles - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminShippingProfilesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteShippingProfilesProfile - summary: Delete a Shipping Profile - description: Delete a Shipping Profile. Associated shipping options are deleted as well. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Profile. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.shippingProfiles.delete(profileId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteShippingProfile } from "medusa-react" - - type Props = { - shippingProfileId: string - } - - const ShippingProfile = ({ shippingProfileId }: Props) => { - const deleteShippingProfile = useAdminDeleteShippingProfile( - shippingProfileId - ) - // ... - - const handleDelete = () => { - deleteShippingProfile.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default ShippingProfile - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/shipping-profiles/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Profiles - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteShippingProfileRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} /admin/stock-locations: - get: - operationId: GetStockLocations - summary: List Stock Locations - description: Retrieve a list of stock locations. The stock locations can be filtered by fields such as `name` or `created_at`. The stock locations can also be sorted or paginated. - x-authenticated: true - parameters: - - in: query - name: id - description: Filter by ID. - schema: - type: string - - in: query - name: name - description: Filter by name. - schema: - type: string - - in: query - name: order - description: A stock-location field to sort-order the retrieved stock locations by. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of stock locations to skip when retrieving the stock locations. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of stock locations returned. - schema: - type: integer - default: 20 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned stock locations. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned stock locations. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetStockLocationsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.stockLocations.list() - .then(({ stock_locations, limit, offset, count }) => { - console.log(stock_locations.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminStockLocations } from "medusa-react" - - function StockLocations() { - const { - stock_locations, - isLoading - } = useAdminStockLocations() - - return ( -
- {isLoading && Loading...} - {stock_locations && !stock_locations.length && ( - No Locations - )} - {stock_locations && stock_locations.length > 0 && ( -
    - {stock_locations.map( - (location) => ( -
  • {location.name}
  • - ) - )} -
- )} -
- ) - } - - export default StockLocations - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/stock-locations' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Stock Locations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminStockLocationsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' post: operationId: PostStockLocations - summary: Create a Stock Location - description: Create a Stock Location. + summary: Create Stock Location + description: Create a stock location. x-authenticated: true - parameters: - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned stock location. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned stock location. - schema: - type: string + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AdminPostStockLocationsReq' - x-codegen: - method: create x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.stockLocations.create({ - name: "Main Warehouse", - }) - .then(({ stock_location }) => { - console.log(stock_location.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateStockLocation } from "medusa-react" - - const CreateStockLocation = () => { - const createStockLocation = useAdminCreateStockLocation() - // ... - - const handleCreate = (name: string) => { - createStockLocation.mutate({ - name, - }, { - onSuccess: ({ stock_location }) => { - console.log(stock_location.id) - } - }) - } - - // ... - } - - export default CreateStockLocation - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/stock-locations' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "name": "App" + "name": "Dorthy" }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Stock Locations responses: '200': description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminStockLocationsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -23174,180 +4620,32 @@ paths: $ref: '#/components/responses/500_error' /admin/stock-locations/{id}: get: - operationId: GetStockLocationsStockLocation + operationId: GetStockLocationsId summary: Get a Stock Location - description: Retrieve a Stock Location's details. + description: Retrieve a stock location by its ID. You can expand the stock location's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The stock location's ID. required: true - description: The ID of the Stock Location. schema: type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned stock location. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned stock location. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetStockLocationsLocationParams + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.stockLocations.retrieve(stockLocationId) - .then(({ stock_location }) => { - console.log(stock_location.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminStockLocation } from "medusa-react" - - type Props = { - stockLocationId: string - } - - const StockLocation = ({ stockLocationId }: Props) => { - const { - stock_location, - isLoading - } = useAdminStockLocation(stockLocationId) - - return ( -
- {isLoading && Loading...} - {stock_location && ( - {stock_location.name} - )} -
- ) - } - - export default StockLocation - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/stock-locations/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] + -H 'x-medusa-access-token: {api_token}' tags: - Stock Locations responses: '200': description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminStockLocationsRes' - post: - operationId: PostStockLocationsStockLocation - summary: Update a Stock Location - description: Update a Stock Location's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Stock Location. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned stock location. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned stock location. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostStockLocationsLocationReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.stockLocations.update(stockLocationId, { - name: 'Main Warehouse' - }) - .then(({ stock_location }) => { - console.log(stock_location.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateStockLocation } from "medusa-react" - - type Props = { - stockLocationId: string - } - - const StockLocation = ({ stockLocationId }: Props) => { - const updateLocation = useAdminUpdateStockLocation( - stockLocationId - ) - // ... - - const handleUpdate = ( - name: string - ) => { - updateLocation.mutate({ - name - }, { - onSuccess: ({ stock_location }) => { - console.log(stock_location.name) - } - }) - } - } - - export default StockLocation - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/stock-locations/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Main Warehouse" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Stock Locations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminStockLocationsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -23361,132 +4659,32 @@ paths: '500': $ref: '#/components/responses/500_error' delete: - operationId: DeleteStockLocationsStockLocation + operationId: DeleteStockLocationsId summary: Delete a Stock Location - description: Delete a Stock Location. + description: Delete a stock location. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The stock location's ID. required: true - description: The ID of the Stock Location. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.stockLocations.delete(stockLocationId) - .then(({ id, object, deleted }) => { - console.log(id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteStockLocation } from "medusa-react" - - type Props = { - stockLocationId: string - } - - const StockLocation = ({ stockLocationId }: Props) => { - const deleteLocation = useAdminDeleteStockLocation( - stockLocationId - ) - // ... - - const handleDelete = () => { - deleteLocation.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - } - - export default StockLocation - lang: Shell label: cURL - source: | + source: |- curl -X DELETE '{backend_url}/admin/stock-locations/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Stock Locations responses: '200': description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminStockLocationsDeleteRes' - '400': - $ref: '#/components/responses/400_error' - /admin/store: - get: - operationId: GetStore - summary: Get Store details - description: Retrieve the Store's details. - x-authenticated: true - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.store.retrieve() - .then(({ store }) => { - console.log(store.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminStore } from "medusa-react" - - const Store = () => { - const { - store, - isLoading - } = useAdminStore() - - return ( -
- {isLoading && Loading...} - {store && {store.name}} -
- ) - } - - export default Store - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/store' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Store - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminExtendedStoresRes' '400': $ref: '#/components/responses/400_error' '401': @@ -23499,77 +4697,68 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostStore - summary: Update Store Details - description: Update the Store's details. + /admin/stores: + get: + operationId: GetStores + summary: List Stores + description: Retrieve a list of stores. The stores can be filtered by fields such as `id`. The stores can also be sorted or paginated. x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/stores' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Stores + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminPostStoreReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.store.update({ - name: "Medusa Store" - }) - .then(({ store }) => { - console.log(store.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateStore } from "medusa-react" - - function Store() { - const updateStore = useAdminUpdateStore() - // ... - - const handleUpdate = ( - name: string - ) => { - updateStore.mutate({ - name - }, { - onSuccess: ({ store }) => { - console.log(store.name) - } - }) - } - } - - export default Store - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/store' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "Medusa Store" - }' + schema: {} + /admin/stores/{id}: + get: + operationId: GetStoresId + summary: Get a Store + description: Retrieve a store by its ID. You can expand the store's relations or select the fields that should be returned. + x-authenticated: true + parameters: + - name: id + in: path + description: The store's ID. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/stores/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Store + - Stores responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminStoresRes' '400': $ref: '#/components/responses/400_error' '401': @@ -23582,481 +4771,35 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/store/currencies/{code}: + requestBody: + content: + application/json: + schema: {} post: - operationId: PostStoreCurrenciesCode - summary: Add a Currency Code - description: Add a Currency Code to the available currencies in a store. This does not create new currencies, as currencies are defined within the Medusa backend. To create a currency, you can create a migration that inserts the currency into the database. + operationId: PostStoresId + summary: Update a Store + description: Update a store's details. x-authenticated: true parameters: - - in: path - name: code + - name: id + in: path + description: The store's ID. required: true - description: The 3 character ISO currency code. schema: type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: addCurrency - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.store.addCurrency("eur") - .then(({ store }) => { - console.log(store.currencies); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminAddStoreCurrency } from "medusa-react" - - const Store = () => { - const addCurrency = useAdminAddStoreCurrency() - // ... - - const handleAdd = (code: string) => { - addCurrency.mutate(code, { - onSuccess: ({ store }) => { - console.log(store.currencies) - } - }) - } - - // ... - } - - export default Store - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/store/currencies/{currency_code}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/stores/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Store + - Stores responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminStoresRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteStoreCurrenciesCode - summary: Remove a Currency - description: Remove a Currency Code from the available currencies in a store. This does not completely delete the currency and it can be added again later to the store. - x-authenticated: true - parameters: - - in: path - name: code - required: true - description: The 3 character ISO currency code. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: deleteCurrency - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.store.deleteCurrency("eur") - .then(({ store }) => { - console.log(store.currencies); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteStoreCurrency } from "medusa-react" - - const Store = () => { - const deleteCurrency = useAdminDeleteStoreCurrency() - // ... - - const handleAdd = (code: string) => { - deleteCurrency.mutate(code, { - onSuccess: ({ store }) => { - console.log(store.currencies) - } - }) - } - - // ... - } - - export default Store - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/store/currencies/{currency_code}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Store - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminStoresRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/store/payment-providers: - get: - operationId: GetStorePaymentProviders - summary: List Payment Providers - description: Retrieve a list of available Payment Providers in a store. - x-authenticated: true - x-codegen: - method: listPaymentProviders - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.store.listPaymentProviders() - .then(({ payment_providers }) => { - console.log(payment_providers.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminStorePaymentProviders } from "medusa-react" - - const PaymentProviders = () => { - const { - payment_providers, - isLoading - } = useAdminStorePaymentProviders() - - return ( -
- {isLoading && Loading...} - {payment_providers && !payment_providers.length && ( - No Payment Providers - )} - {payment_providers && - payment_providers.length > 0 &&( -
    - {payment_providers.map((provider) => ( -
  • {provider.id}
  • - ))} -
- )} -
- ) - } - - export default PaymentProviders - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/store/payment-providers' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Store - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPaymentProvidersList' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/store/tax-providers: - get: - operationId: GetStoreTaxProviders - summary: List Tax Providers - description: Retrieve a list of available Tax Providers in a store. - x-authenticated: true - x-codegen: - method: listTaxProviders - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.store.listTaxProviders() - .then(({ tax_providers }) => { - console.log(tax_providers.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminStoreTaxProviders } from "medusa-react" - - const TaxProviders = () => { - const { - tax_providers, - isLoading - } = useAdminStoreTaxProviders() - - return ( -
- {isLoading && Loading...} - {tax_providers && !tax_providers.length && ( - No Tax Providers - )} - {tax_providers && - tax_providers.length > 0 &&( -
    - {tax_providers.map((provider) => ( -
  • {provider.id}
  • - ))} -
- )} -
- ) - } - - export default TaxProviders - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/store/tax-providers' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Store - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxProvidersList' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/swaps: - get: - operationId: GetSwaps - summary: List Swaps - description: Retrieve a list of Swaps. The swaps can be paginated. - parameters: - - in: query - name: limit - description: Limit the number of swaps returned. - schema: - type: number - default: '50' - - in: query - name: offset - description: The number of swaps to skip when retrieving the swaps. - schema: - type: number - default: '0' - x-authenticated: true - x-codegen: - method: list - queryParams: AdminGetSwapsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.swaps.list() - .then(({ swaps }) => { - console.log(swaps.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminSwaps } from "medusa-react" - - const Swaps = () => { - const { swaps, isLoading } = useAdminSwaps() - - return ( -
- {isLoading && Loading...} - {swaps && !swaps.length && No Swaps} - {swaps && swaps.length > 0 && ( -
    - {swaps.map((swap) => ( -
  • {swap.payment_status}
  • - ))} -
- )} -
- ) - } - - export default Swaps - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/swaps' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Swaps - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminSwapsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/swaps/{id}: - get: - operationId: GetSwapsSwap - summary: Get a Swap - description: Retrieve a Swap's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Swap. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.swaps.retrieve(swapId) - .then(({ swap }) => { - console.log(swap.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminSwap } from "medusa-react" - - type Props = { - swapId: string - } - - const Swap = ({ swapId }: Props) => { - const { swap, isLoading } = useAdminSwap(swapId) - - return ( -
- {isLoading && Loading...} - {swap && {swap.id}} -
- ) - } - - export default Swap - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/swaps/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Swaps - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminSwapsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -24069,224 +4812,30 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /admin/tax-rates: get: operationId: GetTaxRates summary: List Tax Rates - description: Retrieve a list of Tax Rates. The tax rates can be filtered by fields such as `name` or `rate`. The tax rates can also be paginated. + description: Retrieve a list of tax rates. The tax rates can be filtered by fields such as `id`. The tax rates can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: name - description: Filter by name. - schema: - type: string - - in: query - name: region_id - style: form - explode: false - description: Filter by Region IDs - schema: - oneOf: - - type: string - - type: array - items: - type: string - - in: query - name: code - description: Filter by code. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: rate - style: form - explode: false - description: Filter by Rate - schema: - oneOf: - - type: number - - type: object - properties: - lt: - type: number - description: filter by rates less than this number - gt: - type: number - description: filter by rates greater than this number - lte: - type: number - description: filter by rates less than or equal to this number - gte: - type: number - description: filter by rates greater than or equal to this number - - in: query - name: q - description: Term used to search tax rates by name. - schema: - type: string - - in: query - name: order - description: A tax rate field to sort-order the retrieved tax rates by. - schema: - type: string - - in: query - name: offset - description: The number of tax rates to skip when retrieving the tax rates. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of tax rates returned. - schema: - type: integer - default: 50 - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-codegen: - method: list - queryParams: AdminGetTaxRatesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.taxRates.list() - .then(({ tax_rates, limit, offset, count }) => { - console.log(tax_rates.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminTaxRates } from "medusa-react" - - const TaxRates = () => { - const { - tax_rates, - isLoading - } = useAdminTaxRates() - - return ( -
- {isLoading && Loading...} - {tax_rates && !tax_rates.length && ( - No Tax Rates - )} - {tax_rates && tax_rates.length > 0 && ( -
    - {tax_rates.map((tax_rate) => ( -
  • {tax_rate.code}
  • - ))} -
- )} -
- ) - } - - export default TaxRates - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/tax-rates' \ - -H 'x-medusa-access-token: {api_token}' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/tax-rates' \ + -H 'x-medusa-access-token: {api_token}' tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxRatesListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -24299,112 +4848,39 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: operationId: PostTaxRates - summary: Create a Tax Rate - description: Create a Tax Rate. - parameters: - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string + summary: Create Tax Rate + description: Create a tax rate. x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AdminPostTaxRatesReq' - x-codegen: - method: create - queryParams: AdminPostTaxRatesParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.taxRates.create({ - code: "TEST", - name: "New Tax Rate", - region_id - }) - .then(({ tax_rate }) => { - console.log(tax_rate.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateTaxRate } from "medusa-react" - - type Props = { - regionId: string - } - - const CreateTaxRate = ({ regionId }: Props) => { - const createTaxRate = useAdminCreateTaxRate() - // ... - - const handleCreate = ( - code: string, - name: string, - rate: number - ) => { - createTaxRate.mutate({ - code, - name, - region_id: regionId, - rate, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.id) - } - }) - } - - // ... - } - - export default CreateTaxRate - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/tax-rates' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "code": "TEST", - "name": "New Tax Rate", - "region_id": "{region_id}" + "name": "Emilio", + "tax_region_id": "{value}" }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxRatesRes' '400': $ref: '#/components/responses/400_error' '401': @@ -24419,89 +4895,30 @@ paths: $ref: '#/components/responses/500_error' /admin/tax-rates/{id}: get: - operationId: GetTaxRatesTaxRate + operationId: GetTaxRatesId summary: Get a Tax Rate - description: Retrieve a Tax Rate's details. + description: Retrieve a tax rate by its ID. You can expand the tax rate's relations or select the fields that should be returned. + x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The tax rate's ID. required: true - description: ID of the tax rate. schema: type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - x-codegen: - method: retrieve - queryParams: AdminGetTaxRatesTaxRateParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.taxRates.retrieve(taxRateId) - .then(({ tax_rate }) => { - console.log(tax_rate.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminTaxRate } from "medusa-react" - - type Props = { - taxRateId: string - } - - const TaxRate = ({ taxRateId }: Props) => { - const { tax_rate, isLoading } = useAdminTaxRate(taxRateId) - - return ( -
- {isLoading && Loading...} - {tax_rate && {tax_rate.code}} -
- ) - } - - export default TaxRate - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/tax-rates/{id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/tax-rates/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxRatesRes' '400': $ref: '#/components/responses/400_error' '401': @@ -24514,109 +4931,40 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: - operationId: PostTaxRatesTaxRate + operationId: PostTaxRatesId summary: Update a Tax Rate - description: Update a Tax Rate's details. + description: Update a tax rate's details. + x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The tax rate's ID. required: true - description: ID of the tax rate. schema: type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AdminPostTaxRatesTaxRateReq' - x-codegen: - method: update - queryParams: AdminPostTaxRatesTaxRateParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.taxRates.update(taxRateId, { - name: "New Tax Rate" - }) - .then(({ tax_rate }) => { - console.log(tax_rate.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateTaxRate } from "medusa-react" - - type Props = { - taxRateId: string - } - - const TaxRate = ({ taxRateId }: Props) => { - const updateTaxRate = useAdminUpdateTaxRate(taxRateId) - // ... - - const handleUpdate = ( - name: string - ) => { - updateTaxRate.mutate({ - name - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.name) - } - }) - } - - // ... - } - - export default TaxRate - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/tax-rates/{id}' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "name": "New Tax Rate" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] + -H 'x-medusa-access-token: {api_token}' tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxRatesRes' '400': $ref: '#/components/responses/400_error' '401': @@ -24630,74 +4978,30 @@ paths: '500': $ref: '#/components/responses/500_error' delete: - operationId: DeleteTaxRatesTaxRate + operationId: DeleteTaxRatesId summary: Delete a Tax Rate - description: Delete a Tax Rate. Resources associated with the tax rate, such as products or product types, are not deleted. + description: Delete a tax rate. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The tax rate's ID. required: true - description: The ID of the Shipping Option. schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.taxRates.delete(taxRateId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteTaxRate } from "medusa-react" - - type Props = { - taxRateId: string - } - - const TaxRate = ({ taxRateId }: Props) => { - const deleteTaxRate = useAdminDeleteTaxRate(taxRateId) - // ... - - const handleDelete = () => { - deleteTaxRate.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default TaxRate - lang: Shell label: cURL - source: | + source: |- curl -X DELETE '{backend_url}/admin/tax-rates/{id}' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxRatesDeleteRes' '400': $ref: '#/components/responses/400_error' '401': @@ -24710,116 +5014,46 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/tax-rates/{id}/product-types/batch: + requestBody: + content: + application/json: + schema: {} + /admin/tax-rates/{id}/rules: post: - operationId: PostTaxRatesTaxRateProductTypes - summary: Add to Product Types - description: Add Product Types to a Tax Rate. + operationId: PostTaxRatesIdRules + summary: Add Rules to Tax Rate + description: Add a list of rules to a tax rate. + x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The tax rate's ID. required: true - description: ID of the tax rate. schema: type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdminPostTaxRatesTaxRateProductTypesReq' - x-codegen: - method: addProductTypes - queryParams: AdminPostTaxRatesTaxRateProductTypesParams + $ref: '#/components/schemas/AdminPostTaxRatesTaxRateRulesReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.taxRates.addProductTypes(taxRateId, { - product_types: [ - productTypeId - ] - }) - .then(({ tax_rate }) => { - console.log(tax_rate.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminCreateProductTypeTaxRates, - } from "medusa-react" - - type Props = { - taxRateId: string - } - - const TaxRate = ({ taxRateId }: Props) => { - const addProductTypes = useAdminCreateProductTypeTaxRates( - taxRateId - ) - // ... - - const handleAddProductTypes = (productTypeIds: string[]) => { - addProductTypes.mutate({ - product_types: productTypeIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.product_types) - } - }) - } - - // ... - } - - export default TaxRate - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/admin/tax-rates/{id}/product-types/batch' \ + source: |- + curl -X POST '{backend_url}/admin/tax-rates/{id}/rules' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "product_types": [ - "{product_type_id}" - ] + "reference": "{value}", + "reference_id": "{value}" }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxRatesRes' '400': $ref: '#/components/responses/400_error' '401': @@ -24832,117 +5066,38 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + /admin/tax-rates/{id}/rules/{rule_id}: delete: - operationId: DeleteTaxRatesTaxRateProductTypes - summary: Remove Product Types from Rate - description: Remove product types from a tax rate. This only removes the association between the product types and the tax rate. It does not delete the product types. + operationId: DeleteTaxRatesIdRulesRule_id + summary: Remove Rules from Tax Rate + description: Remove a list of rules from a tax rate. This doesn't delete the Rule, only the association between the Rule and the tax rate. + x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The tax rate's ID. required: true - description: ID of the tax rate. schema: type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false + - name: rule_id + in: path + description: The tax rate's rule id. + required: true schema: - type: array - items: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteTaxRatesTaxRateProductTypesReq' - x-codegen: - method: removeProductTypes - queryParams: AdminDeleteTaxRatesTaxRateProductTypesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.taxRates.removeProductTypes(taxRateId, { - product_types: [ - productTypeId - ] - }) - .then(({ tax_rate }) => { - console.log(tax_rate.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { - useAdminDeleteProductTypeTaxRates, - } from "medusa-react" - - type Props = { - taxRateId: string - } - - const TaxRate = ({ taxRateId }: Props) => { - const removeProductTypes = useAdminDeleteProductTypeTaxRates( - taxRateId - ) - // ... - - const handleRemoveProductTypes = ( - productTypeIds: string[] - ) => { - removeProductTypes.mutate({ - product_types: productTypeIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.product_types) - } - }) - } - - // ... - } - - export default TaxRate - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/tax-rates/{id}/product-types/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "product_types": [ - "{product_type_id}" - ] - }' + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE '{backend_url}/admin/tax-rates/{id}/rules/{rule_id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxRatesRes' '400': $ref: '#/components/responses/400_error' '401': @@ -24955,112 +5110,39 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/tax-rates/{id}/products/batch: + requestBody: + content: + application/json: + schema: {} + /admin/tax-regions: post: - operationId: PostTaxRatesTaxRateProducts - summary: Add to Products - description: Add products to a tax rate. - parameters: - - in: path - name: id - required: true - description: ID of the tax rate. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string + operationId: PostTaxRegions + summary: Create Tax Region + description: Create a tax region. x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostTaxRatesTaxRateProductsReq' - x-codegen: - method: addProducts - queryParams: AdminPostTaxRatesTaxRateProductsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.taxRates.addProducts(taxRateId, { - products: [ - productId - ] - }) - .then(({ tax_rate }) => { - console.log(tax_rate.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateProductTaxRates } from "medusa-react" - - type Props = { - taxRateId: string - } - - const TaxRate = ({ taxRateId }: Props) => { - const addProduct = useAdminCreateProductTaxRates(taxRateId) - // ... - - const handleAddProduct = (productIds: string[]) => { - addProduct.mutate({ - products: productIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.products) - } - }) - } - - // ... - } - - export default TaxRate - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/tax-rates/{id}/products/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "products": [ - "{product_id}" - ] - }' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostTaxRegionsReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/tax-regions' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "country_code": "{value}" + }' tags: - - Tax Rates + - Tax Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxRatesRes' '400': $ref: '#/components/responses/400_error' '401': @@ -25073,876 +5155,68 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + /admin/tax-regions/{id}: delete: - operationId: DeleteTaxRatesTaxRateProducts - summary: Remove Products from Rate - description: Remove products from a tax rate. This only removes the association between the products and the tax rate. It does not delete the products. + operationId: DeleteTaxRegionsId + summary: Delete a Tax Region + description: Delete a tax region. + x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The tax region's ID. required: true - description: ID of the tax rate. schema: type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE '{backend_url}/admin/tax-regions/{id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Tax Regions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminDeleteTaxRatesTaxRateProductsReq' - x-codegen: - method: removeProducts - queryParams: AdminDeleteTaxRatesTaxRateProductsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.taxRates.removeProducts(taxRateId, { - products: [ - productId - ] - }) - .then(({ tax_rate }) => { - console.log(tax_rate.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteProductTaxRates } from "medusa-react" - - type Props = { - taxRateId: string - } - - const TaxRate = ({ taxRateId }: Props) => { - const removeProduct = useAdminDeleteProductTaxRates(taxRateId) - // ... - - const handleRemoveProduct = (productIds: string[]) => { - removeProduct.mutate({ - products: productIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.products) - } - }) - } - - // ... - } - - export default TaxRate - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/tax-rates/{id}/products/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "products": [ - "{product_id}" - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Tax Rates - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxRatesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/tax-rates/{id}/shipping-options/batch: - post: - operationId: PostTaxRatesTaxRateShippingOptions - summary: Add to Shipping Options - description: Add Shipping Options to a Tax Rate. - parameters: - - in: path - name: id - required: true - description: ID of the tax rate. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostTaxRatesTaxRateShippingOptionsReq' - x-codegen: - method: addShippingOptions - queryParams: AdminPostTaxRatesTaxRateShippingOptionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.taxRates.addShippingOptions(taxRateId, { - shipping_options: [ - shippingOptionId - ] - }) - .then(({ tax_rate }) => { - console.log(tax_rate.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateShippingTaxRates } from "medusa-react" - - type Props = { - taxRateId: string - } - - const TaxRate = ({ taxRateId }: Props) => { - const addShippingOption = useAdminCreateShippingTaxRates( - taxRateId - ) - // ... - - const handleAddShippingOptions = ( - shippingOptionIds: string[] - ) => { - addShippingOption.mutate({ - shipping_options: shippingOptionIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.shipping_options) - } - }) - } - - // ... - } - - export default TaxRate - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/tax-rates/{id}/shipping-options/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "shipping_options": [ - "{shipping_option_id}" - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Tax Rates - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxRatesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteTaxRatesTaxRateShippingOptions - summary: Remove Shipping Options from Rate - description: Remove shipping options from a tax rate. This only removes the association between the shipping options and the tax rate. It does not delete the shipping options. - parameters: - - in: path - name: id - required: true - description: ID of the tax rate. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteTaxRatesTaxRateShippingOptionsReq' - x-codegen: - method: removeShippingOptions - queryParams: AdminDeleteTaxRatesTaxRateShippingOptionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.taxRates.removeShippingOptions(taxRateId, { - shipping_options: [ - shippingOptionId - ] - }) - .then(({ tax_rate }) => { - console.log(tax_rate.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteShippingTaxRates } from "medusa-react" - - type Props = { - taxRateId: string - } - - const TaxRate = ({ taxRateId }: Props) => { - const removeShippingOptions = useAdminDeleteShippingTaxRates( - taxRateId - ) - // ... - - const handleRemoveShippingOptions = ( - shippingOptionIds: string[] - ) => { - removeShippingOptions.mutate({ - shipping_options: shippingOptionIds, - }, { - onSuccess: ({ tax_rate }) => { - console.log(tax_rate.shipping_options) - } - }) - } - - // ... - } - - export default TaxRate - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/tax-rates/{id}/shipping-options/batch' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "shipping_options": [ - "{shipping_option_id}" - ] - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Tax Rates - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminTaxRatesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/uploads: - post: - operationId: PostUploads - summary: Upload Files - description: Upload at least one file to a public bucket or storage. The file upload is handled by the file service installed on the Medusa backend. - x-authenticated: true - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - files: - type: string - format: binary - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.uploads.create(file) - .then(({ uploads }) => { - console.log(uploads.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUploadFile } from "medusa-react" - - const UploadFile = () => { - const uploadFile = useAdminUploadFile() - // ... - - const handleFileUpload = (file: File) => { - uploadFile.mutate(file, { - onSuccess: ({ uploads }) => { - console.log(uploads[0].key) - } - }) - } - - // ... - } - - export default UploadFile - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/uploads' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: image/jpeg' \ - --form 'files=@""' \ - --form 'files=@""' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Uploads - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminUploadsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteUploads - summary: Delete an Uploaded File - description: Delete an uploaded file from storage. The file is deleted using the installed file service on the Medusa backend. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteUploadsReq' - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.uploads.delete({ - file_key - }) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteFile } from "medusa-react" - - const Image = () => { - const deleteFile = useAdminDeleteFile() - // ... - - const handleDeleteFile = (fileKey: string) => { - deleteFile.mutate({ - file_key: fileKey - }, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default Image - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/uploads' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "file_key": "{file_key}" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Uploads - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteUploadsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/uploads/download-url: - post: - operationId: PostUploadsDownloadUrl - summary: Get a File's Download URL - description: Create and retrieve a presigned or public download URL for a file. The URL creation is handled by the file service installed on the Medusa backend. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminPostUploadsDownloadUrlReq' - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.uploads.getPresignedDownloadUrl({ - file_key - }) - .then(({ download_url }) => { - console.log(download_url); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreatePresignedDownloadUrl } from "medusa-react" - - const Image = () => { - const createPresignedUrl = useAdminCreatePresignedDownloadUrl() - // ... - - const handlePresignedUrl = (fileKey: string) => { - createPresignedUrl.mutate({ - file_key: fileKey - }, { - onSuccess: ({ download_url }) => { - console.log(download_url) - } - }) - } - - // ... - } - - export default Image - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/uploads/download-url' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "file_key": "{file_key}" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Uploads - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminUploadsDownloadUrlRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /admin/uploads/protected: - post: - operationId: PostUploadsProtected - summary: Protected File Upload - description: Upload at least one file to an ACL or a non-public bucket. The file upload is handled by the file service installed on the Medusa backend. - x-authenticated: true - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - files: - type: string - format: binary - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.uploads.createProtected(file) - .then(({ uploads }) => { - console.log(uploads.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUploadProtectedFile } from "medusa-react" - - const UploadFile = () => { - const uploadFile = useAdminUploadProtectedFile() - // ... - - const handleFileUpload = (file: File) => { - uploadFile.mutate(file, { - onSuccess: ({ uploads }) => { - console.log(uploads[0].key) - } - }) - } - - // ... - } - - export default UploadFile - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/uploads/protected' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: image/jpeg' \ - --form 'files=@""' \ - --form 'files=@""' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Uploads - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminUploadsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} /admin/users: get: operationId: GetUsers summary: List Users - description: Retrieves a list of users. The users can be filtered by fields such as `q` or `email`. The users can also be sorted or paginated. + description: Retrieve a list of users. The users can be filtered by fields such as `id`. The users can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: email - description: Filter by email. - schema: - type: string - - in: query - name: first_name - description: Filter by first name. - schema: - type: string - - in: query - name: last_name - description: Filter by last name. - schema: - type: string - - in: query - name: q - description: Term used to search users' first name, last name, and email. - schema: - type: string - - in: query - name: order - description: A user field to sort-order the retrieved users by. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by user IDs. - schema: - oneOf: - - type: string - description: ID of the user. - - type: array - items: - type: string - description: ID of a user. - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of users to skip when retrieving the users. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of users returned. - schema: - type: integer - default: 20 - - in: query - name: fields - description: Comma-separated fields that should be included in the returned users. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetUsersParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.users.list() - .then(({ users, limit, offset, count }) => { - console.log(users.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUsers } from "medusa-react" - - const Users = () => { - const { users, isLoading } = useAdminUsers() - - return ( -
- {isLoading && Loading...} - {users && !users.length && No Users} - {users && users.length > 0 && ( -
    - {users.map((user) => ( -
  • {user.email}
  • - ))} -
- )} -
- ) - } - - export default Users - lang: Shell label: cURL - source: | + source: |- curl '{backend_url}/admin/users' \ -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Users responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminUsersListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -25955,80 +5229,29 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: operationId: PostUsers - summary: Create a User - description: Create an admin User. The user has the same privileges as all admin users, and will be able to authenticate and perform admin functionalities right after creation. + summary: Create User + description: Create a user. x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCreateUserRequest' - x-codegen: - method: create + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.users.create({ - email: "user@example.com", - password: "supersecret" - }) - .then(({ user }) => { - console.log(user.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminCreateUser } from "medusa-react" - - const CreateUser = () => { - const createUser = useAdminCreateUser() - // ... - - const handleCreateUser = () => { - createUser.mutate({ - email: "user@example.com", - password: "supersecret", - }, { - onSuccess: ({ user }) => { - console.log(user.id) - } - }) - } - - // ... - } - - export default CreateUser - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/users' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com", - "password": "supersecret" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] + -H 'x-medusa-access-token: {api_token}' tags: - Users responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminUserRes' '400': $ref: '#/components/responses/400_error' '401': @@ -26041,81 +5264,30 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/users/password-token: - post: - operationId: PostUsersUserPasswordToken - summary: Request Password Reset - description: Generate a password token for an admin user with a given email. This also triggers the `user.password_reset` event. So, if you have a Notification Service installed that can handle this event, a notification, such as an email, will be sent to the user. The token is triggered as part of the `user.password_reset` event's payload. That token must be used later to reset the password using the [Reset Password](https://docs.medusajs.com/api/admin#users_postusersuserpassword) API Route. - externalDocs: - description: How to reset a user's password - url: https://docs.medusajs.com/modules/users/admin/manage-profile#reset-password requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminResetPasswordTokenRequest' - x-codegen: - method: sendResetPasswordToken - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.users.sendResetPasswordToken({ - email: "user@example.com" - }) - .then(() => { - // successful - }) - .catch(() => { - // error occurred - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminSendResetPasswordToken } from "medusa-react" - - const Login = () => { - const requestPasswordReset = useAdminSendResetPasswordToken() - // ... - - const handleResetPassword = ( - email: string - ) => { - requestPasswordReset.mutate({ - email - }, { - onSuccess: () => { - // successful - } - }) - } - - // ... - } - - export default Login - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/users/password-token' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com" - }' + schema: {} + /admin/users/me: + get: + operationId: GetUsersMe + summary: List Users + description: Retrieve a list of users. The users can be filtered by fields such as `id`. The users can also be sorted or paginated. + x-authenticated: true + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/users/me' \ + -H 'x-medusa-access-token: {api_token}' tags: - Users responses: - '204': - description: OK '400': $ref: '#/components/responses/400_error' '401': @@ -26128,166 +5300,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/users/reset-password: - post: - operationId: PostUsersUserPassword - summary: Reset Password - description: Reset the password of an admin User using their reset password token. A user must request to reset their password first before attempting to reset their password with this request. - externalDocs: - description: How to reset a user's password - url: https://docs.medusajs.com/modules/users/admin/manage-profile#reset-password requestBody: content: application/json: - schema: - $ref: '#/components/schemas/AdminResetPasswordRequest' - x-codegen: - method: resetPassword - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.users.resetPassword({ - token: "supersecrettoken", - password: "supersecret" - }) - .then(({ user }) => { - console.log(user.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminResetPassword } from "medusa-react" - - const ResetPassword = () => { - const resetPassword = useAdminResetPassword() - // ... - - const handleResetPassword = ( - token: string, - password: string - ) => { - resetPassword.mutate({ - token, - password, - }, { - onSuccess: ({ user }) => { - console.log(user.id) - } - }) - } - - // ... - } - - export default ResetPassword - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/admin/users/reset-password' \ - -H 'x-medusa-access-token: {api_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "token": "supersecrettoken", - "password": "supersecret" - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Users - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminUserRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} /admin/users/{id}: get: - operationId: GetUsersUser + operationId: GetUsersId summary: Get a User - description: Retrieve an admin user's details. + description: Retrieve a user by its ID. You can expand the user's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The user's ID. required: true - description: The ID of the User. schema: type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.users.retrieve(userId) - .then(({ user }) => { - console.log(user.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUser } from "medusa-react" - - type Props = { - userId: string - } - - const User = ({ userId }: Props) => { - const { user, isLoading } = useAdminUser( - userId - ) - - return ( -
- {isLoading && Loading...} - {user && {user.first_name} {user.last_name}} -
- ) - } - - export default User - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/users/{id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/users/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Users responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminUserRes' '400': $ref: '#/components/responses/400_error' '401': @@ -26300,90 +5342,44 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} post: - operationId: PostUsersUser + operationId: PostUsersId summary: Update a User - description: Update an admin user's details. + description: Update a user's details. + x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The user's ID. required: true - description: The ID of the User. schema: type: string - x-authenticated: true + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AdminUpdateUserRequest' - x-codegen: - method: update x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.users.update(userId, { - first_name: "Marcellus" - }) - .then(({ user }) => { - console.log(user.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminUpdateUser } from "medusa-react" - - type Props = { - userId: string - } - - const User = ({ userId }: Props) => { - const updateUser = useAdminUpdateUser(userId) - // ... - - const handleUpdateUser = ( - firstName: string - ) => { - updateUser.mutate({ - first_name: firstName, - }, { - onSuccess: ({ user }) => { - console.log(user.first_name) - } - }) - } - - // ... - } - - export default User - lang: Shell label: cURL - source: | + source: |- curl -X POST '{backend_url}/admin/users/{id}' \ -H 'x-medusa-access-token: {api_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "first_name": "Marcellus" + "avatar_url": "{value}" }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Users responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminUserRes' '400': $ref: '#/components/responses/400_error' '401': @@ -26397,74 +5393,30 @@ paths: '500': $ref: '#/components/responses/500_error' delete: - operationId: DeleteUsersUser + operationId: DeleteUsersId summary: Delete a User - description: Delete a User. Once deleted, the user will not be able to authenticate or perform admin functionalities. + description: Delete a user. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The user's ID. required: true - description: The ID of the User. schema: type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.users.delete(userId) - .then(({ id, object, deleted }) => { - console.log(id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminDeleteUser } from "medusa-react" - - type Props = { - userId: string - } - - const User = ({ userId }: Props) => { - const deleteUser = useAdminDeleteUser(userId) - // ... - - const handleDeleteUser = () => { - deleteUser.mutate(void 0, { - onSuccess: ({ id, object, deleted }) => { - console.log(id) - } - }) - } - - // ... - } - - export default User - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/admin/users/{id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE '{backend_url}/admin/users/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - Users responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminDeleteUserRes' '400': $ref: '#/components/responses/400_error' '401': @@ -26477,194 +5429,30 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/variants: + requestBody: + content: + application/json: + schema: {} + /admin/workflows-executions: get: - operationId: GetVariants - summary: List Product Variants - description: Retrieve a list of Product Variants. The product variant can be filtered by fields such as `id` or `title`. The product variant can also be paginated. + operationId: GetWorkflowsExecutions + summary: List Workflows Executions + description: Retrieve a list of workflows executions. The workflows executions can be filtered by fields such as `id`. The workflows executions can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: id - style: form - explode: false - description: Filter by product variant IDs. - schema: - oneOf: - - type: string - description: A product variant ID. - - type: array - description: An array of product variant IDs. - items: - type: string - - in: query - name: expand - description: '"Comma-separated relations that should be expanded in the returned product variants."' - schema: - type: string - - in: query - name: fields - description: '"Comma-separated fields that should be included in the returned product variants."' - schema: - type: string - - in: query - name: offset - description: The number of product variants to skip when retrieving the product variants. - schema: - type: number - default: '0' - - in: query - name: limit - description: Limit the number of product variants returned. - schema: - type: number - default: '100' - - in: query - name: order - 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 `-`. - schema: - type: string - - in: query - name: manage_inventory - description: Filter product variants by whether their inventory is managed or not. - schema: - type: boolean - - in: query - name: allow_backorder - description: Filter product variants by whether they are allowed to be backordered or not. - schema: - type: boolean - - in: query - name: cart_id - style: form - explode: false - description: The ID of the cart to use for the price selection context. - schema: - type: string - - in: query - name: region_id - style: form - explode: false - description: The ID of the region to use for the price selection context. - schema: - type: string - externalDocs: - description: Price selection context overview - url: https://docs.medusajs.com/modules/price-lists/price-selection-strategy#context-object - - in: query - name: currency_code - style: form - explode: false - description: The 3 character ISO currency code to use for the price selection context. - schema: - type: string - externalDocs: - description: Price selection context overview - url: https://docs.medusajs.com/modules/price-lists/price-selection-strategy#context-object - - in: query - name: customer_id - style: form - explode: false - description: The ID of the customer to use for the price selection context. - schema: - type: string - externalDocs: - description: Price selection context overview - url: https://docs.medusajs.com/modules/price-lists/price-selection-strategy#context-object - - in: query - name: title - style: form - explode: false - description: Filter by title. - schema: - oneOf: - - type: string - description: a single title to filter by - - type: array - description: multiple titles to filter by - items: - type: string - - in: query - name: inventory_quantity - description: Filter by available inventory quantity - schema: - oneOf: - - type: number - description: a specific number to filter by. - - type: object - description: filter using less and greater than comparisons. - properties: - lt: - type: number - description: filter by inventory quantity less than this number - gt: - type: number - description: filter by inventory quantity greater than this number - lte: - type: number - description: filter by inventory quantity less than or equal to this number - gte: - type: number - description: filter by inventory quantity greater than or equal to this number - x-codegen: - method: list - queryParams: AdminGetVariantsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.variants.list() - .then(({ variants, limit, offset, count }) => { - console.log(variants.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminVariants } from "medusa-react" - - const Variants = () => { - const { variants, isLoading } = useAdminVariants() - - return ( -
- {isLoading && Loading...} - {variants && !variants.length && ( - No Variants - )} - {variants && variants.length > 0 && ( -
    - {variants.map((variant) => ( -
  • {variant.title}
  • - ))} -
- )} -
- ) - } - - export default Variants - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/variants' \ - -H 'x-medusa-access-token: {api_token}' + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/workflows-executions' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Product Variants + - Workflows Executions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminVariantsListRes' '400': $ref: '#/components/responses/400_error' '401': @@ -26677,85 +5465,36 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/variants/{id}: + requestBody: + content: + application/json: + schema: {} + /admin/workflows-executions/{id}: get: - operationId: GetVariantsVariant - summary: Get a Product variant - description: Retrieve a product variant's details. + operationId: GetWorkflowsExecutionsId + summary: Get a Workflows Execution + description: Retrieve a workflows execution by its ID. You can expand the workflows execution's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The workflows execution's ID. required: true - description: The ID of the product variant. schema: type: string - - in: query - name: expand - description: '"Comma-separated relations that should be expanded in the returned product variant."' - schema: - type: string - - in: query - name: fields - description: '"Comma-separated fields that should be included in the returned product variant."' - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetVariantParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.variants.retrieve(variantId) - .then(({ variant }) => { - console.log(variant.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminVariant } from "medusa-react" - - type Props = { - variantId: string - } - - const Variant = ({ variantId }: Props) => { - const { variant, isLoading } = useAdminVariant( - variantId - ) - - return ( -
- {isLoading && Loading...} - {variant && {variant.title}} -
- ) - } - - export default Variant - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/variants/{id}' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/workflows-executions/{id}' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Product Variants + - Workflows Executions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminVariantsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -26768,83 +5507,41 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /admin/variants/{id}/inventory: - get: - operationId: GetVariantsVariantInventory - summary: Get Variant's Inventory - description: Retrieve the available inventory of a Product Variant. + requestBody: + content: + application/json: + schema: {} + /admin/workflows-executions/{workflow_id}/run: + post: + operationId: PostWorkflowsExecutionsWorkflow_idRun + summary: Add Runs to Workflows Execution + description: Add a list of runs to a workflows execution. x-authenticated: true parameters: - - in: path - name: id + - name: workflow_id + in: path + description: The workflows execution's workflow id. required: true - description: The Product Variant ID. schema: type: string - x-codegen: - method: getInventory - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.admin.variants.getInventory(variantId) - .then(({ variant }) => { - console.log(variant.inventory, variant.sales_channel_availability) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAdminVariantsInventory } from "medusa-react" - - type Props = { - variantId: string - } - - const VariantInventory = ({ variantId }: Props) => { - const { variant, isLoading } = useAdminVariantsInventory( - variantId - ) - - return ( -
- {isLoading && Loading...} - {variant && variant.inventory.length === 0 && ( - Variant doesn't have inventory details - )} - {variant && variant.inventory.length > 0 && ( -
    - {variant.inventory.map((inventory) => ( -
  • {inventory.title}
  • - ))} -
- )} -
- ) - } - - export default VariantInventory - - lang: Shell - label: cURL - source: | - curl '{backend_url}/admin/variants/{id}/inventory' \ - -H 'x-medusa-access-token: {api_token}' security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostWorkflowsRunReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/run' \ + -H 'x-medusa-access-token: {api_token}' tags: - - Product Variants + - Workflows Executions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AdminGetVariantsVariantInventoryRes' '400': $ref: '#/components/responses/400_error' '401': @@ -26857,6 +5554,246 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + /admin/workflows-executions/{workflow_id}/steps/failure: + post: + operationId: PostWorkflowsExecutionsWorkflow_idStepsFailure + summary: Add Failures to Workflows Execution + description: Add a list of failures to a workflows execution. + x-authenticated: true + parameters: + - name: workflow_id + in: path + description: The workflows execution's workflow id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostWorkflowsAsyncResponseReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/steps/failure' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "transaction_id": "{value}", + "step_id": "{value}" + }' + tags: + - Workflows Executions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + /admin/workflows-executions/{workflow_id}/steps/success: + post: + operationId: PostWorkflowsExecutionsWorkflow_idStepsSuccess + summary: Add Successes to Workflows Execution + description: Add a list of successes to a workflows execution. + x-authenticated: true + parameters: + - name: workflow_id + in: path + description: The workflows execution's workflow id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdminPostWorkflowsAsyncResponseReq' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/steps/success' \ + -H 'x-medusa-access-token: {api_token}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "transaction_id": "{value}", + "step_id": "{value}" + }' + tags: + - Workflows Executions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + /admin/workflows-executions/{workflow_id}/subscribe: + get: + operationId: GetWorkflowsExecutionsWorkflow_idSubscribe + summary: List Subscribes + description: Retrieve a list of subscribes in a workflows execution. The subscribes can be filtered by fields like FILTER FIELDS. The subscribes can also be paginated. + x-authenticated: true + parameters: + - name: workflow_id + in: path + description: The workflows execution's workflow id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/workflows-executions/{workflow_id}/subscribe' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Workflows Executions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + /admin/workflows-executions/{workflow_id}/{transaction_id}: + get: + operationId: GetWorkflowsExecutionsWorkflow_idTransaction_id + summary: 'List ' + description: Retrieve a list of in a workflows execution. The can be filtered by fields like FILTER FIELDS. The can also be paginated. + x-authenticated: true + parameters: + - name: workflow_id + in: path + description: The workflows execution's workflow id. + required: true + schema: + type: string + - name: transaction_id + in: path + description: The workflows execution's transaction id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/workflows-executions/{workflow_id}/{transaction_id}' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Workflows Executions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + /admin/workflows-executions/{workflow_id}/{transaction_id}/{step_id}/subscribe: + get: + operationId: GetWorkflowsExecutionsWorkflow_idTransaction_idStep_idSubscribe + summary: List Subscribes + description: Retrieve a list of subscribes in a workflows execution. The subscribes can be filtered by fields like FILTER FIELDS. The subscribes can also be paginated. + x-authenticated: true + parameters: + - name: workflow_id + in: path + description: The workflows execution's workflow id. + required: true + schema: + type: string + - name: transaction_id + in: path + description: The workflows execution's transaction id. + required: true + schema: + type: string + - name: step_id + in: path + description: The workflows execution's step id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/workflows-executions/{workflow_id}/{transaction_id}/{step_id}/subscribe' \ + -H 'x-medusa-access-token: {api_token}' + tags: + - Workflows Executions + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} components: responses: default_error: @@ -27002,8016 +5939,1841 @@ components: name: connect.sid x-displayName: Cookie Session ID schemas: - Address: - title: Address - description: An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity. + AdminDeletePricingRuleTypesRuleTypeReq: type: object - required: - - address_1 - - address_2 - - city - - company - - country_code - - created_at - - customer_id - - deleted_at - - first_name - - id - - last_name - - metadata - - phone - - postal_code - - province - - updated_at + description: SUMMARY + x-schemaName: AdminDeletePricingRuleTypesRuleTypeReq + properties: {} + AdminGetPricingRuleTypesParams: + type: object + description: SUMMARY + x-schemaName: AdminGetPricingRuleTypesParams properties: + rule_attribute: + type: array + description: The pricing's rule attribute. + items: + type: string + title: rule_attribute + description: The rule attribute's details. + expand: + type: string + title: expand + description: The pricing's expand. + fields: + type: string + title: fields + description: The pricing's fields. + offset: + type: number + title: offset + description: The pricing's offset. + limit: + type: number + title: limit + description: The pricing's limit. + order: + type: string + title: order + description: The pricing's order. + AdminGetPricingRuleTypesRuleTypeParams: + type: object + description: SUMMARY + x-schemaName: AdminGetPricingRuleTypesRuleTypeParams + properties: + expand: + type: string + title: expand + description: The pricing's expand. + fields: + type: string + title: fields + description: The pricing's fields. + AdminGetProductsParams: + type: object + description: SUMMARY + x-schemaName: AdminGetProductsParams + properties: + q: + type: string + title: q + description: The product's q. id: + oneOf: + - type: string + title: id + description: The product's ID. + - type: array + description: The product's ID. + items: + type: string + title: id + description: The id's ID. + status: + type: array + description: The product's status. + items: {} + title: type: string - description: ID of the address - example: addr_01G8ZC9VS1XVE149MGH2J7QSSH - customer_id: - description: ID of the customer this address belongs to - nullable: true + title: title + description: The product's title. + handle: type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: Available if the relation `customer` is expanded. - nullable: true + title: handle + description: The product's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The product's is giftcard. + price_list_id: + type: array + description: The product's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The product's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The product's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The product's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The product's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: type: object - company: - description: Company name - nullable: true - type: string - example: Acme - first_name: - description: First name - nullable: true - type: string - example: Arno - last_name: - description: Last name - nullable: true - type: string - example: Willms - address_1: - description: Address line 1 - nullable: true - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - nullable: true - type: string - example: Suite 369 - city: - description: City - nullable: true - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - nullable: true - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - country: - description: A country object. - x-expandable: country - nullable: true - $ref: '#/components/schemas/Country' - province: - description: Province - nullable: true - type: string - example: Kentucky - postal_code: - description: Postal Code - nullable: true - type: string - example: 72093 - phone: - description: Phone Number - nullable: true - type: string - example: 16128234334802 - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AddressCreatePayload: - type: object - description: Address fields used when creating an address. - required: - - first_name - - last_name - - address_1 - - city - - country_code - - postal_code - properties: - first_name: - description: First name - type: string - example: Arno - last_name: - description: Last name - type: string - example: Willms - phone: - type: string - description: Phone Number - example: 16128234334802 - company: - type: string - address_1: - description: Address line 1 - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - type: string - example: Suite 369 - city: - description: City - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - province: - description: Province - type: string - example: Kentucky - postal_code: - description: Postal Code - type: string - example: 72093 - metadata: - type: object - example: - car: white - description: An optional key-value map with additional details - AddressPayload: - type: object - description: Address fields used when creating/updating an address. - properties: - first_name: - description: First name - type: string - example: Arno - last_name: - description: Last name - type: string - example: Willms - phone: - type: string - description: Phone Number - example: 16128234334802 - company: - type: string - description: Company - address_1: - description: Address line 1 - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - type: string - example: Suite 369 - city: - description: City - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - province: - description: Province - type: string - example: Kentucky - postal_code: - description: Postal Code - type: string - example: 72093 - metadata: - type: object - example: - car: white - description: An optional key-value map with additional details - AdminAppsListRes: - type: object - required: - - apps - properties: - apps: - type: array - description: An array of app details. - items: - $ref: '#/components/schemas/OAuth' - AdminAppsRes: - type: object - required: - - apps - properties: - apps: - description: App details. - $ref: '#/components/schemas/OAuth' - AdminAuthRes: - type: object - description: The user's details. - required: - - user - properties: - user: - description: User details. - $ref: '#/components/schemas/User' - AdminBatchJobListRes: - type: object - required: - - batch_jobs - - count - - offset - - limit - properties: - batch_jobs: - type: array - description: An array of batch job details. - items: - $ref: '#/components/schemas/BatchJob' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of batch jobs skipped when retrieving the batch jobs. - limit: - type: integer - description: The number of items per page - AdminBatchJobRes: - type: object - description: The batch job's details. - required: - - batch_job - properties: - batch_job: - description: Batch job details. - $ref: '#/components/schemas/BatchJob' - AdminBearerAuthRes: - type: object - description: The access token of the user, if they're authenticated successfully. - properties: - access_token: - description: Access token that can be used to send authenticated requests. - type: string - AdminCollectionsDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Collection - object: - type: string - description: The type of the object that was deleted. - default: product-collection - deleted: - type: boolean - description: Whether the collection was deleted successfully or not. - default: true - AdminCollectionsListRes: - type: object - required: - - collections - - count - - offset - - limit - properties: - collections: - type: array - description: an array of collection details - items: - $ref: '#/components/schemas/ProductCollection' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product collections skipped when retrieving the product collections. - limit: - type: integer - description: The number of items per page - AdminCollectionsRes: - type: object - description: The collection's details. - x-expanded-relations: - field: collection - relations: - - products - required: - - collection - properties: - collection: - description: Product Collection details. - $ref: '#/components/schemas/ProductCollection' - AdminCreateUserRequest: - type: object - required: - - email - - password - properties: - email: - description: The User's email. - type: string - format: email - first_name: - description: The first name of the User. - type: string - last_name: - description: The last name of the User. - type: string - role: - description: The role assigned to the user. These roles don't provide any different privileges. - type: string - enum: - - admin - - member - - developer - password: - description: The User's password. - type: string - format: password - AdminCurrenciesListRes: - type: object - description: List of currencies with pagination fields. - required: - - currencies - - count - - offset - - limit - properties: - currencies: - type: array - description: An array of currency details. - items: - $ref: '#/components/schemas/Currency' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of currencies skipped when retrieving the currencies. - limit: - type: integer - description: The number of items per page - AdminCurrenciesRes: - type: object - description: A currency's details. - required: - - currency - properties: - currency: - description: Currency details. - $ref: '#/components/schemas/Currency' - AdminCustomerGroupsDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted customer group. - object: - type: string - description: The type of the object that was deleted. - default: customer_group - deleted: - type: boolean - description: Whether the customer group was deleted successfully or not. - default: true - AdminCustomerGroupsListRes: - type: object - required: - - customer_groups - - count - - offset - - limit - properties: - customer_groups: - type: array - description: An array of customer group details. - items: - $ref: '#/components/schemas/CustomerGroup' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of customer groups skipped when retrieving the customer groups. - limit: - type: integer - description: The number of items per page - AdminCustomerGroupsRes: - type: object - description: The customer group's details. - required: - - customer_group - properties: - customer_group: - description: Customer group details. - $ref: '#/components/schemas/CustomerGroup' - AdminCustomersListRes: - description: The list of customers with pagination fields. - type: object - required: - - customers - - count - - offset - - limit - properties: - customers: - type: array - description: An array of customer details. - items: - $ref: '#/components/schemas/Customer' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of customers skipped when retrieving the customers. - limit: - type: integer - description: The number of items per page - AdminCustomersRes: - type: object - description: The customer's details. - x-expanded-relations: - field: customer - relations: - - orders - - shipping_addresses - required: - - customer - properties: - customer: - description: Customer details. - $ref: '#/components/schemas/Customer' - AdminDeleteCustomerGroupsGroupCustomerBatchReq: - type: object - description: The customers to remove from the customer group. - required: - - customer_ids - properties: - customer_ids: - description: The ids of the customers to remove + description: The product's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: type: array + description: The product's $and. items: type: object - required: - - id + description: The $and's details. + x-schemaName: AdminGetProductsParams properties: + q: + type: string + title: q + description: The $and's q. id: - description: ID of the customer - type: string - AdminDeleteDiscountsDiscountConditionsConditionBatchReq: - type: object - description: The resources to remove. - required: - - resources - properties: - resources: - description: The resources to be removed from the discount condition - type: array - items: - type: object - required: - - id - properties: - id: - description: The id of the item - type: string - AdminDeletePriceListPricesPricesReq: - type: object - description: The details of the prices to delete. - properties: - price_ids: - description: The IDs of the prices to delete. - type: array - items: - type: string - AdminDeletePriceListsPriceListProductsPricesBatchReq: - type: object - description: The details of the products' prices to delete. - properties: - product_ids: - description: The IDs of the products to delete their associated prices. - type: array - items: - type: string - AdminDeleteProductCategoriesCategoryProductsBatchReq: - type: object - description: The details of the products to delete from the product category. - required: - - product_ids - properties: - product_ids: - description: The IDs of the products to delete from the product category. - type: array - items: - type: object - required: - - id - properties: - id: - description: The ID of a product - type: string - AdminDeleteProductsFromCollectionReq: - type: object - description: The details of the products to remove from the collection. - required: - - product_ids - properties: - product_ids: - description: An array of Product IDs to remove from the Product Collection. - type: array - items: - description: The ID of a Product to add to the Product Collection. - type: string - AdminDeleteProductsFromCollectionRes: - type: object - description: Deletion operation details - required: - - id - - object - - removed_products - properties: - id: - type: string - description: The ID of the collection - object: - type: string - description: The type of object the removal was executed on - default: product-collection - removed_products: - description: The IDs of the products removed from the collection - type: array - items: - description: The ID of the Product removed from the Product Collection. - type: string - AdminDeletePublishableApiKeySalesChannelsBatchReq: - type: object - description: The details of the sales channels to remove from the publishable API key. - required: - - sales_channel_ids - properties: - sales_channel_ids: - description: The IDs of the sales channels to remove from the publishable API key - type: array - items: - type: object - required: - - id - properties: - id: - type: string - description: The ID of the sales channel - AdminDeleteSalesChannelsChannelProductsBatchReq: - type: object - description: The details of the products to delete from the sales channel. - required: - - product_ids - properties: - product_ids: - description: The IDs of the products to remove from the sales channel. - type: array - items: - type: object - required: - - id - properties: - id: - description: The ID of a product - type: string - AdminDeleteSalesChannelsChannelStockLocationsReq: - type: object - required: - - location_id - properties: - location_id: - description: The ID of the stock location - type: string - AdminDeleteShippingProfileRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Shipping Profile. - object: - type: string - description: The type of the object that was deleted. - default: shipping_profile - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminDeleteTaxRatesTaxRateProductTypesReq: - type: object - description: Product types to remove from the tax rates. - required: - - product_types - properties: - product_types: - type: array - description: The IDs of the product types to remove their association with this tax rate. - items: - type: string - AdminDeleteTaxRatesTaxRateProductsReq: - type: object - description: The details of the products to remove their associated with the tax rate. - required: - - products - properties: - products: - type: array - description: The IDs of the products to remove their association with this tax rate. - items: - type: string - AdminDeleteTaxRatesTaxRateShippingOptionsReq: - type: object - description: The details of the shipping options to remove their associate with the tax rate. - required: - - shipping_options - properties: - shipping_options: - type: array - description: The IDs of the shipping options to remove their association with this tax rate. - items: - type: string - AdminDeleteUploadsReq: - type: object - description: The details of the file to delete. - required: - - file_key - properties: - file_key: - description: key of the file to delete. This is obtained when you first uploaded the file, or by the file service if you used it directly. - type: string - AdminDeleteUploadsRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The file key of the upload deleted - object: - type: string - description: The type of the object that was deleted. - default: file - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminDeleteUserRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted user. - object: - type: string - description: The type of the object that was deleted. - default: user - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminDiscountConditionsDeleteRes: - type: object - required: - - id - - object - - deleted - - discount - properties: - id: - type: string - description: The ID of the deleted Discount Condition - object: - type: string - description: The type of the object that was deleted. - default: discount-condition - deleted: - type: boolean - description: Whether the discount condition was deleted successfully. - default: true - discount: - description: The Discount to which the condition used to belong to. - $ref: '#/components/schemas/Discount' - AdminDiscountConditionsRes: - type: object - x-expanded-relations: - field: discount_condition - relations: - - discount_rule - required: - - discount_condition - properties: - discount_condition: - description: Discount condition details. - $ref: '#/components/schemas/DiscountCondition' - AdminDiscountsDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Discount - object: - type: string - description: The type of the object that was deleted. - default: discount - deleted: - type: boolean - description: Whether the discount was deleted successfully. - default: true - AdminDiscountsListRes: - type: object - description: The list of discounts with pagination fields. - x-expanded-relations: - field: discounts - relations: - - parent_discount - - regions - - rule - - rule.conditions - required: - - discounts - - count - - offset - - limit - properties: - discounts: - type: array - description: The list of discounts. - items: - $ref: '#/components/schemas/Discount' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of discounts skipped when retrieving the discounts. - limit: - type: integer - description: The number of items per page - AdminDiscountsRes: - type: object - description: The discount's details. - x-expanded-relations: - field: discount - relations: - - parent_discount - - regions - - rule - - rule.conditions - eager: - - regions.fulfillment_providers - - regions.payment_providers - required: - - discount - properties: - discount: - description: Discount details. - $ref: '#/components/schemas/Discount' - AdminDraftOrdersDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Draft Order. - object: - type: string - description: The type of the object that was deleted. - default: draft-order - deleted: - type: boolean - description: Whether the draft order was deleted successfully. - default: true - AdminDraftOrdersListRes: - description: The list of draft orders with pagination fields. - type: object - x-expanded-relations: - field: draft_orders - relations: - - order - - cart - - cart.items - - cart.items.adjustments - required: - - draft_orders - - count - - offset - - limit - properties: - draft_orders: - type: array - description: An array of draft order's details. - items: - $ref: '#/components/schemas/DraftOrder' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of draft orders skipped when retrieving the draft orders. - limit: - type: integer - description: The number of items per page - AdminDraftOrdersRes: - type: object - description: The list of draft orders. - x-expanded-relations: - field: draft_order - relations: - - order - - cart - - cart.items - - cart.items.adjustments - - cart.billing_address - - cart.customer - - cart.discounts - - cart.discounts.rule - - cart.items - - cart.items.adjustments - - cart.payment - - cart.payment_sessions - - cart.region - - cart.region.payment_providers - - cart.shipping_address - - cart.shipping_methods - - cart.shipping_methods.shipping_option - eager: - - cart.region.fulfillment_providers - - cart.region.payment_providers - - cart.shipping_methods.shipping_option - implicit: - - cart.discounts - - cart.discounts.rule - - cart.gift_cards - - cart.items - - cart.items.adjustments - - cart.items.tax_lines - - cart.items.variant - - cart.items.variant.product - - cart.items.variant.product.profiles - - cart.region - - cart.region.tax_rates - - cart.shipping_address - - cart.shipping_methods - - cart.shipping_methods.tax_lines - totals: - - cart.discount_total - - cart.gift_card_tax_total - - cart.gift_card_total - - cart.item_tax_total - - cart.refundable_amount - - cart.refunded_total - - cart.shipping_tax_total - - cart.shipping_total - - cart.subtotal - - cart.tax_total - - cart.total - - cart.items.discount_total - - cart.items.gift_card_total - - cart.items.original_tax_total - - cart.items.original_total - - cart.items.refundable - - cart.items.subtotal - - cart.items.tax_total - - cart.items.total - required: - - draft_order - properties: - draft_order: - description: Draft order's details. - $ref: '#/components/schemas/DraftOrder' - AdminExtendedStoresRes: - type: object - description: The store's details with additional details like payment and tax providers. - x-expanded-relations: - field: store - relations: - - currencies - - default_currency - required: - - store - properties: - store: - description: Store details. - $ref: '#/components/schemas/ExtendedStoreDTO' - AdminGetRegionsRegionFulfillmentOptionsRes: - type: object - description: The list of fulfillment options in a region. - required: - - fulfillment_options - properties: - fulfillment_options: - type: array - description: Fulfillment providers details. - items: - type: object - required: - - provider_id - - options - properties: - provider_id: - description: ID of the fulfillment provider - type: string - options: - description: fulfillment provider options + oneOf: + - type: string + title: id + description: The $and's ID. + - type: array + description: The $and's ID. + items: + type: string + title: id + description: The id's ID. + status: type: array + description: The $and's status. + items: {} + title: + type: string + title: title + description: The $and's title. + handle: + type: string + title: handle + description: The $and's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $and's is giftcard. + price_list_id: + type: array + description: The $and's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $and's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $and's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $and's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $and's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $and's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $and's details. items: type: object - example: - - id: manual-fulfillment - - id: manual-fulfillment-return - is_return: true - AdminGetVariantsVariantInventoryRes: - type: object - description: The variant's inventory details. - properties: - variant: - type: object - description: The product variant's inventory details. - $ref: '#/components/schemas/VariantInventory' - AdminGiftCardsDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Gift Card - object: - type: string - description: The type of the object that was deleted. - default: gift-card - deleted: - type: boolean - description: Whether the gift card was deleted successfully. - default: true - AdminGiftCardsListRes: - type: object - description: The list of gift cards with pagination fields. - x-expanded-relations: - field: gift_cards - relations: - - order - - region - eager: - - region.fulfillment_providers - - region.payment_providers - required: - - gift_cards - - count - - offset - - limit - properties: - gift_cards: - type: array - description: The list of gift cards. - items: - $ref: '#/components/schemas/GiftCard' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of gift cards skipped when retrieving the gift cards. - limit: - type: integer - description: The number of items per page - AdminGiftCardsRes: - type: object - description: The gift card's details. - x-expanded-relations: - field: gift_card - relations: - - order - - region - eager: - - region.fulfillment_providers - - region.payment_providers - required: - - gift_card - properties: - gift_card: - description: A gift card's details. - $ref: '#/components/schemas/GiftCard' - AdminInventoryItemsDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Inventory Item. - object: - type: string - description: The type of the object that was deleted. - format: inventory_item - deleted: - type: boolean - description: Whether or not the Inventory Item was deleted. - default: true - AdminInventoryItemsListRes: - type: object - required: - - inventory_items - - count - - offset - - limit - properties: - inventory_items: - type: array - description: an array of Inventory Item details - items: - $ref: '#/components/schemas/InventoryItemDTO' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of inventory items skipped when retrieving the inventory items. - limit: - type: integer - description: The number of items per page - AdminInventoryItemsListWithVariantsAndLocationLevelsRes: - type: object - required: - - inventory_items - - count - - offset - - limit - properties: - inventory_items: - type: array - description: an array of Inventory Item details - items: - $ref: '#/components/schemas/DecoratedInventoryItemDTO' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of inventory items skipped when retrieving the inventory items. - limit: - type: integer - description: The number of items per page - AdminInventoryItemsLocationLevelsRes: - type: object - description: Details of inventory items and their associated location levels. - required: - - inventory_item - properties: - inventory_item: - type: object - description: An inventory item's ID and associated location levels. - required: - - id - - location_levels - properties: - id: - description: The id of the location - type: string - location_levels: - description: List of stock levels at a given location - type: array - items: - $ref: '#/components/schemas/InventoryLevelDTO' - AdminInventoryItemsRes: - type: object - description: The inventory item's details. - required: - - inventory_item - properties: - inventory_item: - description: Inventory Item details - $ref: '#/components/schemas/InventoryItemDTO' - AdminInviteDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Invite. - object: - type: string - description: The type of the object that was deleted. - default: invite - deleted: - type: boolean - description: Whether or not the invite was deleted. - default: true - AdminListInvitesRes: - description: The list of invites. - type: object - required: - - invites - properties: - invites: - type: array - description: An array of invites - items: - $ref: '#/components/schemas/Invite' - AdminNotesDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Note. - object: - type: string - description: The type of the object that was deleted. - default: note - deleted: - type: boolean - description: Whether or not the Note was deleted. - default: true - AdminNotesListRes: - type: object - description: The list of notes with pagination fields. - required: - - notes - - count - - offset - - limit - properties: - notes: - type: array - description: An array of notes - items: - $ref: '#/components/schemas/Note' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of notes skipped when retrieving the notes. - limit: - type: integer - description: The number of items per page - AdminNotesRes: - type: object - description: The note's details. - required: - - note - properties: - note: - description: Note details. - $ref: '#/components/schemas/Note' - AdminNotificationsListRes: - type: object - x-expanded-relations: - field: notifications - relations: - - resends - required: - - notifications - properties: - notifications: - type: array - description: an array of notifications - items: - $ref: '#/components/schemas/Notification' - count: - type: integer - description: The total number of notifications - offset: - type: integer - description: The number of notifications skipped when retrieving the notifications. - limit: - type: integer - description: The number of notifications per page - AdminNotificationsRes: - type: object - description: The notification's details. - x-expanded-relations: - field: notification - relations: - - resends - required: - - notification - properties: - notification: - description: Notification details - $ref: '#/components/schemas/Notification' - AdminOrderEditDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Order Edit. - object: - type: string - description: The type of the object that was deleted. - default: order_edit - deleted: - type: boolean - description: Whether or not the Order Edit was deleted. - default: true - AdminOrderEditItemChangeDeleteRes: - type: object - description: The details of deleting order edit item changes. - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Order Edit Item Change. - object: - type: string - description: The type of the object that was deleted. - default: item_change - deleted: - type: boolean - description: Whether or not the Order Edit Item Change was deleted. - default: true - AdminOrderEditsListRes: - type: object - description: The list of order edits with pagination fields. - x-expanded-relations: - field: order_edits - relations: - - changes - - changes.line_item - - changes.line_item.variant - - changes.original_line_item - - changes.original_line_item.variant - - items - - items.adjustments - - items.tax_lines - - items.variant - - payment_collection - implicit: - - items - - items.tax_lines - - items.adjustments - - items.variant - totals: - - difference_due - - discount_total - - gift_card_tax_total - - gift_card_total - - shipping_total - - subtotal - - tax_total - - total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - required: - - order_edits - - count - - offset - - limit - properties: - order_edits: - type: array - description: An array of order edit details - items: - $ref: '#/components/schemas/OrderEdit' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of order edits skipped when retrieving the order edits. - limit: - type: integer - description: The number of items per page - AdminOrderEditsRes: - type: object - description: The order edit details. - x-expanded-relations: - field: order_edit - relations: - - changes - - changes.line_item - - changes.line_item.variant - - changes.original_line_item - - changes.original_line_item.variant - - items - - items.adjustments - - items.tax_lines - - items.variant - - payment_collection - implicit: - - items - - items.tax_lines - - items.adjustments - - items.variant - totals: - - difference_due - - discount_total - - gift_card_tax_total - - gift_card_total - - shipping_total - - subtotal - - tax_total - - total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - required: - - order_edit - properties: - order_edit: - description: Order edit details - $ref: '#/components/schemas/OrderEdit' - AdminOrdersListRes: - type: object - description: The list of orders with pagination fields. - x-expanded-relations: - field: orders - relations: - - billing_address - - claims - - claims.additional_items - - claims.additional_items.variant - - claims.claim_items - - claims.claim_items.images - - claims.claim_items.item - - claims.fulfillments - - claims.fulfillments.tracking_links - - claims.return_order - - claims.return_order.shipping_method - - claims.return_order.shipping_method.tax_lines - - claims.shipping_address - - claims.shipping_methods - - customer - - discounts - - discounts.rule - - fulfillments - - fulfillments.items - - fulfillments.tracking_links - - gift_card_transactions - - gift_cards - - items - - payments - - refunds - - region - - returns - - returns.items - - returns.items.reason - - returns.shipping_method - - returns.shipping_method.tax_lines - - shipping_address - - shipping_methods - eager: - - fulfillments.items - - region.fulfillment_providers - - region.payment_providers - - returns.items - - shipping_methods.shipping_option - implicit: - - claims - - claims.additional_items - - claims.additional_items.adjustments - - claims.additional_items.refundable - - claims.additional_items.tax_lines - - discounts - - discounts.rule - - gift_card_transactions - - gift_card_transactions.gift_card - - gift_cards - - items - - items.adjustments - - items.refundable - - items.tax_lines - - items.variant - - items.variant.product - - items.variant.product.profiles - - refunds - - region - - shipping_methods - - shipping_methods.tax_lines - - swaps - - swaps.additional_items - - swaps.additional_items.adjustments - - swaps.additional_items.refundable - - swaps.additional_items.tax_lines - totals: - - discount_total - - gift_card_tax_total - - gift_card_total - - paid_total - - refundable_amount - - refunded_total - - shipping_total - - subtotal - - tax_total - - total - - claims.additional_items.discount_total - - claims.additional_items.gift_card_total - - claims.additional_items.original_tax_total - - claims.additional_items.original_total - - claims.additional_items.refundable - - claims.additional_items.subtotal - - claims.additional_items.tax_total - - claims.additional_items.total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - - swaps.additional_items.discount_total - - swaps.additional_items.gift_card_total - - swaps.additional_items.original_tax_total - - swaps.additional_items.original_total - - swaps.additional_items.refundable - - swaps.additional_items.subtotal - - swaps.additional_items.tax_total - - swaps.additional_items.total - required: - - orders - - count - - offset - - limit - properties: - orders: - type: array - description: An array of order details. - items: - $ref: '#/components/schemas/Order' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of orders skipped when retrieving the orders. - limit: - type: integer - description: The number of items per page - AdminOrdersOrderLineItemReservationReq: - type: object - required: - - location_id - properties: - location_id: - description: The ID of the location of the reservation - type: string - quantity: - description: The quantity to reserve - type: number - AdminOrdersRes: - type: object - description: The order's details. - x-expanded-relations: - field: order - relations: - - billing_address - - claims - - claims.additional_items - - claims.additional_items.variant - - claims.claim_items - - claims.claim_items.images - - claims.claim_items.item - - claims.fulfillments - - claims.fulfillments.tracking_links - - claims.return_order - - claims.return_order.shipping_method - - claims.return_order.shipping_method.tax_lines - - claims.shipping_address - - claims.shipping_methods - - customer - - discounts - - discounts.rule - - fulfillments - - fulfillments.items - - fulfillments.tracking_links - - gift_card_transactions - - gift_cards - - items - - payments - - refunds - - region - - returns - - returns.items - - returns.items.reason - - returns.shipping_method - - returns.shipping_method.tax_lines - - shipping_address - - shipping_methods - eager: - - fulfillments.items - - region.fulfillment_providers - - region.payment_providers - - returns.items - - shipping_methods.shipping_option - implicit: - - claims - - claims.additional_items - - claims.additional_items.adjustments - - claims.additional_items.refundable - - claims.additional_items.tax_lines - - discounts - - discounts.rule - - gift_card_transactions - - gift_card_transactions.gift_card - - gift_cards - - items - - items.adjustments - - items.refundable - - items.tax_lines - - items.variant - - items.variant.product - - items.variant.product.profiles - - refunds - - region - - shipping_methods - - shipping_methods.tax_lines - - swaps - - swaps.additional_items - - swaps.additional_items.adjustments - - swaps.additional_items.refundable - - swaps.additional_items.tax_lines - totals: - - discount_total - - gift_card_tax_total - - gift_card_total - - paid_total - - refundable_amount - - refunded_total - - shipping_total - - subtotal - - tax_total - - total - - claims.additional_items.discount_total - - claims.additional_items.gift_card_total - - claims.additional_items.original_tax_total - - claims.additional_items.original_total - - claims.additional_items.refundable - - claims.additional_items.subtotal - - claims.additional_items.tax_total - - claims.additional_items.total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - - swaps.additional_items.discount_total - - swaps.additional_items.gift_card_total - - swaps.additional_items.original_tax_total - - swaps.additional_items.original_total - - swaps.additional_items.refundable - - swaps.additional_items.subtotal - - swaps.additional_items.tax_total - - swaps.additional_items.total - required: - - order - properties: - order: - description: Order details. - $ref: '#/components/schemas/Order' - AdminPaymentCollectionDeleteRes: - type: object - description: The details of deleting a payment collection. - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Payment Collection. - object: - type: string - description: The type of the object that was deleted. - default: payment_collection - deleted: - type: boolean - description: Whether or not the Payment Collection was deleted. - default: true - AdminPaymentCollectionsRes: - type: object - description: The payment collection's details. - x-expanded-relations: - field: payment_collection - relations: - - payment_sessions - - payments - - region - eager: - - region.fulfillment_providers - - region.payment_providers - required: - - payment_collection - properties: - payment_collection: - description: Payment Collection details. - $ref: '#/components/schemas/PaymentCollection' - AdminPaymentProvidersList: - type: object - description: The list of payment providers in a store. - required: - - payment_providers - properties: - payment_providers: - type: array - description: An array of payment providers details. - items: - $ref: '#/components/schemas/PaymentProvider' - AdminPaymentRes: - type: object - description: The payment's details. - required: - - payment - properties: - payment: - description: Payment details - $ref: '#/components/schemas/Payment' - AdminPostAppsReq: - type: object - required: - - application_name - - state - - code - properties: - application_name: - type: string - description: Name of the application for to generate the token for. - state: - type: string - description: State of the application. - code: - type: string - description: The code for the generated token. - AdminPostAuthReq: - type: object - description: The admin's credentials used to log in. - required: - - email - - password - properties: - email: - type: string - description: The user's email. - format: email - password: - type: string - description: The user's password. - format: password - AdminPostBatchesReq: - type: object - description: The details of the batch job to create. - required: - - type - - context - properties: - type: - type: string - description: The type of batch job to start, which is defined by the `batchType` property of the associated batch job strategy. - example: product-export - context: - type: object - description: Additional infomration regarding the batch to be used for processing. - example: - shape: - prices: - - region: null - currency_code: eur - dynamicImageColumnCount: 4 - dynamicOptionColumnCount: 2 - list_config: - skip: 0 - take: 50 + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: + q: + type: string + title: q + description: The $and's q. + id: + oneOf: + - type: string + title: id + description: The $and's ID. + - type: array + description: The $and's ID. + items: + type: string + title: id + description: The id's ID. + status: + type: array + description: The $and's status. + items: {} + title: + type: string + title: title + description: The $and's title. + handle: + type: string + title: handle + description: The $and's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $and's is giftcard. + price_list_id: + type: array + description: The $and's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $and's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $and's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $and's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $and's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $and's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $and's details. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: {} + $or: + type: array + description: The $and's $or. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: {} + expand: + type: string + title: expand + description: The $and's expand. + fields: + type: string + title: fields + description: The $and's fields. + offset: + type: number + title: offset + description: The $and's offset. + limit: + type: number + title: limit + description: The $and's limit. + order: + type: string + title: order + description: The $and's order. + $or: + type: array + description: The $and's $or. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: + q: + type: string + title: q + description: The $or's q. + id: + oneOf: + - type: string + title: id + description: The $or's ID. + - type: array + description: The $or's ID. + items: + type: string + title: id + description: The id's ID. + status: + type: array + description: The $or's status. + items: {} + title: + type: string + title: title + description: The $or's title. + handle: + type: string + title: handle + description: The $or's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $or's is giftcard. + price_list_id: + type: array + description: The $or's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $or's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $or's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $or's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $or's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $or's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $or's $and. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: {} + $or: + type: array + description: The $or's details. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: {} + expand: + type: string + title: expand + description: The $or's expand. + fields: + type: string + title: fields + description: The $or's fields. + offset: + type: number + title: offset + description: The $or's offset. + limit: + type: number + title: limit + description: The $or's limit. + order: + type: string + title: order + description: The $or's order. + expand: + type: string + title: expand + description: The $and's expand. + fields: + type: string + title: fields + description: The $and's fields. + offset: + type: number + title: offset + description: The $and's offset. + limit: + type: number + title: limit + description: The $and's limit. order: - created_at: DESC - relations: - - variants - - variant.prices - - images - dry_run: - type: boolean - description: Set a batch job in dry_run mode, which would delay executing the batch job until it's confirmed. - default: false - AdminPostCollectionsCollectionReq: - type: object - description: The product collection's details to update. - properties: - title: - type: string - description: The title of the collection. - handle: - type: string - description: An optional handle to be used in slugs. If none is provided, the kebab-case version of the title will be used. - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostCollectionsReq: - type: object - description: The product collection's details. - required: - - title - properties: - title: - type: string - description: The title of the collection. - handle: - type: string - description: An optional handle to be used in slugs. If none is provided, the kebab-case version of the title will be used. - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostCurrenciesCurrencyReq: - type: object - description: The details to update in the currency - properties: - includes_tax: - type: boolean - x-featureFlag: tax_inclusive_pricing - description: Tax included in prices of currency. - AdminPostCustomerGroupsGroupCustomersBatchReq: - type: object - description: The customers to add to the customer group. - required: - - customer_ids - properties: - customer_ids: - description: The ids of the customers to add + type: string + title: order + description: The $and's order. + $or: type: array + description: The product's $or. items: type: object - required: - - id + description: The $or's details. + x-schemaName: AdminGetProductsParams properties: - id: - description: ID of the customer + q: type: string - AdminPostCustomerGroupsGroupReq: - type: object - description: The details to update in the customer group. - properties: - name: - description: Name of the customer group + title: q + description: The $or's q. + id: + oneOf: + - type: string + title: id + description: The $or's ID. + - type: array + description: The $or's ID. + items: + type: string + title: id + description: The id's ID. + status: + type: array + description: The $or's status. + items: {} + title: + type: string + title: title + description: The $or's title. + handle: + type: string + title: handle + description: The $or's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $or's is giftcard. + price_list_id: + type: array + description: The $or's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $or's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $or's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $or's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $or's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $or's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $or's $and. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: + q: + type: string + title: q + description: The $and's q. + id: + oneOf: + - type: string + title: id + description: The $and's ID. + - type: array + description: The $and's ID. + items: + type: string + title: id + description: The id's ID. + status: + type: array + description: The $and's status. + items: {} + title: + type: string + title: title + description: The $and's title. + handle: + type: string + title: handle + description: The $and's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $and's is giftcard. + price_list_id: + type: array + description: The $and's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $and's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $and's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $and's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $and's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $and's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $and's details. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: {} + $or: + type: array + description: The $and's $or. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: {} + expand: + type: string + title: expand + description: The $and's expand. + fields: + type: string + title: fields + description: The $and's fields. + offset: + type: number + title: offset + description: The $and's offset. + limit: + type: number + title: limit + description: The $and's limit. + order: + type: string + title: order + description: The $and's order. + $or: + type: array + description: The $or's details. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: + q: + type: string + title: q + description: The $or's q. + id: + oneOf: + - type: string + title: id + description: The $or's ID. + - type: array + description: The $or's ID. + items: + type: string + title: id + description: The id's ID. + status: + type: array + description: The $or's status. + items: {} + title: + type: string + title: title + description: The $or's title. + handle: + type: string + title: handle + description: The $or's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $or's is giftcard. + price_list_id: + type: array + description: The $or's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $or's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $or's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $or's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $or's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $or's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $or's $and. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: {} + $or: + type: array + description: The $or's details. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: {} + expand: + type: string + title: expand + description: The $or's expand. + fields: + type: string + title: fields + description: The $or's fields. + offset: + type: number + title: offset + description: The $or's offset. + limit: + type: number + title: limit + description: The $or's limit. + order: + type: string + title: order + description: The $or's order. + expand: + type: string + title: expand + description: The $or's expand. + fields: + type: string + title: fields + description: The $or's fields. + offset: + type: number + title: offset + description: The $or's offset. + limit: + type: number + title: limit + description: The $or's limit. + order: + type: string + title: order + description: The $or's order. + expand: type: string - metadata: - description: Metadata of the customer group. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostCustomerGroupsReq: + title: expand + description: The product's expand. + fields: + type: string + title: fields + description: The product's fields. + offset: + type: number + title: offset + description: The product's offset. + limit: + type: number + title: limit + description: The product's limit. + order: + type: string + title: order + description: The product's order. + AdminGetPromotionsParams: type: object - description: The details of the customer group to create. + description: SUMMARY + x-schemaName: AdminGetPromotionsParams + properties: + code: + type: string + title: code + description: The promotion's code. + expand: + type: string + title: expand + description: The promotion's expand. + fields: + type: string + title: fields + description: The promotion's fields. + offset: + type: number + title: offset + description: The promotion's offset. + limit: + type: number + title: limit + description: The promotion's limit. + order: + type: string + title: order + description: The promotion's order. + AdminPostCampaignsReq: + type: object + description: The promotion's campaign. + x-schemaName: AdminPostCampaignsReq required: - name properties: name: type: string - description: Name of the customer group - metadata: - type: object - description: Metadata of the customer group. - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostCustomersCustomerReq: - type: object - description: The details of the customer to update. - properties: - email: + title: name + description: The campaign's name. + campaign_identifier: type: string - description: The Customer's email. You can't update the email of a registered customer. - format: email - first_name: + title: campaign_identifier + description: The campaign's campaign identifier. + description: type: string - description: The Customer's first name. - last_name: + title: description + description: The campaign's description. + currency: type: string - description: The Customer's last name. - phone: + title: currency + description: The campaign's currency. + budget: + $ref: '#/components/schemas/CampaignBudget' + starts_at: type: string - description: The Customer's phone number. - password: + title: starts_at + description: The campaign's starts at. + ends_at: type: string - description: The Customer's password. - format: password - groups: + title: ends_at + description: The campaign's ends at. + promotions: type: array - description: A list of customer groups to which the customer belongs. + description: The campaign's promotions. items: type: object + description: The promotion's promotions. + x-schemaName: IdObject required: - id properties: id: - description: The ID of a customer group type: string - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostCustomersReq: + title: id + description: The promotion's ID. + AdminPostCustomerGroupsGroupCustomersBatchReq: type: object - description: The details of the customer to create. + description: SUMMARY + x-schemaName: AdminPostCustomerGroupsGroupCustomersBatchReq required: - - email - - first_name - - last_name - - password + - customer_ids properties: - email: - type: string - description: The customer's email. - format: email - first_name: - type: string - description: The customer's first name. - last_name: - type: string - description: The customer's last name. - password: - type: string - description: The customer's password. - format: password - phone: - type: string - description: The customer's phone number. - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostDiscountsDiscountConditions: - type: object - required: - - operator - properties: - operator: - description: Operator of the condition. `in` indicates that discountable resources are within the specified resources. `not_in` indicates that discountable resources are everything but the specified resources. - type: string - enum: - - in - - not_in - products: - type: array - description: list of product IDs if the condition's type is `products`. - items: - type: string - product_types: - type: array - description: list of product type IDs if the condition's type is `product_types`. - items: - type: string - product_collections: - type: array - description: list of product collection IDs if the condition's type is `product_collections`. - items: - type: string - product_tags: - type: array - description: list of product tag IDs if the condition's type is `product_tags`. - items: - type: string - customer_groups: - type: array - description: list of customer group IDs if the condition's type is `customer_groups`. - items: - type: string - AdminPostDiscountsDiscountConditionsCondition: - type: object - properties: - products: - type: array - description: list of product IDs if the condition's type is `products`. - items: - type: string - product_types: - type: array - description: list of product type IDs if the condition's type is `product_types`. - items: - type: string - product_collections: - type: array - description: list of product collection IDs if the condition's type is `product_collections`. - items: - type: string - product_tags: - type: array - description: list of product tag IDs if the condition's type is `product_tags` - items: - type: string - customer_groups: - type: array - description: list of customer group IDs if the condition's type is `customer_groups`. - items: - type: string - AdminPostDiscountsDiscountConditionsConditionBatchReq: - type: object - description: The details of the resources to add. - required: - - resources - properties: - resources: - description: The resources to be added to the discount condition + customer_ids: type: array + description: The customer group's customer ids. items: type: object + description: The customer id's customer ids. + x-schemaName: CustomerGroupsBatchCustomer required: - id properties: id: - description: The ID of the item type: string - AdminPostDiscountsDiscountDynamicCodesReq: + title: id + description: The customer id's ID. + AdminPostFulfillmentShippingOptionsRulesBatchAddReq: type: object - description: The details of the dynamic discount to create. + description: SUMMARY + x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchAddReq required: - - code + - rules properties: - code: - type: string - description: A unique code that will be used to redeem the Discount - usage_limit: - type: number - description: Maximum number of times the discount code can be used - default: 1 - metadata: - type: object - description: An optional set of key-value pairs to hold additional information. - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostDiscountsDiscountReq: - type: object - description: The details of the discount to update. - properties: - code: - type: string - description: A unique code that will be used to redeem the discount - rule: - description: The discount rule that defines how discounts are calculated - type: object - required: - - id - properties: - id: - type: string - description: The ID of the Rule - description: - type: string - description: A short description of the discount - value: - type: number - description: The value that the discount represents. This will depend on the type of the discount. - allocation: - type: string - description: The scope that the discount should apply to. `total` indicates that the discount should be applied on the cart total, and `item` indicates that the discount should be applied to each discountable item in the cart. - enum: - - total - - item - conditions: - type: array - description: A set of conditions that can be used to limit when the discount can be used. Only one of `products`, `product_types`, `product_collections`, `product_tags`, and `customer_groups` should be provided based on the discount condition's type. - items: - type: object - required: - - operator - properties: - id: - type: string - description: The ID of the condition - operator: - type: string - description: Operator of the condition. `in` indicates that discountable resources are within the specified resources. `not_in` indicates that discountable resources are everything but the specified resources. - enum: - - in - - not_in - products: - type: array - description: list of product IDs if the condition's type is `products`. - items: - type: string - product_types: - type: array - description: list of product type IDs if the condition's type is `product_types`. - items: - type: string - product_collections: - type: array - description: list of product collection IDs if the condition's type is `product_collections`. - items: - type: string - product_tags: - type: array - description: list of product tag IDs if the condition's type is `product_tags`. - items: - type: string - customer_groups: - type: array - description: list of customer group IDs if the condition's type is `customer_groups`. - items: - type: string - is_disabled: - type: boolean - description: Whether the discount code is disabled on creation. If set to `true`, it will not be available for customers. - starts_at: - type: string - format: date-time - description: The date and time at which the discount should be available. - ends_at: - type: string - format: date-time - description: The date and time at which the discount should no longer be available. - valid_duration: - type: string - description: The duration the discount runs between - example: P3Y6M4DT12H30M5S - usage_limit: - type: number - description: Maximum number of times the discount can be used - regions: - description: A list of region IDs representing the Regions in which the Discount can be used. + rules: type: array + description: The fulfillment's rules. + items: + type: object + description: The rule's rules. + x-schemaName: FulfillmentRuleCreate + required: + - operator + - attribute + - value + properties: + operator: {} + attribute: + type: string + title: attribute + description: The rule's attribute. + value: + oneOf: + - type: string + title: value + description: The rule's value. + - type: array + description: The rule's value. + items: + type: string + title: value + description: The value's details. + AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq: + type: object + description: SUMMARY + x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq + required: + - rule_ids + properties: + rule_ids: + type: array + description: The fulfillment's rule ids. items: type: string - metadata: - description: An object containing metadata of the discount - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostDiscountsReq: - type: object - description: The details of the discount to create. - required: - - code - - rule - - regions - properties: - code: - type: string - description: A unique code that will be used to redeem the discount - is_dynamic: - type: boolean - description: Whether the discount should have multiple instances of itself, each with a different code. This can be useful for automatically generated discount codes that all have to follow a common set of rules. - default: false - rule: - description: The discount rule that defines how discounts are calculated - type: object - required: - - type - - value - - allocation - properties: - description: - type: string - description: A short description of the discount - type: - type: string - description: The type of the discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers. - enum: - - fixed - - percentage - - free_shipping - value: - type: number - description: The value that the discount represents. This will depend on the type of the discount. - allocation: - type: string - description: The scope that the discount should apply to. `total` indicates that the discount should be applied on the cart total, and `item` indicates that the discount should be applied to each discountable item in the cart. - enum: - - total - - item - conditions: - type: array - description: A set of conditions that can be used to limit when the discount can be used. Only one of `products`, `product_types`, `product_collections`, `product_tags`, and `customer_groups` should be provided based on the discount condition's type. - items: - type: object - required: - - operator - properties: - operator: - type: string - description: Operator of the condition. `in` indicates that discountable resources are within the specified resources. `not_in` indicates that discountable resources are everything but the specified resources. - enum: - - in - - not_in - products: - type: array - description: list of product IDs if the condition's type is `products`. - items: - type: string - product_types: - type: array - description: list of product type IDs if the condition's type is `product_types`. - items: - type: string - product_collections: - type: array - description: list of product collection IDs if the condition's type is `product_collections`. - items: - type: string - product_tags: - type: array - description: list of product tag IDs if the condition's type is `product_tags`. - items: - type: string - customer_groups: - type: array - description: list of customer group IDs if the condition's type is `customer_groups`. - items: - type: string - is_disabled: - type: boolean - description: Whether the discount code is disabled on creation. If set to `true`, it will not be available for customers. - default: false - starts_at: - type: string - format: date-time - description: The date and time at which the discount should be available. - ends_at: - type: string - format: date-time - description: The date and time at which the discount should no longer be available. - valid_duration: - type: string - description: The duration the discount runs between - example: P3Y6M4DT12H30M5S - regions: - description: A list of region IDs representing the Regions in which the Discount can be used. - type: array - items: - type: string - usage_limit: - type: number - description: Maximum number of times the discount can be used - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostDraftOrdersDraftOrderLineItemsItemReq: - type: object - description: The details to update of the line item. - properties: - unit_price: - description: The custom price of the line item. If a `variant_id` is supplied, the price provided here will override the variant's price. - type: integer - title: - description: The title of the line item if `variant_id` is not provided. - type: string - quantity: - description: The quantity of the line item. - type: integer - metadata: - description: The optional key-value map with additional details about the Line Item. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostDraftOrdersDraftOrderLineItemsReq: - type: object - description: The details of the line item to create. - required: - - quantity - properties: - variant_id: - description: The ID of the Product Variant associated with the line item. If the line item is custom, the `variant_id` should be omitted. - type: string - unit_price: - description: The custom price of the line item. If a `variant_id` is supplied, the price provided here will override the variant's price. - type: integer - title: - description: The title of the line item if `variant_id` is not provided. - type: string - default: Custom item - quantity: - description: The quantity of the line item. - type: integer - metadata: - description: The optional key-value map with additional details about the Line Item. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostDraftOrdersDraftOrderRegisterPaymentRes: - type: object - description: The order's details. - required: - - order - properties: - order: - description: Order's details. - $ref: '#/components/schemas/Order' - AdminPostDraftOrdersDraftOrderReq: - type: object - description: The details of the draft order to update. - properties: - region_id: - type: string - description: The ID of the Region to create the Draft Order in. - country_code: - type: string - description: The 2 character ISO code for the Country. - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - email: - type: string - description: An email to be used in the Draft Order. - format: email - billing_address: - description: The Address to be used for billing purposes. - anyOf: - - $ref: '#/components/schemas/AddressPayload' - - type: string - shipping_address: - description: The Address to be used for shipping purposes. - anyOf: - - $ref: '#/components/schemas/AddressPayload' - - type: string - discounts: - description: An array of Discount codes to add to the Draft Order. - type: array - items: - type: object - required: - - code - properties: - code: - description: The code that a Discount is identifed by. - type: string - no_notification_order: - description: An optional flag passed to the resulting order that indicates whether the customer should receive notifications about order updates. - type: boolean - customer_id: - description: The ID of the customer this draft order is associated with. - type: string - AdminPostDraftOrdersReq: - type: object - description: The details of the draft order to create. - required: - - email - - region_id - - shipping_methods - properties: - status: - description: The status of the draft order. The draft order's default status is `open`. It's changed to `completed` when its payment is marked as paid. - type: string - enum: - - open - - completed - email: - description: The email of the customer of the draft order - type: string - format: email - billing_address: - description: The Address to be used for billing purposes. - anyOf: - - $ref: '#/components/schemas/AddressPayload' - - type: string - shipping_address: - description: The Address to be used for shipping purposes. - anyOf: - - $ref: '#/components/schemas/AddressPayload' - - type: string - items: - description: The draft order's line items. - type: array - items: - type: object - required: - - quantity - properties: - variant_id: - description: The ID of the Product Variant associated with the line item. If the line item is custom, the `variant_id` should be omitted. - type: string - unit_price: - description: The custom price of the line item. If a `variant_id` is supplied, the price provided here will override the variant's price. - type: integer - title: - description: The title of the line item if `variant_id` is not provided. - type: string - quantity: - description: The quantity of the line item. - type: integer - metadata: - description: The optional key-value map with additional details about the line item. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - region_id: - description: The ID of the region for the draft order - type: string - discounts: - description: The discounts to add to the draft order - type: array - items: - type: object - required: - - code - properties: - code: - description: The code of the discount to apply - type: string - customer_id: - description: The ID of the customer this draft order is associated with. - type: string - no_notification_order: - description: An optional flag passed to the resulting order that indicates whether the customer should receive notifications about order updates. - type: boolean - shipping_methods: - description: The shipping methods for the draft order - type: array - items: - type: object - required: - - option_id - properties: - option_id: - description: The ID of the shipping option in use - type: string - data: - description: The optional additional data needed for the shipping method - type: object - price: - description: The price of the shipping method. - type: integer - metadata: - description: The optional key-value map with additional details about the Draft Order. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostGiftCardsGiftCardReq: - type: object - description: The details to update of the gift card. - properties: - balance: - type: integer - description: The value (excluding VAT) that the Gift Card should represent. - is_disabled: - type: boolean - description: Whether the Gift Card is disabled on creation. If set to `true`, the gift card will not be available for customers. - ends_at: - type: string - format: date-time - description: The date and time at which the Gift Card should no longer be available. - region_id: - description: The ID of the Region in which the Gift Card can be used. - type: string - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostGiftCardsReq: - type: object - description: The details of the gift card to create. - required: - - region_id - properties: - value: - type: integer - description: The value (excluding VAT) that the Gift Card should represent. - is_disabled: - type: boolean - description: Whether the Gift Card is disabled on creation. If set to `true`, the gift card will not be available for customers. - ends_at: - type: string - format: date-time - description: The date and time at which the Gift Card should no longer be available. - region_id: - description: The ID of the Region in which the Gift Card can be used. - type: string - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute + title: rule_ids + description: The rule id's rule ids. AdminPostInventoryItemsInventoryItemReq: type: object - description: The attributes to update in an inventory item. + description: SUMMARY + x-schemaName: AdminPostInventoryItemsInventoryItemReq properties: - hs_code: - description: The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers. + sku: type: string + title: sku + description: The inventory item's sku. origin_country: - description: The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. type: string + title: origin_country + description: The inventory item's origin country. + hs_code: + type: string + title: hs_code + description: The inventory item's hs code. mid_code: - description: The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers. type: string + title: mid_code + description: The inventory item's mid code. material: - description: The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. type: string + title: material + description: The inventory item's material. weight: - description: The weight of the Inventory Item. May be used in shipping rate calculations. type: number + title: weight + description: The inventory item's weight. height: - description: The height of the Inventory Item. May be used in shipping rate calculations. - type: number - width: - description: The width of the Inventory Item. May be used in shipping rate calculations. type: number + title: height + description: The inventory item's height. length: - description: The length of the Inventory Item. May be used in shipping rate calculations. type: number + title: length + description: The inventory item's length. + width: + type: number + title: width + description: The inventory item's width. title: + type: string + title: title description: The inventory item's title. - type: string description: + type: string + title: description description: The inventory item's description. - type: string thumbnail: - description: The inventory item's thumbnail. type: string + title: thumbnail + description: The inventory item's thumbnail. requires_shipping: - description: Whether the item requires shipping. type: boolean + title: requires_shipping + description: The inventory item's requires shipping. AdminPostInventoryItemsItemLocationLevelsLevelReq: type: object + description: SUMMARY + x-schemaName: AdminPostInventoryItemsItemLocationLevelsLevelReq properties: - stocked_quantity: - description: the total stock quantity of an inventory item at the given location ID - type: number incoming_quantity: - description: the incoming stock quantity of an inventory item at the given location ID type: number + title: incoming_quantity + description: The inventory item's incoming quantity. + stocked_quantity: + type: number + title: stocked_quantity + description: The inventory item's stocked quantity. AdminPostInventoryItemsItemLocationLevelsReq: type: object - description: The details of the location level to create. + description: SUMMARY + x-schemaName: AdminPostInventoryItemsItemLocationLevelsReq required: - location_id - stocked_quantity properties: location_id: - description: the ID of the stock location type: string + title: location_id + description: The inventory item's location id. stocked_quantity: - description: the stock quantity of the inventory item at this location type: number + title: stocked_quantity + description: The inventory item's stocked quantity. incoming_quantity: - description: the incoming stock quantity of the inventory item at this location type: number + title: incoming_quantity + description: The inventory item's incoming quantity. AdminPostInventoryItemsReq: type: object - description: The details of the inventory item to create. - required: - - variant_id + description: SUMMARY + x-schemaName: AdminPostInventoryItemsReq properties: - variant_id: - description: The ID of the variant to create the inventory item for. - type: string sku: - description: The unique SKU of the associated Product Variant. - type: string - ean: - description: The EAN number of the item. - type: string - upc: - description: The UPC number of the item. - type: string - barcode: - description: A generic GTIN field for the Product Variant. type: string + title: sku + description: The inventory item's sku. hs_code: - description: The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers. type: string - inventory_quantity: - description: The amount of stock kept of the associated Product Variant. - type: integer - default: 0 - allow_backorder: - description: Whether the associated Product Variant can be purchased when out of stock. - type: boolean - manage_inventory: - description: Whether Medusa should keep track of the inventory for the associated Product Variant. - type: boolean - default: true + title: hs_code + description: The inventory item's hs code. weight: - description: The weight of the Inventory Item. May be used in shipping rate calculations. type: number + title: weight + description: The inventory item's weight. length: - description: The length of the Inventory Item. May be used in shipping rate calculations. type: number + title: length + description: The inventory item's length. height: - description: The height of the Inventory Item. May be used in shipping rate calculations. type: number + title: height + description: The inventory item's height. width: - description: The width of the Inventory Item. May be used in shipping rate calculations. type: number + title: width + description: The inventory item's width. origin_country: - description: The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. type: string + title: origin_country + description: The inventory item's origin country. mid_code: - description: The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers. type: string + title: mid_code + description: The inventory item's mid code. material: - description: The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. type: string + title: material + description: The inventory item's material. title: + type: string + title: title description: The inventory item's title. - type: string description: + type: string + title: description description: The inventory item's description. - type: string thumbnail: - description: The inventory item's thumbnail. type: string + title: thumbnail + description: The inventory item's thumbnail. metadata: - description: An optional set of key-value pairs with additional information. type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute + description: The inventory item's metadata. + properties: {} AdminPostInvitesInviteAcceptReq: type: object - description: The details of the invite to be accepted. + description: SUMMARY + x-schemaName: AdminPostInvitesInviteAcceptReq required: - - token - - user + - first_name + - last_name properties: - token: - description: The token of the invite to accept. This is a unique token generated when the invite was created or resent. + first_name: type: string - user: - description: The details of the user to create. - type: object - required: - - first_name - - last_name - - password - properties: - first_name: - type: string - description: the first name of the User - last_name: - type: string - description: the last name of the User - password: - description: The password for the User - type: string - format: password - AdminPostInvitesReq: + title: first_name + description: The invite's first name. + last_name: + type: string + title: last_name + description: The invite's last name. + AdminPostPaymentsCapturesReq: type: object - required: - - user - - role - properties: - user: - description: The email associated with the invite. Once the invite is accepted, the email will be associated with the created user. - type: string - format: email - role: - description: The role of the user to be created. This does not actually change the privileges of the user that is eventually created. - type: string - enum: - - admin - - member - - developer - AdminPostNotesNoteReq: - type: object - description: The details to update of the note. - required: - - value - properties: - value: - type: string - description: The description of the Note. - AdminPostNotesReq: - type: object - description: The details of the note to be created. - required: - - resource_id - - resource_type - - value - properties: - resource_id: - type: string - description: The ID of the resource which the Note relates to. For example, an order ID. - resource_type: - type: string - description: The type of resource which the Note relates to. For example, `order`. - value: - type: string - description: The content of the Note to create. - AdminPostNotificationsNotificationResendReq: - type: object - description: The resend details. - properties: - to: - description: A new address or user identifier that the Notification should be sent to. If not provided, the previous `to` field of the notification will be used. - type: string - AdminPostOrderEditsEditLineItemsLineItemReq: - type: object - description: The details to create or update of the line item change. - required: - - quantity - properties: - quantity: - description: The quantity to update - type: number - AdminPostOrderEditsEditLineItemsReq: - type: object - description: The details of the line item change to create. - required: - - variant_id - - quantity - properties: - variant_id: - description: The ID of the product variant associated with the item. - type: string - quantity: - description: The quantity of the item. - type: number - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostOrderEditsOrderEditReq: - type: object - description: The details to update of the order edit. - properties: - internal_note: - description: An optional note to create or update in the order edit. - type: string - AdminPostOrderEditsReq: - type: object - description: The details of the order edit to create. - required: - - order_id - properties: - order_id: - description: The ID of the order to create the edit for. - type: string - internal_note: - description: An optional note to associate with the order edit. - type: string - AdminPostOrdersOrderClaimsClaimFulfillmentsReq: - type: object - properties: - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - no_notification: - description: If set to `true`, no notification will be sent to the customer related to this Claim. - type: boolean - location_id: - description: The ID of the fulfillment's location. - type: string - AdminPostOrdersOrderClaimsClaimReq: - type: object - properties: - claim_items: - description: The Claim Items that the Claim will consist of. - type: array - items: - type: object - required: - - id - - images - - tags - properties: - id: - description: The ID of the Claim Item. - type: string - item_id: - description: The ID of the Line Item that will be claimed. - type: string - quantity: - description: The number of items that will be returned - type: integer - note: - description: Short text describing the Claim Item in further detail. - type: string - reason: - description: The reason for the Claim - type: string - enum: - - missing_item - - wrong_item - - production_failure - - other - tags: - description: A list o tags to add to the Claim Item - type: array - items: - type: object - properties: - id: - type: string - description: Tag ID - value: - type: string - description: Tag value - images: - description: A list of image URL's that will be associated with the Claim - type: array - items: - type: object - properties: - id: - type: string - description: Image ID - url: - type: string - description: Image URL - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - shipping_methods: - description: The Shipping Methods to send the additional Line Items with. - type: array - items: - type: object - properties: - id: - description: The ID of an existing Shipping Method - type: string - option_id: - description: The ID of the Shipping Option to create a Shipping Method from - type: string - price: - description: The price to charge for the Shipping Method - type: integer - data: - description: An optional set of key-value pairs to hold additional information. - type: object - no_notification: - description: If set to true no notification will be send related to this Swap. - type: boolean - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostOrdersOrderClaimsClaimShipmentsReq: - type: object - required: - - fulfillment_id - properties: - fulfillment_id: - description: The ID of the Fulfillment. - type: string - tracking_numbers: - description: An array of tracking numbers for the shipment. - type: array - items: - type: string - AdminPostOrdersOrderClaimsReq: - type: object - description: The details of the claim to be created. - required: - - type - - claim_items - properties: - type: - description: 'The type of the Claim. This will determine how the Claim is treated: `replace` Claims will result in a Fulfillment with new items being created, while a `refund` Claim will refund the amount paid for the claimed items.' - type: string - enum: - - replace - - refund - claim_items: - description: The Claim Items that the Claim will consist of. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the Line Item that will be claimed. - type: string - quantity: - description: The number of items that will be returned - type: integer - note: - description: Short text describing the Claim Item in further detail. - type: string - reason: - description: The reason for the Claim - type: string - enum: - - missing_item - - wrong_item - - production_failure - - other - tags: - description: A list of tags to add to the Claim Item - type: array - items: - type: string - images: - description: A list of image URL's that will be associated with the Claim - items: - type: string - return_shipping: - description: Optional details for the Return Shipping Method, if the items are to be sent back. Providing this field will result in a return being created and associated with the claim. - type: object - properties: - option_id: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. - price: - type: integer - description: The price to charge for the Shipping Method. - additional_items: - description: The new items to send to the Customer. This is only used if the claim's type is `replace`. - type: array - items: - type: object - required: - - variant_id - - quantity - properties: - variant_id: - description: The ID of the Product Variant. - type: string - quantity: - description: The quantity of the Product Variant. - type: integer - shipping_methods: - description: The Shipping Methods to send the additional Line Items with. This is only used if the claim's type is `replace`. - type: array - items: - type: object - properties: - id: - description: The ID of an existing Shipping Method - type: string - option_id: - description: The ID of the Shipping Option to create a Shipping Method from - type: string - price: - description: The price to charge for the Shipping Method - type: integer - data: - description: An optional set of key-value pairs to hold additional information. - type: object - shipping_address: - description: An optional shipping address to send the claimed items to. If not provided, the parent order's shipping address will be used. - $ref: '#/components/schemas/AddressPayload' - refund_amount: - description: The amount to refund the customer. This is used when the claim's type is `refund`. - type: integer - no_notification: - description: If set to true no notification will be send related to this Claim. - type: boolean - return_location_id: - description: The ID of the location used for the associated return. - type: string - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostOrdersOrderFulfillmentsReq: - type: object - description: The details of the fulfillment to be created. - required: - - items - properties: - items: - description: The Line Items to include in the Fulfillment. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the Line Item to fulfill. - type: string - quantity: - description: The quantity of the Line Item to fulfill. - type: integer - location_id: - type: string - description: The ID of the location where the items will be fulfilled from. - no_notification: - description: If set to `true`, no notification will be sent to the customer related to this fulfillment. - type: boolean - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostOrdersOrderRefundsReq: - type: object - description: The details of the order refund. - required: - - amount - - reason + description: SUMMARY + x-schemaName: AdminPostPaymentsCapturesReq properties: amount: - description: The amount to refund. It should be less than or equal the `refundable_amount` of the order. - type: integer - reason: - description: The reason for the Refund. - type: string - note: - description: A note with additional details about the Refund. - type: string - no_notification: - description: If set to `true`, no notification will be sent to the customer related to this Refund. - type: boolean - AdminPostOrdersOrderReq: - type: object - description: The details to update of the order. - properties: - email: - description: The email associated with the order - type: string - billing_address: - description: The order's billing address - $ref: '#/components/schemas/AddressPayload' - shipping_address: - description: The order's shipping address - $ref: '#/components/schemas/AddressPayload' - items: - description: The line items of the order - type: array - items: - $ref: '#/components/schemas/LineItem' - region: - description: ID of the region that the order is associated with. - type: string - discounts: - description: The discounts applied to the order - type: array - items: - $ref: '#/components/schemas/Discount' - customer_id: - description: The ID of the customer associated with the order. - type: string - payment_method: - description: The payment method chosen for the order. - type: object - properties: - provider_id: - type: string - description: The ID of the payment provider. - data: - description: Any data relevant for the given payment method. - type: object - shipping_method: - description: The Shipping Method used for shipping the order. - type: object - properties: - provider_id: - type: string - description: The ID of the shipping provider. - profile_id: - type: string - description: The ID of the shipping profile. - price: - type: integer - description: The price of the shipping. - data: - type: object - description: Any data relevant to the specific shipping method. - items: - type: array - items: - $ref: '#/components/schemas/LineItem' - description: Items to ship - no_notification: - description: If set to `true`, no notification will be sent to the customer related to this order. - type: boolean - AdminPostOrdersOrderReturnsReq: - type: object - description: The details of the requested return. - required: - - items - properties: - items: - description: The line items that will be returned. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the Line Item. - type: string - reason_id: - description: The ID of the Return Reason to use. - type: string - note: - description: An optional note with information about the Return. - type: string - quantity: - description: The quantity of the Line Item. - type: integer - return_shipping: - description: The Shipping Method to be used to handle the return shipment. - type: object - properties: - option_id: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. - price: - type: integer - description: The price to charge for the Shipping Method. - note: - description: An optional note with information about the Return. - type: string - receive_now: - description: A flag to indicate if the Return should be registerd as received immediately. - type: boolean - default: false - no_notification: - description: If set to `true`, no notification will be sent to the customer related to this Return. - type: boolean - refund: - description: The amount to refund. - type: integer - location_id: - description: The ID of the location used for the return. - type: string - AdminPostOrdersOrderShipmentReq: - type: object - description: The details of the shipment to create. - required: - - fulfillment_id - properties: - fulfillment_id: - description: The ID of the Fulfillment. - type: string - tracking_numbers: - description: The tracking numbers for the shipment. - type: array - items: - type: string - no_notification: - description: If set to true no notification will be send related to this Shipment. - type: boolean - AdminPostOrdersOrderShippingMethodsReq: - type: object - description: The shipping method's details. - required: - - price - - option_id - properties: - price: type: number - description: The price (excluding VAT) that should be charged for the Shipping Method - option_id: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. - data: - type: object - description: The data required for the Shipping Option to create a Shipping Method. This depends on the Fulfillment Provider. - AdminPostOrdersOrderSwapsReq: + title: amount + description: The payment's amount. + AdminPostPaymentsRefundsReq: type: object - description: The details of the swap to create. - required: - - return_items - properties: - return_items: - description: The Line Items to associate with the swap's return. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the Line Item that will be returned. - type: string - quantity: - description: The number of items that will be returned - type: integer - reason_id: - description: The ID of the Return Reason to use. - type: string - note: - description: An optional note with information about the Return. - type: string - return_shipping: - description: The shipping method associated with the swap's return. - type: object - required: - - option_id - properties: - option_id: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. - price: - type: integer - description: The price to charge for the Shipping Method. - additional_items: - description: The new items to send to the Customer. - type: array - items: - type: object - required: - - variant_id - - quantity - properties: - variant_id: - description: The ID of the Product Variant. - type: string - quantity: - description: The quantity of the Product Variant. - type: integer - sales_channel_id: - type: string - description: The ID of the sales channel associated with the swap. - custom_shipping_options: - description: An array of custom shipping options to potentially create a Shipping Method from to send the additional items. - type: array - items: - type: object - required: - - option_id - - price - properties: - option_id: - description: The ID of the Shipping Option. - type: string - price: - description: The custom price of the Shipping Option. - type: integer - no_notification: - description: If set to `true`, no notification will be sent to the customer related to this Swap. - type: boolean - return_location_id: - type: string - description: The ID of the location used for the associated return. - allow_backorder: - description: If set to `true`, swaps can be completed with items out of stock - type: boolean - default: true - AdminPostOrdersOrderSwapsSwapFulfillmentsReq: - type: object - properties: - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - no_notification: - description: If set to `true`, no notification will be sent to the customer related to this swap. - type: boolean - location_id: - description: The ID of the fulfillment's location. - type: string - AdminPostOrdersOrderSwapsSwapShipmentsReq: - type: object - required: - - fulfillment_id - properties: - fulfillment_id: - description: The ID of the Fulfillment. - type: string - tracking_numbers: - description: The tracking numbers for the shipment. - type: array - items: - type: string - no_notification: - description: If set to true no notification will be sent related to this Claim. - type: boolean - AdminPostPaymentRefundsReq: - type: object - description: The details of the refund to create. - required: - - amount - - reason + description: SUMMARY + x-schemaName: AdminPostPaymentsRefundsReq properties: amount: - description: The amount to refund. - type: integer - reason: - description: The reason for the Refund. - type: string - note: - description: A note with additional details about the Refund. - type: string - AdminPostPriceListPricesPricesReq: + type: number + title: amount + description: The payment's amount. + AdminPostPriceListsPriceListPricesBatchAddReq: type: object - description: The details of the prices to add. + description: SUMMARY + x-schemaName: AdminPostPriceListsPriceListPricesBatchAddReq + required: + - prices properties: prices: - description: The prices to update or add. type: array + description: The price list's prices. items: type: object + description: The price's prices. + x-schemaName: AdminPriceListPricesCreateReq required: + - currency_code - amount - variant_id properties: - id: - description: The ID of the price. - type: string - region_id: - description: The ID of the Region for which the price is used. This is only required if `currecny_code` is not provided. - type: string currency_code: - description: The 3 character ISO currency code for which the price will be used. This is only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - variant_id: - description: The ID of the Variant for which the price is used. type: string + title: currency_code + description: The price's currency code. amount: - description: The amount to charge for the Product Variant. - type: integer + type: number + title: amount + description: The price's amount. + variant_id: + type: string + title: variant_id + description: The price's variant id. min_quantity: - description: The minimum quantity for which the price will be used. - type: integer + type: number + title: min_quantity + description: The price's min quantity. max_quantity: - description: The maximum quantity for which the price will be used. - type: integer - override: - description: If set to `true`, the prices will replace all existing prices associated with the Price List. - type: boolean - AdminPostPriceListsPriceListPriceListReq: + type: number + title: max_quantity + description: The price's max quantity. + rules: + type: object + description: The price's rules. + properties: {} + AdminPostPriceListsPriceListPricesBatchRemoveReq: type: object - description: The details to update of the payment collection. + description: SUMMARY + x-schemaName: AdminPostPriceListsPriceListPricesBatchRemoveReq + required: + - ids properties: - name: - description: The name of the Price List - type: string - description: - description: The description of the Price List. - type: string - starts_at: - description: The date with timezone that the Price List starts being valid. - type: string - format: date - ends_at: - description: The date with timezone that the Price List ends being valid. - type: string - format: date - type: - description: The type of the Price List. - type: string - enum: - - sale - - override - status: - description: The status of the Price List. If the status is set to `draft`, the prices created in the price list will not be available of the customer. - type: string - enum: - - active - - draft - prices: - description: The prices of the Price List. + ids: type: array + description: The price list's ids. items: - type: object - required: - - amount - - variant_id - properties: - id: - description: The ID of the price. - type: string - region_id: - description: The ID of the Region for which the price is used. This is only required if `currecny_code` is not provided. - type: string - currency_code: - description: The 3 character ISO currency code for which the price will be used. This is only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - variant_id: - description: The ID of the Variant for which the price is used. - type: string - amount: - description: The amount to charge for the Product Variant. - type: integer - min_quantity: - description: The minimum quantity for which the price will be used. - type: integer - max_quantity: - description: The maximum quantity for which the price will be used. - type: integer - customer_groups: - type: array - description: An array of customer groups that the Price List applies to. - items: - type: object - required: - - id - properties: - id: - description: The ID of a customer group - type: string - includes_tax: - description: Tax included in prices of price list - x-featureFlag: tax_inclusive_pricing - type: boolean + type: string + title: ids + description: The id's ids. AdminPostPriceListsPriceListReq: type: object - description: The details of the price list to create. + description: SUMMARY + x-schemaName: AdminPostPriceListsPriceListReq required: - - name - - description - - type - prices properties: - name: - description: The name of the Price List. + title: type: string + title: title + description: The price list's title. description: - description: The description of the Price List. type: string + title: description + description: The price list's description. starts_at: - description: The date with timezone that the Price List starts being valid. type: string - format: date + title: starts_at + description: The price list's starts at. ends_at: - description: The date with timezone that the Price List ends being valid. type: string - format: date - type: - description: The type of the Price List. - type: string - enum: - - sale - - override - status: - description: The status of the Price List. If the status is set to `draft`, the prices created in the price list will not be available of the customer. - type: string - enum: - - active - - draft + title: ends_at + description: The price list's ends at. + status: {} + type: {} prices: - description: The prices of the Price List. type: array + description: The price list's prices. items: type: object + description: The price's prices. + x-schemaName: AdminPriceListPricesCreateReq required: + - currency_code - amount - variant_id properties: - region_id: - description: The ID of the Region for which the price is used. This is only required if `currecny_code` is not provided. - type: string currency_code: - description: The 3 character ISO currency code for which the price will be used. This is only required if `region_id` is not provided. type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. + title: currency_code + description: The price's currency code. amount: - description: The amount to charge for the Product Variant. - type: integer + type: number + title: amount + description: The price's amount. variant_id: - description: The ID of the Variant for which the price is used. type: string + title: variant_id + description: The price's variant id. min_quantity: - description: The minimum quantity for which the price will be used. - type: integer + type: number + title: min_quantity + description: The price's min quantity. max_quantity: - description: The maximum quantity for which the price will be used. - type: integer - customer_groups: - type: array - description: An array of customer groups that the Price List applies to. - items: - type: object - required: - - id - properties: - id: - description: The ID of a customer group - type: string - includes_tax: - description: Tax included in prices of price list - x-featureFlag: tax_inclusive_pricing - type: boolean - AdminPostProductCategoriesCategoryProductsBatchReq: - type: object - description: The details of the products to add to the product category. - required: - - product_ids - properties: - product_ids: - description: The IDs of the products to add to the product category - type: array - items: - type: object - required: - - id - properties: - id: - type: string - description: The ID of the product - AdminPostProductCategoriesCategoryReq: - type: object - description: The details to update of the product category. - properties: - name: - type: string - description: The name to identify the Product Category by. - description: - type: string - description: An optional text field to describe the Product Category by. - handle: - type: string - description: A handle to be used in slugs. - is_internal: - type: boolean - description: A flag to make product category an internal category for admins - is_active: - type: boolean - description: A flag to make product category visible/hidden in the store front - parent_category_id: - type: string - description: The ID of the parent product category - rank: - type: number - description: The rank of the category in the tree node (starting from 0) - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostProductCategoriesReq: - type: object - description: The details of the product category to create. - required: - - name - properties: - name: - type: string - description: The name of the product category - description: - type: string - description: The description of the product category. - handle: - type: string - description: The handle of the product category. If none is provided, the kebab-case version of the name will be used. This field can be used as a slug in URLs. - is_internal: - type: boolean - description: If set to `true`, the product category will only be available to admins. - is_active: - type: boolean - description: If set to `false`, the product category will not be available in the storefront. - parent_category_id: - type: string - description: The ID of the parent product category - metadata: - description: An optional set of key-value pairs to hold additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostProductsProductMetadataReq: - type: object - required: - - key - - value - properties: - key: - description: The metadata key - type: string - value: - description: The metadata value - type: string - AdminPostProductsProductOptionsOption: - type: object - required: - - title - properties: - title: - description: The title of the Product Option - type: string - AdminPostProductsProductOptionsReq: - type: object - description: The details of the product option to create. - required: - - title - properties: - title: - description: The title the Product Option. - type: string - example: Size - AdminPostProductsProductReq: - type: object - description: The details to update of the product. - properties: - title: - description: The title of the Product - type: string - subtitle: - description: The subtitle of the Product - type: string - description: - description: The description of the Product. - type: string - discountable: - description: A flag to indicate if discounts can be applied to the Line Items generated from this Product - type: boolean - images: - description: An array of images of the Product. Each value in the array is a URL to the image. You can use the upload API Routes to upload the image and obtain a URL. - type: array - items: - type: string - thumbnail: - description: The thumbnail to use for the Product. The value is a URL to the thumbnail. You can use the upload API Routes to upload the thumbnail and obtain a URL. - type: string - handle: - description: A unique handle to identify the Product by. If not provided, the kebab-case version of the product title will be used. This can be used as a slug in URLs. - type: string - status: - description: The status of the product. The product is shown to the customer only if its status is `published`. - type: string - enum: - - draft - - proposed - - published - - rejected - type: - description: The Product Type to associate the Product with. - type: object - required: - - value - properties: - id: - description: The ID of an existing Product Type. If not provided, a new product type will be created. - type: string - value: - description: The value of the Product Type. - type: string - collection_id: - description: The ID of the Product Collection the Product belongs to. - type: string - tags: - description: Product Tags to associate the Product with. - type: array - items: - type: object - required: - - value - properties: - id: - description: The ID of an existing Product Tag. If not provided, a new product tag will be created. - type: string - value: - description: The value of the Tag. If the `id` is provided, the value of the existing tag will be updated. - type: string - sales_channels: - description: Sales channels to associate the Product with. - type: array - items: - type: object - required: - - id - properties: - id: - description: The ID of an existing Sales channel. - type: string - categories: - description: Product categories to add the Product to. - x-featureFlag: product_categories - type: array - items: - required: - - id - properties: - id: - description: The ID of a Product Category. - type: string - variants: - description: An array of Product Variants to create with the Product. Each product variant must have a unique combination of Product Option values. - type: array - items: - type: object - properties: - id: - description: The id of an existing product variant. If provided, the details of the product variant will be updated. If not, a new product variant will be created. - type: string - title: - description: The title of the product variant. - type: string - sku: - description: The unique SKU of the product variant. - type: string - ean: - description: The EAN number of the product variant. - type: string - upc: - description: The UPC number of the product variant. - type: string - barcode: - description: A generic GTIN field of the product variant. - type: string - hs_code: - description: The Harmonized System code of the product variant. - type: string - inventory_quantity: - description: The amount of stock kept of the product variant. - type: integer - allow_backorder: - description: Whether the product variant can be purchased when out of stock. - type: boolean - manage_inventory: - description: Whether Medusa should keep track of the inventory of this product variant. - type: boolean - weight: - description: The weight of the product variant. type: number - length: - description: The length of the product variant. - type: number - height: - description: The height of the product variant. - type: number - width: - description: The width of the product variant. - type: number - origin_country: - description: The country of origin of the product variant. - type: string - mid_code: - description: The Manufacturer Identification code of the product variant. - type: string - material: - description: The material composition of the product variant. - type: string - metadata: - description: An optional set of key-value pairs with additional information. + title: max_quantity + description: The price's max quantity. + rules: type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - prices: - type: array - description: An array of product variant prices. A product variant can have different prices for each region or currency code. - externalDocs: - url: https://docs.medusajs.com/modules/products/admin/manage-products#product-variant-prices - description: Product variant pricing. - items: - type: object - required: - - amount - properties: - id: - description: The ID of the Price. If provided, the existing price will be updated. Otherwise, a new price will be created. - type: string - region_id: - description: The ID of the Region the price will be used in. This is only required if `currency_code` is not provided. - type: string - currency_code: - description: The 3 character ISO currency code the price will be used in. This is only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - amount: - description: The price amount. - type: integer - min_quantity: - description: The minimum quantity required to be added to the cart for the price to be used. - type: integer - max_quantity: - description: The maximum quantity required to be added to the cart for the price to be used. - type: integer - options: - type: array - description: An array of Product Option values that the variant corresponds to. - items: - type: object - required: - - option_id - - value - properties: - option_id: - description: The ID of the Option. - type: string - value: - description: The value of the Product Option. - type: string - weight: - description: The weight of the Product. - type: number - length: - description: The length of the Product. - type: number - height: - description: The height of the Product. - type: number - width: - description: The width of the Product. - type: number - hs_code: - description: The Harmonized System code of the product variant. - type: string - origin_country: - description: The country of origin of the Product. - type: string - mid_code: - description: The Manufacturer Identification code of the Product. - type: string - material: - description: The material composition of the Product. - type: string - metadata: - description: An optional set of key-value pairs with additional information. + description: The price's rules. + properties: {} + rules: type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostProductsProductVariantsReq: + description: The price list's rules. + properties: {} + AdminPostPriceListsReq: type: object - description: The details of the product variant to create. + description: SUMMARY + x-schemaName: AdminPostPriceListsReq required: - title - - prices - - options - properties: - title: - description: The title of the product variant. - type: string - sku: - description: The unique SKU of the product variant. - type: string - ean: - description: The EAN number of the product variant. - type: string - upc: - description: The UPC number of the product variant. - type: string - barcode: - description: A generic GTIN field of the product variant. - type: string - hs_code: - description: The Harmonized System code of the product variant. - type: string - inventory_quantity: - description: The amount of stock kept of the product variant. - type: integer - default: 0 - allow_backorder: - description: Whether the product variant can be purchased when out of stock. - type: boolean - manage_inventory: - description: Whether Medusa should keep track of the inventory of this product variant. - type: boolean - default: true - weight: - description: The wieght of the product variant. - type: number - length: - description: The length of the product variant. - type: number - height: - description: The height of the product variant. - type: number - width: - description: The width of the product variant. - type: number - origin_country: - description: The country of origin of the product variant. - type: string - mid_code: - description: The Manufacturer Identification code of the product variant. - type: string - material: - description: The material composition of the product variant. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - prices: - type: array - description: An array of product variant prices. A product variant can have different prices for each region or currency code. - externalDocs: - url: https://docs.medusajs.com/modules/products/admin/manage-products#product-variant-prices - description: Product variant pricing. - items: - type: object - required: - - amount - properties: - region_id: - description: The ID of the Region the price will be used in. This is only required if `currency_code` is not provided. - type: string - currency_code: - description: The 3 character ISO currency code the price will be used in. This is only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - amount: - description: The price amount. - type: integer - min_quantity: - description: The minimum quantity required to be added to the cart for the price to be used. - type: integer - max_quantity: - description: The maximum quantity required to be added to the cart for the price to be used. - type: integer - options: - type: array - description: An array of Product Option values that the variant corresponds to. - items: - type: object - required: - - option_id - - value - properties: - option_id: - description: The ID of the Product Option. - type: string - value: - description: A value to give to the Product Option. - type: string - AdminPostProductsProductVariantsVariantReq: - type: object - properties: - title: - description: The title of the product variant. - type: string - sku: - description: The unique SKU of the product variant. - type: string - ean: - description: The EAN number of the item. - type: string - upc: - description: The UPC number of the item. - type: string - barcode: - description: A generic GTIN field of the product variant. - type: string - hs_code: - description: The Harmonized System code of the product variant. - type: string - inventory_quantity: - description: The amount of stock kept of the product variant. - type: integer - allow_backorder: - description: Whether the product variant can be purchased when out of stock. - type: boolean - manage_inventory: - description: Whether Medusa should keep track of the inventory of this product variant. - type: boolean - weight: - description: The weight of the product variant. - type: number - length: - description: The length of the product variant. - type: number - height: - description: The height of the product variant. - type: number - width: - description: The width of the product variant. - type: number - origin_country: - description: The country of origin of the product variant. - type: string - mid_code: - description: The Manufacturer Identification code of the product variant. - type: string - material: - description: The material composition of the product variant. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - prices: - type: array - description: An array of product variant prices. A product variant can have different prices for each region or currency code. - externalDocs: - url: https://docs.medusajs.com/modules/products/admin/manage-products#product-variant-prices - description: Product variant pricing. - items: - type: object - required: - - amount - properties: - id: - description: The ID of the price. If provided, the existing price will be updated. Otherwise, a new price will be created. - type: string - region_id: - description: The ID of the Region the price will be used in. This is only required if `currency_code` is not provided. - type: string - currency_code: - description: The 3 character ISO currency code the price will be used in. This is only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - amount: - description: The price amount. - type: integer - min_quantity: - description: The minimum quantity required to be added to the cart for the price to be used. - type: integer - max_quantity: - description: The maximum quantity required to be added to the cart for the price to be used. - type: integer - options: - type: array - description: An array of Product Option values that the variant corresponds to. - items: - type: object - required: - - option_id - - value - properties: - option_id: - description: The ID of the Product Option. - type: string - value: - description: The value of the Product Option. - type: string - AdminPostProductsReq: - type: object - description: The details of the product to create. - required: - - title - properties: - title: - description: The title of the Product - type: string - subtitle: - description: The subtitle of the Product - type: string - description: - description: The description of the Product. - type: string - is_giftcard: - description: A flag to indicate if the Product represents a Gift Card. Purchasing Products with this flag set to `true` will result in a Gift Card being created. - type: boolean - default: false - discountable: - description: A flag to indicate if discounts can be applied to the Line Items generated from this Product - type: boolean - default: true - images: - description: An array of images of the Product. Each value in the array is a URL to the image. You can use the upload API Routes to upload the image and obtain a URL. - type: array - items: - type: string - thumbnail: - description: The thumbnail to use for the Product. The value is a URL to the thumbnail. You can use the upload API Routes to upload the thumbnail and obtain a URL. - type: string - handle: - description: A unique handle to identify the Product by. If not provided, the kebab-case version of the product title will be used. This can be used as a slug in URLs. - type: string - status: - description: The status of the product. The product is shown to the customer only if its status is `published`. - type: string - enum: - - draft - - proposed - - published - - rejected - default: draft - type: - description: The Product Type to associate the Product with. - type: object - required: - - value - properties: - id: - description: The ID of an existing Product Type. If not provided, a new product type will be created. - type: string - value: - description: The value of the Product Type. - type: string - collection_id: - description: The ID of the Product Collection the Product belongs to. - type: string - tags: - description: Product Tags to associate the Product with. - type: array - items: - type: object - required: - - value - properties: - id: - description: The ID of an existing Product Tag. If not provided, a new product tag will be created. - type: string - value: - description: The value of the Tag. If the `id` is provided, the value of the existing tag will be updated. - type: string - sales_channels: - description: Sales channels to associate the Product with. - type: array - items: - type: object - required: - - id - properties: - id: - description: The ID of an existing Sales channel. - type: string - categories: - description: Product categories to add the Product to. - x-featureFlag: product_categories - type: array - items: - type: object - required: - - id - properties: - id: - description: The ID of a Product Category. - type: string - options: - description: The Options that the Product should have. A new product option will be created for every item in the array. - type: array - items: - type: object - required: - - title - properties: - title: - description: The title of the Product Option. - type: string - variants: - description: An array of Product Variants to create with the Product. Each product variant must have a unique combination of Product Option values. - type: array - items: - type: object - required: - - title - properties: - title: - description: The title of the Product Variant. - type: string - sku: - description: The unique SKU of the Product Variant. - type: string - ean: - description: The EAN number of the item. - type: string - upc: - description: The UPC number of the item. - type: string - barcode: - description: A generic GTIN field of the Product Variant. - type: string - hs_code: - description: The Harmonized System code of the Product Variant. - type: string - inventory_quantity: - description: The amount of stock kept of the Product Variant. - type: integer - default: 0 - allow_backorder: - description: Whether the Product Variant can be purchased when out of stock. - type: boolean - manage_inventory: - description: Whether Medusa should keep track of the inventory of this Product Variant. - type: boolean - weight: - description: The wieght of the Product Variant. - type: number - length: - description: The length of the Product Variant. - type: number - height: - description: The height of the Product Variant. - type: number - width: - description: The width of the Product Variant. - type: number - origin_country: - description: The country of origin of the Product Variant. - type: string - mid_code: - description: The Manufacturer Identification code of the Product Variant. - type: string - material: - description: The material composition of the Product Variant. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - prices: - type: array - description: An array of product variant prices. A product variant can have different prices for each region or currency code. - externalDocs: - url: https://docs.medusajs.com/modules/products/admin/manage-products#product-variant-prices - description: Product variant pricing. - items: - type: object - required: - - amount - properties: - region_id: - description: The ID of the Region the price will be used in. This is only required if `currency_code` is not provided. - type: string - currency_code: - description: The 3 character ISO currency code the price will be used in. This is only required if `region_id` is not provided. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - amount: - description: The price amount. - type: integer - min_quantity: - description: The minimum quantity required to be added to the cart for the price to be used. - type: integer - max_quantity: - description: The maximum quantity required to be added to the cart for the price to be used. - type: integer - options: - type: array - description: An array of Product Option values that the variant corresponds to. The option values should be added into the array in the same index as in the `options` field of the product. - externalDocs: - url: https://docs.medusajs.com/modules/products/admin/manage-products#create-a-product - description: Example of how to create a product with options and variants - items: - type: object - required: - - value - properties: - value: - description: The value to give for the Product Option at the same index in the Product's `options` field. - type: string - weight: - description: The weight of the Product. - type: number - length: - description: The length of the Product. - type: number - height: - description: The height of the Product. - type: number - width: - description: The width of the Product. - type: number - hs_code: - description: The Harmonized System code of the Product. - type: string - origin_country: - description: The country of origin of the Product. - type: string - mid_code: - description: The Manufacturer Identification code of the Product. - type: string - material: - description: The material composition of the Product. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostProductsToCollectionReq: - type: object - description: The details of the products to add to the collection. - required: - - product_ids - properties: - product_ids: - description: An array of Product IDs to add to the Product Collection. - type: array - items: - description: The ID of a Product to add to the Product Collection. - type: string - AdminPostPublishableApiKeySalesChannelsBatchReq: - type: object - description: The details of the sales channels to add to the publishable API key. - required: - - sales_channel_ids - properties: - sales_channel_ids: - description: The IDs of the sales channels to add to the publishable API key - type: array - items: - type: object - required: - - id - properties: - id: - type: string - description: The ID of the sales channel - AdminPostPublishableApiKeysPublishableApiKeyReq: - type: object - description: The details to update of the publishable API key. - properties: - title: - description: The title of the Publishable API Key. - type: string - AdminPostPublishableApiKeysReq: - type: object - description: The details of the publishable API key to create. - required: - - title - properties: - title: - description: The title of the publishable API key - type: string - AdminPostRegionsRegionCountriesReq: - type: object - description: The details of the country to add to the region. - required: - - country_code - properties: - country_code: - description: The 2 character ISO code for the Country. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - AdminPostRegionsRegionFulfillmentProvidersReq: - type: object - description: The details of the fulfillment provider to add to the region. - required: - - provider_id - properties: - provider_id: - description: The ID of the Fulfillment Provider. - type: string - AdminPostRegionsRegionPaymentProvidersReq: - type: object - description: The details of the payment provider to add to the region. - required: - - provider_id - properties: - provider_id: - description: The ID of the Payment Provider. - type: string - AdminPostRegionsRegionReq: - type: object - description: The details to update of the regions. - properties: - name: - description: The name of the Region - type: string - currency_code: - description: The 3 character ISO currency code to use in the Region. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - automatic_taxes: - description: If set to `true`, the Medusa backend will automatically calculate taxes for carts in this region. If set to `false`, the taxes must be calculated manually. - externalDocs: - url: https://docs.medusajs.com/modules/taxes/storefront/manual-calculation - description: How to calculate taxes in a storefront. - type: boolean - gift_cards_taxable: - description: If set to `true`, taxes will be applied on gift cards. - type: boolean - tax_provider_id: - description: The ID of the tax provider to use. If none provided, the system tax provider is used. - type: string - tax_code: - description: The tax code of the Region. - type: string - tax_rate: - description: The tax rate to use in the Region. - type: number - includes_tax: - x-featureFlag: tax_inclusive_pricing - description: Whether taxes are included in the prices of the region. - type: boolean - payment_providers: - description: A list of Payment Provider IDs that can be used in the Region - type: array - items: - type: string - fulfillment_providers: - description: A list of Fulfillment Provider IDs that can be used in the Region - type: array - items: - type: string - countries: - description: A list of countries' 2 ISO characters that should be included in the Region. - type: array - items: - type: string - AdminPostRegionsReq: - type: object - description: The details of the region to create. - required: - - name - - currency_code - - tax_rate - - payment_providers - - fulfillment_providers - - countries - properties: - name: - description: The name of the Region - type: string - currency_code: - description: The 3 character ISO currency code to use in the Region. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - tax_code: - description: The tax code of the Region. - type: string - tax_rate: - description: The tax rate to use in the Region. - type: number - payment_providers: - description: A list of Payment Provider IDs that can be used in the Region - type: array - items: - type: string - fulfillment_providers: - description: A list of Fulfillment Provider IDs that can be used in the Region - type: array - items: - type: string - countries: - description: A list of countries' 2 ISO characters that should be included in the Region. - example: - - US - type: array - items: - type: string - includes_tax: - x-featureFlag: tax_inclusive_pricing - description: Whether taxes are included in the prices of the region. - type: boolean - AdminPostReservationsReq: - type: object - description: The details of the reservation to create. - required: - - location_id - - inventory_item_id - - quantity - properties: - line_item_id: - description: The ID of the line item of the reservation. - type: string - location_id: - description: The ID of the location of the reservation. - type: string - inventory_item_id: - description: The ID of the inventory item the reservation is associated with. - type: string - quantity: - description: The quantity to reserve. - type: number - description: - description: The reservation's description. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostReservationsReservationReq: - type: object - description: The details to update of the reservation. - properties: - location_id: - description: The ID of the location associated with the reservation. - type: string - quantity: - description: The quantity to reserve. - type: number - description: - description: The reservation's description. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostReturnReasonsReasonReq: - type: object - description: The details to update of the return reason. - properties: - label: - description: The label to display to the Customer. - type: string - value: - description: A unique value of the return reason. - type: string - description: - description: The description of the Reason. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostReturnReasonsReq: - type: object - description: The details of the return reason to create. - required: - - label - - value - properties: - label: - description: The label to display to the Customer. - type: string - value: - description: A unique value of the return reason. - type: string - parent_return_reason_id: - description: The ID of the parent return reason. - type: string - description: - description: The description of the Reason. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostReturnsReturnReceiveReq: - type: object - description: The details of the received return. - required: - - items - properties: - items: - description: The Line Items that have been received. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the Line Item. - type: string - quantity: - description: The quantity of the Line Item. - type: integer - refund: - description: The amount to refund. - type: number - location_id: - description: The ID of the location to return items from. - type: string - AdminPostSalesChannelsChannelProductsBatchReq: - type: object - description: The details of the products to add to the sales channel. - required: - - product_ids - properties: - product_ids: - description: The IDs of the products to add to the sales channel - type: array - items: - type: object - required: - - id - properties: - id: - type: string - description: The ID of the product - AdminPostSalesChannelsChannelStockLocationsReq: - type: object - required: - - location_id - properties: - location_id: - description: The ID of the stock location - type: string - AdminPostSalesChannelsReq: - type: object - description: The details of the sales channel to create. - required: - - name - properties: - name: - description: The name of the Sales Channel - type: string - description: - description: The description of the Sales Channel - type: string - is_disabled: - description: Whether the Sales Channel is disabled. - type: boolean - AdminPostSalesChannelsSalesChannelReq: - type: object - description: The details to update of the sales channel. - properties: - name: - type: string - description: The name of the sales channel - description: - type: string - description: The description of the sales channel. - is_disabled: - type: boolean - description: Whether the Sales Channel is disabled. - AdminPostShippingOptionsOptionReq: - type: object - description: The details to update of the shipping option. - required: - - requirements - properties: - name: - description: The name of the Shipping Option - type: string - amount: - description: The amount to charge for the Shipping Option. If the `price_type` of the shipping option is `calculated`, this amount will not actually be used. - type: integer - admin_only: - description: If set to `true`, the shipping option can only be used when creating draft orders. - type: boolean - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - requirements: - description: The requirements that must be satisfied for the Shipping Option to be available. - type: array - items: - type: object - required: - - type - - amount - properties: - id: - description: The ID of an existing requirement. If an ID is passed, the existing requirement's details are updated. Otherwise, a new requirement is created. - type: string - type: - description: The type of the requirement - type: string - enum: - - max_subtotal - - min_subtotal - amount: - description: The amount to compare with. - type: integer - includes_tax: - description: Tax included in prices of shipping option - x-featureFlag: tax_inclusive_pricing - type: boolean - AdminPostShippingOptionsReq: - type: object - description: The details of the shipping option to create. - required: - - name - - region_id - - provider_id - - data - - price_type - properties: - name: - description: The name of the Shipping Option - type: string - region_id: - description: The ID of the Region in which the Shipping Option will be available. - type: string - provider_id: - description: The ID of the Fulfillment Provider that handles the Shipping Option. - type: string - profile_id: - description: The ID of the Shipping Profile to add the Shipping Option to. - type: number - data: - description: The data needed for the Fulfillment Provider to handle shipping with this Shipping Option. - type: object - price_type: - description: The type of the Shipping Option price. `flat_rate` indicates fixed pricing, whereas `calculated` indicates that the price will be calculated each time by the fulfillment provider. - type: string - enum: - - flat_rate - - calculated - amount: - description: The amount to charge for the Shipping Option. If the `price_type` is set to `calculated`, this amount will not actually be used. - type: integer - requirements: - description: The requirements that must be satisfied for the Shipping Option to be available. - type: array - items: - type: object - required: - - type - - amount - properties: - type: - description: The type of the requirement - type: string - enum: - - max_subtotal - - min_subtotal - amount: - description: The amount to compare with. - type: integer - is_return: - description: Whether the Shipping Option can be used for returns or during checkout. - type: boolean - default: false - admin_only: - description: If set to `true`, the shipping option can only be used when creating draft orders. - type: boolean - default: false - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - includes_tax: - description: Tax included in prices of shipping option - x-featureFlag: tax_inclusive_pricing - type: boolean - AdminPostShippingProfilesProfileReq: - type: object - description: The detail to update of the shipping profile. - properties: - name: - description: The name of the Shipping Profile - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - type: - description: The type of the Shipping Profile - type: string - enum: - - default - - gift_card - - custom - products: - description: product IDs to associate with the Shipping Profile - type: array - shipping_options: - description: Shipping option IDs to associate with the Shipping Profile - type: array - AdminPostShippingProfilesReq: - type: object - description: The details of the shipping profile to create. - required: - - name + - description - type + - prices properties: - name: - description: The name of the Shipping Profile + title: type: string - type: - description: The type of the Shipping Profile + title: title + description: The price list's title. + description: type: string - enum: - - default - - gift_card - - custom - metadata: - description: An optional set of key-value pairs with additional information. + title: description + description: The price list's description. + starts_at: + type: string + title: starts_at + description: The price list's starts at. + ends_at: + type: string + title: ends_at + description: The price list's ends at. + status: {} + type: {} + prices: + type: array + description: The price list's prices. + items: + type: object + description: The price's prices. + x-schemaName: AdminPriceListPricesCreateReq + required: + - currency_code + - amount + - variant_id + properties: + currency_code: + type: string + title: currency_code + description: The price's currency code. + amount: + type: number + title: amount + description: The price's amount. + variant_id: + type: string + title: variant_id + description: The price's variant id. + min_quantity: + type: number + title: min_quantity + description: The price's min quantity. + max_quantity: + type: number + title: max_quantity + description: The price's max quantity. + rules: + type: object + description: The price's rules. + properties: {} + rules: type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminPostStockLocationsLocationReq: + description: The price list's rules. + properties: {} + AdminPostPricingRuleTypesReq: type: object - description: The details to update of the stock location. + description: SUMMARY + x-schemaName: AdminPostPricingRuleTypesReq + required: + - name + - rule_attribute + - default_priority properties: name: - description: the name of the stock location type: string - address_id: - description: the stock location address ID + title: name + description: The pricing's name. + rule_attribute: type: string - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - address: - description: The data of an associated address to create or update. - $ref: '#/components/schemas/StockLocationAddressInput' + title: rule_attribute + description: The pricing's rule attribute. + default_priority: + type: number + title: default_priority + description: The pricing's default priority. + AdminPostPricingRuleTypesRuleTypeReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPricingRuleTypesRuleTypeReq + properties: + name: + type: string + title: name + description: The pricing's name. + rule_attribute: + type: string + title: rule_attribute + description: The pricing's rule attribute. + default_priority: + type: number + title: default_priority + description: The pricing's default priority. + AdminPostPromotionsPromotionReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPromotionsPromotionReq + properties: + code: + type: string + title: code + description: The promotion's code. + is_automatic: + type: boolean + title: is_automatic + description: The promotion's is automatic. + type: {} + campaign_id: + type: string + title: campaign_id + description: The promotion's campaign id. + campaign: + $ref: '#/components/schemas/AdminPostCampaignsReq' + application_method: + $ref: '#/components/schemas/ApplicationMethodsMethodPostReq' + rules: + type: array + description: The promotion's rules. + items: + type: object + description: The rule's rules. + x-schemaName: PromotionRule + required: + - operator + - attribute + - values + properties: + operator: {} + description: + type: string + title: description + description: The rule's description. + attribute: + type: string + title: attribute + description: The rule's attribute. + values: + type: array + description: The rule's values. + items: + type: string + title: values + description: The value's values. + AdminPostPromotionsPromotionRulesBatchAddReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPromotionsPromotionRulesBatchAddReq + required: + - rules + properties: + rules: + type: array + description: The promotion's rules. + items: + type: object + description: The rule's rules. + x-schemaName: PromotionRule + required: + - operator + - attribute + - values + properties: + operator: {} + description: + type: string + title: description + description: The rule's description. + attribute: + type: string + title: attribute + description: The rule's attribute. + values: + type: array + description: The rule's values. + items: + type: string + title: values + description: The value's values. + AdminPostPromotionsPromotionRulesBatchRemoveReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPromotionsPromotionRulesBatchRemoveReq + required: + - rule_ids + properties: + rule_ids: + type: array + description: The promotion's rule ids. + items: + type: string + title: rule_ids + description: The rule id's rule ids. + AdminPostPromotionsPromotionRulesBatchUpdateReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPromotionsPromotionRulesBatchUpdateReq + required: + - rules + properties: + rules: + type: array + description: The promotion's rules. + items: + type: object + description: The rule's rules. + x-schemaName: UpdatePromotionRule + required: + - id + - attribute + - values + properties: + id: + type: string + title: id + description: The rule's ID. + operator: {} + description: + type: string + title: description + description: The rule's description. + attribute: + type: string + title: attribute + description: The rule's attribute. + values: + type: array + description: The rule's values. + items: + type: string + title: values + description: The value's values. AdminPostStockLocationsReq: type: object - description: The details of the stock location to create. + description: SUMMARY + x-schemaName: AdminPostStockLocationsReq required: - name properties: name: - description: the name of the stock location type: string - address_id: - description: the ID of an existing stock location address to associate with the stock location. Only required if `address` is not provided. - type: string - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute + title: name + description: The stock location's name. address: - description: A new stock location address to create and associate with the stock location. Only required if `address_id` is not provided. - $ref: '#/components/schemas/StockLocationAddressInput' - AdminPostStockLocationsReqAddress: - type: object - required: - - address_1 - - country_code - properties: - address_1: + $ref: '#/components/schemas/StockLocationAddress' + address_id: type: string - description: Stock location address - example: 35, Jhon Doe Ave - address_2: - type: string - description: Stock location address' complement - example: apartment 4432 - company: - type: string - description: Stock location address' company - city: - type: string - description: Stock location address' city - example: Mexico city - country_code: - description: The two character ISO code for the country. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - phone: - type: string - description: Stock location address' phone number - example: +1 555 61646 - postal_code: - type: string - description: Stock location address' postal code - example: HD3-1G8 - province: - type: string - description: Stock location address' province - example: Sinaloa - AdminPostStoreReq: - type: object - description: The details to update of the store. - properties: - name: - description: The name of the Store - type: string - swap_link_template: - description: A template for Swap links - use `{{cart_id}}` to insert the Swap Cart ID - type: string - example: http://example.com/swaps/{{cart_id}} - payment_link_template: - description: A template for payment links - use `{{cart_id}}` to insert the Cart ID - example: http://example.com/payments/{{cart_id}} - type: string - invite_link_template: - description: A template for invite links - use `{{invite_token}}` to insert the invite token - example: http://example.com/invite?token={{invite_token}} - type: string - default_currency_code: - description: The default currency code of the Store. - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currencies: - description: Array of available currencies in the store. Each currency is in 3 character ISO code format. - type: array - items: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. + title: address_id + description: The stock location's address id. metadata: - description: An optional set of key-value pairs with additional information. type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute + description: The stock location's metadata. + properties: {} AdminPostTaxRatesReq: type: object - description: The details of the tax rate to create. + description: SUMMARY + x-schemaName: AdminPostTaxRatesReq required: - - code - name - - region_id + - tax_region_id properties: - code: - type: string - description: The code of the tax rate. - name: - type: string - description: The name of the tax rate. - region_id: - type: string - description: The ID of the Region that the tax rate belongs to. rate: type: number - description: The numeric rate to charge. - products: + title: rate + description: The tax rate's rate. + code: + type: string + title: code + description: The tax rate's code. + rules: type: array - description: The IDs of the products associated with this tax rate. + description: The tax rate's rules. items: - type: string - shipping_options: - type: array - description: The IDs of the shipping options associated with this tax rate - items: - type: string - product_types: - type: array - description: The IDs of the types of products associated with this tax rate - items: - type: string - AdminPostTaxRatesTaxRateProductTypesReq: - type: object - description: The product types to add to the tax rate. - required: - - product_types - properties: - product_types: - type: array - description: The IDs of the types of products to associate with this tax rate - items: - type: string - AdminPostTaxRatesTaxRateProductsReq: - type: object - description: The details of the products to associat with the tax rate. - required: - - products - properties: - products: - type: array - description: The IDs of the products to associate with this tax rate - items: - type: string + type: object + description: The rule's rules. + x-schemaName: CreateTaxRateRule + required: + - reference + - reference_id + properties: + reference: + type: string + title: reference + description: The rule's reference. + reference_id: + type: string + title: reference_id + description: The rule's reference id. + name: + type: string + title: name + description: The tax rate's name. + is_default: + type: boolean + title: is_default + description: The tax rate's is default. + is_combinable: + type: boolean + title: is_combinable + description: The tax rate's is combinable. + tax_region_id: + type: string + title: tax_region_id + description: The tax rate's tax region id. + metadata: + type: object + description: The tax rate's metadata. + properties: {} AdminPostTaxRatesTaxRateReq: type: object - description: The details to update of the tax rate. + description: SUMMARY + x-schemaName: AdminPostTaxRatesTaxRateReq properties: code: type: string - description: The code of the tax rate. + title: code + description: The tax rate's code. name: type: string - description: The name of the tax rate. + title: name + description: The tax rate's name. region_id: type: string - description: The ID of the Region that the tax rate belongs to. + title: region_id + description: The tax rate's region id. rate: type: number - description: The numeric rate to charge. + title: rate + description: The tax rate's rate. products: type: array - description: The IDs of the products associated with this tax rate + description: The tax rate's products. items: type: string + title: products + description: The product's products. shipping_options: type: array - description: The IDs of the shipping options associated with this tax rate + description: The tax rate's shipping options. items: type: string + title: shipping_options + description: The shipping option's shipping options. product_types: type: array - description: The IDs of the types of product types associated with this tax rate + description: The tax rate's product types. items: type: string - AdminPostTaxRatesTaxRateShippingOptionsReq: + title: product_types + description: The product type's product types. + AdminPostTaxRatesTaxRateRulesReq: type: object - description: The details of the shipping options to associate with the tax rate. + description: SUMMARY + x-schemaName: AdminPostTaxRatesTaxRateRulesReq required: - - shipping_options + - reference + - reference_id properties: - shipping_options: - type: array - description: The IDs of the shipping options to associate with this tax rate - items: - type: string - AdminPostUploadsDownloadUrlReq: - type: object - description: The details of the file to retrieve its download URL. - required: - - file_key - properties: - file_key: - description: key of the file to obtain the download link for. This is obtained when you first uploaded the file, or by the file service if you used it directly. + reference: type: string - AdminPriceListDeleteBatchRes: - type: object - description: The details of deleting a price list. - required: - - ids - - object - - deleted - properties: - ids: - type: array - description: The IDs of the deleted prices. - items: - type: string - description: The ID of a deleted price. - object: + title: reference + description: The tax rate's reference. + reference_id: type: string - description: The type of the object that was deleted. A price is also named `money-amount`. - default: money-amount - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminPriceListDeleteProductPricesRes: + title: reference_id + description: The tax rate's reference id. + AdminPostTaxRegionsReq: type: object + description: SUMMARY + x-schemaName: AdminPostTaxRegionsReq required: - - ids - - object - - deleted + - country_code properties: - ids: - type: array - description: The IDs of the deleted prices. - items: - type: string - object: + country_code: type: string - description: The type of the object that was deleted. A price is also named `money-amount`. - default: money-amount - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminPriceListDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: + title: country_code + description: The tax region's country code. + province_code: type: string - description: The ID of the deleted Price List. - object: - type: string - description: The type of the object that was deleted. - default: price-list - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminPriceListDeleteVariantPricesRes: - type: object - required: - - ids - - object - - deleted - properties: - ids: - type: array - description: The IDs of the deleted prices. - items: - type: string - object: - type: string - description: The type of the object that was deleted. A price is also named `money-amount`. - default: money-amount - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminPriceListRes: - type: object - description: The price list's details. - x-expanded-relations: - field: price_list - relations: - - customer_groups - - prices - required: - - price_list - properties: - price_list: - description: Price List details. - $ref: '#/components/schemas/PriceList' - AdminPriceListsListRes: - type: object - description: The list of price lists with pagination fields. - required: - - price_lists - - count - - offset - - limit - properties: - price_lists: - type: array - description: An array of price lists details. - items: - $ref: '#/components/schemas/PriceList' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of price lists skipped when retrieving the price lists. - limit: - type: integer - description: The number of items per page - AdminPriceListsProductsListRes: - type: object - description: The list of products with pagination fields. - x-expanded-relations: - field: products - relations: - - categories - - collection - - images - - options - - tags - - type - - variants - - variants.options - required: - - products - - count - - offset - - limit - properties: - products: - type: array - description: An array of products details. - items: - $ref: '#/components/schemas/Product' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of price lists skipped when retrieving the price lists. - limit: - type: integer - description: The number of items per page - AdminProductCategoriesCategoryDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted product category - object: - type: string - description: The type of the object that was deleted. - default: product-category - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminProductCategoriesCategoryRes: - type: object - description: The product category's details. - x-expanded-relations: - field: product_category - relations: - - category_children - - parent_category - required: - - product_category - properties: - product_category: - description: Product category details. - $ref: '#/components/schemas/ProductCategory' - AdminProductCategoriesListRes: - type: object - description: The list of product categories with pagination fields. - x-expanded-relations: - field: product_categories - relations: - - category_children - - parent_category - required: - - product_categories - - count - - offset - - limit - properties: - product_categories: - type: array - description: An array of product category details. - items: - $ref: '#/components/schemas/ProductCategory' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product categories skipped when retrieving the product categories. - limit: - type: integer - description: The number of items per page - AdminProductTagsListRes: - type: object - description: The list of product tags with pagination fields. - required: - - product_tags - - count - - offset - - limit - properties: - product_tags: - type: array - description: An array of product tag details. - items: - $ref: '#/components/schemas/ProductTag' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product tags skipped when retrieving the product tags. - limit: - type: integer - description: The number of items per page - AdminProductTypesListRes: - type: object - description: The list of product types with pagination fields. - required: - - product_types - - count - - offset - - limit - properties: - product_types: - type: array - description: An array of product types details. - items: - $ref: '#/components/schemas/ProductType' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product types skipped when retrieving the product types. - limit: - type: integer - description: The number of items per page - AdminProductsDeleteOptionRes: - type: object - description: The details of deleting a product's option. - x-expanded-relations: - field: product - relations: - - collection - - images - - options - - tags - - type - - variants - - variants.options - - variants.prices - required: - - option_id - - object - - deleted - - product - properties: - option_id: - type: string - description: The ID of the deleted Product Option - object: - type: string - description: The type of the object that was deleted. - default: option - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - product: - description: Product details. - $ref: '#/components/schemas/PricedProduct' - AdminProductsDeleteRes: - type: object - description: The details of deleting a product. - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Product. - object: - type: string - description: The type of the object that was deleted. - default: product - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminProductsDeleteVariantRes: - type: object - description: The details of deleting a product's variant. - x-expanded-relations: - field: product - relations: - - collection - - images - - options - - tags - - type - - variants - - variants.options - - variants.prices - required: - - variant_id - - object - - deleted - - product - properties: - variant_id: - type: string - description: The ID of the deleted Product Variant. - object: - type: string - description: The type of the object that was deleted. - default: product-variant - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - product: - description: Product details. - $ref: '#/components/schemas/PricedProduct' - AdminProductsListRes: - type: object - description: The list of products with pagination fields. - x-expanded-relations: - field: products - relations: - - collection - - images - - options - - tags - - type - - variants - - variants.options - - variants.prices - totals: - - variants.purchasable - required: - - products - - count - - offset - - limit - properties: - products: - type: array - description: An array of products details. - items: - $ref: '#/components/schemas/PricedProduct' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of products skipped when retrieving the products. - limit: - type: integer - description: The number of items per page - AdminProductsListTagsRes: - type: object - description: The usage details of product tags. - required: - - tags - properties: - tags: - description: An array of product tags details. - type: array - items: - type: object - required: - - id - - usage_count - - value - properties: - id: - description: The ID of the tag. - type: string - usage_count: - description: The number of products that use this tag. - type: string - value: - description: The value of the tag. - type: string - AdminProductsListTypesRes: - type: object - required: - - types - properties: - types: - type: array - description: An array of product types details. - items: - $ref: '#/components/schemas/ProductType' - AdminProductsListVariantsRes: - type: object - required: - - variants - - count - - offset - - limit - properties: - variants: - type: array - description: An array of product variants details. - items: - $ref: '#/components/schemas/ProductVariant' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product variants skipped when retrieving the product variants. - limit: - type: integer - description: The number of items per page - AdminProductsRes: - type: object - description: The product's details. - x-expanded-relations: - field: product - relations: - - collection - - images - - options - - tags - - type - - variants - - variants.options - - variants.prices - required: - - product - properties: - product: - description: Product details. - $ref: '#/components/schemas/PricedProduct' - AdminPublishableApiKeyDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted publishable API key. - object: - type: string - description: The type of the object that was deleted. - default: publishable_api_key - deleted: - type: boolean - description: Whether the publishable API key was deleted. - default: true - AdminPublishableApiKeysListRes: - type: object - description: The list of publishable API keys with pagination fields. - required: - - publishable_api_keys - - count - - offset - - limit - properties: - publishable_api_keys: - type: array - description: An array of publishable API keys details. - items: - $ref: '#/components/schemas/PublishableApiKey' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of publishable API keys skipped when retrieving the publishable API keys. - limit: - type: integer - description: The number of items per page - AdminPublishableApiKeysListSalesChannelsRes: - type: object - description: The list of sales channel. - required: - - sales_channels - properties: - sales_channels: - description: An array of sales channels details. - type: array - items: - $ref: '#/components/schemas/SalesChannel' - AdminPublishableApiKeysRes: - type: object - description: The publishable API key's details. - required: - - publishable_api_key - properties: - publishable_api_key: - description: Publishable API key details. - $ref: '#/components/schemas/PublishableApiKey' - AdminRefundRes: - type: object - description: The refund's details. - required: - - refund - properties: - refund: - description: Refund details. - $ref: '#/components/schemas/Refund' - AdminRegionsDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Region. - object: - type: string - description: The type of the object that was deleted. - default: region - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminRegionsListRes: - type: object - description: The list of regions with pagination fields. - x-expanded-relations: - field: regions - relations: - - countries - - fulfillment_providers - - payment_providers - eager: - - fulfillment_providers - - payment_providers - required: - - regions - - count - - offset - - limit - properties: - regions: - type: array - description: An array of regions details. - items: - $ref: '#/components/schemas/Region' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of regions skipped when retrieving the regions. - limit: - type: integer - description: The number of items per page - AdminRegionsRes: - type: object - description: The region's details. - x-expanded-relations: - field: region - relations: - - countries - - fulfillment_providers - - payment_providers - eager: - - fulfillment_providers - - payment_providers - required: - - region - properties: - region: - description: Region details. - $ref: '#/components/schemas/Region' - AdminReservationsDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Reservation. - object: - type: string - description: The type of the object that was deleted. - default: reservation - deleted: - type: boolean - description: Whether or not the Reservation was deleted. - default: true - AdminReservationsListRes: - type: object - description: The list of reservations with pagination fields. - required: - - reservations - - count - - offset - - limit - properties: - reservations: - type: array - description: An array of reservations details. - items: - $ref: '#/components/schemas/ExtendedReservationItem' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of reservations skipped when retrieving the reservations. - limit: - type: integer - description: The number of items per page - AdminReservationsRes: - type: object - description: The reservation's details. - required: - - reservation - properties: - reservation: - description: Reservation details. - $ref: '#/components/schemas/ReservationItemDTO' - AdminResetPasswordRequest: - type: object - description: The details of the password reset request. - required: - - token - - password - properties: - email: - description: The User's email. - type: string - format: email - token: - description: The password-reset token generated when the password reset was requested. - type: string - password: - description: The User's new password. - type: string - format: password - AdminResetPasswordTokenRequest: - type: object - description: The details of the password reset token request. - required: - - email - properties: - email: - description: The User's email. - type: string - format: email - AdminReturnReasonsDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted return reason - object: - type: string - description: The type of the object that was deleted. - default: return_reason - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminReturnReasonsListRes: - type: object - description: The list of return reasons. - x-expanded-relations: - field: return_reasons - relations: - - parent_return_reason - - return_reason_children - required: - - return_reasons - properties: - return_reasons: - type: array - description: The list of return reasons. - items: - $ref: '#/components/schemas/ReturnReason' - AdminReturnReasonsRes: - type: object - description: The return reason's details. - x-expanded-relations: - field: return_reason - relations: - - parent_return_reason - - return_reason_children - required: - - return_reason - properties: - return_reason: - description: The return reason's details. - $ref: '#/components/schemas/ReturnReason' - AdminReturnsCancelRes: - type: object - description: The associated order's details. - x-expanded-relations: - field: order - relations: - - billing_address - - claims - - claims.additional_items - - claims.additional_items.variant - - claims.claim_items - - claims.claim_items.images - - claims.claim_items.item - - claims.fulfillments - - claims.fulfillments.tracking_links - - claims.return_order - - claims.return_order.shipping_method - - claims.return_order.shipping_method.tax_lines - - claims.shipping_address - - claims.shipping_methods - - customer - - discounts - - discounts.rule - - fulfillments - - fulfillments.items - - fulfillments.tracking_links - - gift_card_transactions - - gift_cards - - items - - payments - - refunds - - region - - returns - - returns.items - - returns.items.reason - - returns.shipping_method - - returns.shipping_method.tax_lines - - shipping_address - - shipping_methods - - swaps - - swaps.additional_items - - swaps.additional_items.variant - - swaps.fulfillments - - swaps.fulfillments.tracking_links - - swaps.payment - - swaps.return_order - - swaps.return_order.shipping_method - - swaps.return_order.shipping_method.tax_lines - - swaps.shipping_address - - swaps.shipping_methods - - swaps.shipping_methods.tax_lines - required: - - order - properties: - order: - description: Order details. - $ref: '#/components/schemas/Order' - AdminReturnsListRes: - type: object - description: The list of returns with pagination fields. - x-expanded-relation: - field: returns - relations: - - order - - swap - required: - - returns - - count - - offset - - limit - properties: - returns: - type: array - description: An array of returns details. - items: - $ref: '#/components/schemas/Return' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of returns skipped when retrieving the returns. - limit: - type: integer - description: The number of items per page - AdminReturnsRes: - type: object - description: The return's details. - x-expanded-relation: - field: return - relations: - - swap - required: - - return - properties: - return: - description: Return details. - $ref: '#/components/schemas/Return' - AdminSalesChannelsDeleteLocationRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the removed stock location from a sales channel - object: - type: string - description: The type of the object that was removed. - default: stock-location - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminSalesChannelsDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted sales channel - object: - type: string - description: The type of the object that was deleted. - default: sales-channel - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminSalesChannelsListRes: - type: object - description: The list of sales channels with pagination fields. - required: - - sales_channels - - count - - offset - - limit - properties: - sales_channels: - type: array - description: An array of sales channels details. - items: - $ref: '#/components/schemas/SalesChannel' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of items skipped before the returned results - limit: - type: integer - description: The number of items per page - AdminSalesChannelsRes: - type: object - description: The sales channel's details. - required: - - sales_channel - properties: - sales_channel: - description: Sales Channel's details. - $ref: '#/components/schemas/SalesChannel' - AdminShippingOptionsDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Shipping Option. - object: - type: string - description: The type of the object that was deleted. - default: shipping-option - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminShippingOptionsListRes: - type: object - description: The list of shipping options with pagination fields. - x-expanded-relations: - field: shipping_options - relations: - - profile - - region - - requirements - eager: - - region.fulfillment_providers - - region.payment_providers - required: - - shipping_options - - count - - offset - - limit - properties: - shipping_options: - type: array - description: An array of shipping options details. - items: - $ref: '#/components/schemas/ShippingOption' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of shipping options skipped when retrieving the shipping options. - limit: - type: integer - description: The number of items per page - AdminShippingOptionsRes: - type: object - description: The shipping option's details. - x-expanded-relations: - field: shipping_option - relations: - - profile - - region - - requirements - eager: - - region.fulfillment_providers - - region.payment_providers - required: - - shipping_option - properties: - shipping_option: - description: Shipping option details. - $ref: '#/components/schemas/ShippingOption' - AdminShippingProfilesListRes: - type: object - description: The list of shipping profiles. - required: - - shipping_profiles - properties: - shipping_profiles: - type: array - description: An array of shipping profiles details. - items: - $ref: '#/components/schemas/ShippingProfile' - AdminShippingProfilesRes: - type: object - description: The shipping profile's details. - x-expanded-relations: - field: shipping_profile - relations: - - products - - shipping_options - required: - - shipping_profile - properties: - shipping_profile: - description: Shipping profile details. - $ref: '#/components/schemas/ShippingProfile' - AdminStockLocationsDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Stock Location. - object: - type: string - description: The type of the object that was deleted. - default: stock_location - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminStockLocationsListRes: - type: object - description: The list of stock locations with pagination fields. - required: - - stock_locations - - count - - offset - - limit - properties: - stock_locations: - type: array - description: The list of stock locations. - items: - $ref: '#/components/schemas/StockLocationExpandedDTO' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of stock locations skipped when retrieving the stock locations. - limit: - type: integer - description: The number of items per page - AdminStockLocationsRes: - type: object - description: The stock location's details. - required: - - stock_location - properties: - stock_location: - description: Stock location details. - $ref: '#/components/schemas/StockLocationExpandedDTO' - AdminStoresRes: - type: object - description: The store's details. - required: - - store - properties: - store: - description: Store details. - $ref: '#/components/schemas/Store' - AdminSwapsListRes: - type: object - description: The list of swaps with pagination fields. - required: - - swaps - - count - - offset - - limit - properties: - swaps: - type: array - description: An array of swaps details. - items: - $ref: '#/components/schemas/Swap' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of swaps skipped when retrieving the swaps. - limit: - type: integer - description: The number of items per page - AdminSwapsRes: - type: object - description: The swap's details. - x-expanded-relations: - field: swap - relations: - - additional_items - - additional_items.adjustments - - cart - - cart.items - - cart.items.adjustments - - cart.items.variant - - fulfillments - - order - - payment - - return_order - - shipping_address - - shipping_methods - eager: - - fulfillments.items - - shipping_methods.shipping_option - required: - - swap - properties: - swap: - description: Swap details. - $ref: '#/components/schemas/Swap' - AdminTaxProvidersList: - type: object - description: The list of tax providers in a store. - required: - - tax_providers - properties: - tax_providers: - type: array - description: An array of tax providers details. - items: - $ref: '#/components/schemas/TaxProvider' - AdminTaxRatesDeleteRes: - type: object - required: - - id - - object - - deleted - properties: - id: - type: string - description: The ID of the deleted Shipping Option. - object: - type: string - description: The type of the object that was deleted. - default: tax-rate - deleted: - type: boolean - description: Whether or not the items were deleted. - default: true - AdminTaxRatesListRes: - type: object - description: The list of tax rates with pagination fields. - required: - - tax_rates - - count - - offset - - limit - properties: - tax_rates: - type: array - description: An array of tax rate details. - items: - $ref: '#/components/schemas/TaxRate' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of tax rates to skip when retrieving the tax rates. - limit: - type: integer - description: The number of items per page - AdminTaxRatesRes: - type: object - description: The tax rate's details. - required: - - tax_rate - properties: - tax_rate: - description: Tax rate details. - $ref: '#/components/schemas/TaxRate' - AdminUpdatePaymentCollectionsReq: - type: object - description: The details to update of the payment collection. - properties: - description: - description: A description to create or update the payment collection. + title: province_code + description: The tax region's province code. + parent_id: type: string + title: parent_id + description: The tax region's parent id. + default_tax_rate: + $ref: '#/components/schemas/CreateDefaultTaxRate' metadata: - description: A set of key-value pairs to hold additional information. type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute + description: The tax region's metadata. + properties: {} + AdminPostWorkflowsAsyncResponseReq: + type: object + description: SUMMARY + x-schemaName: AdminPostWorkflowsAsyncResponseReq + required: + - transaction_id + - step_id + properties: + transaction_id: + type: string + title: transaction_id + description: The workflows execution's transaction id. + step_id: + type: string + title: step_id + description: The workflows execution's step id. + response: {} + compensate_input: {} + action: {} + AdminPostWorkflowsRunReq: + type: object + description: SUMMARY + x-schemaName: AdminPostWorkflowsRunReq + properties: + input: {} + transaction_id: + type: string + title: transaction_id + description: The workflows execution's transaction id. AdminUpdateUserRequest: type: object + description: SUMMARY + x-schemaName: AdminUpdateUserRequest + required: + - avatar_url properties: first_name: - description: The first name of the User. type: string + title: first_name + description: The user's first name. last_name: - description: The last name of the User. type: string - role: - description: The role assigned to the user. These roles don't provide any different privileges. + title: last_name + description: The user's last name. + avatar_url: type: string - enum: - - admin - - member - - developer - api_token: - description: The API token of the User. - type: string - metadata: - description: An optional set of key-value pairs with additional information. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AdminUploadsDownloadUrlRes: + title: avatar_url + description: The user's avatar url. + ApplicationMethodsMethodPostReq: type: object - description: The download URL details. - required: - - download_url + description: The promotion's application method. + x-schemaName: ApplicationMethodsMethodPostReq properties: - download_url: - description: The Download URL of the file - type: string - AdminUploadsRes: - type: object - description: The list of uploaded files. - required: - - uploads - properties: - uploads: - type: array - description: Uploaded files details. - items: - type: object - required: - - url - - key - properties: - url: - description: The URL of the uploaded file. - type: string - format: uri - key: - description: The key of the file that is identifiable by the file service. It can be used later to retrieve or manipulate the file. - type: string - AdminUserRes: - type: object - description: The user's details. - required: - - user - properties: - user: - description: User details. - $ref: '#/components/schemas/User' - AdminUsersListRes: - type: object - description: The list of users. - required: - - users - - count - - offset - - limit - properties: - users: - type: array - description: An array of users details. - items: - $ref: '#/components/schemas/User' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of users skipped when retrieving the users. - limit: - type: integer - description: The number of items per page - AdminVariantsListRes: - type: object - description: The list of variants with pagination fields. - x-expanded-relations: - field: variants - relations: - - options - - prices - - product - totals: - - purchasable - required: - - variants - - count - - offset - - limit - properties: - variants: - type: array - description: An array of product variant details. - items: - $ref: '#/components/schemas/PricedVariant' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product variants skipped when retrieving the product variants. - limit: - type: integer - description: The number of items per page - AdminVariantsRes: - type: object - description: The product variant's details. - x-expanded-relations: - field: variant - relations: - - options - - prices - - product - required: - - variant - properties: - variant: - description: Product variant's details. - $ref: '#/components/schemas/PricedVariant' - BatchJob: - title: Batch Job - description: A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not. - type: object - required: - - canceled_at - - completed_at - - confirmed_at - - context - - created_at - - created_by - - deleted_at - - dry_run - - failed_at - - id - - pre_processed_at - - processing_at - - result - - status - - type - - updated_at - properties: - id: - description: The unique identifier for the batch job. - type: string - example: batch_01G8T782965PYFG0751G0Z38B4 - type: - description: The type of batch job. - type: string - enum: - - product-import - - product-export - status: - description: The status of the batch job. - type: string - enum: - - created - - pre_processed - - confirmed - - processing - - completed - - canceled - - failed - default: created - created_by: - description: The unique identifier of the user that created the batch job. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - created_by_user: - description: The details of the user that created the batch job. - x-expandable: created_by_user - nullable: true - $ref: '#/components/schemas/User' - context: - description: The context of the batch job, the type of the batch job determines what the context should contain. - nullable: true - type: object - example: - shape: - prices: - - region: null - currency_code: eur - dynamicImageColumnCount: 4 - dynamicOptionColumnCount: 2 - list_config: - skip: 0 - take: 50 - order: - created_at: DESC - relations: - - variants - - variant.prices - - images - dry_run: - description: Specify if the job must apply the modifications or not. - type: boolean - default: false - result: - description: The result of the batch job. - nullable: true - allOf: - - type: object - example: {} - - type: object - properties: - count: - type: number - advancement_count: - type: number - progress: - type: number - errors: - type: object - properties: - message: - type: string - code: - oneOf: - - type: string - - type: number - err: - type: array - stat_descriptors: - type: object - properties: - key: - type: string - name: - type: string - message: - type: string - file_key: - type: string - file_size: - type: number - example: - errors: - - err: [] - code: unknown - message: Method not implemented. - stat_descriptors: - - key: product-export-count - name: Product count to export - message: There will be 8 products exported by this action - pre_processed_at: - description: The date from which the job has been pre-processed. - nullable: true - type: string - format: date-time - processing_at: - description: The date the job is processing at. - nullable: true - type: string - format: date-time - confirmed_at: - description: The date when the confirmation has been done. - nullable: true - type: string - format: date-time - completed_at: - description: The date of the completion. - nullable: true - type: string - format: date-time - canceled_at: - description: The date of the concellation. - nullable: true - type: string - format: date-time - failed_at: - description: The date when the job failed. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was last updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - Cart: - title: Cart - description: A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim. - type: object - required: - - billing_address_id - - completed_at - - context - - created_at - - customer_id - - deleted_at - - email - - id - - idempotency_key - - metadata - - payment_authorized_at - - payment_id - - payment_session - - region_id - - shipping_address_id - - type - - updated_at - properties: - id: - description: The cart's ID - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - email: - description: The email associated with the cart - nullable: true - type: string - format: email - billing_address_id: - description: The billing address's ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the cart. - x-expandable: billing_address - nullable: true - $ref: '#/components/schemas/Address' - shipping_address_id: - description: The shipping address's ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address associated with the cart. - x-expandable: shipping_address - nullable: true - $ref: '#/components/schemas/Address' - items: - description: The line items added to the cart. - type: array - x-expandable: items - items: - $ref: '#/components/schemas/LineItem' - region_id: - description: The region's ID - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region associated with the cart. - x-expandable: region - nullable: true - $ref: '#/components/schemas/Region' - discounts: - description: An array of details of all discounts applied to the cart. - type: array - x-expandable: discounts - items: - $ref: '#/components/schemas/Discount' - gift_cards: - description: An array of details of all gift cards applied to the cart. - type: array - x-expandable: gift_cards - items: - $ref: '#/components/schemas/GiftCard' - customer_id: - description: The customer's ID - nullable: true - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer the cart belongs to. - x-expandable: customer - nullable: true - type: object - payment_session: - description: The details of the selected payment session in the cart. - x-expandable: payment_session - nullable: true - type: object - payment_sessions: - description: The details of all payment sessions created on the cart. - type: array - x-expandable: payment_sessions - items: - type: object - payment_id: - description: The payment's ID if available - nullable: true - type: string - example: pay_01G8ZCC5W42ZNY842124G7P5R9 - payment: - description: The details of the payment associated with the cart. - nullable: true - x-expandable: payment - type: object - shipping_methods: - description: The details of the shipping methods added to the cart. - type: array - x-expandable: shipping_methods - items: - $ref: '#/components/schemas/ShippingMethod' - type: - description: The cart's type. - type: string - enum: - - default - - swap - - draft_order - - payment_link - - claim - default: default - completed_at: - description: The date with timezone at which the cart was completed. - nullable: true - type: string - format: date-time - payment_authorized_at: - description: The date with timezone at which the payment was authorized. - nullable: true - type: string - format: date-time - idempotency_key: - description: Randomly generated key used to continue the completion of a cart in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - context: - description: The context of the cart which can include info like IP or user agent. - nullable: true - type: object - example: - ip: '::1' - user_agent: PostmanRuntime/7.29.2 - sales_channel_id: - description: The sales channel ID the cart is associated with. - nullable: true - type: string - example: null - sales_channel: - description: The details of the sales channel associated with the cart. - nullable: true - x-expandable: sales_channel - $ref: '#/components/schemas/SalesChannel' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - shipping_total: - description: The total of shipping - type: integer - example: 1000 - discount_total: - description: The total of discount rounded - type: integer - example: 800 - raw_discount_total: - description: The total of discount - type: integer - example: 800 - item_tax_total: - description: The total of items with taxes - type: integer - example: 8000 - shipping_tax_total: - description: The total of shipping with taxes - type: integer - example: 1000 - tax_total: - description: The total of tax - type: integer - example: 0 - refunded_total: - description: The total amount refunded if the order associated with this cart is returned. - type: integer - example: 0 - total: - description: The total amount of the cart - type: integer - example: 8200 - subtotal: - description: The subtotal of the cart - type: integer - example: 8000 - refundable_amount: - description: The amount that can be refunded - type: integer - example: 8200 - gift_card_total: - description: The total of gift cards - type: integer - example: 0 - gift_card_tax_total: - description: The total of gift cards with taxes - type: integer - example: 0 - sales_channels: - description: The associated sales channels. - type: array - nullable: true - x-expandable: sales_channels - items: - $ref: '#/components/schemas/SalesChannel' - ClaimImage: - title: Claim Image - description: The details of an image attached to a claim. - type: object - required: - - claim_item_id - - created_at - - deleted_at - - id - - metadata - - updated_at - - url - properties: - id: - description: The claim image's ID - type: string - example: cimg_01G8ZH853Y6TFXWPG5EYE81X63 - claim_item_id: - description: The ID of the claim item associated with the image - type: string - claim_item: - description: The details of the claim item this image is associated with. - nullable: true - x-expandable: claim_item - type: object - url: - description: The URL of the image - type: string - format: uri - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ClaimItem: - title: Claim Item - description: A claim item is an item created as part of a claim. It references an item in the order that should be exchanged or refunded. - type: object - required: - - claim_order_id - - created_at - - deleted_at - - id - - item_id - - metadata - - note - - quantity - - reason - - updated_at - - variant_id - properties: - id: - description: The claim item's ID - type: string - example: citm_01G8ZH853Y6TFXWPG5EYE81X63 - images: - description: The claim images that are attached to the claim item. - type: array - x-expandable: images - items: - $ref: '#/components/schemas/ClaimImage' - claim_order_id: - description: The ID of the claim this item is associated with. - type: string - claim_order: - description: The details of the claim this item belongs to. - x-expandable: claim_order - nullable: true - type: object - item_id: - description: The ID of the line item that the claim item refers to. - type: string - example: item_01G8ZM25TN49YV9EQBE2NC27KC - item: - description: The details of the line item in the original order that this claim item refers to. - x-expandable: item - nullable: true - $ref: '#/components/schemas/LineItem' - variant_id: - description: The ID of the product variant that is claimed. - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant to potentially replace the item in the original order. - x-expandable: variant - nullable: true - $ref: '#/components/schemas/ProductVariant' - reason: - description: The reason for the claim - type: string - enum: - - missing_item - - wrong_item - - production_failure - - other - note: - description: An optional note about the claim, for additional information - nullable: true - type: string - example: I don't like it. - quantity: - description: The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order. - type: integer - example: 1 - tags: - description: User defined tags for easy filtering and grouping. - type: array - x-expandable: tags - items: - $ref: '#/components/schemas/ClaimTag' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ClaimOrder: - title: Claim - description: A Claim represents a group of faulty or missing items. It consists of claim items that refer to items in the original order that should be replaced or refunded. It also includes details related to shipping and fulfillment. - type: object - required: - - canceled_at - - created_at - - deleted_at - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - order_id - - payment_status - - refund_amount - - shipping_address_id - - type - - updated_at - properties: - id: - description: The claim's ID - type: string - example: claim_01G8ZH853Y6TFXWPG5EYE81X63 - type: - description: The claim's type - type: string - enum: - - refund - - replace - payment_status: - description: The status of the claim's payment - type: string - enum: - - na - - not_refunded - - refunded - default: na - fulfillment_status: - description: The claim's fulfillment status - type: string - enum: - - not_fulfilled - - partially_fulfilled - - fulfilled - - partially_shipped - - shipped - - partially_returned - - returned - - canceled - - requires_action - default: not_fulfilled - claim_items: - description: The details of the items that should be replaced or refunded. - type: array - x-expandable: claim_items - items: - $ref: '#/components/schemas/ClaimItem' - additional_items: - description: The details of the new items to be shipped when the claim's type is `replace` - type: array - x-expandable: additional_items - items: - $ref: '#/components/schemas/LineItem' - order_id: - description: The ID of the order that the claim comes from. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that this claim was created for. - x-expandable: order - nullable: true - type: object - return_order: - description: The details of the return associated with the claim if the claim's type is `replace`. - x-expandable: return_order - nullable: true - type: object - shipping_address_id: - description: The ID of the address that the new items should be shipped to - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the address that new items should be shipped to. - x-expandable: shipping_address - nullable: true - $ref: '#/components/schemas/Address' - shipping_methods: - description: The details of the shipping methods that the claim order will be shipped with. - type: array - x-expandable: shipping_methods - items: - $ref: '#/components/schemas/ShippingMethod' - fulfillments: - description: The fulfillments of the new items to be shipped - type: array - x-expandable: fulfillments - items: - type: object - refund_amount: - description: The amount that will be refunded in conjunction with the claim - nullable: true - type: integer - example: 1000 - canceled_at: - description: The date with timezone at which the claim was canceled. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - no_notification: - description: Flag for describing whether or not notifications related to this should be send. - nullable: true - type: boolean - example: false - idempotency_key: - description: Randomly generated key used to continue the completion of the cart associated with the claim in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - ClaimTag: - title: Claim Tag - description: Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value - properties: - id: - description: The claim tag's ID - type: string - example: ctag_01G8ZCC5Y63B95V6B5SHBZ91S4 - value: - description: The value that the claim tag holds - type: string - example: Damaged - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - Country: - title: Country - description: Country details - type: object - required: - - display_name - - id - - iso_2 - - iso_3 - - name - - num_code - - region_id - properties: - id: - description: The country's ID - type: string - example: 109 - iso_2: - description: The 2 character ISO code of the country in lower case - type: string - example: it - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - iso_3: - description: The 2 character ISO code of the country in lower case - type: string - example: ita - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements - description: See a list of codes. - num_code: - description: The numerical ISO code for the country. - type: string - example: 380 - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_numeric#Officially_assigned_code_elements - description: See a list of codes. - name: - description: The normalized country name in upper case. - type: string - example: ITALY - display_name: - description: The country name appropriate for display. - type: string - example: Italy - region_id: - description: The region ID this country is associated with. - nullable: true - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region the country is associated with. - x-expandable: region - nullable: true - type: object - CreateStockLocationInput: - title: Create Stock Location Input - description: Represents the Input to create a Stock Location - type: object - required: - - name - properties: - name: - type: string - description: The stock location name - address_id: - type: string - description: The Stock location address ID - address: - description: Stock location address object - allOf: - - $ref: '#/components/schemas/StockLocationAddressInput' - - type: object - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - Currency: - title: Currency - description: Currency - type: object - required: - - code - - name - - symbol - - symbol_native - properties: - code: - description: The 3 character ISO code for the currency. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - symbol: - description: The symbol used to indicate the currency. - type: string - example: $ - symbol_native: - description: The native symbol used to indicate the currency. - type: string - example: $ - name: - description: The written name of the currency - type: string - example: US Dollar - includes_tax: - description: Whether the currency prices include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - CustomShippingOption: - title: Custom Shipping Option - description: Custom Shipping Options are overridden Shipping Options. Admins can attach a Custom Shipping Option to a cart in order to set a custom price for a particular Shipping Option. - type: object - required: - - cart_id - - created_at - - deleted_at - - id - - metadata - - price - - shipping_option_id - - updated_at - properties: - id: - description: The custom shipping option's ID - type: string - example: cso_01G8X99XNB77DMFBJFWX6DN9V9 - price: - description: The custom price set that will override the shipping option's original price - type: integer - example: 1000 - shipping_option_id: - description: The ID of the Shipping Option that the custom shipping option overrides - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the overridden shipping options. - x-expandable: shipping_option - nullable: true - $ref: '#/components/schemas/ShippingOption' - cart_id: - description: The ID of the Cart that the custom shipping option is attached to - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart this shipping option belongs to. - x-expandable: cart - nullable: true - $ref: '#/components/schemas/Cart' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - Customer: - title: Customer - description: A customer can make purchases in your store and manage their profile. - type: object - required: - - billing_address_id - - created_at - - deleted_at - - email - - first_name - - has_account - - id - - last_name - - metadata - - phone - - updated_at - properties: - id: - description: The customer's ID - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - email: - description: The customer's email - type: string - format: email - first_name: - description: The customer's first name - nullable: true - type: string - example: Arno - last_name: - description: The customer's last name - nullable: true - type: string - example: Willms - billing_address_id: - description: The customer's billing address ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the customer. - x-expandable: billing_address - nullable: true - $ref: '#/components/schemas/Address' - shipping_addresses: - description: The details of the shipping addresses associated with the customer. - type: array - x-expandable: shipping_addresses - items: - $ref: '#/components/schemas/Address' - phone: - description: The customer's phone number - nullable: true - type: string - example: 16128234334802 - has_account: - description: Whether the customer has an account or not - type: boolean - default: false - orders: - description: The details of the orders this customer placed. - type: array - x-expandable: orders - items: - type: object - groups: - description: The customer groups the customer belongs to. - type: array - x-expandable: groups - items: - $ref: '#/components/schemas/CustomerGroup' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - CustomerGroup: - title: Customer Group - description: A customer group that can be used to organize customers into groups of similar traits. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - name - - updated_at - properties: - id: - description: The customer group's ID - type: string - example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63 - name: - description: The name of the customer group - type: string - example: VIP - customers: - description: The details of the customers that belong to the customer group. - type: array - x-expandable: customers - items: - type: object - price_lists: - description: The price lists that are associated with the customer group. - type: array - x-expandable: price_lists - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DecoratedInventoryItemDTO: - type: object - allOf: - - $ref: '#/components/schemas/InventoryItemDTO' - - type: object - required: - - stocked_quantity - - reserved_quantity - properties: - location_levels: - type: array - description: An array of location level details - items: - $ref: '#/components/schemas/InventoryLevelDTO' - variants: - type: array - description: An array of product variant details - items: - $ref: '#/components/schemas/ProductVariant' - stocked_quantity: - type: number - description: The total quantity of the item in stock across levels - reserved_quantity: - type: number - description: The total quantity of the item available across levels - Discount: - title: Discount - description: A discount can be applied to a cart for promotional purposes. - type: object - required: - - code - - created_at - - deleted_at - - ends_at - - id - - is_disabled - - is_dynamic - - metadata - - parent_discount_id - - rule_id - - starts_at - - updated_at - - usage_count - - usage_limit - - valid_duration - properties: - id: - description: The discount's ID - type: string - example: disc_01F0YESMW10MGHWJKZSDDMN0VN - code: - description: A unique code for the discount - this will be used by the customer to apply the discount - type: string - example: 10DISC - is_dynamic: - description: A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts - type: boolean - example: false - rule_id: - description: The ID of the discount rule that defines how the discount will be applied to a cart. - nullable: true - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - rule: - description: The details of the discount rule that defines how the discount will be applied to a cart.. - x-expandable: rule - nullable: true - $ref: '#/components/schemas/DiscountRule' - is_disabled: - description: Whether the Discount has been disabled. Disabled discounts cannot be applied to carts - type: boolean - example: false - parent_discount_id: - description: The Discount that the discount was created from. This will always be a dynamic discount - nullable: true - type: string - example: disc_01G8ZH853YPY9B94857DY91YGW - parent_discount: - description: The details of the parent discount that this discount was created from. - x-expandable: parent_discount - nullable: true - type: object - starts_at: - description: The time at which the discount can be used. - type: string - format: date-time - ends_at: - description: The time at which the discount can no longer be used. - nullable: true - type: string - format: date-time - valid_duration: - description: Duration the discount runs between - nullable: true - type: string - example: P3Y6M4DT12H30M5S - regions: - description: The details of the regions in which the Discount can be used. - type: array - x-expandable: regions - items: - $ref: '#/components/schemas/Region' - usage_limit: - description: The maximum number of times that a discount can be used. - nullable: true - type: integer - example: 100 - usage_count: - description: The number of times a discount has been used. - type: integer - example: 50 - default: 0 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountCondition: - title: Discount Condition - description: Holds rule conditions for when a discount is applicable - type: object - required: - - created_at - - deleted_at - - discount_rule_id - - id - - metadata - - operator - - type - - updated_at - properties: - id: - description: The discount condition's ID - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - type: - description: The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty. - type: string - enum: - - products - - product_types - - product_collections - - product_tags - - customer_groups - operator: - description: The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not_in` indicates that discountable resources are everything but the specified resources. - type: string - enum: - - in - - not_in - discount_rule_id: - description: The ID of the discount rule associated with the condition - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - discount_rule: - description: The details of the discount rule associated with the condition. - x-expandable: discount_rule - nullable: true - $ref: '#/components/schemas/DiscountRule' - products: - description: products associated with this condition if `type` is `products`. - type: array - x-expandable: products - items: - $ref: '#/components/schemas/Product' - product_types: - description: Product types associated with this condition if `type` is `product_types`. - type: array - x-expandable: product_types - items: - $ref: '#/components/schemas/ProductType' - product_tags: - description: Product tags associated with this condition if `type` is `product_tags`. - type: array - x-expandable: product_tags - items: - $ref: '#/components/schemas/ProductTag' - product_collections: - description: Product collections associated with this condition if `type` is `product_collections`. - type: array - x-expandable: product_collections - items: - $ref: '#/components/schemas/ProductCollection' - customer_groups: - description: Customer groups associated with this condition if `type` is `customer_groups`. - type: array - x-expandable: customer_groups - items: - $ref: '#/components/schemas/CustomerGroup' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountConditionCustomerGroup: - title: Product Tag Discount Condition - description: Associates a discount condition with a customer group - type: object - required: - - condition_id - - created_at - - customer_group_id - - metadata - - updated_at - properties: - customer_group_id: - description: The ID of the Product Tag - type: string - example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63 - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - customer_group: - description: Available if the relation `customer_group` is expanded. - nullable: true - $ref: '#/components/schemas/CustomerGroup' - discount_condition: - description: Available if the relation `discount_condition` is expanded. - nullable: true - $ref: '#/components/schemas/DiscountCondition' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountConditionProduct: - title: Product Discount Condition - description: This represents the association between a discount condition and a product - type: object - required: - - condition_id - - created_at - - metadata - - product_id - - updated_at - properties: - product_id: - description: The ID of the Product Tag - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product: - description: The details of the product. - x-expandable: product - nullable: true - $ref: '#/components/schemas/Product' - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: '#/components/schemas/DiscountCondition' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountConditionProductCollection: - title: Product Collection Discount Condition - description: This represents the association between a discount condition and a product collection - type: object - required: - - condition_id - - created_at - - metadata - - product_collection_id - - updated_at - properties: - product_collection_id: - description: The ID of the Product Collection - type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_collection: - description: The details of the product collection. - x-expandable: product_collection - nullable: true - $ref: '#/components/schemas/ProductCollection' - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: '#/components/schemas/DiscountCondition' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountConditionProductTag: - title: Product Tag Discount Condition - description: This represents the association between a discount condition and a product tag - type: object - required: - - condition_id - - created_at - - metadata - - product_tag_id - - updated_at - properties: - product_tag_id: - description: The ID of the Product Tag - type: string - example: ptag_01F0YESHPZYY3H4SJ3A5918SBN - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_tag: - description: The details of the product tag. - x-expandable: product_tag - nullable: true - $ref: '#/components/schemas/ProductTag' - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: '#/components/schemas/DiscountCondition' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountConditionProductType: - title: Product Type Discount Condition - description: This represents the association between a discount condition and a product type - type: object - required: - - condition_id - - created_at - - metadata - - product_type_id - - updated_at - properties: - product_type_id: - description: The ID of the Product Tag - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_type: - description: The details of the product type. - x-expandable: product_type - nullable: true - $ref: '#/components/schemas/ProductType' - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: '#/components/schemas/DiscountCondition' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountRule: - title: Discount Rule - description: A discount rule defines how a Discount is calculated when applied to a Cart. - type: object - required: - - allocation - - created_at - - deleted_at - - description - - id - - metadata - - type - - updated_at - - value - properties: - id: - description: The discount rule's ID - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - type: - description: The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers. - type: string - enum: - - fixed - - percentage - - free_shipping - example: percentage description: - description: A short description of the discount - nullable: true type: string - example: 10 Percent + title: description + description: The application method's description. value: - description: The value that the discount represents; this will depend on the type of the discount - type: integer - example: 10 - allocation: - description: The scope that the discount should apply to. - nullable: true type: string - enum: - - total - - item - example: total - conditions: - description: The details of the discount conditions associated with the rule. They can be used to limit when the discount can be used. + title: value + description: The application method's value. + max_quantity: + type: number + title: max_quantity + description: The application method's max quantity. + type: {} + target_type: {} + allocation: {} + target_rules: type: array - x-expandable: conditions + description: The application method's target rules. items: type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DraftOrder: - title: DraftOrder - description: A draft order is created by an admin without direct involvement of the customer. Once its payment is marked as captured, it is transformed into an order. + description: The target rule's target rules. + x-schemaName: PromotionRule + required: + - operator + - attribute + - values + properties: + operator: {} + description: + type: string + title: description + description: The target rule's description. + attribute: + type: string + title: attribute + description: The target rule's attribute. + values: + type: array + description: The target rule's values. + items: + type: string + title: values + description: The value's values. + buy_rules: + type: array + description: The application method's buy rules. + items: + type: object + description: The buy rule's buy rules. + x-schemaName: PromotionRule + required: + - operator + - attribute + - values + properties: + operator: {} + description: + type: string + title: description + description: The buy rule's description. + attribute: + type: string + title: attribute + description: The buy rule's attribute. + values: + type: array + description: The buy rule's values. + items: + type: string + title: values + description: The value's values. + apply_to_quantity: + type: number + title: apply_to_quantity + description: The application method's apply to quantity. + buy_rules_min_quantity: + type: number + title: buy_rules_min_quantity + description: The application method's buy rules min quantity. + CampaignBudget: type: object - required: - - canceled_at - - cart_id - - completed_at - - created_at - - display_id - - id - - idempotency_key - - metadata - - no_notification_order - - order_id - - status - - updated_at + description: The campaign's budget. + x-schemaName: CampaignBudget properties: - id: - description: The draft order's ID + type: {} + limit: + type: number + title: limit + description: The budget's limit. + CreateDefaultTaxRate: + type: object + description: The tax region's default tax rate. + x-schemaName: CreateDefaultTaxRate + required: + - name + properties: + rate: + type: number + title: rate + description: The default tax rate's rate. + code: type: string - example: dorder_01G8TJFKBG38YYFQ035MSVG03C - status: - description: The status of the draft order. It's changed to `completed` when it's transformed to an order. + title: code + description: The default tax rate's code. + name: type: string - enum: - - open - - completed - default: open - display_id: - description: The draft order's display ID - type: string - example: 2 - cart_id: - description: The ID of the cart associated with the draft order. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart associated with the draft order. - x-expandable: cart - nullable: true - type: object - order_id: - description: The ID of the order created from the draft order when its payment is captured. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order created from the draft order when its payment is captured. - x-expandable: order - nullable: true - type: object - canceled_at: - description: The date the draft order was canceled at. - nullable: true - type: string - format: date-time - completed_at: - description: The date the draft order was completed at. - nullable: true - type: string - format: date-time - no_notification_order: - description: Whether to send the customer notifications regarding order updates. - nullable: true - type: boolean - example: false - idempotency_key: - description: Randomly generated key used to continue the completion of the cart associated with the draft order in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time + title: name + description: The default tax rate's name. metadata: - description: An optional key-value map with additional details - nullable: true type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute + description: The default tax rate's metadata. + properties: {} Error: title: Response Error type: object @@ -35046,1090 +7808,6 @@ components: - unexpected_state - invalid_argument - unknown_error - ExtendedReservationItem: - type: object - allOf: - - $ref: '#/components/schemas/ReservationItemDTO' - - type: object - properties: - line_item: - description: The line item associated with the reservation. - $ref: '#/components/schemas/LineItem' - inventory_item: - description: The inventory item associated with the reservation. - $ref: '#/components/schemas/InventoryItemDTO' - ExtendedStoreDTO: - allOf: - - $ref: '#/components/schemas/Store' - - type: object - required: - - payment_providers - - fulfillment_providers - - feature_flags - - modules - properties: - payment_providers: - description: The store's payment providers. - $ref: '#/components/schemas/PaymentProvider' - fulfillment_providers: - description: The store's fulfillment providers. - $ref: '#/components/schemas/FulfillmentProvider' - feature_flags: - description: The feature flags enabled in the store's backend. - $ref: '#/components/schemas/FeatureFlagsResponse' - modules: - description: The modules installed in the store's backend. - $ref: '#/components/schemas/ModulesResponse' - FeatureFlagsResponse: - type: array - items: - type: object - required: - - key - - value - properties: - key: - description: The key of the feature flag. - type: string - value: - description: The value of the feature flag. - type: boolean - Fulfillment: - title: Fulfillment - description: A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns. - type: object - required: - - canceled_at - - claim_order_id - - created_at - - data - - id - - idempotency_key - - location_id - - metadata - - no_notification - - order_id - - provider_id - - shipped_at - - swap_id - - tracking_numbers - - updated_at - properties: - id: - description: The fulfillment's ID - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - claim_order_id: - description: The ID of the Claim that the Fulfillment belongs to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the fulfillment may belong to. - x-expandable: claim_order - nullable: true - type: object - swap_id: - description: The ID of the Swap that the Fulfillment belongs to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the fulfillment may belong to. - x-expandable: swap - nullable: true - type: object - order_id: - description: The ID of the Order that the Fulfillment belongs to. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the fulfillment may belong to. - x-expandable: order - nullable: true - type: object - provider_id: - description: The ID of the Fulfillment Provider responsible for handling the fulfillment. - type: string - example: manual - provider: - description: The details of the fulfillment provider responsible for handling the fulfillment. - x-expandable: provider - nullable: true - $ref: '#/components/schemas/FulfillmentProvider' - location_id: - description: The ID of the stock location the fulfillment will be shipped from - nullable: true - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK - items: - description: The Fulfillment Items in the Fulfillment. These hold information about how many of each Line Item has been fulfilled. - type: array - x-expandable: items - items: - $ref: '#/components/schemas/FulfillmentItem' - tracking_links: - description: The Tracking Links that can be used to track the status of the Fulfillment. These will usually be provided by the Fulfillment Provider. - type: array - x-expandable: tracking_links - items: - $ref: '#/components/schemas/TrackingLink' - tracking_numbers: - description: The tracking numbers that can be used to track the status of the fulfillment. - deprecated: true - type: array - items: - type: string - data: - description: This contains all the data necessary for the Fulfillment provider to handle the fulfillment. - type: object - example: {} - shipped_at: - description: The date with timezone at which the Fulfillment was shipped. - nullable: true - type: string - format: date-time - no_notification: - description: Flag for describing whether or not notifications related to this should be sent. - nullable: true - type: boolean - example: false - canceled_at: - description: The date with timezone at which the Fulfillment was canceled. - nullable: true - type: string - format: date-time - idempotency_key: - description: Randomly generated key used to continue the completion of the fulfillment in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - FulfillmentItem: - title: Fulfillment Item - description: This represents the association between a Line Item and a Fulfillment. - type: object - required: - - fulfillment_id - - item_id - - quantity - properties: - fulfillment_id: - description: The ID of the Fulfillment that the Fulfillment Item belongs to. - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - item_id: - description: The ID of the Line Item that the Fulfillment Item references. - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - fulfillment: - description: The details of the fulfillment. - x-expandable: fulfillment - nullable: true - type: object - item: - description: The details of the line item. - x-expandable: item - nullable: true - $ref: '#/components/schemas/LineItem' - quantity: - description: The quantity of the Line Item that is included in the Fulfillment. - type: integer - example: 1 - FulfillmentProvider: - title: Fulfillment Provider - description: A fulfillment provider represents a fulfillment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the fulfillment service's installation status. - type: object - required: - - id - - is_installed - properties: - id: - description: The ID of the fulfillment provider as given by the fulfillment service. - type: string - example: manual - is_installed: - description: Whether the fulfillment service is installed in the current version. If a fulfillment service is no longer installed, the `is_installed` attribute is set to `false`. - type: boolean - default: true - GiftCard: - title: Gift Card - description: Gift Cards are redeemable and represent a value that can be used towards the payment of an Order. - type: object - required: - - balance - - code - - created_at - - deleted_at - - ends_at - - id - - is_disabled - - metadata - - order_id - - region_id - - tax_rate - - updated_at - - value - properties: - id: - description: The gift card's ID - type: string - example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ - code: - description: The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card. - type: string - example: 3RFT-MH2C-Y4YZ-XMN4 - value: - description: The value that the Gift Card represents. - type: integer - example: 10 - balance: - description: The remaining value on the Gift Card. - type: integer - example: 10 - region_id: - description: The ID of the region this gift card is available in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this gift card is available in. - x-expandable: region - nullable: true - $ref: '#/components/schemas/Region' - order_id: - description: The ID of the order that the gift card was purchased in. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the gift card was purchased in. - x-expandable: region - nullable: true - type: object - is_disabled: - description: Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts. - type: boolean - default: false - ends_at: - description: The time at which the Gift Card can no longer be used. - nullable: true - type: string - format: date-time - tax_rate: - description: The gift card's tax rate that will be applied on calculating totals - nullable: true - type: number - example: 0 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - GiftCardTransaction: - title: Gift Card Transaction - description: Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order. - type: object - required: - - amount - - created_at - - gift_card_id - - id - - is_taxable - - order_id - - tax_rate - properties: - id: - description: The gift card transaction's ID - type: string - example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A - gift_card_id: - description: The ID of the Gift Card that was used in the transaction. - type: string - example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ - gift_card: - description: The details of the gift card associated used in this transaction. - x-expandable: gift_card - nullable: true - type: object - order_id: - description: The ID of the order that the gift card was used for payment. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the gift card was used for payment. - x-expandable: order - nullable: true - type: object - amount: - description: The amount that was used from the Gift Card. - type: integer - example: 10 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - is_taxable: - description: Whether the transaction is taxable or not. - nullable: true - type: boolean - example: false - tax_rate: - description: The tax rate of the transaction - nullable: true - type: number - example: 0 - IdempotencyKey: - title: Idempotency Key - description: Idempotency Key is used to continue a process in case of any failure that might occur. - type: object - required: - - created_at - - id - - idempotency_key - - locked_at - - recovery_point - - response_code - - response_body - - request_method - - request_params - - request_path - properties: - id: - description: The idempotency key's ID - type: string - example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A - idempotency_key: - description: The unique randomly generated key used to determine the state of a process. - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: Date which the idempotency key was locked. - type: string - format: date-time - locked_at: - description: Date which the idempotency key was locked. - nullable: true - type: string - format: date-time - request_method: - description: The method of the request - nullable: true - type: string - example: POST - request_params: - description: The parameters passed to the request - nullable: true - type: object - example: - id: cart_01G8ZH853Y6TFXWPG5EYE81X63 - request_path: - description: The request's path - nullable: true - type: string - example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete - response_code: - description: The response's code. - nullable: true - type: string - example: 200 - response_body: - description: The response's body - nullable: true - type: object - example: - id: cart_01G8ZH853Y6TFXWPG5EYE81X63 - recovery_point: - description: Where to continue from. - type: string - default: started - Image: - title: Image - description: An Image is used to store details about uploaded images. Images are uploaded by the File Service, and the URL is provided by the File Service. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - url - properties: - id: - type: string - description: The image's ID - example: img_01G749BFYR6T8JTVW6SGW3K3E6 - url: - description: The URL at which the image file can be found. - type: string - format: uri - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - InventoryItemDTO: - type: object - required: - - sku - properties: - id: - description: The inventory item's ID. - type: string - example: iitem_12334 - sku: - description: The Stock Keeping Unit (SKU) code of the Inventory Item. - type: string - hs_code: - description: The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers. - type: string - origin_country: - description: The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. - type: string - mid_code: - description: The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers. - type: string - title: - description: Title of the inventory item - type: string - description: - description: Description of the inventory item - type: string - thumbnail: - description: Thumbnail for the inventory item - type: string - material: - description: The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. - type: string - weight: - description: The weight of the Inventory Item. May be used in shipping rate calculations. - type: number - height: - description: The height of the Inventory Item. May be used in shipping rate calculations. - type: number - width: - description: The width of the Inventory Item. May be used in shipping rate calculations. - type: number - length: - description: The length of the Inventory Item. May be used in shipping rate calculations. - type: number - requires_shipping: - description: Whether the item requires shipping. - type: boolean - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - InventoryLevelDTO: - type: object - required: - - inventory_item_id - - location_id - - stocked_quantity - - reserved_quantity - - incoming_quantity - properties: - location_id: - description: the item location ID - type: string - stocked_quantity: - description: the total stock quantity of an inventory item at the given location ID - type: number - reserved_quantity: - description: the reserved stock quantity of an inventory item at the given location ID - type: number - incoming_quantity: - description: the incoming stock quantity of an inventory item at the given location ID - type: number - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - Invite: - title: Invite - description: An invite is created when an admin user invites a new user to join the store's team. Once the invite is accepted, it's deleted. - type: object - required: - - accepted - - created_at - - deleted_at - - expires_at - - id - - metadata - - role - - token - - updated_at - - user_email - properties: - id: - type: string - description: The invite's ID - example: invite_01G8TKE4XYCTHSCK2GDEP47RE1 - user_email: - description: The email of the user being invited. - type: string - format: email - role: - description: The user's role. These roles don't change the privileges of the user. - nullable: true - type: string - enum: - - admin - - member - - developer - default: member - accepted: - description: Whether the invite was accepted or not. - type: boolean - default: false - token: - description: The token used to accept the invite. - type: string - expires_at: - description: The date the invite expires at. - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - LineItem: - title: Line Item - description: Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits. - type: object - required: - - allow_discounts - - cart_id - - claim_order_id - - created_at - - description - - fulfilled_quantity - - has_shipping - - id - - is_giftcard - - is_return - - metadata - - order_edit_id - - order_id - - original_item_id - - quantity - - returned_quantity - - shipped_quantity - - should_merge - - swap_id - - thumbnail - - title - - unit_price - - updated_at - - variant_id - properties: - id: - description: The line item's ID - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - cart_id: - description: The ID of the cart that the line item may belongs to. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the line item may belongs to. - x-expandable: cart - nullable: true - type: object - order_id: - description: The ID of the order that the line item may belongs to. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the line item may belongs to. - x-expandable: order - nullable: true - type: object - swap_id: - description: The ID of the swap that the line item may belong to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the line item may belong to. - x-expandable: swap - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the line item may belong to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the line item may belong to. - x-expandable: claim_order - nullable: true - type: object - tax_lines: - description: The details of the item's tax lines. - x-expandable: tax_lines - type: array - items: - $ref: '#/components/schemas/LineItemTaxLine' - adjustments: - description: The details of the item's adjustments, which are available when a discount is applied on the item. - x-expandable: adjustments - type: array - items: - $ref: '#/components/schemas/LineItemAdjustment' - original_item_id: - description: The ID of the original line item. This is useful if the line item belongs to a resource that references an order, such as a return or an order edit. - nullable: true - type: string - order_edit_id: - description: The ID of the order edit that the item may belong to. - nullable: true - type: string - order_edit: - description: The details of the order edit. - x-expandable: order_edit - nullable: true - type: object - title: - description: The title of the Line Item. - type: string - example: Medusa Coffee Mug - description: - description: A more detailed description of the contents of the Line Item. - nullable: true - type: string - example: One Size - thumbnail: - description: A URL string to a small image of the contents of the Line Item. - nullable: true - type: string - format: uri - example: https://medusa-public-images.s3.eu-west-1.amazonaws.com/coffee-mug.png - is_return: - description: Is the item being returned - type: boolean - default: false - is_giftcard: - description: Flag to indicate if the Line Item is a Gift Card. - type: boolean - default: false - should_merge: - description: Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item. - type: boolean - default: true - allow_discounts: - description: Flag to indicate if the Line Item should be included when doing discount calculations. - type: boolean - default: true - has_shipping: - description: Flag to indicate if the Line Item has fulfillment associated with it. - nullable: true - type: boolean - example: false - unit_price: - description: The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to. - type: integer - example: 8000 - variant_id: - description: The id of the Product Variant contained in the Line Item. - nullable: true - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that this item was created from. - x-expandable: variant - nullable: true - $ref: '#/components/schemas/ProductVariant' - quantity: - description: The quantity of the content in the Line Item. - type: integer - example: 1 - fulfilled_quantity: - description: The quantity of the Line Item that has been fulfilled. - nullable: true - type: integer - example: 0 - returned_quantity: - description: The quantity of the Line Item that has been returned. - nullable: true - type: integer - example: 0 - shipped_quantity: - description: The quantity of the Line Item that has been shipped. - nullable: true - type: integer - example: 0 - refundable: - description: The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration. - type: integer - example: 0 - subtotal: - description: The subtotal of the line item - type: integer - example: 8000 - tax_total: - description: The total of tax of the line item - type: integer - example: 0 - total: - description: The total amount of the line item - type: integer - example: 8000 - original_total: - description: The original total amount of the line item - type: integer - example: 8000 - original_tax_total: - description: The original tax total amount of the line item - type: integer - example: 0 - discount_total: - description: The total of discount of the line item rounded - type: integer - example: 0 - raw_discount_total: - description: The total of discount of the line item - type: integer - example: 0 - gift_card_total: - description: The total of the gift card of the line item - type: integer - example: 0 - includes_tax: - description: Indicates if the line item unit_price include tax - x-featureFlag: tax_inclusive_pricing - type: boolean - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - LineItemAdjustment: - title: Line Item Adjustment - description: A Line Item Adjustment includes details on discounts applied on a line item. - type: object - required: - - amount - - description - - discount_id - - id - - item_id - - metadata - properties: - id: - description: The Line Item Adjustment's ID - type: string - example: lia_01G8TKE4XYCTHSCK2GDEP47RE1 - item_id: - description: The ID of the line item - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: The details of the line item. - x-expandable: item - nullable: true - type: object - description: - description: The line item's adjustment description - type: string - example: Adjusted item's price. - discount_id: - description: The ID of the discount associated with the adjustment - nullable: true - type: string - example: disc_01F0YESMW10MGHWJKZSDDMN0VN - discount: - description: The details of the discount associated with the adjustment. - x-expandable: discount - nullable: true - $ref: '#/components/schemas/Discount' - amount: - description: The adjustment amount - type: number - example: 1000 - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - LineItemTaxLine: - title: Line Item Tax Line - description: A Line Item Tax Line represents the taxes applied on a line item. - type: object - required: - - code - - created_at - - id - - item_id - - metadata - - name - - rate - - updated_at - properties: - id: - description: The line item tax line's ID - type: string - example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - item_id: - description: The ID of the line item - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: The details of the line item. - x-expandable: item - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ModulesResponse: - type: array - items: - type: object - required: - - module - - resolution - properties: - module: - description: The key of the module. - type: string - resolution: - description: The resolution path of the module or false if module is not installed. - type: string - MoneyAmount: - title: Money Amount - description: A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region. - type: object - required: - - amount - - created_at - - currency_code - - deleted_at - - id - - max_quantity - - min_quantity - - price_list_id - - region_id - - updated_at - - variant_id - properties: - id: - description: The money amount's ID - type: string - example: ma_01F0YESHRFQNH5S8Q0PK84YYZN - currency_code: - description: The 3 character currency code that the money amount may belong to. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency that the money amount may belong to. - x-expandable: currency - nullable: true - $ref: '#/components/schemas/Currency' - amount: - description: The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost. - type: integer - example: 100 - min_quantity: - description: The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. - nullable: true - type: integer - example: 1 - max_quantity: - description: The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. - nullable: true - type: integer - example: 1 - price_list_id: - description: The ID of the price list that the money amount may belong to. - nullable: true - type: string - example: pl_01G8X3CKJXCG5VXVZ87H9KC09W - price_list: - description: The details of the price list that the money amount may belong to. - x-expandable: price_list - nullable: true - type: object - variant_id: - description: The ID of the Product Variant contained in the Line Item. - nullable: true - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that the money amount may belong to. - x-expandable: variant - nullable: true - type: object - region_id: - description: The region's ID - nullable: true - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region that the money amount may belong to. - x-expandable: region - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time MultipleErrors: title: Multiple Errors type: object @@ -36142,4053 +7820,64 @@ components: message: type: string default: Provided request body contains errors. Please check the data and retry the request - Note: - title: Note - description: A Note is an element that can be used in association with different resources to allow admin users to describe additional information. For example, they can be used to add additional information about orders. - type: object - required: - - author_id - - created_at - - deleted_at - - id - - metadata - - resource_id - - resource_type - - updated_at - - value - properties: - id: - description: The note's ID - type: string - example: note_01G8TM8ENBMC7R90XRR1G6H26Q - resource_type: - description: The type of resource that the Note refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Note refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - value: - description: The contents of the note. - type: string - example: This order must be fulfilled on Monday - author_id: - description: The ID of the user that created the note. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - author: - description: The details of the user that created the note. - x-expandable: author - nullable: true - $ref: '#/components/schemas/User' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - Notification: - title: Notification - description: A notification is an alert sent, typically to customers, using the installed Notification Provider as a reaction to internal events such as `order.placed`. Notifications can be resent. - type: object - required: - - created_at - - customer_id - - data - - event_name - - id - - parent_id - - provider_id - - resource_type - - resource_id - - to - - updated_at - properties: - id: - description: The notification's ID - type: string - example: noti_01G53V9Y6CKMCGBM1P0X7C28RX - event_name: - description: The name of the event that the notification was sent for. - nullable: true - type: string - example: order.placed - resource_type: - description: The type of resource that the Notification refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Notification refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - customer_id: - description: The ID of the customer that this notification was sent to. - nullable: true - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer that this notification was sent to. - x-expandable: customer - nullable: true - $ref: '#/components/schemas/Customer' - to: - description: The address that the Notification was sent to. This will usually be an email address, but can represent other addresses such as a chat bot user ID. - type: string - example: user@example.com - data: - description: The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend. - type: object - example: {} - parent_id: - description: The notification's parent ID - nullable: true - type: string - example: noti_01G53V9Y6CKMCGBM1P0X7C28RX - parent_notification: - description: The details of the parent notification. - x-expandable: parent_notification - nullable: true - type: object - resends: - description: The details of all resends of the notification. - type: array - x-expandable: resends - items: - type: object - provider_id: - description: The ID of the notification provider used to send the notification. - nullable: true - type: string - example: sengrid - provider: - description: The notification provider used to send the notification. - x-expandable: provider - nullable: true - $ref: '#/components/schemas/NotificationProvider' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - NotificationProvider: - title: Notification Provider - description: A notification provider represents a notification service installed in the Medusa backend, either through a plugin or backend customizations. It holds the notification service's installation status. - type: object - required: - - id - - is_installed - properties: - id: - description: The ID of the notification provider as given by the notification service. - type: string - example: sendgrid - is_installed: - description: Whether the notification service is installed in the current version. If a notification service is no longer installed, the `is_installed` attribute is set to `false`. - type: boolean - default: true - OAuth: - title: OAuth - description: An Oauth app is typically created by a plugin to handle authentication to third-party services. - type: object - required: - - application_name - - data - - display_name - - id - - install_url - - uninstall_url - properties: - id: - description: The app's ID - type: string - example: example_app - display_name: - description: The app's display name - type: string - example: Example app - application_name: - description: The app's name - type: string - example: example - install_url: - description: The URL to install the app - nullable: true - type: string - format: uri - uninstall_url: - description: The URL to uninstall the app - nullable: true - type: string - format: uri - data: - description: Any data necessary to the app. - nullable: true - type: object - example: {} - Order: - title: Order - description: An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user. - type: object - required: - - billing_address_id - - canceled_at - - cart_id - - created_at - - currency_code - - customer_id - - draft_order_id - - display_id - - email - - external_id - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - object - - payment_status - - region_id - - shipping_address_id - - status - - tax_rate - - updated_at - properties: - id: - description: The order's ID - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - status: - description: The order's status - type: string - enum: - - pending - - completed - - archived - - canceled - - requires_action - default: pending - fulfillment_status: - description: The order's fulfillment status - type: string - enum: - - not_fulfilled - - partially_fulfilled - - fulfilled - - partially_shipped - - shipped - - partially_returned - - returned - - canceled - - requires_action - default: not_fulfilled - payment_status: - description: The order's payment status - type: string - enum: - - not_paid - - awaiting - - captured - - partially_refunded - - refunded - - canceled - - requires_action - default: not_paid - display_id: - description: The order's display ID - type: integer - example: 2 - cart_id: - description: The ID of the cart associated with the order - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart associated with the order. - x-expandable: cart - nullable: true - type: object - customer_id: - description: The ID of the customer associated with the order - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer associated with the order. - x-expandable: customer - nullable: true - type: object - email: - description: The email associated with the order - type: string - format: email - billing_address_id: - description: The ID of the billing address associated with the order - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the order. - x-expandable: billing_address - nullable: true - $ref: '#/components/schemas/Address' - shipping_address_id: - description: The ID of the shipping address associated with the order - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address associated with the order. - x-expandable: shipping_address - nullable: true - $ref: '#/components/schemas/Address' - region_id: - description: The ID of the region this order was created in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this order was created in. - x-expandable: region - nullable: true - $ref: '#/components/schemas/Region' - currency_code: - description: The 3 character currency code that is used in the order - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency used in the order. - x-expandable: currency - nullable: true - $ref: '#/components/schemas/Currency' - tax_rate: - description: The order's tax rate - nullable: true - type: number - example: 0 - discounts: - description: The details of the discounts applied on the order. - type: array - x-expandable: discounts - items: - $ref: '#/components/schemas/Discount' - gift_cards: - description: The details of the gift card used in the order. - type: array - x-expandable: gift_cards - items: - $ref: '#/components/schemas/GiftCard' - shipping_methods: - description: The details of the shipping methods used in the order. - type: array - x-expandable: shipping_methods - items: - $ref: '#/components/schemas/ShippingMethod' - payments: - description: The details of the payments used in the order. - type: array - x-expandable: payments - items: - type: object - fulfillments: - description: The details of the fulfillments created for the order. - type: array - x-expandable: fulfillments - items: - type: object - returns: - description: The details of the returns created for the order. - type: array - x-expandable: returns - items: - type: object - claims: - description: The details of the claims created for the order. - type: array - x-expandable: claims - items: - type: object - refunds: - description: The details of the refunds created for the order. - type: array - x-expandable: refunds - items: - type: object - swaps: - description: The details of the swaps created for the order. - type: array - x-expandable: swaps - items: - type: object - draft_order_id: - description: The ID of the draft order this order was created from. - nullable: true - type: string - example: null - draft_order: - description: The details of the draft order this order was created from. - x-expandable: draft_order - nullable: true - type: object - items: - description: The details of the line items that belong to the order. - x-expandable: items - type: array - items: - $ref: '#/components/schemas/LineItem' - edits: - description: The details of the order edits done on the order. - type: array - x-expandable: edits - items: - type: object - gift_card_transactions: - description: The gift card transactions made in the order. - type: array - x-expandable: gift_card_transactions - items: - $ref: '#/components/schemas/GiftCardTransaction' - canceled_at: - description: The date the order was canceled on. - nullable: true - type: string - format: date-time - no_notification: - description: Flag for describing whether or not notifications related to this should be send. - nullable: true - type: boolean - example: false - idempotency_key: - description: Randomly generated key used to continue the processing of the order in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - external_id: - description: The ID of an external order. - nullable: true - type: string - example: null - sales_channel_id: - description: The ID of the sales channel this order belongs to. - nullable: true - type: string - example: null - sales_channel: - description: The details of the sales channel this order belongs to. - x-expandable: sales_channel - nullable: true - $ref: '#/components/schemas/SalesChannel' - shipping_total: - type: integer - description: The total of shipping - example: 1000 - nullable: true - shipping_tax_total: - type: integer - description: The tax total applied on shipping - example: 1000 - raw_discount_total: - description: The total of discount - type: integer - example: 800 - discount_total: - description: The total of discount rounded - type: integer - example: 800 - tax_total: - description: The total of tax - type: integer - example: 0 - item_tax_total: - description: The tax total applied on items - type: integer - example: 0 - nullable: true - refunded_total: - description: The total amount refunded if the order is returned. - type: integer - example: 0 - total: - description: The total amount of the order - type: integer - example: 8200 - subtotal: - description: The subtotal of the order - type: integer - example: 8000 - paid_total: - description: The total amount paid - type: integer - example: 8000 - refundable_amount: - description: The amount that can be refunded - type: integer - example: 8200 - gift_card_total: - description: The total of gift cards - type: integer - example: 0 - gift_card_tax_total: - description: The total of gift cards with taxes - type: integer - example: 0 - returnable_items: - description: The details of the line items that are returnable as part of the order, swaps, or claims - type: array - x-expandable: returnable_items - items: - $ref: '#/components/schemas/LineItem' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - sales_channels: - description: The associated sales channels. - type: array - nullable: true - x-expandable: sales_channels - x-featureFlag: medusa_v2 - items: - $ref: '#/components/schemas/SalesChannel' - OrderEdit: - title: Order Edit - description: Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order. - type: object - required: - - canceled_at - - canceled_by - - confirmed_by - - confirmed_at - - created_at - - created_by - - declined_at - - declined_by - - declined_reason - - id - - internal_note - - order_id - - payment_collection_id - - requested_at - - requested_by - - status - - updated_at - properties: - id: - description: The order edit's ID - type: string - example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK - order_id: - description: The ID of the order that is edited - type: string - example: order_01G2SG30J8C85S4A5CHM2S1NS2 - order: - description: The details of the order that this order edit was created for. - x-expandable: order - nullable: true - type: object - changes: - description: The details of all the changes on the original order's line items. - x-expandable: changes - type: array - items: - $ref: '#/components/schemas/OrderItemChange' - internal_note: - description: An optional note with additional details about the order edit. - nullable: true - type: string - example: Included two more items B to the order. - created_by: - description: The unique identifier of the user or customer who created the order edit. - type: string - requested_by: - description: The unique identifier of the user or customer who requested the order edit. - nullable: true - type: string - requested_at: - description: The date with timezone at which the edit was requested. - nullable: true - type: string - format: date-time - confirmed_by: - description: The unique identifier of the user or customer who confirmed the order edit. - nullable: true - type: string - confirmed_at: - description: The date with timezone at which the edit was confirmed. - nullable: true - type: string - format: date-time - declined_by: - description: The unique identifier of the user or customer who declined the order edit. - nullable: true - type: string - declined_at: - description: The date with timezone at which the edit was declined. - nullable: true - type: string - format: date-time - declined_reason: - description: An optional note why the order edit is declined. - nullable: true - type: string - canceled_by: - description: The unique identifier of the user or customer who cancelled the order edit. - nullable: true - type: string - canceled_at: - description: The date with timezone at which the edit was cancelled. - nullable: true - type: string - format: date-time - subtotal: - description: The total of subtotal - type: integer - example: 8000 - discount_total: - description: The total of discount - type: integer - example: 800 - shipping_total: - description: The total of the shipping amount - type: integer - example: 800 - gift_card_total: - description: The total of the gift card amount - type: integer - example: 800 - gift_card_tax_total: - description: The total of the gift card tax amount - type: integer - example: 800 - tax_total: - description: The total of tax - type: integer - example: 0 - total: - description: The total amount of the edited order. - type: integer - example: 8200 - difference_due: - description: The difference between the total amount of the order and total amount of edited order. - type: integer - example: 8200 - status: - description: The status of the order edit. - type: string - enum: - - confirmed - - declined - - requested - - created - - canceled - items: - description: The details of the cloned items from the original order with the new changes. Once the order edit is confirmed, these line items are associated with the original order. - type: array - x-expandable: items - items: - $ref: '#/components/schemas/LineItem' - payment_collection_id: - description: The ID of the payment collection - nullable: true - type: string - example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK - payment_collection: - description: The details of the payment collection used to authorize additional payment if necessary. - x-expandable: payment_collection - nullable: true - $ref: '#/components/schemas/PaymentCollection' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - OrderItemChange: - title: Order Item Change - description: An order item change is a change made within an order edit to an order's items. These changes are not reflected on the original order until the order edit is confirmed. - type: object - required: - - created_at - - deleted_at - - id - - line_item_id - - order_edit_id - - original_line_item_id - - type - - updated_at - properties: - id: - description: The order item change's ID - type: string - example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK - type: - description: The order item change's status - type: string - enum: - - item_add - - item_remove - - item_update - order_edit_id: - description: The ID of the order edit - type: string - example: oe_01G2SG30J8C85S4A5CHM2S1NS2 - order_edit: - description: The details of the order edit the item change is associated with. - x-expandable: order_edit - nullable: true - type: object - original_line_item_id: - description: The ID of the original line item in the order - nullable: true - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - original_line_item: - description: The details of the original line item this item change references. This is used if the item change updates or deletes the original item. - x-expandable: original_line_item - nullable: true - $ref: '#/components/schemas/LineItem' - line_item_id: - description: The ID of the cloned line item. - nullable: true - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - line_item: - description: The details of the resulting line item after the item change. This line item is then used in the original order once the order edit is confirmed. - x-expandable: line_item - nullable: true - $ref: '#/components/schemas/LineItem' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - Payment: - title: Payment - description: A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources. - type: object - required: - - amount - - amount_refunded - - canceled_at - - captured_at - - cart_id - - created_at - - currency_code - - data - - id - - idempotency_key - - metadata - - order_id - - provider_id - - swap_id - - updated_at - properties: - id: - description: The payment's ID - type: string - example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE - swap_id: - description: The ID of the swap that this payment was potentially created for. - nullable: true - type: string - example: null - swap: - description: The details of the swap that this payment was potentially created for. - x-expandable: swap - nullable: true - type: object - cart_id: - description: The ID of the cart that the payment session was potentially created for. - nullable: true - type: string - cart: - description: The details of the cart that the payment session was potentially created for. - x-expandable: cart - nullable: true - type: object - order_id: - description: The ID of the order that the payment session was potentially created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the payment session was potentially created for. - x-expandable: order - nullable: true - type: object - amount: - description: The amount that the Payment has been authorized for. - type: integer - example: 100 - currency_code: - description: The 3 character ISO currency code of the payment. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency of the payment. - x-expandable: currency - nullable: true - $ref: '#/components/schemas/Currency' - amount_refunded: - description: The amount of the original Payment amount that has been refunded back to the Customer. - type: integer - default: 0 - example: 0 - provider_id: - description: The id of the Payment Provider that is responsible for the Payment - type: string - example: manual - data: - description: The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state. - type: object - example: {} - captured_at: - description: The date with timezone at which the Payment was captured. - nullable: true - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Payment was canceled. - nullable: true - type: string - format: date-time - idempotency_key: - description: Randomly generated key used to continue the completion of a payment in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - PaymentCollection: - title: Payment Collection - description: A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments. - type: object - required: - - amount - - authorized_amount - - created_at - - created_by - - currency_code - - deleted_at - - description - - id - - metadata - - region_id - - status - - type - - updated_at - properties: - id: - description: The payment collection's ID - type: string - example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK - type: - description: The type of the payment collection - type: string - enum: - - order_edit - status: - description: The type of the payment collection - type: string - enum: - - not_paid - - awaiting - - authorized - - partially_authorized - - canceled - description: - description: Description of the payment collection - nullable: true - type: string - amount: - description: Amount of the payment collection. - type: integer - authorized_amount: - description: Authorized amount of the payment collection. - nullable: true - type: integer - region_id: - description: The ID of the region this payment collection is associated with. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this payment collection is associated with. - x-expandable: region - nullable: true - $ref: '#/components/schemas/Region' - currency_code: - description: The three character ISO code for the currency this payment collection is associated with. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency this payment collection is associated with. - x-expandable: currency - nullable: true - $ref: '#/components/schemas/Currency' - payment_sessions: - description: The details of the payment sessions created as part of the payment collection. - type: array - x-expandable: payment_sessions - items: - $ref: '#/components/schemas/PaymentSession' - payments: - description: The details of the payments created as part of the payment collection. - type: array - x-expandable: payments - items: - $ref: '#/components/schemas/Payment' - created_by: - description: The ID of the user that created the payment collection. - type: string - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - PaymentProvider: - title: Payment Provider - description: A payment provider represents a payment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the payment service's installation status. - type: object - required: - - id - - is_installed - properties: - id: - description: The ID of the payment provider as given by the payment service. - type: string - example: manual - is_installed: - description: Whether the payment service is installed in the current version. If a payment service is no longer installed, the `is_installed` attribute is set to `false`. - type: boolean - default: true - PaymentSession: - title: Payment Session - description: A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections. - type: object - required: - - amount - - cart_id - - created_at - - data - - id - - is_initiated - - is_selected - - idempotency_key - - payment_authorized_at - - provider_id - - status - - updated_at - properties: - id: - description: The payment session's ID - type: string - example: ps_01G901XNSRM2YS3ASN9H5KG3FZ - cart_id: - description: The ID of the cart that the payment session was created for. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the payment session was created for. - x-expandable: cart - nullable: true - $ref: '#/components/schemas/Cart' - provider_id: - description: The ID of the Payment Provider that is responsible for the Payment Session - type: string - example: manual - is_selected: - description: A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase. - nullable: true - type: boolean - example: true - is_initiated: - description: A flag to indicate if a communication with the third party provider has been initiated. - type: boolean - default: false - example: true - status: - description: Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer. - type: string - enum: - - authorized - - pending - - requires_more - - error - - canceled - example: pending - data: - description: The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state. - type: object - example: {} - idempotency_key: - description: Randomly generated key used to continue the completion of a cart in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - amount: - description: The amount that the Payment Session has been authorized for. - nullable: true - type: integer - example: 100 - payment_authorized_at: - description: The date with timezone at which the Payment Session was authorized. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - PriceList: - title: Price List - description: A Price List represents a set of prices that override the default price for one or more product variants. - type: object - required: - - created_at - - deleted_at - - description - - ends_at - - id - - name - - starts_at - - status - - type - - updated_at - properties: - id: - description: The price list's ID - type: string - example: pl_01G8X3CKJXCG5VXVZ87H9KC09W - name: - description: The price list's name - type: string - example: VIP Prices - description: - description: The price list's description - type: string - example: Prices for VIP customers - type: - description: The type of Price List. This can be one of either `sale` or `override`. - type: string - enum: - - sale - - override - default: sale - status: - description: The status of the Price List - type: string - enum: - - active - - draft - default: draft - starts_at: - description: The date with timezone that the Price List starts being valid. - nullable: true - type: string - format: date-time - ends_at: - description: The date with timezone that the Price List stops being valid. - nullable: true - type: string - format: date-time - customer_groups: - description: The details of the customer groups that the Price List can apply to. - type: array - x-expandable: customer_groups - items: - $ref: '#/components/schemas/CustomerGroup' - prices: - description: The prices that belong to the price list, represented as a Money Amount. - type: array - x-expandable: prices - items: - $ref: '#/components/schemas/MoneyAmount' - includes_tax: - description: Whether the price list prices include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - PricedProduct: - title: Priced Product - type: object - allOf: - - $ref: '#/components/schemas/Product' - - type: object - properties: - variants: - description: The product variants and their prices. - type: array - items: - $ref: '#/components/schemas/PricedVariant' - PricedShippingOption: - title: Priced Shipping Option - type: object - allOf: - - $ref: '#/components/schemas/ShippingOption' - - type: object - properties: - price_incl_tax: - type: number - description: Price including taxes - tax_rates: - type: array - description: An array of applied tax rates - items: - type: object - properties: - rate: - type: number - description: The tax rate value - name: - type: string - description: The name of the tax rate - code: - type: string - description: The code of the tax rate - tax_amount: - type: number - description: The taxes applied. - PricedVariant: - title: Priced Product Variant - type: object - allOf: - - $ref: '#/components/schemas/ProductVariant' - - type: object - properties: - original_price: - type: number - description: The original price of the variant without any discounted prices applied. - calculated_price: - type: number - description: The calculated price of the variant. Can be a discounted price. - original_price_incl_tax: - type: number - description: The original price of the variant including taxes. - calculated_price_incl_tax: - type: number - description: The calculated price of the variant including taxes. - original_tax: - type: number - description: The taxes applied on the original price. - calculated_tax: - type: number - description: The taxes applied on the calculated price. - tax_rates: - type: array - description: An array of applied tax rates - items: - type: object - properties: - rate: - type: number - description: The tax rate value - name: - type: string - description: The name of the tax rate - code: - type: string - description: The code of the tax rate - Product: - title: Product - description: A product is a saleable item that holds general information such as name or description. It must include at least one Product Variant, where each product variant defines different options to purchase the product with (for example, different sizes or colors). The prices and inventory of the product are defined on the variant level. - type: object - required: - - collection_id - - created_at - - deleted_at - - description - - discountable - - external_id - - handle - - height - - hs_code - - id - - is_giftcard - - length - - material - - metadata - - mid_code - - origin_country - - profile_id - - status - - subtitle - - type_id - - thumbnail - - title - - updated_at - - weight - - width - properties: - id: - description: The product's ID - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - title: - description: A title that can be displayed for easy identification of the Product. - type: string - example: Medusa Coffee Mug - subtitle: - description: An optional subtitle that can be used to further specify the Product. - nullable: true - type: string - description: - description: A short description of the Product. - nullable: true - type: string - example: Every programmer's best friend. - handle: - description: A unique identifier for the Product (e.g. for slug structure). - nullable: true - type: string - example: coffee-mug - is_giftcard: - description: Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased. - type: boolean - default: false - status: - description: The status of the product - type: string - enum: - - draft - - proposed - - published - - rejected - default: draft - images: - description: The details of the product's images. - type: array - x-expandable: images - items: - $ref: '#/components/schemas/Image' - thumbnail: - description: A URL to an image file that can be used to identify the Product. - nullable: true - type: string - format: uri - options: - description: The details of the Product Options that are defined for the Product. The product's variants will have a unique combination of values of the product's options. - type: array - x-expandable: options - items: - $ref: '#/components/schemas/ProductOption' - variants: - description: The details of the Product Variants that belong to the Product. Each will have a unique combination of values of the product's options. - type: array - x-expandable: variants - items: - $ref: '#/components/schemas/ProductVariant' - categories: - description: The details of the product categories that this product belongs to. - type: array - x-expandable: categories - x-featureFlag: product_categories - items: - $ref: '#/components/schemas/ProductCategory' - profile_id: - description: The ID of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product. - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - profile: - description: The details of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product. - x-expandable: profile - nullable: true - $ref: '#/components/schemas/ShippingProfile' - profiles: - description: Available if the relation `profiles` is expanded. - nullable: true - type: array - items: - $ref: '#/components/schemas/ShippingProfile' - weight: - description: The weight of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - length: - description: The length of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - height: - description: The height of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - width: - description: The width of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - hs_code: - description: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - origin_country: - description: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - mid_code: - description: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - material: - description: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - collection_id: - description: The ID of the product collection that the product belongs to. - nullable: true - type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - collection: - description: The details of the product collection that the product belongs to. - x-expandable: collection - nullable: true - $ref: '#/components/schemas/ProductCollection' - type_id: - description: The ID of the product type that the product belongs to. - nullable: true - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - type: - description: The details of the product type that the product belongs to. - x-expandable: type - nullable: true - $ref: '#/components/schemas/ProductType' - tags: - description: The details of the product tags used in this product. - type: array - x-expandable: type - items: - $ref: '#/components/schemas/ProductTag' - discountable: - description: Whether the Product can be discounted. Discounts will not apply to Line Items of this Product when this flag is set to `false`. - type: boolean - default: true - external_id: - description: The external ID of the product - nullable: true - type: string - example: null - sales_channels: - description: The details of the sales channels this product is available in. - type: array - x-expandable: sales_channels - items: - $ref: '#/components/schemas/SalesChannel' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductCategory: - title: Product Category - description: A product category can be used to categorize products into a hierarchy of categories. - x-resourceId: ProductCategory - x-featureFlag: product_categories - type: object - required: - - category_children - - created_at - - handle - - id - - is_active - - is_internal - - metadata - - mpath - - name - - parent_category_id - - updated_at - properties: - id: - description: The product category's ID - type: string - example: pcat_01G2SG30J8C85S4A5CHM2S1NS2 - name: - description: The product category's name - type: string - example: Regular Fit - description: - description: The product category's description. - type: string - default: '' - handle: - description: A unique string that identifies the Product Category - can for example be used in slug structures. - type: string - example: regular-fit - mpath: - description: A string for Materialized Paths - used for finding ancestors and descendents - nullable: true - type: string - example: pcat_id1.pcat_id2.pcat_id3 - is_internal: - type: boolean - description: A flag to make product category an internal category for admins - default: false - is_active: - type: boolean - description: A flag to make product category visible/hidden in the store front - default: false - rank: - type: integer - description: An integer that depicts the rank of category in a tree node - default: 0 - category_children: - description: The details of the category's children. - type: array - x-expandable: category_children - items: - type: object - parent_category_id: - description: The ID of the parent category. - nullable: true - type: string - default: null - parent_category: - description: The details of the parent of this category. - x-expandable: parent_category - nullable: true - type: object - products: - description: The details of the products that belong to this category. - type: array - x-expandable: products - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductCollection: - title: Product Collection - description: A Product Collection allows grouping together products for promotional purposes. For example, an admin can create a Summer collection, add products to it, and showcase it on the storefront. - type: object - required: - - created_at - - deleted_at - - handle - - id - - metadata - - title - - updated_at - properties: - id: - description: The product collection's ID - type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - title: - description: The title that the Product Collection is identified by. - type: string - example: Summer Collection - handle: - description: A unique string that identifies the Product Collection - can for example be used in slug structures. - nullable: true - type: string - example: summer-collection - products: - description: The details of the products that belong to this product collection. - type: array - x-expandable: products - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductOption: - title: Product Option - description: A Product Option defines properties that may vary between different variants of a Product. Common Product Options are "Size" and "Color". Admins are free to create any product options. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - product_id - - title - - updated_at - properties: - id: - description: The product option's ID - type: string - example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 - title: - description: The title that the Product Option is defined by (e.g. `Size`). - type: string - example: Size - values: - description: The details of the values of the product option. - type: array - x-expandable: values - items: - $ref: '#/components/schemas/ProductOptionValue' - product_id: - description: The ID of the product that this product option belongs to. - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product that this product option belongs to. - x-expandable: product - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductOptionValue: - title: Product Option Value - description: An option value is one of the possible values of a Product Option. Product Variants specify a unique combination of product option values. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - option_id - - updated_at - - value - - variant_id - properties: - id: - description: The product option value's ID - type: string - example: optval_01F0YESHR7S6ECD03RF6W12DSJ - value: - description: The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is "Size" this value could be `Small`, `Medium` or `Large`). - type: string - example: large - option_id: - description: The ID of the Product Option that the Product Option Value belongs to. - type: string - example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 - option: - description: The details of the product option that the Product Option Value belongs to. - x-expandable: option - nullable: true - type: object - variant_id: - description: The ID of the product variant that uses this product option value. - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that uses this product option value. - x-expandable: variant - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductTag: - title: Product Tag - description: A Product Tag can be added to Products for easy filtering and grouping. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value - properties: - id: - description: The product tag's ID - type: string - example: ptag_01G8K2MTMG9168F2B70S1TAVK3 - value: - description: The value that the Product Tag represents - type: string - example: Pants - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductTaxRate: - title: Product Tax Rate - description: This represents the association between a tax rate and a product to indicate that the product is taxed in a way different than the default. - type: object - required: - - created_at - - metadata - - product_id - - rate_id - - updated_at - properties: - product_id: - description: The ID of the Product - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product. - x-expandable: product - nullable: true - $ref: '#/components/schemas/Product' - rate_id: - description: The ID of the Tax Rate - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the tax rate. - x-expandable: tax_rate - nullable: true - $ref: '#/components/schemas/TaxRate' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductType: - title: Product Type - description: A Product Type can be added to Products for filtering and reporting purposes. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value - properties: - id: - description: The product type's ID - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - value: - description: The value that the Product Type represents. - type: string - example: Clothing - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductTypeTaxRate: - title: Product Type Tax Rate - description: This represents the association between a tax rate and a product type to indicate that the product type is taxed in a different way than the default. - type: object - required: - - created_at - - metadata - - product_type_id - - rate_id - - updated_at - properties: - product_type_id: - description: The ID of the Product type - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - product_type: - description: The details of the product type. - x-expandable: product_type - nullable: true - $ref: '#/components/schemas/ProductType' - rate_id: - description: The id of the Tax Rate - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the tax rate. - x-expandable: tax_rate - nullable: true - $ref: '#/components/schemas/TaxRate' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductVariant: - title: Product Variant - description: A Product Variant represents a Product with a specific set of Product Option configurations. The maximum number of Product Variants that a Product can have is given by the number of available Product Option combinations. A product must at least have one product variant. - type: object - required: - - allow_backorder - - barcode - - created_at - - deleted_at - - ean - - height - - hs_code - - id - - inventory_quantity - - length - - manage_inventory - - material - - metadata - - mid_code - - origin_country - - product_id - - sku - - title - - upc - - updated_at - - weight - - width - properties: - id: - description: The product variant's ID - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - title: - description: A title that can be displayed for easy identification of the Product Variant. - type: string - example: Small - product_id: - description: The ID of the product that the product variant belongs to. - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product that the product variant belongs to. - x-expandable: product - nullable: true - type: object - prices: - description: The details of the prices of the Product Variant, each represented as a Money Amount. Each Money Amount represents a price in a given currency or a specific Region. - type: array - x-expandable: prices - items: - $ref: '#/components/schemas/MoneyAmount' - sku: - description: The unique stock keeping unit used to identify the Product Variant. This will usually be a unique identifer for the item that is to be shipped, and can be referenced across multiple systems. - nullable: true - type: string - example: shirt-123 - barcode: - description: A generic field for a GTIN number that can be used to identify the Product Variant. - nullable: true - type: string - example: null - ean: - description: An EAN barcode number that can be used to identify the Product Variant. - nullable: true - type: string - example: null - upc: - description: A UPC barcode number that can be used to identify the Product Variant. - nullable: true - type: string - example: null - variant_rank: - description: The ranking of this variant - nullable: true - type: number - default: 0 - inventory_quantity: - description: The current quantity of the item that is stocked. - type: integer - example: 100 - allow_backorder: - description: Whether the Product Variant should be purchasable when `inventory_quantity` is 0. - type: boolean - default: false - manage_inventory: - description: Whether Medusa should manage inventory for the Product Variant. - type: boolean - default: true - hs_code: - description: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - origin_country: - description: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - mid_code: - description: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - material: - description: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - weight: - description: The weight of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - length: - description: The length of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - height: - description: The height of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - width: - description: The width of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - options: - description: The details of the product options that this product variant defines values for. - type: array - x-expandable: options - items: - $ref: '#/components/schemas/ProductOptionValue' - inventory_items: - description: The details inventory items of the product variant. - type: array - x-expandable: inventory_items - items: - $ref: '#/components/schemas/ProductVariantInventoryItem' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - purchasable: - description: | - Only used with the inventory modules. - A boolean value indicating whether the Product Variant is purchasable. - A variant is purchasable if: - - inventory is not managed - - it has no inventory items - - it is in stock - - it is backorderable. - type: boolean - ProductVariantInventoryItem: - title: Product Variant Inventory Item - description: A Product Variant Inventory Item links variants with inventory items and denotes the required quantity of the variant. - type: object - required: - - created_at - - deleted_at - - id - - inventory_item_id - - required_quantity - - updated_at - - variant_id - properties: - id: - description: The product variant inventory item's ID - type: string - example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A - inventory_item_id: - description: The id of the inventory item - type: string - variant_id: - description: The id of the variant. - type: string - variant: - description: The details of the product variant. - x-expandable: variant - nullable: true - type: object - required_quantity: - description: The quantity of an inventory item required for the variant. - type: integer - default: 1 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - PublishableApiKey: - title: Publishable API key - description: A Publishable API key defines scopes that resources are available in. Then, it can be used in request to infer the resources without having to directly pass them. For example, a publishable API key can be associated with one or more sales channels. Then, when the publishable API key is passed in the header of a request, it is inferred what sales channel is being used without having to pass the sales channel as a query or body parameter of the request. Publishable API keys can only be used with sales channels, at the moment. - type: object - required: - - created_at - - created_by - - id - - revoked_by - - revoked_at - - title - - updated_at - properties: - id: - description: The key's ID - type: string - example: pk_01G1G5V27GYX4QXNARRQCW1N8T - created_by: - description: The unique identifier of the user that created the key. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_by: - description: The unique identifier of the user that revoked the key. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_at: - description: The date with timezone at which the key was revoked. - nullable: true - type: string - format: date-time - title: - description: The key's title. - type: string - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - PublishableApiKeySalesChannel: - title: Publishable API Key Sales Channel - description: This represents the association between the Publishable API keys and Sales Channels - type: object - required: - - publishable_key_id - - sales_channel_id - - created_at - - updated_at - - deleted_at - properties: - id: - description: The relation's ID - type: string - example: pksc_01G8X9A7ESKAJXG2H0E6F1MW7A - sales_channel_id: - description: The sales channel's ID - type: string - example: sc_01G1G5V21KADXNGH29BJMAJ4B4 - publishable_key_id: - description: The publishable API key's ID - type: string - example: pak_01G1G5V21KADXNGH29BJMAJ4B4 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - Refund: - title: Refund - description: A refund represents an amount of money transfered back to the customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by an admin for an order. - type: object - required: - - amount - - created_at - - id - - idempotency_key - - metadata - - note - - order_id - - payment_id - - reason - - updated_at - properties: - id: - description: The refund's ID - type: string - example: ref_01G1G5V27GYX4QXNARRQCW1N8T - order_id: - description: The ID of the order this refund was created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order this refund was created for. - x-expandable: order - nullable: true - type: object - payment_id: - description: The payment's ID, if available. - nullable: true - type: string - example: pay_01G8ZCC5W42ZNY842124G7P5R9 - payment: - description: The details of the payment associated with the refund. - x-expandable: payment - nullable: true - type: object - amount: - description: The amount that has be refunded to the Customer. - type: integer - example: 1000 - note: - description: An optional note explaining why the amount was refunded. - nullable: true - type: string - example: I didn't like it - reason: - description: The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return. - type: string - enum: - - discount - - return - - swap - - claim - - other - example: return - idempotency_key: - description: Randomly generated key used to continue the completion of the refund in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - Region: - title: Region - description: A region holds settings specific to a geographical location, including the currency, tax rates, and fulfillment and payment providers. A Region can consist of multiple countries to accomodate common shopping settings across countries. - type: object - required: - - automatic_taxes - - created_at - - currency_code - - deleted_at - - gift_cards_taxable - - id - - metadata - - name - - tax_code - - tax_provider_id - - tax_rate - - updated_at - properties: - id: - description: The region's ID - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - name: - description: The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name. - type: string - example: EU - currency_code: - description: The three character currency code used in the region. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency used in the region. - x-expandable: currency - nullable: true - $ref: '#/components/schemas/Currency' - tax_rate: - description: The tax rate that should be charged on purchases in the Region. - type: number - example: 0 - tax_rates: - description: The details of the tax rates used in the region, aside from the default rate. - type: array - x-expandable: tax_rates - items: - $ref: '#/components/schemas/TaxRate' - tax_code: - description: The tax code used on purchases in the Region. This may be used by other systems for accounting purposes. - nullable: true - type: string - example: null - gift_cards_taxable: - description: Whether the gift cards are taxable or not in this region. - type: boolean - default: true - automatic_taxes: - description: Whether taxes should be automated in this region. - type: boolean - default: true - countries: - description: The details of the countries included in this region. - type: array - x-expandable: countries - items: - $ref: '#/components/schemas/Country' - tax_provider_id: - description: The ID of the tax provider used in this region - nullable: true - type: string - example: null - tax_provider: - description: The details of the tax provider used in the region. - x-expandable: tax_provider - nullable: true - $ref: '#/components/schemas/TaxProvider' - payment_providers: - description: The details of the payment providers that can be used to process payments in the region. - type: array - x-expandable: payment_providers - items: - $ref: '#/components/schemas/PaymentProvider' - fulfillment_providers: - description: The details of the fulfillment providers that can be used to fulfill items of orders and similar resources in the region. - type: array - x-expandable: fulfillment_providers - items: - $ref: '#/components/schemas/FulfillmentProvider' - includes_tax: - description: Whether the prices for the region include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ReservationItemDTO: - title: Reservation item - description: Represents a reservation of an inventory item at a stock location - type: object - required: - - id - - location_id - - inventory_item_id - - quantity - properties: - id: - description: The id of the reservation item - type: string - location_id: - description: The id of the location of the reservation - type: string - inventory_item_id: - description: The id of the inventory item the reservation relates to - type: string - description: - description: Description of the reservation item - type: string - created_by: - description: UserId of user who created the reservation item - type: string - quantity: - description: The id of the reservation item - type: number - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - ResponseInventoryItem: - allOf: - - $ref: '#/components/schemas/InventoryItemDTO' - - type: object - properties: - location_levels: - type: array - description: The inventory's location levels. - items: - allOf: - - $ref: '#/components/schemas/InventoryItemDTO' - - type: object - required: - - available_quantity - properties: - available_quantity: - description: The available quantity in the inventory location. - type: number - Return: - title: Return - description: A Return holds information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can also be used as part of a Swap or a Claim. - type: object - required: - - claim_order_id - - created_at - - id - - idempotency_key - - location_id - - metadata - - no_notification - - order_id - - received_at - - refund_amount - - shipping_data - - status - - swap_id - - updated_at - properties: - id: - description: The return's ID - type: string - example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - status: - description: Status of the Return. - type: string - enum: - - requested - - received - - requires_action - - canceled - default: requested - items: - description: The details of the items that the customer is returning. - type: array - x-expandable: items - items: - $ref: '#/components/schemas/ReturnItem' - swap_id: - description: The ID of the swap that the return may belong to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the return may belong to. - x-expandable: swap - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the return may belong to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the return may belong to. - x-expandable: claim_order - nullable: true - type: object - order_id: - description: The ID of the order that the return was created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the return was created for. - x-expandable: order - nullable: true - type: object - shipping_method: - description: The details of the Shipping Method that will be used to send the Return back. Can be null if the Customer will handle the return shipment themselves. - x-expandable: shipping_method - nullable: true - $ref: '#/components/schemas/ShippingMethod' - shipping_data: - description: Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment. - nullable: true - type: object - example: {} - location_id: - description: The ID of the stock location the return will be added back. - nullable: true - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK - refund_amount: - description: The amount that should be refunded as a result of the return. - type: integer - example: 1000 - no_notification: - description: When set to true, no notification will be sent related to this return. - nullable: true - type: boolean - example: false - idempotency_key: - description: Randomly generated key used to continue the completion of the return in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - received_at: - description: The date with timezone at which the return was received. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ReturnItem: - title: Return Item - description: A return item represents a line item in an order that is to be returned. It includes details related to the return and the reason behind it. - type: object - required: - - is_requested - - item_id - - metadata - - note - - quantity - - reason_id - - received_quantity - - requested_quantity - - return_id - properties: - return_id: - description: The ID of the Return that the Return Item belongs to. - type: string - example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - item_id: - description: The ID of the Line Item that the Return Item references. - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - return_order: - description: Details of the Return that the Return Item belongs to. - x-expandable: return_order - nullable: true - type: object - item: - description: The details of the line item in the original order to be returned. - x-expandable: item - nullable: true - $ref: '#/components/schemas/LineItem' - quantity: - description: The quantity of the Line Item to be returned. - type: integer - example: 1 - is_requested: - description: Whether the Return Item was requested initially or received unexpectedly in the warehouse. - type: boolean - default: true - requested_quantity: - description: The quantity that was originally requested to be returned. - nullable: true - type: integer - example: 1 - received_quantity: - description: The quantity that was received in the warehouse. - nullable: true - type: integer - example: 1 - reason_id: - description: The ID of the reason for returning the item. - nullable: true - type: string - example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - reason: - description: The details of the reason for returning the item. - x-expandable: reason - nullable: true - $ref: '#/components/schemas/ReturnReason' - note: - description: An optional note with additional details about the Return. - nullable: true - type: string - example: I didn't like it. - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ReturnReason: - title: Return Reason - description: A Return Reason is a value defined by an admin. It can be used on Return Items in order to indicate why a Line Item was returned. - type: object - required: - - created_at - - deleted_at - - description - - id - - label - - metadata - - parent_return_reason_id - - updated_at - - value - properties: - id: - description: The return reason's ID - type: string - example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - value: - description: The value to identify the reason by. - type: string - example: damaged - label: - description: A text that can be displayed to the Customer as a reason. - type: string - example: Damaged goods - description: - description: A description of the Reason. - nullable: true - type: string - example: Items that are damaged - parent_return_reason_id: - description: The ID of the parent reason. - nullable: true - type: string - example: null - parent_return_reason: - description: The details of the parent reason. - x-expandable: parent_return_reason - nullable: true - type: object - return_reason_children: - description: The details of the child reasons. - x-expandable: return_reason_children - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - SalesChannel: - title: Sales Channel - description: A Sales Channel is a method a business offers its products for purchase for the customers. For example, a Webshop can be a sales channel, and a mobile app can be another. - type: object - required: - - created_at - - deleted_at - - description - - id - - is_disabled - - name - - updated_at - properties: - id: - description: The sales channel's ID - type: string - example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A - name: - description: The name of the sales channel. - type: string - example: Market - description: - description: The description of the sales channel. - nullable: true - type: string - example: Multi-vendor market - is_disabled: - description: Specify if the sales channel is enabled or disabled. - type: boolean - default: false - locations: - description: The details of the stock locations related to the sales channel. - type: array - x-expandable: locations - items: - $ref: '#/components/schemas/SalesChannelLocation' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - carts: - description: The associated carts. - type: array - nullable: true - x-expandable: carts - x-featureFlag: medusa_v2 - items: - type: object - orders: - description: The associated orders. - type: array - nullable: true - x-expandable: orders - x-featureFlag: medusa_v2 - items: - type: object - publishableKeys: - description: The associated publishable API keys. - type: array - nullable: true - x-expandable: publishableKeys - items: - type: object - SalesChannelLocation: - title: Sales Channel Stock Location - description: This represents the association between a sales channel and a stock locations. - type: object - required: - - created_at - - deleted_at - - id - - location_id - - sales_channel_id - - updated_at - properties: - id: - description: The Sales Channel Stock Location's ID - type: string - example: scloc_01G8X9A7ESKAJXG2H0E6F1MW7A - sales_channel_id: - description: The ID of the Sales Channel - type: string - example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A - location_id: - description: The ID of the Location Stock. - type: string - sales_channel: - description: The details of the sales channel the location is associated with. - x-expandable: sales_channel - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - ShippingMethod: - title: Shipping Method - description: A Shipping Method represents a way in which an Order or Return can be shipped. Shipping Methods are created from a Shipping Option, but may contain additional details that can be necessary for the Fulfillment Provider to handle the shipment. If the shipping method is created for a return, it may be associated with a claim or a swap that the return is part of. - type: object - required: - - cart_id - - claim_order_id - - data - - id - - order_id - - price - - return_id - - shipping_option_id - - swap_id - properties: - id: - description: The shipping method's ID - type: string - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_option_id: - description: The ID of the Shipping Option that the Shipping Method is built from. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - order_id: - description: The ID of the order that the shipping method is used in. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the shipping method is used in. - x-expandable: order - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the shipping method is used in. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the shipping method is used in. - x-expandable: claim_order - nullable: true - type: object - cart_id: - description: The ID of the cart that the shipping method is used in. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the shipping method is used in. - x-expandable: cart - nullable: true - type: object - swap_id: - description: The ID of the swap that the shipping method is used in. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the shipping method is used in. - x-expandable: swap - nullable: true - type: object - return_id: - description: The ID of the return that the shipping method is used in. - nullable: true - type: string - example: null - return_order: - description: The details of the return that the shipping method is used in. - x-expandable: return_order - nullable: true - type: object - shipping_option: - description: The details of the shipping option the method was created from. - x-expandable: shipping_option - nullable: true - $ref: '#/components/schemas/ShippingOption' - tax_lines: - description: The details of the tax lines applied on the shipping method. - type: array - x-expandable: tax_lines - items: - $ref: '#/components/schemas/ShippingMethodTaxLine' - price: - description: The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of. - type: integer - example: 200 - data: - description: Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id. - type: object - example: {} - includes_tax: - description: Whether the shipping method price include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - subtotal: - description: The subtotal of the shipping - type: integer - example: 8000 - total: - description: The total amount of the shipping - type: integer - example: 8200 - tax_total: - description: The total of tax - type: integer - example: 0 - ShippingMethodTaxLine: - title: Shipping Method Tax Line - description: A Shipping Method Tax Line represents the taxes applied on a shipping method in a cart. - type: object - required: - - code - - created_at - - id - - shipping_method_id - - metadata - - name - - rate - - updated_at - properties: - id: - description: The line item tax line's ID - type: string - example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - shipping_method_id: - description: The ID of the line item - type: string - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_method: - description: The details of the associated shipping method. - x-expandable: shipping_method - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ShippingOption: - title: Shipping Option - description: A Shipping Option represents a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information. - type: object - required: - - admin_only - - amount - - created_at - - data - - deleted_at - - id - - is_return - - metadata - - name - - price_type - - profile_id - - provider_id - - region_id - - updated_at - properties: - id: - description: The shipping option's ID - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - name: - description: The name given to the Shipping Option - this may be displayed to the Customer. - type: string - example: PostFake Standard - region_id: - description: The ID of the region this shipping option can be used in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this shipping option can be used in. - x-expandable: region - nullable: true - type: object - profile_id: - description: The ID of the Shipping Profile that the shipping option belongs to. - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - profile: - description: The details of the shipping profile that the shipping option belongs to. - x-expandable: profile - nullable: true - $ref: '#/components/schemas/ShippingProfile' - provider_id: - description: The ID of the fulfillment provider that will be used to later to process the shipping method created from this shipping option and its fulfillments. - type: string - example: manual - provider: - description: The details of the fulfillment provider that will be used to later to process the shipping method created from this shipping option and its fulfillments. - x-expandable: provider - nullable: true - $ref: '#/components/schemas/FulfillmentProvider' - price_type: - description: The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations. - type: string - enum: - - flat_rate - - calculated - example: flat_rate - amount: - description: The amount to charge for shipping when the Shipping Option price type is `flat_rate`. - nullable: true - type: integer - example: 200 - is_return: - description: Flag to indicate if the Shipping Option can be used for Return shipments. - type: boolean - default: false - admin_only: - description: Flag to indicate if the Shipping Option usage is restricted to admin users. - type: boolean - default: false - requirements: - description: The details of the requirements that must be satisfied for the Shipping Option to be available for usage in a Cart. - type: array - x-expandable: requirements - items: - $ref: '#/components/schemas/ShippingOptionRequirement' - data: - description: The data needed for the Fulfillment Provider to identify the Shipping Option. - type: object - example: {} - includes_tax: - description: Whether the shipping option price include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ShippingOptionRequirement: - title: Shipping Option Requirement - description: A shipping option requirement defines conditions that a Cart must satisfy for the Shipping Option to be available for usage in the Cart. - type: object - required: - - amount - - deleted_at - - id - - shipping_option_id - - type - properties: - id: - description: The shipping option requirement's ID - type: string - example: sor_01G1G5V29AB4CTNDRFSRWSRKWD - shipping_option_id: - description: The ID of the shipping option that the requirements belong to. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the shipping option that the requirements belong to. - x-expandable: shipping_option - nullable: true - type: object - type: - description: The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available. - type: string - enum: - - min_subtotal - - max_subtotal - example: min_subtotal - amount: - description: The amount to compare the Cart subtotal to. - type: integer - example: 100 - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - ShippingProfile: - title: Shipping Profile - description: A Shipping Profile has a set of defined Shipping Options that can be used to fulfill a given set of Products. For example, gift cards are shipped differently than physical products, so a shipping profile with the type `gift_card` groups together the shipping options that can only be used for gift cards. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - name - - type - - updated_at - properties: - id: - description: The shipping profile's ID - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - name: - description: The name given to the Shipping profile - this may be displayed to the Customer. - type: string - example: Default Shipping Profile - type: - description: The type of the Shipping Profile, may be `default`, `gift_card` or `custom`. - type: string - enum: - - default - - gift_card - - custom - example: default - products: - description: The details of the products that the Shipping Profile defines Shipping Options for. Available if the relation `products` is expanded. - type: array - x-expandable: products - items: - type: object - shipping_options: - description: The details of the shipping options that can be used to create shipping methods for the Products in the Shipping Profile. - type: array - x-expandable: shipping_options - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ShippingTaxRate: - title: Shipping Tax Rate - description: This represents the tax rates applied on a shipping option. - type: object - required: - - created_at - - metadata - - rate_id - - shipping_option_id - - updated_at - properties: - shipping_option_id: - description: The ID of the shipping option. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the shipping option. - x-expandable: shipping_option - nullable: true - $ref: '#/components/schemas/ShippingOption' - rate_id: - description: The ID of the associated tax rate. - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the associated tax rate. - x-expandable: tax_rate - nullable: true - $ref: '#/components/schemas/TaxRate' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - StagedJob: - title: Staged Job - description: A staged job resource - type: object - required: - - data - - event_name - - id - - options - properties: - id: - description: The staged job's ID - type: string - example: job_01F0YET7BZTARY9MKN1SJ7AAXF - event_name: - description: The name of the event - type: string - example: order.placed - data: - description: Data necessary for the job - type: object - example: {} - option: - description: The staged job's option - type: object - example: {} - StockLocationAddressDTO: - title: Stock Location Address - description: Represents a Stock Location Address + StockLocationAddress: type: object + description: The stock location's address. + x-schemaName: StockLocationAddress required: - address_1 - country_code - - created_at - - updated_at properties: - id: - type: string - description: The stock location address' ID - example: laddr_51G4ZW853Y6TFXWPG5ENJ81X42 address_1: type: string - description: Stock location address - example: 35, Jhon Doe Ave + title: address_1 + description: The address's address 1. address_2: type: string - description: Stock location address' complement - example: apartment 4432 + title: address_2 + description: The address's address 2. company: type: string - description: Stock location company' name - example: Medusa + title: company + description: The address's company. city: type: string - description: Stock location address' city - example: Mexico city + title: city + description: The address's city. country_code: type: string - description: Stock location address' country - example: MX + title: country_code + description: The address's country code. phone: type: string - description: Stock location address' phone number - example: +1 555 61646 + title: phone + description: The address's phone. postal_code: type: string - description: Stock location address' postal code - example: HD3-1G8 + title: postal_code + description: The address's postal code. province: type: string - description: Stock location address' province - example: Sinaloa - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - StockLocationAddressInput: - title: Stock Location Address Input - description: Represents a Stock Location Address Input + title: province + description: The address's province. + StorePostCartsCartTaxesReq: type: object + description: SUMMARY + x-schemaName: StorePostCartsCartTaxesReq + properties: {} + StorePostPaymentCollectionsPaymentSessionReq: + type: object + description: SUMMARY + x-schemaName: StorePostPaymentCollectionsPaymentSessionReq required: - - address_1 - - country_code + - provider_id properties: - address_1: + provider_id: type: string - description: Stock location address - example: 35, Jhon Doe Ave - address_2: - type: string - description: Stock location address' complement - example: apartment 4432 - city: - type: string - description: Stock location address' city - example: Mexico city - country_code: - type: string - description: Stock location address' country - example: MX - phone: - type: string - description: Stock location address' phone number - example: +1 555 61646 - postal_code: - type: string - description: Stock location address' postal code - example: HD3-1G8 - province: - type: string - description: Stock location address' province - example: Sinaloa - metadata: + title: provider_id + description: The payment collection's provider id. + context: {} + data: type: object - description: An optional key-value map with additional details - example: - car: white - StockLocationDTO: - title: Stock Location - description: Represents a Stock Location - type: object - required: - - id - - name - - address_id - - created_at - - updated_at - properties: - id: - type: string - description: The stock location's ID - example: sloc_51G4ZW853Y6TFXWPG5ENJ81X42 - address_id: - type: string - description: Stock location address' ID - example: laddr_05B2ZE853Y6FTXWPW85NJ81A44 - name: - type: string - description: The name of the stock location - example: Main Warehouse - address: - description: The Address of the Stock Location - allOf: - - $ref: '#/components/schemas/StockLocationAddressDTO' - - type: object - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - StockLocationExpandedDTO: - allOf: - - $ref: '#/components/schemas/StockLocationDTO' - - type: object - properties: - sales_channels: - description: The associated sales channels. - $ref: '#/components/schemas/SalesChannel' - Store: - title: Store - description: A store holds the main settings of the commerce shop. By default, only one store is created and used within the Medusa backend. It holds settings related to the name of the store, available currencies, and more. - type: object - required: - - created_at - - default_currency_code - - default_location_id - - id - - invite_link_template - - metadata - - name - - payment_link_template - - swap_link_template - - updated_at - properties: - id: - description: The store's ID - type: string - example: store_01G1G5V21KADXNGH29BJMAJ4B4 - name: - description: The name of the Store - this may be displayed to the Customer. - type: string - example: Medusa Store - default: Medusa Store - default_currency_code: - description: The three character currency code that is the default of the store. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - default_currency: - description: The details of the store's default currency. - x-expandable: default_currency - default: usd - nullable: true - $ref: '#/components/schemas/Currency' - currencies: - description: The details of the enabled currencies in the store. - type: array - x-expandable: currencies - items: - $ref: '#/components/schemas/Currency' - swap_link_template: - description: A template to generate Swap links from. Use {{cart_id}} to include the Swap's `cart_id` in the link. - nullable: true - type: string - example: null - payment_link_template: - description: A template to generate Payment links from. Use {{cart_id}} to include the payment's `cart_id` in the link. - nullable: true - type: string - example: null - invite_link_template: - description: A template to generate Invite links from - nullable: true - type: string - example: null - default_location_id: - description: The location ID the store is associated with. - nullable: true - type: string - example: null - default_sales_channel_id: - description: The ID of the store's default sales channel. - nullable: true - type: string - example: null - default_sales_channel: - description: The details of the store's default sales channel. - x-expandable: default_sales_channel - nullable: true - $ref: '#/components/schemas/SalesChannel' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - Swap: - title: Swap - description: A swap can be created when a Customer wishes to exchange Products that they have purchased with different Products. It consists of a Return of previously purchased Products and a Fulfillment of new Products. It also includes information on any additional payment or refund required based on the difference between the exchanged products. - type: object - required: - - allow_backorder - - canceled_at - - cart_id - - confirmed_at - - created_at - - deleted_at - - difference_due - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - order_id - - payment_status - - shipping_address_id - - updated_at - properties: - id: - description: The swap's ID - type: string - example: swap_01F0YET86Y9G92D3YDR9Y6V676 - fulfillment_status: - description: The status of the Fulfillment of the Swap. - type: string - enum: - - not_fulfilled - - fulfilled - - shipped - - partially_shipped - - canceled - - requires_action - example: not_fulfilled - payment_status: - description: The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount. - type: string - enum: - - not_paid - - awaiting - - captured - - confirmed - - canceled - - difference_refunded - - partially_refunded - - refunded - - requires_action - example: not_paid - order_id: - description: The ID of the order that the swap belongs to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the swap belongs to. - x-expandable: order - nullable: true - type: object - additional_items: - description: The details of the new products to send to the customer, represented as line items. - type: array - x-expandable: additional_items - items: - $ref: '#/components/schemas/LineItem' - return_order: - description: The details of the return that belongs to the swap, which holds the details on the items being returned. - x-expandable: return_order - nullable: true - type: object - fulfillments: - description: The details of the fulfillments that are used to send the new items to the customer. - x-expandable: fulfillments - type: array - items: - type: object - payment: - description: The details of the additional payment authorized by the customer when `difference_due` is positive. - x-expandable: payment - nullable: true - type: object - difference_due: - description: The difference amount between the order’s original total and the new total imposed by the swap. If its value is negative, a refund must be issues to the customer. If it's positive, additional payment must be authorized by the customer. Otherwise, no payment processing is required. - nullable: true - type: integer - example: 0 - shipping_address_id: - description: The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order. - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address that the new items should be sent to. - x-expandable: shipping_address - nullable: true - $ref: '#/components/schemas/Address' - shipping_methods: - description: The details of the shipping methods used to fulfill the additional items purchased. - type: array - x-expandable: shipping_methods - items: - $ref: '#/components/schemas/ShippingMethod' - cart_id: - description: The ID of the cart that the customer uses to complete the swap. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the customer uses to complete the swap. - x-expandable: cart - nullable: true - type: object - confirmed_at: - description: The date with timezone at which the Swap was confirmed by the Customer. - nullable: true - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Swap was canceled. - nullable: true - type: string - format: date-time - no_notification: - description: If set to true, no notification will be sent related to this swap - nullable: true - type: boolean - example: false - allow_backorder: - description: If true, swaps can be completed with items out of stock - type: boolean - default: false - idempotency_key: - description: Randomly generated key used to continue the completion of the swap in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - TaxLine: - title: Tax Line - description: A tax line represents the taxes amount applied to a line item. - type: object - required: - - code - - created_at - - id - - metadata - - name - - rate - - updated_at - properties: - id: - description: The tax line's ID - type: string - example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - TaxProvider: - title: Tax Provider - description: A tax provider represents a tax service installed in the Medusa backend, either through a plugin or backend customizations. It holds the tax service's installation status. - type: object - required: - - id - - is_installed - properties: - id: - description: The ID of the tax provider as given by the tax service. - type: string - example: manual - is_installed: - description: Whether the tax service is installed in the current version. If a tax service is no longer installed, the `is_installed` attribute is set to `false`. - type: boolean - default: true - TaxRate: - title: Tax Rate - description: A Tax Rate can be used to define a custom rate to charge on specified products, product types, and shipping options within a given region. - type: object - required: - - code - - created_at - - id - - metadata - - name - - rate - - region_id - - updated_at - properties: - id: - description: The tax rate's ID - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - rate: - description: The numeric rate to charge - nullable: true - type: number - example: 10 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - region_id: - description: The ID of the region that the rate belongs to. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region that the rate belongs to. - x-expandable: region - nullable: true - type: object - products: - description: The details of the products that belong to this tax rate. - type: array - x-expandable: products - items: - $ref: '#/components/schemas/Product' - product_types: - description: The details of the product types that belong to this tax rate. - type: array - x-expandable: product_types - items: - $ref: '#/components/schemas/ProductType' - shipping_options: - description: The details of the shipping options that belong to this tax rate. - type: array - x-expandable: shipping_options - items: - $ref: '#/components/schemas/ShippingOption' - product_count: - description: The count of products - type: integer - example: 10 - product_type_count: - description: The count of product types - type: integer - example: 2 - shipping_option_count: - description: The count of shipping options - type: integer - example: 1 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - TrackingLink: - title: Tracking Link - description: A tracking link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment. Typically, the tracking link is provided from the third-party service integrated through the used fulfillment provider. - type: object - required: - - created_at - - deleted_at - - fulfillment_id - - id - - idempotency_key - - metadata - - tracking_number - - updated_at - - url - properties: - id: - description: The tracking link's ID - type: string - example: tlink_01G8ZH853Y6TFXWPG5EYE81X63 - url: - description: The URL at which the status of the shipment can be tracked. - nullable: true - type: string - format: uri - tracking_number: - description: The tracking number given by the shipping carrier. - type: string - format: RH370168054CN - fulfillment_id: - description: The ID of the fulfillment that the tracking link belongs to. - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - fulfillment: - description: The details of the fulfillment that the tracking link belongs to. - x-expandable: fulfillment - nullable: true - type: object - idempotency_key: - description: Randomly generated key used to continue the completion of a process in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - UpdateStockLocationInput: - title: Update Stock Location Input - description: Represents the Input to update a Stock Location - type: object - properties: - name: - type: string - description: The stock location name - address_id: - type: string - description: The Stock location address ID - address: - description: Stock location address object - allOf: - - $ref: '#/components/schemas/StockLocationAddressInput' - - type: object - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - User: - title: User - description: A User is an administrator who can manage store settings and data. - type: object - required: - - api_token - - created_at - - deleted_at - - email - - first_name - - id - - last_name - - metadata - - role - - updated_at - properties: - id: - description: The user's ID - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - role: - description: The user's role. These roles don't provide any different privileges. - type: string - enum: - - admin - - member - - developer - default: member - email: - description: The email of the User - type: string - format: email - first_name: - description: The first name of the User - nullable: true - type: string - example: Levi - last_name: - description: The last name of the User - nullable: true - type: string - example: Bogan - api_token: - description: An API token associated with the user. - nullable: true - type: string - example: null - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - VariantInventory: - type: object - required: - - id - - inventory - - sales_channel_availability - properties: - id: - description: the ID of the variant - type: string - inventory: - description: The inventory details. - $ref: '#/components/schemas/ResponseInventoryItem' - sales_channel_availability: - type: array - description: Details about the variant's inventory availability in sales channels. - items: - type: object - required: - - channel_name - - channel_id - - available_quantity - properties: - channel_name: - description: Sales channel's name - type: string - channel_id: - description: Sales channel's ID - type: string - available_quantity: - description: Available quantity in the sales channel - type: number + description: The payment collection's data. + properties: {} diff --git a/www/apps/api-reference/specs/admin/openapi.yaml b/www/apps/api-reference/specs/admin/openapi.yaml index f5988c19e7..d12892493e 100644 --- a/www/apps/api-reference/specs/admin/openapi.yaml +++ b/www/apps/api-reference/specs/admin/openapi.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: 1.0.0 + version: 2.0.0 title: Medusa Admin API license: name: MIT @@ -9,36 +9,9 @@ servers: - url: http://localhost:9000 - url: https://api.medusa-commerce.com tags: - - name: Apps Oauth - description: > - Some plugins may require to authenticate with third-party services and - store authentication details, such as the authentication token. To do - that, they can create an Oauth provider within the plugin that handles the - authentication. - - The Apps Oauth API Routes allows admins to manage and generate token for - an app using its oauth provider. - - name: Auth - description: > - Authentication API Routes allow admin users to manage their session, such - as login or log out. - - When an admin user is logged in, the cookie header is set indicating the - admin's login session. - externalDocs: - description: How to implement user profiles - url: https://docs.medusajs.com/modules/users/admin/manage-profile - - name: Batch Jobs - description: > - A batch job is a task that is performed by the Medusa backend - asynchronusly. For example, the Import Product feature is implemented - using batch jobs. - - Batch Job API Routes allow admins to manage the batch jobs and their - state. - externalDocs: - description: How to import products - url: https://docs.medusajs.com/modules/products/admin/import-products + - name: Api Keys + - name: Campaigns + - name: Collections - name: Currencies description: > A store can use unlimited currencies, and each region must be associated @@ -67,34 +40,7 @@ tags: externalDocs: description: How to manage customers url: https://docs.medusajs.com/modules/customers/admin/manage-customers - - name: Discounts - description: > - Admins can create discounts with conditions and rules, providing them with - advanced settings for variety of cases. - - The Discount API Routes can be used to manage discounts, their conditions, - resources, and more. - externalDocs: - description: How to manage discounts - url: https://docs.medusajs.com/modules/discounts/admin/manage-discounts - - name: Draft Orders - description: > - A draft order is an order created manually by the admin. It allows admins - to create orders without direct involvement from the customer. - externalDocs: - description: How to manage draft orders - url: https://docs.medusajs.com/modules/orders/admin/manage-draft-orders - - name: Gift Cards - description: > - Admins can create gift cards and send them directly to customers, - specifying options like their balance, region, and more. - - These gift cards are different than the saleable gift cards in a store, - which are created and managed through Product API Routes. - externalDocs: - description: How to manage gift cards - url: >- - https://docs.medusajs.com/modules/gift-cards/admin/manage-gift-cards#manage-custom-gift-cards + - name: Fulfillment - name: Inventory Items description: > Inventory items, provided by the [Inventory @@ -111,41 +57,6 @@ tags: externalDocs: description: How to manage invites url: https://docs.medusajs.com/modules/users/admin/manage-invites - - name: Notes - description: > - Notes are created by admins and can be associated with any resource. For - example, an admin can add a note to an order for additional details or - remarks. - - name: Notifications - description: > - Notifications are sent to customers to inform them of new updates. For - example, a notification can be sent to the customer when their order is - place or its state is updated. - - The notification's type, such as an email or SMS, is determined by the - notification provider installed on the Medusa backend. - - name: Order Edits - description: > - An admin can edit an order to remove, add, or update an item's quantity. - When an admin edits an order, they're stored as an `OrderEdit`. - externalDocs: - description: How to edit an order - url: https://docs.medusajs.com/modules/orders/admin/edit-order - - name: Orders - description: > - Orders are purchases made by customers, typically through a storefront - using the Store API. Draft orders created by the admin are also - transformed to an Order once the payment is captured. - - Managing orders include managing fulfillment, payment, claims, - reservations, and more. - externalDocs: - description: How to manage orders - url: https://docs.medusajs.com/modules/orders/admin/manage-orders - - name: Payment Collections - description: > - A payment collection is useful for managing additional payments, such as - for Order Edits, or installment payments. - name: Payments description: > A payment can be related to an order, swap, return, or more. It can be @@ -157,44 +68,7 @@ tags: externalDocs: description: How to manage price lists url: https://docs.medusajs.com/modules/price-lists/admin/manage-price-lists - - name: Product Categories - description: > - Products can be categoriezed into categories. A product can be added into - more than one category. - externalDocs: - description: How to manage product categories - url: https://docs.medusajs.com/modules/products/admin/manage-categories - - name: Product Collections - description: > - A product collection is used to organize products for different purposes - such as marketing or discount purposes. For example, you can create a - Summer Collection. - - name: Product Tags - description: > - Product tags are string values created when you create or update a product - with a new tag. - - Products can have more than one tag, and products can share tags. This - allows admins to associate products to similar tags that can be used to - filter products. - - name: Product Types - description: > - Product types are string values created when you create or update a - product with a new type. - - Products can have one type, and products can share types. This allows - admins to associate products with a type that can be used to filter - products. - - name: Product Variants - description: > - Product variants are the actual salable item in your store. Each variant - is a combination of the different option values available on the product. - - Product variants can be managed through the Products API Routes. - externalDocs: - description: How to manage product variants - url: >- - https://docs.medusajs.com/modules/products/admin/manage-products#manage-product-variants + - name: Pricing - name: Products description: > Products are saleable items in a store. This also includes [saleable gift @@ -203,24 +77,7 @@ tags: externalDocs: description: How to manage products url: https://docs.medusajs.com/modules/products/admin/manage-products - - name: Publishable API Keys - description: > - Publishable API Keys can be used to scope Store API calls with an API key, - determining what resources are retrieved when querying the API. - - For example, a publishable API key can be associated with one or more - sales channels. When it is passed in the header of a request to the List - Product store API Route, - - the sales channels are inferred from the key and only products associated - with those sales channels are retrieved. - - Admins can manage publishable API keys and their associated resources. - Currently, only Sales Channels are supported as a resource. - externalDocs: - description: How to manage publishable API keys - url: >- - https://docs.medusajs.com/development/publishable-api-keys/admin/manage-publishable-api-keys + - name: Promotions - name: Regions description: > Regions are different countries or geographical regions that the commerce @@ -231,39 +88,6 @@ tags: description: How to manage regions url: >- https://docs.medusajs.com/modules/regions-and-currencies/admin/manage-regions - - name: Reservations - description: > - Reservations, provided by the [Inventory - Module](https://docs.medusajs.com/modules/multiwarehouse/inventory-module), - are quantities of an item that are reserved, typically when an order is - placed but not yet fulfilled. - - Reservations can be associated with any resources, but commonly with line - items of an order. - externalDocs: - description: How to manage item allocations in orders - url: >- - https://docs.medusajs.com/modules/multiwarehouse/admin/manage-item-allocations-in-orders - - name: Return Reasons - description: > - Return reasons are key-value pairs that are used to specify why an order - return is being created. - - Admins can manage available return reasons, and they can be used by both - admins and customers when creating a return. - externalDocs: - description: How to manage return reasons - url: >- - https://docs.medusajs.com/modules/orders/admin/manage-returns#manage-return-reasons - - name: Returns - description: > - A return can be created by a customer or an admin to return items in an - order. - - Admins can manage these returns and change their state. - externalDocs: - description: How to manage returns - url: https://docs.medusajs.com/modules/orders/admin/manage-returns - name: Sales Channels description: > A sales channel indicates a channel where products can be sold in. For @@ -273,56 +97,8 @@ tags: externalDocs: description: How to manage sales channels url: https://docs.medusajs.com/modules/sales-channels/admin/manage - - name: Shipping Options - description: > - A shipping option is used to define the available shipping methods during - checkout or when creating a return. - - Admins can create an unlimited number of shipping options, each associated - with a shipping profile and fulfillment provider, among other resources. - externalDocs: - description: Shipping Option architecture - url: >- - https://docs.medusajs.com/modules/carts-and-checkout/shipping#shipping-option - - name: Shipping Profiles - description: > - A shipping profile is used to group products that can be shipped in the - same manner. - - They are created by the admin and they're not associated with a - fulfillment provider. - externalDocs: - description: Shipping Profile architecture - url: >- - https://docs.medusajs.com/modules/carts-and-checkout/shipping#shipping-profile - name: Stock Locations - description: > - A stock location, provided by the [Stock Location - module](https://docs.medusajs.com/modules/multiwarehouse/stock-location-module), - indicates a physical address that stock-kept items, such as physical - products, can be stored in. - - An admin can create and manage available stock locations. - externalDocs: - description: How to manage stock locations. - url: >- - https://docs.medusajs.com/modules/multiwarehouse/admin/manage-stock-locations - - name: Store - description: > - A store indicates the general configurations and details about the - commerce store. By default, there's only one store in the Medusa backend. - - Admins can manage the store and its details or configurations. - - name: Swaps - description: > - A swap is created by a customer or an admin to exchange an item with a new - one. - - Creating a swap implicitely includes creating a return for the item being - exchanged. - externalDocs: - description: How to manage swaps - url: https://docs.medusajs.com/modules/orders/admin/manage-swaps + - name: Stores - name: Tax Rates description: > Each region has at least a default tax rate. Admins can create and manage @@ -331,15 +107,7 @@ tags: externalDocs: description: How to manage tax rates url: https://docs.medusajs.com/modules/taxes/admin/manage-tax-rates - - name: Uploads - description: > - The upload API Routes are used to upload any type of resources. For - example, they can be used to upload CSV files that are used to import - products into the store. - externalDocs: - description: How to upload CSV file when importing a product. - url: >- - https://docs.medusajs.com/modules/products/admin/import-products#1-upload-csv-file + - name: Tax Regions - name: Users description: > A store can have more than one user, each having the same privileges. @@ -347,29 +115,22 @@ tags: externalDocs: description: How to manage users url: https://docs.medusajs.com/modules/users/admin/manage-users + - name: Workflows Executions paths: - /admin/apps: - $ref: paths/admin_apps.yaml - /admin/apps/authorizations: - $ref: paths/admin_apps_authorizations.yaml - /admin/auth: - $ref: paths/admin_auth.yaml - /admin/auth/token: - $ref: paths/admin_auth_token.yaml - /admin/batch-jobs: - $ref: paths/admin_batch-jobs.yaml - /admin/batch-jobs/{id}: - $ref: paths/admin_batch-jobs_{id}.yaml - /admin/batch-jobs/{id}/cancel: - $ref: paths/admin_batch-jobs_{id}_cancel.yaml - /admin/batch-jobs/{id}/confirm: - $ref: paths/admin_batch-jobs_{id}_confirm.yaml + /admin/api-keys: + $ref: paths/admin_api-keys.yaml + /admin/api-keys/{id}: + $ref: paths/admin_api-keys_{id}.yaml + /admin/api-keys/{id}/revoke: + $ref: paths/admin_api-keys_{id}_revoke.yaml + /admin/campaigns: + $ref: paths/admin_campaigns.yaml + /admin/campaigns/{id}: + $ref: paths/admin_campaigns_{id}.yaml /admin/collections: $ref: paths/admin_collections.yaml /admin/collections/{id}: $ref: paths/admin_collections_{id}.yaml - /admin/collections/{id}/products/batch: - $ref: paths/admin_collections_{id}_products_batch.yaml /admin/currencies: $ref: paths/admin_currencies.yaml /admin/currencies/{code}: @@ -382,42 +143,20 @@ paths: $ref: paths/admin_customer-groups_{id}_customers.yaml /admin/customer-groups/{id}/customers/batch: $ref: paths/admin_customer-groups_{id}_customers_batch.yaml + /admin/customer-groups/{id}/customers/remove: + $ref: paths/admin_customer-groups_{id}_customers_remove.yaml /admin/customers: $ref: paths/admin_customers.yaml /admin/customers/{id}: $ref: paths/admin_customers_{id}.yaml - /admin/discounts: - $ref: paths/admin_discounts.yaml - /admin/discounts/code/{code}: - $ref: paths/admin_discounts_code_{code}.yaml - /admin/discounts/{discount_id}/conditions: - $ref: paths/admin_discounts_{discount_id}_conditions.yaml - /admin/discounts/{discount_id}/conditions/{condition_id}: - $ref: paths/admin_discounts_{discount_id}_conditions_{condition_id}.yaml - /admin/discounts/{discount_id}/conditions/{condition_id}/batch: - $ref: paths/admin_discounts_{discount_id}_conditions_{condition_id}_batch.yaml - /admin/discounts/{id}: - $ref: paths/admin_discounts_{id}.yaml - /admin/discounts/{id}/dynamic-codes: - $ref: paths/admin_discounts_{id}_dynamic-codes.yaml - /admin/discounts/{id}/dynamic-codes/{code}: - $ref: paths/admin_discounts_{id}_dynamic-codes_{code}.yaml - /admin/discounts/{id}/regions/{region_id}: - $ref: paths/admin_discounts_{id}_regions_{region_id}.yaml - /admin/draft-orders: - $ref: paths/admin_draft-orders.yaml - /admin/draft-orders/{id}: - $ref: paths/admin_draft-orders_{id}.yaml - /admin/draft-orders/{id}/line-items: - $ref: paths/admin_draft-orders_{id}_line-items.yaml - /admin/draft-orders/{id}/line-items/{line_id}: - $ref: paths/admin_draft-orders_{id}_line-items_{line_id}.yaml - /admin/draft-orders/{id}/pay: - $ref: paths/admin_draft-orders_{id}_pay.yaml - /admin/gift-cards: - $ref: paths/admin_gift-cards.yaml - /admin/gift-cards/{id}: - $ref: paths/admin_gift-cards_{id}.yaml + /admin/customers/{id}/addresses: + $ref: paths/admin_customers_{id}_addresses.yaml + /admin/customers/{id}/addresses/{address_id}: + $ref: paths/admin_customers_{id}_addresses_{address_id}.yaml + /admin/fulfillment/shipping-options/{id}/rules/batch/add: + $ref: paths/admin_fulfillment_shipping-options_{id}_rules_batch_add.yaml + /admin/fulfillment/shipping-options/{id}/rules/batch/remove: + $ref: paths/admin_fulfillment_shipping-options_{id}_rules_batch_remove.yaml /admin/inventory-items: $ref: paths/admin_inventory-items.yaml /admin/inventory-items/{id}: @@ -430,92 +169,12 @@ paths: $ref: paths/admin_invites.yaml /admin/invites/accept: $ref: paths/admin_invites_accept.yaml - /admin/invites/{invite_id}: - $ref: paths/admin_invites_{invite_id}.yaml - /admin/invites/{invite_id}/resend: - $ref: paths/admin_invites_{invite_id}_resend.yaml - /admin/notes: - $ref: paths/admin_notes.yaml - /admin/notes/{id}: - $ref: paths/admin_notes_{id}.yaml - /admin/notifications: - $ref: paths/admin_notifications.yaml - /admin/notifications/{id}/resend: - $ref: paths/admin_notifications_{id}_resend.yaml - /admin/order-edits: - $ref: paths/admin_order-edits.yaml - /admin/order-edits/{id}: - $ref: paths/admin_order-edits_{id}.yaml - /admin/order-edits/{id}/cancel: - $ref: paths/admin_order-edits_{id}_cancel.yaml - /admin/order-edits/{id}/changes/{change_id}: - $ref: paths/admin_order-edits_{id}_changes_{change_id}.yaml - /admin/order-edits/{id}/confirm: - $ref: paths/admin_order-edits_{id}_confirm.yaml - /admin/order-edits/{id}/items: - $ref: paths/admin_order-edits_{id}_items.yaml - /admin/order-edits/{id}/items/{item_id}: - $ref: paths/admin_order-edits_{id}_items_{item_id}.yaml - /admin/order-edits/{id}/request: - $ref: paths/admin_order-edits_{id}_request.yaml - /admin/orders: - $ref: paths/admin_orders.yaml - /admin/orders/{id}: - $ref: paths/admin_orders_{id}.yaml - /admin/orders/{id}/archive: - $ref: paths/admin_orders_{id}_archive.yaml - /admin/orders/{id}/cancel: - $ref: paths/admin_orders_{id}_cancel.yaml - /admin/orders/{id}/capture: - $ref: paths/admin_orders_{id}_capture.yaml - /admin/orders/{id}/claims: - $ref: paths/admin_orders_{id}_claims.yaml - /admin/orders/{id}/claims/{claim_id}: - $ref: paths/admin_orders_{id}_claims_{claim_id}.yaml - /admin/orders/{id}/claims/{claim_id}/cancel: - $ref: paths/admin_orders_{id}_claims_{claim_id}_cancel.yaml - /admin/orders/{id}/claims/{claim_id}/fulfillments: - $ref: paths/admin_orders_{id}_claims_{claim_id}_fulfillments.yaml - /admin/orders/{id}/claims/{claim_id}/fulfillments/{fulfillment_id}/cancel: - $ref: >- - paths/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel.yaml - /admin/orders/{id}/claims/{claim_id}/shipments: - $ref: paths/admin_orders_{id}_claims_{claim_id}_shipments.yaml - /admin/orders/{id}/complete: - $ref: paths/admin_orders_{id}_complete.yaml - /admin/orders/{id}/fulfillment: - $ref: paths/admin_orders_{id}_fulfillment.yaml - /admin/orders/{id}/fulfillments/{fulfillment_id}/cancel: - $ref: paths/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel.yaml - /admin/orders/{id}/line-items/{line_item_id}/reserve: - $ref: paths/admin_orders_{id}_line-items_{line_item_id}_reserve.yaml - /admin/orders/{id}/refund: - $ref: paths/admin_orders_{id}_refund.yaml - /admin/orders/{id}/reservations: - $ref: paths/admin_orders_{id}_reservations.yaml - /admin/orders/{id}/return: - $ref: paths/admin_orders_{id}_return.yaml - /admin/orders/{id}/shipment: - $ref: paths/admin_orders_{id}_shipment.yaml - /admin/orders/{id}/shipping-methods: - $ref: paths/admin_orders_{id}_shipping-methods.yaml - /admin/orders/{id}/swaps: - $ref: paths/admin_orders_{id}_swaps.yaml - /admin/orders/{id}/swaps/{swap_id}/cancel: - $ref: paths/admin_orders_{id}_swaps_{swap_id}_cancel.yaml - /admin/orders/{id}/swaps/{swap_id}/fulfillments: - $ref: paths/admin_orders_{id}_swaps_{swap_id}_fulfillments.yaml - /admin/orders/{id}/swaps/{swap_id}/fulfillments/{fulfillment_id}/cancel: - $ref: >- - paths/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel.yaml - /admin/orders/{id}/swaps/{swap_id}/process-payment: - $ref: paths/admin_orders_{id}_swaps_{swap_id}_process-payment.yaml - /admin/orders/{id}/swaps/{swap_id}/shipments: - $ref: paths/admin_orders_{id}_swaps_{swap_id}_shipments.yaml - /admin/payment-collections/{id}: - $ref: paths/admin_payment-collections_{id}.yaml - /admin/payment-collections/{id}/authorize: - $ref: paths/admin_payment-collections_{id}_authorize.yaml + /admin/invites/{id}: + $ref: paths/admin_invites_{id}.yaml + /admin/invites/{id}/resend: + $ref: paths/admin_invites_{id}_resend.yaml + /admin/payments: + $ref: paths/admin_payments.yaml /admin/payments/{id}: $ref: paths/admin_payments_{id}.yaml /admin/payments/{id}/capture: @@ -526,36 +185,18 @@ paths: $ref: paths/admin_price-lists.yaml /admin/price-lists/{id}: $ref: paths/admin_price-lists_{id}.yaml - /admin/price-lists/{id}/prices/batch: - $ref: paths/admin_price-lists_{id}_prices_batch.yaml - /admin/price-lists/{id}/products: - $ref: paths/admin_price-lists_{id}_products.yaml - /admin/price-lists/{id}/products/prices/batch: - $ref: paths/admin_price-lists_{id}_products_prices_batch.yaml - /admin/price-lists/{id}/products/{product_id}/prices: - $ref: paths/admin_price-lists_{id}_products_{product_id}_prices.yaml - /admin/price-lists/{id}/variants/{variant_id}/prices: - $ref: paths/admin_price-lists_{id}_variants_{variant_id}_prices.yaml - /admin/product-categories: - $ref: paths/admin_product-categories.yaml - /admin/product-categories/{id}: - $ref: paths/admin_product-categories_{id}.yaml - /admin/product-categories/{id}/products/batch: - $ref: paths/admin_product-categories_{id}_products_batch.yaml - /admin/product-tags: - $ref: paths/admin_product-tags.yaml - /admin/product-types: - $ref: paths/admin_product-types.yaml + /admin/price-lists/{id}/prices/batch/add: + $ref: paths/admin_price-lists_{id}_prices_batch_add.yaml + /admin/price-lists/{id}/prices/batch/remove: + $ref: paths/admin_price-lists_{id}_prices_batch_remove.yaml + /admin/pricing/rule-types: + $ref: paths/admin_pricing_rule-types.yaml + /admin/pricing/rule-types/{id}: + $ref: paths/admin_pricing_rule-types_{id}.yaml /admin/products: $ref: paths/admin_products.yaml - /admin/products/tag-usage: - $ref: paths/admin_products_tag-usage.yaml - /admin/products/types: - $ref: paths/admin_products_types.yaml /admin/products/{id}: $ref: paths/admin_products_{id}.yaml - /admin/products/{id}/metadata: - $ref: paths/admin_products_{id}_metadata.yaml /admin/products/{id}/options: $ref: paths/admin_products_{id}_options.yaml /admin/products/{id}/options/{option_id}: @@ -564,110 +205,77 @@ paths: $ref: paths/admin_products_{id}_variants.yaml /admin/products/{id}/variants/{variant_id}: $ref: paths/admin_products_{id}_variants_{variant_id}.yaml - /admin/publishable-api-keys: - $ref: paths/admin_publishable-api-keys.yaml - /admin/publishable-api-keys/{id}: - $ref: paths/admin_publishable-api-keys_{id}.yaml - /admin/publishable-api-keys/{id}/revoke: - $ref: paths/admin_publishable-api-keys_{id}_revoke.yaml - /admin/publishable-api-keys/{id}/sales-channels: - $ref: paths/admin_publishable-api-keys_{id}_sales-channels.yaml - /admin/publishable-api-keys/{id}/sales-channels/batch: - $ref: paths/admin_publishable-api-keys_{id}_sales-channels_batch.yaml + /admin/promotions: + $ref: paths/admin_promotions.yaml + /admin/promotions/{id}: + $ref: paths/admin_promotions_{id}.yaml + /admin/promotions/{id}/buy-rules/batch/add: + $ref: paths/admin_promotions_{id}_buy-rules_batch_add.yaml + /admin/promotions/{id}/buy-rules/batch/remove: + $ref: paths/admin_promotions_{id}_buy-rules_batch_remove.yaml + /admin/promotions/{id}/rules/batch/add: + $ref: paths/admin_promotions_{id}_rules_batch_add.yaml + /admin/promotions/{id}/rules/batch/remove: + $ref: paths/admin_promotions_{id}_rules_batch_remove.yaml + /admin/promotions/{id}/rules/batch/update: + $ref: paths/admin_promotions_{id}_rules_batch_update.yaml + /admin/promotions/{id}/target-rules/batch/add: + $ref: paths/admin_promotions_{id}_target-rules_batch_add.yaml + /admin/promotions/{id}/target-rules/batch/remove: + $ref: paths/admin_promotions_{id}_target-rules_batch_remove.yaml /admin/regions: $ref: paths/admin_regions.yaml /admin/regions/{id}: $ref: paths/admin_regions_{id}.yaml - /admin/regions/{id}/countries: - $ref: paths/admin_regions_{id}_countries.yaml - /admin/regions/{id}/countries/{country_code}: - $ref: paths/admin_regions_{id}_countries_{country_code}.yaml - /admin/regions/{id}/fulfillment-options: - $ref: paths/admin_regions_{id}_fulfillment-options.yaml - /admin/regions/{id}/fulfillment-providers: - $ref: paths/admin_regions_{id}_fulfillment-providers.yaml - /admin/regions/{id}/fulfillment-providers/{provider_id}: - $ref: paths/admin_regions_{id}_fulfillment-providers_{provider_id}.yaml - /admin/regions/{id}/payment-providers: - $ref: paths/admin_regions_{id}_payment-providers.yaml - /admin/regions/{id}/payment-providers/{provider_id}: - $ref: paths/admin_regions_{id}_payment-providers_{provider_id}.yaml - /admin/reservations: - $ref: paths/admin_reservations.yaml - /admin/reservations/{id}: - $ref: paths/admin_reservations_{id}.yaml - /admin/return-reasons: - $ref: paths/admin_return-reasons.yaml - /admin/return-reasons/{id}: - $ref: paths/admin_return-reasons_{id}.yaml - /admin/returns: - $ref: paths/admin_returns.yaml - /admin/returns/{id}/cancel: - $ref: paths/admin_returns_{id}_cancel.yaml - /admin/returns/{id}/receive: - $ref: paths/admin_returns_{id}_receive.yaml /admin/sales-channels: $ref: paths/admin_sales-channels.yaml /admin/sales-channels/{id}: $ref: paths/admin_sales-channels_{id}.yaml - /admin/sales-channels/{id}/products/batch: - $ref: paths/admin_sales-channels_{id}_products_batch.yaml - /admin/sales-channels/{id}/stock-locations: - $ref: paths/admin_sales-channels_{id}_stock-locations.yaml - /admin/shipping-options: - $ref: paths/admin_shipping-options.yaml - /admin/shipping-options/{id}: - $ref: paths/admin_shipping-options_{id}.yaml - /admin/shipping-profiles: - $ref: paths/admin_shipping-profiles.yaml - /admin/shipping-profiles/{id}: - $ref: paths/admin_shipping-profiles_{id}.yaml + /admin/sales-channels/{id}/products/batch/add: + $ref: paths/admin_sales-channels_{id}_products_batch_add.yaml /admin/stock-locations: $ref: paths/admin_stock-locations.yaml /admin/stock-locations/{id}: $ref: paths/admin_stock-locations_{id}.yaml - /admin/store: - $ref: paths/admin_store.yaml - /admin/store/currencies/{code}: - $ref: paths/admin_store_currencies_{code}.yaml - /admin/store/payment-providers: - $ref: paths/admin_store_payment-providers.yaml - /admin/store/tax-providers: - $ref: paths/admin_store_tax-providers.yaml - /admin/swaps: - $ref: paths/admin_swaps.yaml - /admin/swaps/{id}: - $ref: paths/admin_swaps_{id}.yaml + /admin/stores: + $ref: paths/admin_stores.yaml + /admin/stores/{id}: + $ref: paths/admin_stores_{id}.yaml /admin/tax-rates: $ref: paths/admin_tax-rates.yaml /admin/tax-rates/{id}: $ref: paths/admin_tax-rates_{id}.yaml - /admin/tax-rates/{id}/product-types/batch: - $ref: paths/admin_tax-rates_{id}_product-types_batch.yaml - /admin/tax-rates/{id}/products/batch: - $ref: paths/admin_tax-rates_{id}_products_batch.yaml - /admin/tax-rates/{id}/shipping-options/batch: - $ref: paths/admin_tax-rates_{id}_shipping-options_batch.yaml - /admin/uploads: - $ref: paths/admin_uploads.yaml - /admin/uploads/download-url: - $ref: paths/admin_uploads_download-url.yaml - /admin/uploads/protected: - $ref: paths/admin_uploads_protected.yaml + /admin/tax-rates/{id}/rules: + $ref: paths/admin_tax-rates_{id}_rules.yaml + /admin/tax-rates/{id}/rules/{rule_id}: + $ref: paths/admin_tax-rates_{id}_rules_{rule_id}.yaml + /admin/tax-regions: + $ref: paths/admin_tax-regions.yaml + /admin/tax-regions/{id}: + $ref: paths/admin_tax-regions_{id}.yaml /admin/users: $ref: paths/admin_users.yaml - /admin/users/password-token: - $ref: paths/admin_users_password-token.yaml - /admin/users/reset-password: - $ref: paths/admin_users_reset-password.yaml + /admin/users/me: + $ref: paths/admin_users_me.yaml /admin/users/{id}: $ref: paths/admin_users_{id}.yaml - /admin/variants: - $ref: paths/admin_variants.yaml - /admin/variants/{id}: - $ref: paths/admin_variants_{id}.yaml - /admin/variants/{id}/inventory: - $ref: paths/admin_variants_{id}_inventory.yaml + /admin/workflows-executions: + $ref: paths/admin_workflows-executions.yaml + /admin/workflows-executions/{id}: + $ref: paths/admin_workflows-executions_{id}.yaml + /admin/workflows-executions/{workflow_id}/run: + $ref: paths/admin_workflows-executions_{workflow_id}_run.yaml + /admin/workflows-executions/{workflow_id}/steps/failure: + $ref: paths/admin_workflows-executions_{workflow_id}_steps_failure.yaml + /admin/workflows-executions/{workflow_id}/steps/success: + $ref: paths/admin_workflows-executions_{workflow_id}_steps_success.yaml + /admin/workflows-executions/{workflow_id}/subscribe: + $ref: paths/admin_workflows-executions_{workflow_id}_subscribe.yaml + /admin/workflows-executions/{workflow_id}/{transaction_id}: + $ref: paths/admin_workflows-executions_{workflow_id}_{transaction_id}.yaml + /admin/workflows-executions/{workflow_id}/{transaction_id}/{step_id}/subscribe: + $ref: >- + paths/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe.yaml components: securitySchemes: api_token: diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_api-keys.yaml b/www/apps/api-reference/specs/admin/paths/admin_api-keys.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_api-keys.yaml rename to www/apps/api-reference/specs/admin/paths/admin_api-keys.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_api-keys_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_api-keys_{id}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_api-keys_{id}.yaml rename to www/apps/api-reference/specs/admin/paths/admin_api-keys_{id}.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_api-keys_{id}_revoke.yaml b/www/apps/api-reference/specs/admin/paths/admin_api-keys_{id}_revoke.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_api-keys_{id}_revoke.yaml rename to www/apps/api-reference/specs/admin/paths/admin_api-keys_{id}_revoke.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_apps.yaml b/www/apps/api-reference/specs/admin/paths/admin_apps.yaml deleted file mode 100644 index 5ff8bbbb79..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_apps.yaml +++ /dev/null @@ -1,37 +0,0 @@ -get: - operationId: GetApps - summary: List Applications - description: Retrieve a list of applications registered in the Medusa backend. - x-authenticated: true - x-codegen: - method: list - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_apps/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Apps Oauth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminAppsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_apps_authorizations.yaml b/www/apps/api-reference/specs/admin/paths/admin_apps_authorizations.yaml deleted file mode 100644 index ae8fc0a159..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_apps_authorizations.yaml +++ /dev/null @@ -1,44 +0,0 @@ -post: - operationId: PostApps - summary: Generate Token for App - description: >- - Use an app's Oauth provider to generate and store a new token for - authentication. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostAppsReq.yaml - x-codegen: - method: authorize - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_apps_authorizations/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Apps Oauth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminAppsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_auth.yaml b/www/apps/api-reference/specs/admin/paths/admin_auth.yaml deleted file mode 100644 index d49b279bb1..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_auth.yaml +++ /dev/null @@ -1,140 +0,0 @@ -get: - operationId: GetAuth - summary: Get Current User - x-authenticated: true - description: Get the currently logged in user's details. - x-codegen: - method: getSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_auth/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_auth/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_auth/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminAuthRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostAuth - summary: User Login - x-authenticated: false - description: >- - Log a User in and includes the Cookie session in the response header. The - cookie session can be used in subsequent requests to authorize the user to - perform admin functionalities. When using Medusa's JS or Medusa React - clients, the cookie is automatically attached to subsequent requests. - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostAuthReq.yaml - x-codegen: - method: createSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_auth/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_auth/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_auth/post.sh - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminAuthRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/incorrect_credentials.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteAuth - summary: User Logout - x-authenticated: true - description: >- - Delete the current session for the logged in user. This will only work if - you're using Cookie session for authentication. If the API token is still - passed in the header, the user is still authorized to perform admin - functionalities in other API Routes. - x-codegen: - method: deleteSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_auth/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_auth/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_auth/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Auth - responses: - '200': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_auth_token.yaml b/www/apps/api-reference/specs/admin/paths/admin_auth_token.yaml deleted file mode 100644 index bf3d4df3b9..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_auth_token.yaml +++ /dev/null @@ -1,44 +0,0 @@ -post: - operationId: PostToken - summary: User Login (JWT) - x-authenticated: false - description: >- - After a successful login, a JWT token is returned, which can be used to send - authenticated requests. - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostAuthReq.yaml - x-codegen: - method: getToken - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_auth_token/post.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_auth_token/post.sh - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminBearerAuthRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/incorrect_credentials.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_batch-jobs.yaml b/www/apps/api-reference/specs/admin/paths/admin_batch-jobs.yaml deleted file mode 100644 index c6729da828..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_batch-jobs.yaml +++ /dev/null @@ -1,326 +0,0 @@ -get: - operationId: GetBatchJobs - summary: List Batch Jobs - description: >- - Retrieve a list of Batch Jobs. The batch jobs can be filtered by fields such - as `type` or `confirmed_at`. The batch jobs can also be sorted or paginated. - x-authenticated: true - parameters: - - in: query - name: limit - description: Limit the number of batch jobs returned. - schema: - type: integer - default: 10 - - in: query - name: offset - description: The number of batch jobs to skip when retrieving the batch jobs. - schema: - type: integer - default: 0 - - in: query - name: id - style: form - explode: false - description: Filter by the batch ID - schema: - oneOf: - - type: string - description: batch job ID - - type: array - description: multiple batch job IDs - items: - type: string - - in: query - name: type - style: form - explode: false - description: Filter by the batch type - schema: - type: array - items: - type: string - - in: query - name: confirmed_at - style: form - explode: false - description: Filter by a confirmation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: pre_processed_at - style: form - explode: false - description: Filter by a pre-processing date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: completed_at - style: form - explode: false - description: Filter by a completion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: failed_at - style: form - explode: false - description: Filter by a failure date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: canceled_at - style: form - explode: false - description: Filter by a cancelation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: order - description: A batch-job field to sort-order the retrieved batch jobs by. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned batch - jobs. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned batch - jobs. - schema: - type: string - - in: query - name: created_at - style: form - explode: false - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - style: form - explode: false - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetBatchParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_batch-jobs/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_batch-jobs/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_batch-jobs/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Batch Jobs - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminBatchJobListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostBatchJobs - summary: Create a Batch Job - description: >- - Create a Batch Job to be executed asynchronously in the Medusa backend. If - `dry_run` is set to `true`, the batch job will not be executed until the it - is confirmed, which can be done using the Confirm Batch Job API Route. - externalDocs: - description: How to create a batch job - url: https://docs.medusajs.com/development/batch-jobs/create#create-batch-job - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostBatchesReq.yaml - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_batch-jobs/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_batch-jobs/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_batch-jobs/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Batch Jobs - responses: - '201': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminBatchJobRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_batch-jobs_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_batch-jobs_{id}.yaml deleted file mode 100644 index 73d0f2b431..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_batch-jobs_{id}.yaml +++ /dev/null @@ -1,52 +0,0 @@ -get: - operationId: GetBatchJobsBatchJob - summary: Get a Batch Job - description: Retrieve the details of a batch job. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Batch Job - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_batch-jobs_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_batch-jobs_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_batch-jobs_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Batch Jobs - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminBatchJobRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_batch-jobs_{id}_cancel.yaml b/www/apps/api-reference/specs/admin/paths/admin_batch-jobs_{id}_cancel.yaml deleted file mode 100644 index 6e9c39897e..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_batch-jobs_{id}_cancel.yaml +++ /dev/null @@ -1,54 +0,0 @@ -post: - operationId: PostBatchJobsBatchJobCancel - summary: Cancel a Batch Job - description: >- - Mark a batch job as canceled. When a batch job is canceled, the processing - of the batch job doesn’t automatically stop. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the batch job. - schema: - type: string - x-codegen: - method: cancel - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_batch-jobs_{id}_cancel/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_batch-jobs_{id}_cancel/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_batch-jobs_{id}_cancel/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Batch Jobs - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminBatchJobRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_batch-jobs_{id}_confirm.yaml b/www/apps/api-reference/specs/admin/paths/admin_batch-jobs_{id}_confirm.yaml deleted file mode 100644 index 59251f1d8f..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_batch-jobs_{id}_confirm.yaml +++ /dev/null @@ -1,55 +0,0 @@ -post: - operationId: PostBatchJobsBatchJobConfirmProcessing - summary: Confirm a Batch Job - description: >- - When a batch job is created, it is not executed automatically if `dry_run` - is set to `true`. This API Route confirms that the batch job should be - executed. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the batch job. - schema: - type: string - x-codegen: - method: confirm - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_batch-jobs_{id}_confirm/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_batch-jobs_{id}_confirm/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_batch-jobs_{id}_confirm/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Batch Jobs - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminBatchJobRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_campaigns.yaml b/www/apps/api-reference/specs/admin/paths/admin_campaigns.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_campaigns.yaml rename to www/apps/api-reference/specs/admin/paths/admin_campaigns.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_campaigns_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_campaigns_{id}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_campaigns_{id}.yaml rename to www/apps/api-reference/specs/admin/paths/admin_campaigns_{id}.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_collections.yaml b/www/apps/api-reference/specs/admin/paths/admin_collections.yaml index 20ab488693..61db631ea0 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_collections.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_collections.yaml @@ -2,143 +2,22 @@ get: operationId: GetCollections summary: List Collections description: >- - Retrieve a list of Product Collection. The product collections can be - filtered by fields such as `handle` or `title`. The collections can also be - sorted or paginated. + Retrieve a list of collections. The collections can be filtered by fields + such as `id`. The collections can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: limit - description: The number of collections to return. - schema: - type: integer - default: 10 - - in: query - name: offset - description: The number of collections to skip when retrieving the collections. - schema: - type: integer - default: 0 - - in: query - name: title - description: Filter collections by their title. - schema: - type: string - - in: query - name: handle - description: Filter collections by their handle. - schema: - type: string - - in: query - name: q - description: a term to search collections by their title or handle. - schema: - type: string - - in: query - name: order - description: A field to sort-order the retrieved collections by. - schema: - type: string - - in: query - name: discount_condition_id - description: Filter collections by a discount condition ID associated with them. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetCollectionsParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_collections/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_collections/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_collections/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Product Collections + - Collections responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCollectionsListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -151,44 +30,28 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostCollections - summary: Create a Collection - description: Create a Product Collection. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostCollectionsReq.yaml - x-codegen: - method: create + schema: {} +post: + operationId: PostCollections + summary: Create Collection + description: Create a collection. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_collections/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_collections/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_collections/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Product Collections + - Collections responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCollectionsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -201,3 +64,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_collections_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_collections_{id}.yaml index 55ad2ba56e..4db0e2a3f1 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_collections_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_collections_{id}.yaml @@ -1,45 +1,29 @@ get: - operationId: GetCollectionsCollection + operationId: GetCollectionsId summary: Get a Collection description: >- - Retrieve a Product Collection by its ID. The products associated with it are - expanded and returned as well. + Retrieve a collection by its ID. You can expand the collection's relations + or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The collection's ID. required: true - description: The ID of the Product Collection schema: type: string - x-codegen: - method: retrieve + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_collections_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_collections_{id}/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_collections_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Product Collections + - Collections responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCollectionsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -52,51 +36,34 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostCollectionsCollection - summary: Update a Collection - description: Update a Product Collection's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Collection. - schema: - type: string requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostCollectionsCollectionReq.yaml - x-codegen: - method: update + schema: {} +post: + operationId: PostCollectionsId + summary: Update a Collection + description: Update a collection's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The collection's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_collections_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_collections_{id}/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_collections_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Product Collections + - Collections responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCollectionsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -109,46 +76,34 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteCollectionsCollection + operationId: DeleteCollectionsId summary: Delete a Collection - description: Delete a Product Collection. This does not delete associated products. + description: Delete a collection. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The collection's ID. required: true - description: The ID of the Collection. schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_collections_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_collections_{id}/delete.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_collections_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - - Product Collections + - Collections responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCollectionsDeleteRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -161,3 +116,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_collections_{id}_products_batch.yaml b/www/apps/api-reference/specs/admin/paths/admin_collections_{id}_products_batch.yaml deleted file mode 100644 index f3bebda2b3..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_collections_{id}_products_batch.yaml +++ /dev/null @@ -1,118 +0,0 @@ -post: - operationId: PostProductsToCollection - summary: Add Products to Collection - description: Add products to a product collection. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the product collection. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostProductsToCollectionReq.yaml - x-codegen: - method: addProducts - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_collections_{id}_products_batch/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_collections_{id}_products_batch/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_collections_{id}_products_batch/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCollectionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteProductsFromCollection - summary: Remove Products from Collection - description: >- - Remove a list of products from a collection. This would not delete the - product, only the association between the product and the collection. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Product Collection. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminDeleteProductsFromCollectionReq.yaml - x-codegen: - method: removeProducts - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_collections_{id}_products_batch/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_collections_{id}_products_batch/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_collections_{id}_products_batch/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDeleteProductsFromCollectionRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_currencies.yaml b/www/apps/api-reference/specs/admin/paths/admin_currencies.yaml index 3d0620a81e..586c02fc3e 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_currencies.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_currencies.yaml @@ -1,73 +1,23 @@ get: operationId: GetCurrencies - summary: List Currency + summary: List Currencies description: >- Retrieve a list of currencies. The currencies can be filtered by fields such - as `code`. The currencies can also be sorted or paginated. + as `id`. The currencies can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: code - description: filter by currency code. - schema: - type: string - - in: query - name: includes_tax - description: filter currencies by whether they include taxes or not. - schema: - type: boolean - x-featureFlag: tax_inclusive_pricing - - in: query - name: order - description: A field to sort order the retrieved currencies by. - schema: - type: string - - in: query - name: q - description: Term used to search currencies' name and code. - schema: - type: string - - in: query - name: offset - description: The number of currencies to skip when retrieving the currencies. - schema: - type: number - default: '0' - - in: query - name: limit - description: The number of currencies to return. - schema: - type: number - default: '20' - x-codegen: - method: list - queryParams: AdminGetCurrenciesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_currencies/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_currencies/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_currencies/get.sh + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_currencies/get.sh tags: - Currencies responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCurrenciesListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -80,3 +30,7 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_currencies_{code}.yaml b/www/apps/api-reference/specs/admin/paths/admin_currencies_{code}.yaml index 2b932fa874..8570532991 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_currencies_{code}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_currencies_{code}.yaml @@ -1,48 +1,29 @@ -post: - operationId: PostCurrenciesCurrency - summary: Update a Currency - description: Update a Currency's details. +get: + operationId: GetCurrenciesCode + summary: Get a Currency + description: >- + Retrieve a currency by its ID. You can expand the currency's relations or + select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: code + - name: code + in: path + description: The currency's code. required: true - description: The code of the Currency. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostCurrenciesCurrencyReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_currencies_{code}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_currencies_{code}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_currencies_{code}/post.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_currencies_{code}/get.sh tags: - Currencies responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCurrenciesRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -55,3 +36,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_customer-groups.yaml b/www/apps/api-reference/specs/admin/paths/admin_customer-groups.yaml index 5568c1bfbf..fab8099d36 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_customer-groups.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_customer-groups.yaml @@ -3,164 +3,21 @@ get: summary: List Customer Groups description: >- Retrieve a list of customer groups. The customer groups can be filtered by - fields such as `name` or `id. The customer groups can also be sorted or - paginated. + fields such as `id`. The customer groups can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: q - description: term to search customer groups by name. - schema: - type: string - - in: query - name: offset - description: >- - The number of customer groups to skip when retrieving the customer - groups. - schema: - type: integer - default: 0 - - in: query - name: order - description: A field to sort order the retrieved customer groups by. - schema: - type: string - - in: query - name: discount_condition_id - description: Filter by discount condition ID. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by the customer group ID - schema: - oneOf: - - type: string - description: customer group ID - - type: array - description: an array of customer group IDs - items: - type: string - - type: object - properties: - lt: - type: string - description: filter by IDs less than this ID - gt: - type: string - description: filter by IDs greater than this ID - lte: - type: string - description: filter by IDs less than or equal to this ID - gte: - type: string - description: filter by IDs greater than or equal to this ID - - in: query - name: name - style: form - explode: false - description: Filter by the customer group name - schema: - type: array - description: an array of customer group names - items: - type: string - description: customer group name - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: limit - description: The number of customer groups to return. - schema: - type: integer - default: 10 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - customer groups. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned customer - groups. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetCustomerGroupsParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_customer-groups/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_customer-groups/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_customer-groups/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomerGroupsListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -173,44 +30,28 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostCustomerGroups - summary: Create a Customer Group - description: Create a Customer Group. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostCustomerGroupsReq.yaml - x-codegen: - method: create + schema: {} +post: + operationId: PostCustomerGroups + summary: Create Customer Group + description: Create a customer group. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_customer-groups/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_customer-groups/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_customer-groups/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomerGroupsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -223,3 +64,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}.yaml index 047ca1ac56..e1b6789dfd 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}.yaml @@ -1,60 +1,29 @@ get: - operationId: GetCustomerGroupsGroup + operationId: GetCustomerGroupsId summary: Get a Customer Group description: >- - Retrieve a Customer Group by its ID. You can expand the customer group's + Retrieve a customer group by its ID. You can expand the customer group's relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer group's ID. required: true - description: The ID of the Customer Group. schema: type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - customer group. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned customer - group. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetCustomerGroupsGroupParams + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_customer-groups_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_customer-groups_{id}/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_customer-groups_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomerGroupsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -67,51 +36,34 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostCustomerGroupsGroup - summary: Update a Customer Group - description: Update a Customer Group's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the customer group. - schema: - type: string requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostCustomerGroupsGroupReq.yaml - x-codegen: - method: update + schema: {} +post: + operationId: PostCustomerGroupsId + summary: Update a Customer Group + description: Update a customer group's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The customer group's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_customer-groups_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_customer-groups_{id}/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_customer-groups_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomerGroupsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -124,48 +76,34 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteCustomerGroupsCustomerGroup + operationId: DeleteCustomerGroupsId summary: Delete a Customer Group - description: >- - Delete a customer group. This doesn't delete the customers associated with - the customer group. + description: Delete a customer group. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer group's ID. required: true - description: The ID of the Customer Group schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_customer-groups_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_customer-groups_{id}/delete.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_customer-groups_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomerGroupsDeleteRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -178,3 +116,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}_customers.yaml b/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}_customers.yaml index 0d5b23de37..bfb2f4dd54 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}_customers.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}_customers.yaml @@ -1,70 +1,29 @@ get: - operationId: GetCustomerGroupsGroupCustomers + operationId: GetCustomerGroupsIdCustomers summary: List Customers description: >- Retrieve a list of customers in a customer group. The customers can be - filtered by the `q` field. The customers can also be paginated. + filtered by fields like FILTER FIELDS. The customers can also be paginated. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer group's ID. required: true - description: The ID of the customer group. schema: type: string - - in: query - name: limit - description: The number of customers to return. - schema: - type: integer - default: 50 - - in: query - name: offset - description: The number of customers to skip when retrieving the customers. - schema: - type: integer - default: 0 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - customers. - schema: - type: string - - in: query - name: q - description: a term to search customers by email, first_name, and last_name. - schema: - type: string - x-codegen: - method: listCustomers - queryParams: AdminGetGroupsGroupCustomersParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_customer-groups_{id}_customers/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_customer-groups_{id}_customers/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_customer-groups_{id}_customers/get.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_customer-groups_{id}_customers/get.sh tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomersListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -77,3 +36,7 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}_customers_batch.yaml b/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}_customers_batch.yaml index 7fcfc1496f..81c5eac2aa 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}_customers_batch.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}_customers_batch.yaml @@ -1,115 +1,34 @@ post: - operationId: PostCustomerGroupsGroupCustomersBatch - summary: Add Customers to Group + operationId: PostCustomerGroupsIdCustomersBatch + summary: Add Customers to Customer Group description: Add a list of customers to a customer group. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer group's ID. required: true - description: The ID of the customer group. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: >- ../components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml - x-codegen: - method: addCustomers x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_customer-groups_{id}_customers_batch/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_customer-groups_{id}_customers_batch/post.tsx - lang: Shell label: cURL source: $ref: >- ../code_samples/Shell/admin_customer-groups_{id}_customers_batch/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customer Groups responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomerGroupsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteCustomerGroupsGroupCustomerBatch - summary: Remove Customers from Group - description: >- - Remove a list of customers from a customer group. This doesn't delete the - customer, only the association between the customer and the customer group. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the customer group. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminDeleteCustomerGroupsGroupCustomerBatchReq.yaml - x-codegen: - method: removeCustomers - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_customer-groups_{id}_customers_batch/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_customer-groups_{id}_customers_batch/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_customer-groups_{id}_customers_batch/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Customer Groups - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomerGroupsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups_{id}_customers_remove.yaml b/www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}_customers_remove.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_customer-groups_{id}_customers_remove.yaml rename to www/apps/api-reference/specs/admin/paths/admin_customer-groups_{id}_customers_remove.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_customers.yaml b/www/apps/api-reference/specs/admin/paths/admin_customers.yaml index adf4c398c4..0fabec7b94 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_customers.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_customers.yaml @@ -2,133 +2,22 @@ get: operationId: GetCustomers summary: List Customers description: >- - Retrieve a list of Customers. The customers can be filtered by fields such - as `q` or `groups`. The customers can also be paginated. + Retrieve a list of customers. The customers can be filtered by fields such + as `id`. The customers can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: limit - description: The number of customers to return. - schema: - type: integer - default: 50 - - in: query - name: offset - description: The number of customers to skip when retrieving the customers. - schema: - type: integer - default: 0 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - customers. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned - customers. - schema: - type: string - - in: query - name: q - description: term to search customers' email, first_name, and last_name fields. - schema: - type: string - - in: query - name: has_account - description: Filter customers by whether they have an account. - schema: - type: boolean - - in: query - name: order - description: A field to sort-order the retrieved customers by. - schema: - type: string - - in: query - name: groups - style: form - explode: false - description: Filter by customer group IDs. - schema: - type: array - items: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetCustomersParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_customers/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_customers/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_customers/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomersListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -141,44 +30,28 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostCustomers - summary: Create a Customer - description: Create a customer as an admin. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostCustomersReq.yaml - x-codegen: - method: create + schema: {} +post: + operationId: PostCustomers + summary: Create Customer + description: Create a customer. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_customers/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_customers/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_customers/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customers responses: - '201': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomersRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -191,3 +64,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_customers_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_customers_{id}.yaml index 7c88c29522..0050fbef8c 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_customers_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_customers_{id}.yaml @@ -1,55 +1,29 @@ get: - operationId: GetCustomersCustomer + operationId: GetCustomersId summary: Get a Customer - description: Retrieve the details of a customer. + description: >- + Retrieve a customer by its ID. You can expand the customer's relations or + select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The customer's ID. required: true - description: The ID of the Customer. schema: type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - customer. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned customer. - schema: - type: string - x-codegen: - method: retrieve + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_customers_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_customers_{id}/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_customers_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomersRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -62,65 +36,34 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostCustomersCustomer - summary: Update a Customer - description: Update a Customer's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Customer. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - customer. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be retrieved in the returned - customer. - schema: - type: string requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostCustomersCustomerReq.yaml - x-codegen: - method: update + schema: {} +post: + operationId: PostCustomersId + summary: Update a Customer + description: Update a customer's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The customer's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_customers_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_customers_{id}/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_customers_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminCustomersRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -133,3 +76,47 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} +delete: + operationId: DeleteCustomersId + summary: Delete a Customer + description: Delete a customer. + x-authenticated: true + parameters: + - name: id + in: path + description: The customer's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_customers_{id}/delete.sh + tags: + - Customers + responses: + '400': + $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml + '404': + $ref: ../components/responses/not_found_error.yaml + '409': + $ref: ../components/responses/invalid_state_error.yaml + '422': + $ref: ../components/responses/invalid_request_error.yaml + '500': + $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_customers_{id}_addresses.yaml b/www/apps/api-reference/specs/admin/paths/admin_customers_{id}_addresses.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_customers_{id}_addresses.yaml rename to www/apps/api-reference/specs/admin/paths/admin_customers_{id}_addresses.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_customers_{id}_addresses_{address_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_customers_{id}_addresses_{address_id}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_customers_{id}_addresses_{address_id}.yaml rename to www/apps/api-reference/specs/admin/paths/admin_customers_{id}_addresses_{address_id}.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_discounts.yaml b/www/apps/api-reference/specs/admin/paths/admin_discounts.yaml deleted file mode 100644 index 0f63545320..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_discounts.yaml +++ /dev/null @@ -1,219 +0,0 @@ -get: - operationId: GetDiscounts - summary: List Discounts - x-authenticated: true - description: >- - Retrieve a list of Discounts. The discounts can be filtered by fields such - as `rule` or `is_dynamic`. The discounts can also be paginated. - parameters: - - in: query - name: q - description: term to search discounts' code field. - schema: - type: string - - in: query - name: rule - description: Filter discounts by rule fields. - schema: - type: object - properties: - type: - type: string - enum: - - fixed - - percentage - - free_shipping - description: Filter discounts by type. - allocation: - type: string - enum: - - total - - item - description: Filter discounts by allocation type. - - in: query - name: is_dynamic - description: Filter discounts by whether they're dynamic or not. - schema: - type: boolean - - in: query - name: is_disabled - description: Filter discounts by whether they're disabled or not. - schema: - type: boolean - - in: query - name: limit - description: The number of discounts to return - schema: - type: number - default: '20' - - in: query - name: offset - description: The number of discounts to skip when retrieving the discounts. - schema: - type: number - default: '0' - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in each returned - discount. - schema: - type: string - - in: query - name: order - description: A discount field to sort-order the retrieved discounts by. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetDiscountsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_discounts/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_discounts/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_discounts/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostDiscounts - summary: Create a Discount - x-authenticated: true - description: >- - Create a Discount with a given set of rules that defines how the Discount is - applied. - parameters: - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - discount. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be retrieved in the returned - discount. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostDiscountsReq.yaml - x-codegen: - method: create - queryParams: AdminPostDiscountsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_discounts/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_discounts/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_discounts/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_discounts_code_{code}.yaml b/www/apps/api-reference/specs/admin/paths/admin_discounts_code_{code}.yaml deleted file mode 100644 index 1a8d89a44c..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_discounts_code_{code}.yaml +++ /dev/null @@ -1,65 +0,0 @@ -get: - operationId: GetDiscountsDiscountCode - summary: Get Discount by Code - description: Retrieve a Discount's details by its discount code - x-authenticated: true - parameters: - - in: path - name: code - required: true - description: The code of the Discount - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - x-codegen: - method: retrieveByCode - queryParams: AdminGetDiscountsDiscountCodeParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_discounts_code_{code}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_discounts_code_{code}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_discounts_code_{code}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_discounts_{discount_id}_conditions.yaml b/www/apps/api-reference/specs/admin/paths/admin_discounts_{discount_id}_conditions.yaml deleted file mode 100644 index 0d79eefdf2..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_discounts_{discount_id}_conditions.yaml +++ /dev/null @@ -1,76 +0,0 @@ -post: - operationId: PostDiscountsDiscountConditions - summary: Create a Condition - description: >- - Create a Discount Condition. Only one of `products`, `product_types`, - `product_collections`, `product_tags`, and `customer_groups` should be - provided, based on the type of discount condition. For example, if the - discount condition's type is `products`, the `products` field should be - provided in the request body. - x-authenticated: true - parameters: - - in: path - name: discount_id - required: true - description: The ID of the discount. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostDiscountsDiscountConditions.yaml - x-codegen: - method: createCondition - queryParams: AdminPostDiscountsDiscountConditionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_discounts_{discount_id}_conditions/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_discounts_{discount_id}_conditions/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_discounts_{discount_id}_conditions/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_discounts_{discount_id}_conditions_{condition_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_discounts_{discount_id}_conditions_{condition_id}.yaml deleted file mode 100644 index d37318f7ed..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_discounts_{discount_id}_conditions_{condition_id}.yaml +++ /dev/null @@ -1,237 +0,0 @@ -get: - operationId: GetDiscountsDiscountConditionsCondition - summary: Get a Condition - description: Retrieve a Discount Condition's details. - x-authenticated: true - parameters: - - in: path - name: discount_id - required: true - description: The ID of the Discount. - schema: - type: string - - in: path - name: condition_id - required: true - description: The ID of the Discount Condition. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - discount condition. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned discount - condition. - schema: - type: string - x-codegen: - method: getCondition - queryParams: AdminGetDiscountsDiscountConditionsConditionParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountConditionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostDiscountsDiscountConditionsCondition - summary: Update a Condition - description: >- - Update a Discount Condition. Only one of `products`, `product_types`, - `product_collections`, `product_tags`, and `customer_groups` should be - provided, based on the type of discount condition. For example, if the - discount condition's type is `products`, the `products` field should be - provided in the request body. - x-authenticated: true - parameters: - - in: path - name: discount_id - required: true - description: The ID of the Discount. - schema: - type: string - - in: path - name: condition_id - required: true - description: The ID of the Discount Condition. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostDiscountsDiscountConditionsCondition.yaml - x-codegen: - method: updateCondition - queryParams: AdminPostDiscountsDiscountConditionsConditionParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteDiscountsDiscountConditionsCondition - summary: Delete a Condition - description: >- - Delete a Discount Condition. This does not delete resources associated to - the discount condition. - x-authenticated: true - parameters: - - in: path - name: discount_id - required: true - description: The ID of the Discount - schema: - type: string - - in: path - name: condition_id - required: true - description: The ID of the Discount Condition - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - x-codegen: - method: deleteCondition - queryParams: AdminDeleteDiscountsDiscountConditionsConditionParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountConditionsDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_discounts_{discount_id}_conditions_{condition_id}_batch.yaml b/www/apps/api-reference/specs/admin/paths/admin_discounts_{discount_id}_conditions_{condition_id}_batch.yaml deleted file mode 100644 index 23b937438f..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_discounts_{discount_id}_conditions_{condition_id}_batch.yaml +++ /dev/null @@ -1,166 +0,0 @@ -post: - operationId: PostDiscountsDiscountConditionsConditionBatch - summary: Add Batch Resources - description: >- - Add a batch of resources to a discount condition. The type of resource - depends on the type of discount condition. For example, if the discount - condition's type is `products`, the resources being added should be - products. - x-authenticated: true - parameters: - - in: path - name: discount_id - required: true - description: The ID of the discount the condition belongs to. - schema: - type: string - - in: path - name: condition_id - required: true - description: The ID of the discount condition on which to add the item. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostDiscountsDiscountConditionsConditionBatchReq.yaml - x-codegen: - method: addConditionResourceBatch - queryParams: AdminPostDiscountsDiscountConditionsConditionBatchParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}_batch/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteDiscountsDiscountConditionsConditionBatch - summary: Remove Batch Resources - description: >- - Remove a batch of resources from a discount condition. This will only remove - the association between the resource and the discount condition, not the - resource itself. - x-authenticated: true - parameters: - - in: path - name: discount_id - required: true - description: The ID of the discount. - schema: - type: string - - in: path - name: condition_id - required: true - description: The ID of the condition to remove the resources from. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminDeleteDiscountsDiscountConditionsConditionBatchReq.yaml - x-codegen: - method: deleteConditionResourceBatch - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_discounts_{discount_id}_conditions_{condition_id}_batch/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}.yaml deleted file mode 100644 index d26af24edc..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}.yaml +++ /dev/null @@ -1,193 +0,0 @@ -get: - operationId: GetDiscountsDiscount - summary: Get a Discount - description: Retrieve a Discount. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - discount. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned discount. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetDiscountParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_discounts_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_discounts_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_discounts_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostDiscountsDiscount - summary: Update a Discount - description: >- - Update a Discount with a given set of rules that define how the Discount is - applied. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - discount. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be retrieved in the returned - discount. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostDiscountsDiscountReq.yaml - x-codegen: - method: update - queryParams: AdminPostDiscountsDiscountParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_discounts_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_discounts_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_discounts_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteDiscountsDiscount - summary: Delete a Discount - description: >- - Delete a Discount. Deleting the discount will make it unavailable for - customers to use. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_discounts_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_discounts_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_discounts_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}_dynamic-codes.yaml b/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}_dynamic-codes.yaml deleted file mode 100644 index 873adfc362..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}_dynamic-codes.yaml +++ /dev/null @@ -1,60 +0,0 @@ -post: - operationId: PostDiscountsDiscountDynamicCodes - summary: Create a Dynamic Code - description: >- - Create a dynamic unique code that can map to a parent Discount. This is - useful if you want to automatically generate codes with the same rules and - conditions. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount to create the dynamic code for." - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostDiscountsDiscountDynamicCodesReq.yaml - x-codegen: - method: createDynamicCode - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_discounts_{id}_dynamic-codes/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_discounts_{id}_dynamic-codes/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_discounts_{id}_dynamic-codes/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}_dynamic-codes_{code}.yaml b/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}_dynamic-codes_{code}.yaml deleted file mode 100644 index 674e44c28f..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}_dynamic-codes_{code}.yaml +++ /dev/null @@ -1,61 +0,0 @@ -delete: - operationId: DeleteDiscountsDiscountDynamicCodesCode - summary: Delete a Dynamic Code - description: Delete a dynamic code from a Discount. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount - schema: - type: string - - in: path - name: code - required: true - description: The dynamic code to delete - schema: - type: string - x-codegen: - method: deleteDynamicCode - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_discounts_{id}_dynamic-codes_{code}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_discounts_{id}_dynamic-codes_{code}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_discounts_{id}_dynamic-codes_{code}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}_regions_{region_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}_regions_{region_id}.yaml deleted file mode 100644 index 0ee9e2b50d..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_discounts_{id}_regions_{region_id}.yaml +++ /dev/null @@ -1,123 +0,0 @@ -post: - operationId: PostDiscountsDiscountRegionsRegion - summary: Add Region to Discount - description: Add a Region to the list of Regions a Discount can be used in. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Discount. - schema: - type: string - - in: path - name: region_id - required: true - description: The ID of the Region. - schema: - type: string - x-codegen: - method: addRegion - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_discounts_{id}_regions_{region_id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_discounts_{id}_regions_{region_id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_discounts_{id}_regions_{region_id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteDiscountsDiscountRegionsRegion - summary: Remove Region - x-authenticated: true - description: >- - Remove a Region from the list of Regions that a Discount can be used in. - This does not delete a region, only the association between it and the - discount. - parameters: - - in: path - name: id - required: true - description: The ID of the Discount. - schema: - type: string - - in: path - name: region_id - required: true - description: The ID of the Region. - schema: - type: string - x-codegen: - method: removeRegion - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_discounts_{id}_regions_{region_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_discounts_{id}_regions_{region_id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_discounts_{id}_regions_{region_id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Discounts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDiscountsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_draft-orders.yaml b/www/apps/api-reference/specs/admin/paths/admin_draft-orders.yaml deleted file mode 100644 index 4cf45c4d15..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_draft-orders.yaml +++ /dev/null @@ -1,191 +0,0 @@ -get: - operationId: GetDraftOrders - summary: List Draft Orders - description: >- - Retrieve an list of Draft Orders. The draft orders can be filtered by fields - such as `q`. The draft orders can also paginated. - x-authenticated: true - parameters: - - in: query - name: offset - description: The number of draft orders to skip when retrieving the draft orders. - schema: - type: number - default: '0' - - in: query - name: limit - description: Limit the number of draft orders returned. - schema: - type: number - default: '50' - - in: query - name: q - description: >- - a term to search draft orders' display IDs and emails in the draft - order's cart - schema: - type: string - - in: query - name: order - description: Field to sort retrieved draft orders by. - schema: - type: string - - in: query - name: expand - description: A comma-separated list of fields to expand. - schema: - type: string - - in: query - name: fields - description: A comma-separated list of fields to include in the response. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: status - style: form - explode: false - description: Filter by status - schema: - type: array - items: - type: string - enum: - - open - - completed - x-codegen: - method: list - queryParams: AdminGetDraftOrdersParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_draft-orders/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_draft-orders/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_draft-orders/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDraftOrdersListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostDraftOrders - summary: Create a Draft Order - description: >- - Create a Draft Order. A draft order is not transformed into an order until - payment is captured. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostDraftOrdersReq.yaml - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_draft-orders/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_draft-orders/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_draft-orders/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDraftOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}.yaml deleted file mode 100644 index 9cd62c7cdc..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}.yaml +++ /dev/null @@ -1,161 +0,0 @@ -get: - operationId: GetDraftOrdersDraftOrder - summary: Get a Draft Order - description: Retrieve a Draft Order's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_draft-orders_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_draft-orders_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_draft-orders_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDraftOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostDraftOrdersDraftOrder - summary: Update a Draft Order - description: Update a Draft Order's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostDraftOrdersDraftOrderReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_draft-orders_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_draft-orders_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_draft-orders_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDraftOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteDraftOrdersDraftOrder - summary: Delete a Draft Order - description: Delete a Draft Order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_draft-orders_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_draft-orders_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_draft-orders_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDraftOrdersDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}_line-items.yaml b/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}_line-items.yaml deleted file mode 100644 index 801806cd48..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}_line-items.yaml +++ /dev/null @@ -1,58 +0,0 @@ -post: - operationId: PostDraftOrdersDraftOrderLineItems - summary: Create a Line Item - description: Create a Line Item in the Draft Order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostDraftOrdersDraftOrderLineItemsReq.yaml - x-codegen: - method: addLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_draft-orders_{id}_line-items/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_draft-orders_{id}_line-items/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_draft-orders_{id}_line-items/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDraftOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}_line-items_{line_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}_line-items_{line_id}.yaml deleted file mode 100644 index caa7d48f0f..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}_line-items_{line_id}.yaml +++ /dev/null @@ -1,128 +0,0 @@ -post: - operationId: PostDraftOrdersDraftOrderLineItemsItem - summary: Update a Line Item - description: Update a Line Item in a Draft Order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - - in: path - name: line_id - required: true - description: The ID of the Line Item. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostDraftOrdersDraftOrderLineItemsItemReq.yaml - x-codegen: - method: updateLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_draft-orders_{id}_line-items_{line_id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_draft-orders_{id}_line-items_{line_id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_draft-orders_{id}_line-items_{line_id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDraftOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteDraftOrdersDraftOrderLineItemsItem - summary: Delete a Line Item - description: Delete a Line Item from a Draft Order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Draft Order. - schema: - type: string - - in: path - name: line_id - required: true - description: The ID of the line item. - schema: - type: string - x-codegen: - method: removeLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_draft-orders_{id}_line-items_{line_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_draft-orders_{id}_line-items_{line_id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_draft-orders_{id}_line-items_{line_id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDraftOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}_pay.yaml b/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}_pay.yaml deleted file mode 100644 index cc7b96fe65..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_draft-orders_{id}_pay.yaml +++ /dev/null @@ -1,58 +0,0 @@ -post: - summary: Mark Paid - operationId: PostDraftOrdersDraftOrderRegisterPayment - description: >- - Capture the draft order's payment. This will also set the draft order's - status to `completed` and create an Order from the draft order. The payment - is captured through Medusa's system payment, which is manual payment that - isn't integrated with any third-party payment provider. It is assumed that - the payment capturing is handled manually by the admin. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The Draft Order ID. - schema: - type: string - x-codegen: - method: markPaid - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_draft-orders_{id}_pay/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_draft-orders_{id}_pay/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_draft-orders_{id}_pay/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Draft Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostDraftOrdersDraftOrderRegisterPaymentRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_fulfillment_shipping-options_{id}_rules_batch_add.yaml b/www/apps/api-reference/specs/admin/paths/admin_fulfillment_shipping-options_{id}_rules_batch_add.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_fulfillment_shipping-options_{id}_rules_batch_add.yaml rename to www/apps/api-reference/specs/admin/paths/admin_fulfillment_shipping-options_{id}_rules_batch_add.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_fulfillment_shipping-options_{id}_rules_batch_remove.yaml b/www/apps/api-reference/specs/admin/paths/admin_fulfillment_shipping-options_{id}_rules_batch_remove.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_fulfillment_shipping-options_{id}_rules_batch_remove.yaml rename to www/apps/api-reference/specs/admin/paths/admin_fulfillment_shipping-options_{id}_rules_batch_remove.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_gift-cards.yaml b/www/apps/api-reference/specs/admin/paths/admin_gift-cards.yaml deleted file mode 100644 index 89c660585d..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_gift-cards.yaml +++ /dev/null @@ -1,123 +0,0 @@ -get: - operationId: GetGiftCards - summary: List Gift Cards - description: >- - Retrieve a list of Gift Cards. The gift cards can be filtered by fields such - as `q`. The gift cards can also paginated. - x-authenticated: true - parameters: - - in: query - name: offset - description: The number of gift cards to skip when retrieving the gift cards. - schema: - type: number - default: '0' - - in: query - name: limit - description: Limit the number of gift cards returned. - schema: - type: number - default: '50' - - in: query - name: q - description: a term to search gift cards' code or display ID - schema: - type: string - - in: query - name: order - description: A gift card field to sort-order the retrieved gift cards by. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetGiftCardsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_gift-cards/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_gift-cards/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_gift-cards/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminGiftCardsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostGiftCards - summary: Create a Gift Card - description: >- - Create a Gift Card that can redeemed by its unique code. The Gift Card is - only valid within 1 region. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostGiftCardsReq.yaml - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_gift-cards/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_gift-cards/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_gift-cards/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminGiftCardsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_gift-cards_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_gift-cards_{id}.yaml deleted file mode 100644 index a6a5a09fc9..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_gift-cards_{id}.yaml +++ /dev/null @@ -1,161 +0,0 @@ -get: - operationId: GetGiftCardsGiftCard - summary: Get a Gift Card - description: Retrieve a Gift Card's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Gift Card. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_gift-cards_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_gift-cards_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_gift-cards_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminGiftCardsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostGiftCardsGiftCard - summary: Update a Gift Card - description: Update a Gift Card's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Gift Card. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostGiftCardsGiftCardReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_gift-cards_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_gift-cards_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_gift-cards_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminGiftCardsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteGiftCardsGiftCard - summary: Delete a Gift Card - description: Delete a Gift Card. Once deleted, it can't be used by customers. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Gift Card to delete. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_gift-cards_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_gift-cards_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_gift-cards_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminGiftCardsDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_inventory-items.yaml b/www/apps/api-reference/specs/admin/paths/admin_inventory-items.yaml index 23f05eb017..e2b35b2d37 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_inventory-items.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_inventory-items.yaml @@ -3,150 +3,21 @@ get: summary: List Inventory Items description: >- Retrieve a list of inventory items. The inventory items can be filtered by - fields such as `q` or `location_id`. The inventory items can also be - paginated. + fields such as `id`. The inventory items can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: offset - description: >- - The number of inventory items to skip when retrieving the inventory - items. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of inventory items returned. - schema: - type: integer - default: 20 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in each returned - inventory item. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned inventory - item. - schema: - type: string - - in: query - name: q - description: term to search inventory item's sku, title, and description. - schema: - type: string - - in: query - name: order - description: Field to sort-order inventory items by. - schema: - type: string - - in: query - name: location_id - style: form - explode: false - description: Filter by location IDs. - schema: - type: array - items: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by the inventory ID - schema: - oneOf: - - type: string - description: inventory ID - - type: array - description: an array of inventory IDs - items: - type: string - - in: query - name: sku - description: Filter by SKU - schema: - type: string - - in: query - name: origin_country - description: Filter by origin country - schema: - type: string - - in: query - name: mid_code - description: Filter by MID code - schema: - type: string - - in: query - name: material - description: Filter by material - schema: - type: string - - in: query - name: hs_code - description: Filter by HS Code - schema: - type: string - - in: query - name: weight - description: Filter by weight - schema: - type: string - - in: query - name: length - description: Filter by length - schema: - type: string - - in: query - name: height - description: Filter by height - schema: - type: string - - in: query - name: width - description: Filter by width - schema: - type: string - - in: query - name: requires_shipping - description: Filter by whether the item requires shipping - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetInventoryItemsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_inventory-items/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_inventory-items/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_inventory-items/get.sh + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_inventory-items/get.sh tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminInventoryItemsListWithVariantsAndLocationLevelsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -159,60 +30,33 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} post: operationId: PostInventoryItems - summary: Create an Inventory Item - description: Create an Inventory Item for a product variant. + summary: Create Inventory Item + description: Create a inventory item. x-authenticated: true - parameters: - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - inventory item. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned inventory - item. - schema: - type: string + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: ../components/schemas/AdminPostInventoryItemsReq.yaml - x-codegen: - method: create - queryParams: AdminPostInventoryItemsParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_inventory-items/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_inventory-items/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_inventory-items/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminInventoryItemsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}.yaml index ee6f7efc9b..7074f3a305 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}.yaml @@ -1,58 +1,29 @@ get: - operationId: GetInventoryItemsInventoryItem - summary: Get an Inventory Item - description: Retrieve an Inventory Item's details. + operationId: GetInventoryItemsId + summary: Get a Inventory Item + description: >- + Retrieve a inventory item by its ID. You can expand the inventory item's + relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item. schema: type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - inventory item. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned inventory - item. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetInventoryItemsItemParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_inventory-items_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_inventory-items_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_inventory-items_{id}/get.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_inventory-items_{id}/get.sh tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminInventoryItemsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -65,66 +36,41 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} post: - operationId: PostInventoryItemsInventoryItem - summary: Update an Inventory Item - description: Update an Inventory Item's details. + operationId: PostInventoryItemsId + summary: Update a Inventory Item + description: Update a inventory item's details. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - inventory level. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned inventory - level. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: ../components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml - x-codegen: - method: update - queryParams: AdminPostInventoryItemsInventoryItemParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_inventory-items_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_inventory-items_{id}/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_inventory-items_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Inventory Items responses: '200': description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminInventoryItemsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -138,46 +84,42 @@ post: '500': $ref: ../components/responses/500_error.yaml delete: - operationId: DeleteInventoryItemsInventoryItem - summary: Delete an Inventory Item - description: >- - Delete an Inventory Item. This does not delete the associated product - variant. + operationId: DeleteInventoryItemsId + summary: Delete a Inventory Item + description: Delete a inventory item. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item to delete. schema: type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_inventory-items_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_inventory-items_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_inventory-items_{id}/delete.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_inventory-items_{id}/delete.sh tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminInventoryItemsDeleteRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml + '404': + $ref: ../components/responses/not_found_error.yaml + '409': + $ref: ../components/responses/invalid_state_error.yaml + '422': + $ref: ../components/responses/invalid_request_error.yaml + '500': + $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}_location-levels.yaml b/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}_location-levels.yaml index 3c85af2cc7..a7cd8053b4 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}_location-levels.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}_location-levels.yaml @@ -1,147 +1,34 @@ -get: - operationId: GetInventoryItemsInventoryItemLocationLevels - summary: List Inventory Level - description: >- - Retrieve a list of inventory levels of an inventory item. The inventory - levels can be filtered by fields such as `location_id`. +post: + operationId: PostInventoryItemsIdLocationLevels + summary: Add Location Levels to Inventory Item + description: Add a list of location levels to a inventory item. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item the locations are associated with. schema: type: string - - in: query - name: location_id - style: form - explode: false - description: Filter by location IDs. - schema: - type: array - items: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - inventory levels. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned inventory - levels. - schema: - type: string - x-codegen: - method: listLocationLevels - queryParams: AdminGetInventoryItemsItemLocationLevelsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_inventory-items_{id}_location-levels/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_inventory-items_{id}_location-levels/get.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_inventory-items_{id}_location-levels/get.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] - tags: - - Inventory Items - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminInventoryItemsLocationLevelsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostInventoryItemsInventoryItemLocationLevels - summary: Create a Location Level - description: Create a Location Level for a given Inventory Item. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Inventory Item. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - inventory item. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned inventory - item. - schema: - type: string requestBody: content: application/json: schema: $ref: >- ../components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml - x-codegen: - method: createLocationLevel - queryParams: AdminPostInventoryItemsItemLocationLevelsParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_inventory-items_{id}_location-levels/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_inventory-items_{id}_location-levels/post.tsx - lang: Shell label: cURL source: $ref: >- ../code_samples/Shell/admin_inventory-items_{id}_location-levels/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminInventoryItemsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}_location-levels_{location_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}_location-levels_{location_id}.yaml index 9e19fd4d02..bf33698fef 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}_location-levels_{location_id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_inventory-items_{id}_location-levels_{location_id}.yaml @@ -1,73 +1,42 @@ post: - operationId: PostInventoryItemsInventoryItemLocationLevelsLocationLevel - summary: Update a Location Level - description: Update a Location Level's details for a given Inventory Item. + operationId: PostInventoryItemsIdLocationLevelsLocation_id + summary: Add Location Levels to Inventory Item + description: Add a list of location levels to a inventory item. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item that the location is associated with. schema: type: string - - in: path - name: location_id + - name: location_id + in: path + description: The inventory item's location id. required: true - description: The ID of the Location to update. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - location level. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned location - level. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: >- ../components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml - x-codegen: - method: updateLocationLevel - queryParams: AdminPostInventoryItemsItemLocationLevelsLevelParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_inventory-items_{id}_location-levels_{location_id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_inventory-items_{id}_location-levels_{location_id}/post.tsx - lang: Shell label: cURL source: $ref: >- ../code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Inventory Items responses: '200': description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminInventoryItemsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -81,54 +50,39 @@ post: '500': $ref: ../components/responses/500_error.yaml delete: - operationId: DeleteInventoryItemsInventoryIteLocationLevelsLocation - summary: Delete a Location Level - description: Delete a location level of an Inventory Item. + operationId: DeleteInventoryItemsIdLocationLevelsLocation_id + summary: Remove Location Levels from Inventory Item + description: >- + Remove a list of location levels from a inventory item. This doesn't delete + the Location Level, only the association between the Location Level and the + inventory item. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The inventory item's ID. required: true - description: The ID of the Inventory Item. schema: type: string - - in: path - name: location_id + - name: location_id + in: path + description: The inventory item's location id. required: true - description: The ID of the location. schema: type: string - x-codegen: - method: deleteLocationLevel + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_inventory-items_{id}_location-levels_{location_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_inventory-items_{id}_location-levels_{location_id}/delete.tsx - lang: Shell label: cURL source: $ref: >- ../code_samples/Shell/admin_inventory-items_{id}_location-levels_{location_id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Inventory Items responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminInventoryItemsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -141,3 +95,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_invites.yaml b/www/apps/api-reference/specs/admin/paths/admin_invites.yaml index aa92017b26..c7fadba0ac 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_invites.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_invites.yaml @@ -1,32 +1,23 @@ get: operationId: GetInvites - summary: Lists Invites - description: Retrieve a list of invites. + summary: List Invites + description: >- + Retrieve a list of invites. The invites can be filtered by fields such as + `id`. The invites can also be sorted or paginated. x-authenticated: true - x-codegen: - method: list + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_invites/get.js - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_invites/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Invites responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminListInvitesRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -39,40 +30,28 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostInvites - summary: Create an Invite - description: >- - Create an Invite. This will generate a token associated with the invite and - trigger an `invite.created` event. If you have a Notification Provider - installed that handles this event, a notification should be sent to the - email associated with the invite to allow them to accept the invite. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostInvitesReq.yaml - x-codegen: - method: create + schema: {} +post: + operationId: PostInvites + summary: Create Invite + description: Create a invite. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_invites/post.js - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_invites/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Invites responses: - '200': - description: OK '400': $ref: ../components/responses/400_error.yaml '401': @@ -85,3 +64,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_invites_accept.yaml b/www/apps/api-reference/specs/admin/paths/admin_invites_accept.yaml index 2bb68b8d72..48794e3dd7 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_invites_accept.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_invites_accept.yaml @@ -1,40 +1,26 @@ post: - operationId: PostInvitesInviteAccept - summary: Accept an Invite - description: >- - Accept an Invite. This will also delete the invite and create a new user - that can log in and perform admin functionalities. The user will have the - email associated with the invite, and the password provided in the request - body. + operationId: PostInvitesAccept + summary: Create Invite + description: Create a invite. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: ../components/schemas/AdminPostInvitesInviteAcceptReq.yaml - x-codegen: - method: accept x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_invites_accept/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_invites_accept/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_invites_accept/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Invites responses: - '200': - description: OK '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_invites_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_invites_{id}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_invites_{id}.yaml rename to www/apps/api-reference/specs/admin/paths/admin_invites_{id}.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_invites_{id}_resend.yaml b/www/apps/api-reference/specs/admin/paths/admin_invites_{id}_resend.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_invites_{id}_resend.yaml rename to www/apps/api-reference/specs/admin/paths/admin_invites_{id}_resend.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_invites_{invite_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_invites_{invite_id}.yaml deleted file mode 100644 index ac7b1db6fe..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_invites_{invite_id}.yaml +++ /dev/null @@ -1,52 +0,0 @@ -delete: - operationId: DeleteInvitesInvite - summary: Delete an Invite - description: Delete an Invite. Only invites that weren't accepted can be deleted. - x-authenticated: true - parameters: - - in: path - name: invite_id - required: true - description: The ID of the Invite - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_invites_{invite_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_invites_{invite_id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_invites_{invite_id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Invites - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminInviteDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_invites_{invite_id}_resend.yaml b/www/apps/api-reference/specs/admin/paths/admin_invites_{invite_id}_resend.yaml deleted file mode 100644 index 694616e2c4..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_invites_{invite_id}_resend.yaml +++ /dev/null @@ -1,53 +0,0 @@ -post: - operationId: PostInvitesInviteResend - summary: Resend an Invite - description: >- - Resend an Invite. This renews the expiry date by 7 days and generates a new - token for the invite. It also triggers the `invite.created` event, so if you - have a Notification Provider installed that handles this event, a - notification should be sent to the email associated with the invite to allow - them to accept the invite. - x-authenticated: true - parameters: - - in: path - name: invite_id - required: true - description: The ID of the Invite - schema: - type: string - x-codegen: - method: resend - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_invites_{invite_id}_resend/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_invites_{invite_id}_resend/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_invites_{invite_id}_resend/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Invites - responses: - '200': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_notes.yaml b/www/apps/api-reference/specs/admin/paths/admin_notes.yaml deleted file mode 100644 index a992bb570b..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_notes.yaml +++ /dev/null @@ -1,116 +0,0 @@ -get: - operationId: GetNotes - summary: List Notes - x-authenticated: true - description: >- - Retrieve a list of notes. The notes can be filtered by fields such as - `resource_id`. The notes can also be paginated. - parameters: - - in: query - name: limit - description: Limit the number of notes returned. - schema: - type: number - default: '50' - - in: query - name: offset - description: The number of notes to skip when retrieving the notes. - schema: - type: number - default: '0' - - in: query - name: resource_id - description: Filter by resource ID - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetNotesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_notes/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_notes/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_notes/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notes - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminNotesListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostNotes - summary: Create a Note - description: Create a Note which can be associated with any resource. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostNotesReq.yaml - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_notes/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_notes/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_notes/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notes - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminNotesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_notes_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_notes_{id}.yaml deleted file mode 100644 index cd8dee5841..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_notes_{id}.yaml +++ /dev/null @@ -1,161 +0,0 @@ -get: - operationId: GetNotesNote - summary: Get a Note - description: Retrieve a note's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the note. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_notes_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_notes_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_notes_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notes - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminNotesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostNotesNote - summary: Update a Note - x-authenticated: true - description: Update a Note's details. - parameters: - - in: path - name: id - required: true - description: The ID of the Note - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostNotesNoteReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_notes_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_notes_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_notes_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notes - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminNotesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteNotesNote - summary: Delete a Note - description: Delete a Note. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Note to delete. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_notes_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_notes_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_notes_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notes - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminNotesDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_notifications.yaml b/www/apps/api-reference/specs/admin/paths/admin_notifications.yaml deleted file mode 100644 index c043b0a9c1..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_notifications.yaml +++ /dev/null @@ -1,110 +0,0 @@ -get: - operationId: GetNotifications - summary: List Notifications - description: >- - Retrieve a list of notifications. The notifications can be filtered by - fields such as `event_name` or `resource_type`. The notifications can also - be paginated. - x-authenticated: true - parameters: - - in: query - name: offset - description: >- - The number of inventory items to skip when retrieving the inventory - items. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of notifications returned. - schema: - type: integer - default: 50 - - in: query - name: fields - description: >- - Comma-separated fields that should be included in each returned - notification. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in each returned - notification. - schema: - type: string - - in: query - name: event_name - description: >- - Filter by the name of the event that triggered sending this - notification. - schema: - type: string - - in: query - name: resource_type - description: Filter by the resource type. - schema: - type: string - - in: query - name: resource_id - description: Filter by the resource ID. - schema: - type: string - - in: query - name: to - description: >- - Filter by the address that the Notification was sent to. This will - usually be an email address, but it can also represent other addresses - such as a chat bot user id. - schema: - type: string - - in: query - name: include_resends - description: >- - A boolean indicating whether the result set should include resent - notifications or not - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetNotificationsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_notifications/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_notifications/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_notifications/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notifications - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminNotificationsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_notifications_{id}_resend.yaml b/www/apps/api-reference/specs/admin/paths/admin_notifications_{id}_resend.yaml deleted file mode 100644 index 3e382de389..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_notifications_{id}_resend.yaml +++ /dev/null @@ -1,60 +0,0 @@ -post: - operationId: PostNotificationsNotificationResend - summary: Resend Notification - description: >- - Resend a previously sent notifications, with the same data but optionally to - a different address. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Notification - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostNotificationsNotificationResendReq.yaml - x-codegen: - method: resend - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_notifications_{id}_resend/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_notifications_{id}_resend/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_notifications_{id}_resend/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Notifications - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminNotificationsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_order-edits.yaml b/www/apps/api-reference/specs/admin/paths/admin_order-edits.yaml deleted file mode 100644 index 19a9334f27..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_order-edits.yaml +++ /dev/null @@ -1,135 +0,0 @@ -get: - operationId: GetOrderEdits - summary: List Order Edits - description: >- - Retrieve a list of order edits. The order edits can be filtered by fields - such as `q` or `order_id`. The order edits can also be paginated. - x-authenticated: true - parameters: - - in: query - name: q - description: term to search order edits' internal note. - schema: - type: string - - in: query - name: order_id - description: Filter by order ID - schema: - type: string - - in: query - name: limit - description: Limit the number of order edits returned. - schema: - type: number - default: '20' - - in: query - name: offset - description: The number of order edits to skip when retrieving the order edits. - schema: - type: number - default: '0' - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in each returned order - edit. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in each returned order - edit. - schema: - type: string - x-codegen: - method: list - queryParams: GetOrderEditsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_order-edits/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_order-edits/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_order-edits/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostOrderEdits - summary: Create an OrderEdit - description: Create an Order Edit. - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrderEditsReq.yaml - x-authenticated: true - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_order-edits/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_order-edits/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_order-edits/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}.yaml deleted file mode 100644 index d0c3ca3f2b..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}.yaml +++ /dev/null @@ -1,168 +0,0 @@ -get: - operationId: GetOrderEditsOrderEdit - summary: Get an Order Edit - description: Retrieve an Order Edit's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the OrderEdit. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in each returned order - edit. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned order - edit. - schema: - type: string - x-codegen: - method: retrieve - queryParams: GetOrderEditsOrderEditParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_order-edits_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_order-edits_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_order-edits_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostOrderEditsOrderEdit - summary: Update an Order Edit - description: Update an Order Edit's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the OrderEdit. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrderEditsOrderEditReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_order-edits_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_order-edits_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_order-edits_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteOrderEditsOrderEdit - summary: Delete an Order Edit - description: >- - Delete an Order Edit. Only order edits that have the status `created` can be - deleted. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit to delete. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_order-edits_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_order-edits_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_order-edits_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_cancel.yaml b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_cancel.yaml deleted file mode 100644 index fc42019072..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_cancel.yaml +++ /dev/null @@ -1,48 +0,0 @@ -post: - operationId: PostOrderEditsOrderEditCancel - summary: Cancel an Order Edit - description: Cancel an Order Edit. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the OrderEdit. - schema: - type: string - x-codegen: - method: cancel - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_order-edits_{id}_cancel/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_order-edits_{id}_cancel/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_order-edits_{id}_cancel/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_changes_{change_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_changes_{change_id}.yaml deleted file mode 100644 index fc15dc544b..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_changes_{change_id}.yaml +++ /dev/null @@ -1,53 +0,0 @@ -delete: - operationId: DeleteOrderEditsOrderEditItemChange - summary: Delete a Line Item Change - description: >- - Delete a line item change that indicates the addition, deletion, or update - of a line item in the original order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - - in: path - name: change_id - required: true - description: The ID of the Line Item Change to delete. - schema: - type: string - x-codegen: - method: deleteItemChange - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_order-edits_{id}_changes_{change_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_order-edits_{id}_changes_{change_id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_order-edits_{id}_changes_{change_id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditItemChangeDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_confirm.yaml b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_confirm.yaml deleted file mode 100644 index 8a2ae80f0b..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_confirm.yaml +++ /dev/null @@ -1,50 +0,0 @@ -post: - operationId: PostOrderEditsOrderEditConfirm - summary: Confirm an OrderEdit - description: >- - Confirm an Order Edit. This will reflect the changes in the order edit on - the associated order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the order edit. - schema: - type: string - x-codegen: - method: confirm - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_order-edits_{id}_confirm/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_order-edits_{id}_confirm/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_order-edits_{id}_confirm/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_items.yaml b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_items.yaml deleted file mode 100644 index becb950301..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_items.yaml +++ /dev/null @@ -1,60 +0,0 @@ -post: - operationId: PostOrderEditsEditLineItems - summary: Add a Line Item - description: >- - Create a line item change in the order edit that indicates adding an item in - the original order. The item will not be added to the original order until - the order edit is confirmed. - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrderEditsEditLineItemsReq.yaml - x-authenticated: true - x-codegen: - method: addLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_order-edits_{id}_items/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_order-edits_{id}_items/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_order-edits_{id}_items/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_items_{item_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_items_{item_id}.yaml deleted file mode 100644 index 93679eead3..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_items_{item_id}.yaml +++ /dev/null @@ -1,131 +0,0 @@ -post: - operationId: PostOrderEditsEditLineItemsLineItem - summary: Upsert Line Item Change - description: >- - Create or update a line item change in the order edit that indicates - addition, deletion, or update of a line item into an original order. Line - item changes are only reflected on the original order after the order edit - is confirmed. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - - in: path - name: item_id - required: true - description: The ID of the line item in the original order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostOrderEditsEditLineItemsLineItemReq.yaml - x-codegen: - method: updateLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_order-edits_{id}_items_{item_id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_order-edits_{id}_items_{item_id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_order-edits_{id}_items_{item_id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteOrderEditsOrderEditLineItemsLineItem - summary: Delete Line Item - description: >- - Create a line item change in the order edit that indicates deleting an item - in the original order. The item in the original order will not be deleted - until the order edit is confirmed. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - - in: path - name: item_id - required: true - description: The ID of line item in the original order. - schema: - type: string - x-codegen: - method: removeLineItem - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_order-edits_{id}_items_{item_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_order-edits_{id}_items_{item_id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_order-edits_{id}_items_{item_id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_request.yaml b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_request.yaml deleted file mode 100644 index febe4c4098..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_request.yaml +++ /dev/null @@ -1,51 +0,0 @@ -post: - operationId: PostOrderEditsOrderEditRequest - summary: Request Confirmation - description: >- - Request customer confirmation of an Order Edit. This would emit the event - `order-edit.requested` which Notification Providers listen to and send a - notification to the customer about the order edit. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - x-codegen: - method: requestConfirmation - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_order-edits_{id}_request/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_order-edits_{id}_request/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_order-edits_{id}_request/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders.yaml deleted file mode 100644 index 8c3956d279..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders.yaml +++ /dev/null @@ -1,263 +0,0 @@ -get: - operationId: GetOrders - summary: List Orders - description: >- - Retrieve a list of Orders. The orders can be filtered by fields such as - `status` or `display_id`. The order can also be paginated. - x-authenticated: true - parameters: - - in: query - name: q - description: >- - term to search orders' shipping address, first name, email, and display - ID - schema: - type: string - - in: query - name: id - description: Filter by ID. - schema: - type: string - - in: query - name: status - style: form - explode: false - description: Filter by status - schema: - type: array - items: - type: string - enum: - - pending - - completed - - archived - - canceled - - requires_action - - in: query - name: fulfillment_status - style: form - explode: false - description: Filter by fulfillment status - schema: - type: array - items: - type: string - enum: - - not_fulfilled - - fulfilled - - partially_fulfilled - - shipped - - partially_shipped - - canceled - - returned - - partially_returned - - requires_action - - in: query - name: payment_status - style: form - explode: false - description: Filter by payment status - schema: - type: array - items: - type: string - enum: - - captured - - awaiting - - not_paid - - refunded - - partially_refunded - - canceled - - requires_action - - in: query - name: display_id - description: Filter by display ID - schema: - type: string - - in: query - name: cart_id - description: Filter by cart ID - schema: - type: string - - in: query - name: customer_id - description: Filter by customer ID - schema: - type: string - - in: query - name: email - description: Filter by email - schema: - type: string - - in: query - name: region_id - style: form - explode: false - description: Filter by region IDs. - schema: - oneOf: - - type: string - description: ID of a Region. - - type: array - items: - type: string - description: ID of a Region. - - in: query - name: currency_code - style: form - explode: false - description: Filter by currency codes. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - - in: query - name: tax_rate - description: Filter by tax rate. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: canceled_at - description: Filter by a cancelation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: sales_channel_id - style: form - explode: false - description: Filter by Sales Channel IDs - schema: - type: array - items: - type: string - description: The ID of a Sales Channel - - in: query - name: offset - description: The number of orders to skip when retrieving the orders. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of orders returned. - schema: - type: integer - default: 50 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - - in: query - name: order - description: Field to sort retrieved orders by. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetOrdersParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}.yaml deleted file mode 100644 index e7dc8f5f30..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}.yaml +++ /dev/null @@ -1,131 +0,0 @@ -get: - operationId: GetOrdersOrder - summary: Get an Order - description: Retrieve an Order's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetOrdersOrderParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostOrdersOrder - summary: Update an Order - description: Update and order's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrdersOrderReq.yaml - x-codegen: - method: update - params: AdminPostOrdersOrderParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_archive.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_archive.yaml deleted file mode 100644 index df799a3349..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_archive.yaml +++ /dev/null @@ -1,63 +0,0 @@ -post: - operationId: PostOrdersOrderArchive - summary: Archive Order - description: Archive an order and change its status. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: archive - params: AdminPostOrdersOrderArchiveParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_archive/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_archive/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_archive/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_cancel.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_cancel.yaml deleted file mode 100644 index 01d027a2aa..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_cancel.yaml +++ /dev/null @@ -1,66 +0,0 @@ -post: - operationId: PostOrdersOrderCancel - summary: Cancel an Order - description: >- - Cancel an order and change its status. This will also cancel any associated - Fulfillments and Payments, and it may fail if the Payment or Fulfillment - Provider is unable to cancel the Payment/Fulfillment. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancel - params: AdminPostOrdersOrderCancel - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_cancel/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_cancel/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_cancel/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_capture.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_capture.yaml deleted file mode 100644 index 25d0568742..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_capture.yaml +++ /dev/null @@ -1,65 +0,0 @@ -post: - operationId: PostOrdersOrderCapture - summary: Capture an Order's Payments - description: >- - Capture all the Payments associated with an Order. The payment of canceled - orders can't be captured. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: capturePayment - params: AdminPostOrdersOrderCaptureParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_capture/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_capture/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_capture/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims.yaml deleted file mode 100644 index 7e042dbdf4..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims.yaml +++ /dev/null @@ -1,74 +0,0 @@ -post: - operationId: PostOrdersOrderClaims - summary: Create a Claim - description: >- - Create a Claim for an order. If a return shipping method is specified, a - return will also be created and associated with the claim. If the claim's - type is `refund`, the refund is processed as well. - externalDocs: - description: How are claims created - url: https://docs.medusajs.com/modules/orders/claims#how-are-claims-created - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrdersOrderClaimsReq.yaml - x-codegen: - method: createClaim - params: AdminPostOrdersOrderClaimsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_claims/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_claims/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_claims/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}.yaml deleted file mode 100644 index fba41972fe..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}.yaml +++ /dev/null @@ -1,74 +0,0 @@ -post: - operationId: PostOrdersOrderClaimsClaim - summary: Update a Claim - description: Update a Claim's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order associated with the claim. - schema: - type: string - - in: path - name: claim_id - required: true - description: The ID of the Claim. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrdersOrderClaimsClaimReq.yaml - x-codegen: - method: updateClaim - params: AdminPostOrdersOrderClaimsClaimParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_claims_{claim_id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_claims_{claim_id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_cancel.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_cancel.yaml deleted file mode 100644 index b76b555a22..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_cancel.yaml +++ /dev/null @@ -1,78 +0,0 @@ -post: - operationId: PostOrdersClaimCancel - summary: Cancel a Claim - description: >- - Cancel a Claim and change its status. A claim can't be canceled if it has a - refund, if its fulfillments haven't been canceled, of if its associated - return hasn't been canceled. - x-authenticated: true - externalDocs: - description: Canceling a claim - url: https://docs.medusajs.com/modules/orders/claims#cancel-a-claim - parameters: - - in: path - name: id - required: true - description: The ID of the order the claim is associated with. - schema: - type: string - - in: path - name: claim_id - required: true - description: The ID of the Claim. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancelClaim - params: AdminPostOrdersClaimCancel - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_cancel/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_orders_{id}_claims_{claim_id}_cancel/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_orders_{id}_claims_{claim_id}_cancel/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_fulfillments.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_fulfillments.yaml deleted file mode 100644 index 104e29b9f7..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_fulfillments.yaml +++ /dev/null @@ -1,85 +0,0 @@ -post: - operationId: PostOrdersOrderClaimsClaimFulfillments - summary: Create a Claim Fulfillment - description: >- - Create a Fulfillment for a Claim, and change its fulfillment status to - `partially_fulfilled` or `fulfilled` depending on whether all the items were - fulfilled. It may also change the status to `requires_action` if any actions - are required. - x-authenticated: true - externalDocs: - description: Fulfill a claim - url: https://docs.medusajs.com/modules/orders/claims#fulfill-a-claim - parameters: - - in: path - name: id - required: true - description: The ID of the Order the claim is associated with. - schema: - type: string - - in: path - name: claim_id - required: true - description: The ID of the Claim. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostOrdersOrderClaimsClaimFulfillmentsReq.yaml - x-codegen: - method: fulfillClaim - params: AdminPostOrdersOrderClaimsClaimFulfillmentsReq - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_fulfillments/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_orders_{id}_claims_{claim_id}_fulfillments/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_orders_{id}_claims_{claim_id}_fulfillments/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel.yaml deleted file mode 100644 index 9e3c2b5bc5..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel.yaml +++ /dev/null @@ -1,80 +0,0 @@ -post: - operationId: PostOrdersClaimFulfillmentsCancel - summary: Cancel Claim's Fulfillment - description: >- - Cancel a claim's fulfillment and change its fulfillment status to - `canceled`. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the order the claim is associated with. - schema: - type: string - - in: path - name: claim_id - required: true - description: The ID of the claim. - schema: - type: string - - in: path - name: fulfillment_id - required: true - description: The ID of the fulfillment. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancelClaimFulfillment - params: AdminPostOrdersClaimFulfillmentsCancelParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_orders_{id}_claims_{claim_id}_fulfillments_{fulfillment_id}_cancel/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_shipments.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_shipments.yaml deleted file mode 100644 index 41bef37cee..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_claims_{claim_id}_shipments.yaml +++ /dev/null @@ -1,84 +0,0 @@ -post: - operationId: PostOrdersOrderClaimsClaimShipments - summary: Ship a Claim's Fulfillment - description: >- - Create a shipment for the claim and mark its fulfillment as shipped. This - changes the claim's fulfillment status to either `partially_shipped` or - `shipped`, depending on whether all the items were shipped. - x-authenticated: true - externalDocs: - description: Fulfill a claim - url: https://docs.medusajs.com/modules/orders/claims#fulfill-a-claim - parameters: - - in: path - name: id - required: true - description: The ID of the Order the claim is associated with. - schema: - type: string - - in: path - name: claim_id - required: true - description: The ID of the Claim. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostOrdersOrderClaimsClaimShipmentsReq.yaml - x-codegen: - method: createClaimShipment - params: AdminPostOrdersOrderClaimsClaimShipmentsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_orders_{id}_claims_{claim_id}_shipments/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_orders_{id}_claims_{claim_id}_shipments/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_orders_{id}_claims_{claim_id}_shipments/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_complete.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_complete.yaml deleted file mode 100644 index 08a987bb82..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_complete.yaml +++ /dev/null @@ -1,65 +0,0 @@ -post: - operationId: PostOrdersOrderComplete - summary: Complete an Order - description: >- - Complete an Order and change its status. A canceled order can't be - completed. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: complete - params: AdminPostOrdersOrderCompleteParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_complete/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_complete/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_complete/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_fulfillment.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_fulfillment.yaml deleted file mode 100644 index d09ab05cec..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_fulfillment.yaml +++ /dev/null @@ -1,74 +0,0 @@ -post: - operationId: PostOrdersOrderFulfillments - summary: Create a Fulfillment - description: >- - Create a Fulfillment of an Order using the fulfillment provider, and change - the order's fulfillment status to either `partially_fulfilled` or - `fulfilled`, depending on whether all the items were fulfilled. - x-authenticated: true - externalDocs: - description: Fulfillments of orders - url: https://docs.medusajs.com/modules/orders/#fulfillments-in-orders - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrdersOrderFulfillmentsReq.yaml - x-codegen: - method: createFulfillment - params: AdminPostOrdersOrderFulfillmentsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_fulfillment/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_fulfillment/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_fulfillment/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel.yaml deleted file mode 100644 index 33db86d4c9..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel.yaml +++ /dev/null @@ -1,74 +0,0 @@ -post: - operationId: PostOrdersOrderFulfillmentsCancel - summary: Cancel a Fulfilmment - description: >- - Cancel an order's fulfillment and change its fulfillment status to - `canceled`. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: path - name: fulfillment_id - required: true - description: The ID of the Fulfillment. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancelFulfillment - params: AdminPostOrdersOrderFulfillementsCancelParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_line-items_{line_item_id}_reserve.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_line-items_{line_item_id}_reserve.yaml deleted file mode 100644 index 60715c3b4b..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_line-items_{line_item_id}_reserve.yaml +++ /dev/null @@ -1,56 +0,0 @@ -post: - operationId: PostOrdersOrderLineItemReservations - summary: Create a Reservation - description: >- - Create a Reservation for a line item at a specified location, optionally for - a partial quantity. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: path - name: line_item_id - required: true - description: The ID of the Line item. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersOrderLineItemReservationReq.yaml - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_orders_{id}_line-items_{line_item_id}_reserve/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostReservationsReq.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_refund.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_refund.yaml deleted file mode 100644 index 424a18ee97..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_refund.yaml +++ /dev/null @@ -1,70 +0,0 @@ -post: - operationId: PostOrdersOrderRefunds - summary: Create a Refund - description: >- - Refund an amount for an order. The amount must be less than or equal the - `refundable_amount` of the order. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrdersOrderRefundsReq.yaml - x-codegen: - method: refundPayment - params: AdminPostOrdersOrderRefundsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_refund/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_refund/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_refund/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_reservations.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_reservations.yaml deleted file mode 100644 index 51964c3b6f..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_reservations.yaml +++ /dev/null @@ -1,54 +0,0 @@ -get: - operationId: GetOrdersOrderReservations - summary: Get Order Reservations - description: Retrieve the list of reservations of an Order - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: offset - description: The number of reservations to skip when retrieving the reservations. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of reservations returned. - schema: - type: integer - default: 20 - x-codeSamples: - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_reservations/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReservationsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_return.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_return.yaml deleted file mode 100644 index 3c4a04485a..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_return.yaml +++ /dev/null @@ -1,73 +0,0 @@ -post: - operationId: PostOrdersOrderReturns - summary: Request a Return - description: >- - Request and create a Return for items in an order. If the return shipping - method is specified, it will be automatically fulfilled. - x-authenticated: true - externalDocs: - description: Return creation process - url: https://docs.medusajs.com/modules/orders/returns#returns-process - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrdersOrderReturnsReq.yaml - x-codegen: - method: requestReturn - params: AdminPostOrdersOrderReturnsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_return/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_return/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_return/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_shipment.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_shipment.yaml deleted file mode 100644 index ab895f771a..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_shipment.yaml +++ /dev/null @@ -1,74 +0,0 @@ -post: - operationId: PostOrdersOrderShipment - summary: Ship a Fulfillment - description: >- - Create a shipment and mark a fulfillment as shipped. This changes the - order's fulfillment status to either `partially_shipped` or `shipped`, - depending on whether all the items were shipped. - x-authenticated: true - externalDocs: - description: Fulfillments of orders - url: https://docs.medusajs.com/modules/orders/#fulfillments-in-orders - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrdersOrderShipmentReq.yaml - x-codegen: - method: createShipment - params: AdminPostOrdersOrderShipmentParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_shipment/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_shipment/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_shipment/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_shipping-methods.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_shipping-methods.yaml deleted file mode 100644 index 7af83bc1c5..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_shipping-methods.yaml +++ /dev/null @@ -1,70 +0,0 @@ -post: - operationId: PostOrdersOrderShippingMethods - summary: Add a Shipping Method - description: >- - Add a Shipping Method to an Order. If another Shipping Method exists with - the same Shipping Profile, the previous Shipping Method will be replaced. - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrdersOrderShippingMethodsReq.yaml - x-authenticated: true - x-codegen: - method: addShippingMethod - params: AdminPostOrdersOrderShippingMethodsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_shipping-methods/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_shipping-methods/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_shipping-methods/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps.yaml deleted file mode 100644 index 8dbd5f5d89..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps.yaml +++ /dev/null @@ -1,73 +0,0 @@ -post: - operationId: PostOrdersOrderSwaps - summary: Create a Swap - description: >- - Create a Swap. This includes creating a return that is associated with the - swap. - x-authenticated: true - externalDocs: - description: How are swaps created - url: https://docs.medusajs.com/modules/orders/swaps#how-are-swaps-created - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrdersOrderSwapsReq.yaml - x-codegen: - method: createSwap - queryParams: AdminPostOrdersOrderSwapsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_orders_{id}_swaps/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_swaps/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_swaps/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_cancel.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_cancel.yaml deleted file mode 100644 index 0329a44efd..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_cancel.yaml +++ /dev/null @@ -1,73 +0,0 @@ -post: - operationId: PostOrdersSwapCancel - summary: Cancel a Swap - description: Cancel a Swap and change its status. - x-authenticated: true - externalDocs: - description: Canceling a swap - url: https://docs.medusajs.com/modules/orders/swaps#canceling-a-swap - parameters: - - in: path - name: id - required: true - description: The ID of the Order the swap is associated with. - schema: - type: string - - in: path - name: swap_id - required: true - description: The ID of the Swap. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancelSwap - params: AdminPostOrdersSwapCancelParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_cancel/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_cancel/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_cancel/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_fulfillments.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_fulfillments.yaml deleted file mode 100644 index ddbdd23177..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_fulfillments.yaml +++ /dev/null @@ -1,84 +0,0 @@ -post: - operationId: PostOrdersOrderSwapsSwapFulfillments - summary: Create a Swap Fulfillment - description: >- - Create a Fulfillment for a Swap and change its fulfillment status to - `fulfilled`. If it requires any additional actions, its fulfillment status - may change to `requires_action`. - x-authenticated: true - externalDocs: - description: Handling a swap's fulfillment - url: https://docs.medusajs.com/modules/orders/swaps#handling-swap-fulfillment - parameters: - - in: path - name: id - required: true - description: The ID of the Order the swap is associated with. - schema: - type: string - - in: path - name: swap_id - required: true - description: The ID of the Swap. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostOrdersOrderSwapsSwapFulfillmentsReq.yaml - x-codegen: - method: fulfillSwap - params: AdminPostOrdersOrderSwapsSwapFulfillmentsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_fulfillments/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel.yaml deleted file mode 100644 index 799a798833..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel.yaml +++ /dev/null @@ -1,78 +0,0 @@ -post: - operationId: PostOrdersSwapFulfillmentsCancel - summary: Cancel Swap's Fulfilmment - description: Cancel a swap's fulfillment and change its fulfillment status to `canceled`. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the order the swap is associated with. - schema: - type: string - - in: path - name: swap_id - required: true - description: The ID of the swap. - schema: - type: string - - in: path - name: fulfillment_id - required: true - description: The ID of the fulfillment. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: cancelSwapFulfillment - params: AdminPostOrdersSwapFulfillementsCancelParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_fulfillments_{fulfillment_id}_cancel/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_process-payment.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_process-payment.yaml deleted file mode 100644 index e6fe219307..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_process-payment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -post: - operationId: PostOrdersOrderSwapsSwapProcessPayment - summary: Process a Swap Payment - description: >- - Process a swap's payment either by refunding or issuing a payment. This - depends on the `difference_due` of the swap. If `difference_due` is - negative, the amount is refunded. If `difference_due` is positive, the - amount is captured. - x-authenticated: true - externalDocs: - description: Handling a swap's payment - url: https://docs.medusajs.com/modules/orders/swaps#handling-swap-payment - parameters: - - in: path - name: id - required: true - description: The ID of the order the swap is associated with. - schema: - type: string - - in: path - name: swap_id - required: true - description: The ID of the swap. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - x-codegen: - method: processSwapPayment - params: AdminPostOrdersOrderSwapsSwapProcessPaymentParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_process-payment/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_process-payment/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_process-payment/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_shipments.yaml b/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_shipments.yaml deleted file mode 100644 index 2ff1fc3202..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_orders_{id}_swaps_{swap_id}_shipments.yaml +++ /dev/null @@ -1,83 +0,0 @@ -post: - operationId: PostOrdersOrderSwapsSwapShipments - summary: Ship a Swap's Fulfillment - description: >- - Create a shipment for a swap and mark its fulfillment as shipped. This - changes the swap's fulfillment status to either `partially_shipped` or - `shipped`, depending on whether all the items were shipped. - x-authenticated: true - externalDocs: - description: Handling swap fulfillments - url: https://docs.medusajs.com/modules/orders/swaps#handling-swap-fulfillment - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: path - name: swap_id - required: true - description: The ID of the Swap. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned order. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostOrdersOrderSwapsSwapShipmentsReq.yaml - x-codegen: - method: createSwapShipment - params: AdminPostOrdersOrderSwapsSwapShipmentsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_orders_{id}_swaps_{swap_id}_shipments/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_orders_{id}_swaps_{swap_id}_shipments/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_orders_{id}_swaps_{swap_id}_shipments/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_payment-collections_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_payment-collections_{id}.yaml deleted file mode 100644 index 2fa9a1dd1a..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_payment-collections_{id}.yaml +++ /dev/null @@ -1,170 +0,0 @@ -get: - operationId: GetPaymentCollectionsPaymentCollection - summary: Get a Payment Collection - description: Retrieve a Payment Collection's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - payment collection. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned payment - collection. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetPaymentCollectionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_payment-collections_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_payment-collections_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_payment-collections_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPaymentCollectionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostPaymentCollectionsPaymentCollection - summary: Update Payment Collection - description: Update a Payment Collection's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminUpdatePaymentCollectionsReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_payment-collections_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_payment-collections_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_payment-collections_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPaymentCollectionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeletePaymentCollectionsPaymentCollection - summary: Delete a Payment Collection - description: >- - Delete a Payment Collection. Only payment collections with the statuses - `canceled` or `not_paid` can be deleted. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_payment-collections_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_payment-collections_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_payment-collections_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPaymentCollectionDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_payment-collections_{id}_authorize.yaml b/www/apps/api-reference/specs/admin/paths/admin_payment-collections_{id}_authorize.yaml deleted file mode 100644 index 0a2ea66422..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_payment-collections_{id}_authorize.yaml +++ /dev/null @@ -1,55 +0,0 @@ -post: - operationId: PostPaymentCollectionsPaymentCollectionAuthorize - summary: Mark Authorized - description: >- - Set the status of a Payment Collection as `authorized`. This will also - change the `authorized_amount` of the payment collection. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - x-codegen: - method: markAsAuthorized - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_payment-collections_{id}_authorize/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_payment-collections_{id}_authorize/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_payment-collections_{id}_authorize/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPaymentCollectionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_payments.yaml b/www/apps/api-reference/specs/admin/paths/admin_payments.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_payments.yaml rename to www/apps/api-reference/specs/admin/paths/admin_payments.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_payments_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_payments_{id}.yaml index 5e4970311d..3645a7b963 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_payments_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_payments_{id}.yaml @@ -1,44 +1,29 @@ get: - operationId: GetPaymentsPayment - summary: Get Payment details - description: Retrieve a Payment's details. + operationId: GetPaymentsId + summary: Get a Payment + description: >- + Retrieve a payment by its ID. You can expand the payment's relations or + select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The payment's ID. required: true - description: The ID of the Payment. schema: type: string - x-codegen: - method: retrieve - queryParams: GetPaymentsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_payments_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_payments_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_payments_{id}/get.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_payments_{id}/get.sh tags: - Payments responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPaymentRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -51,3 +36,7 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_payments_{id}_capture.yaml b/www/apps/api-reference/specs/admin/paths/admin_payments_{id}_capture.yaml index c85f6e22f4..351b9a32fc 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_payments_{id}_capture.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_payments_{id}_capture.yaml @@ -1,43 +1,32 @@ post: - operationId: PostPaymentsPaymentCapture - summary: Capture a Payment - description: Capture a Payment. + operationId: PostPaymentsIdCapture + summary: Add Captures to Payment + description: Add a list of captures to a payment. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The payment's ID. required: true - description: The ID of the Payment. schema: type: string - x-codegen: - method: capturePayment - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_payments_{id}_capture/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_payments_{id}_capture/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_payments_{id}_capture/post.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: ../components/schemas/AdminPostPaymentsCapturesReq.yaml + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_payments_{id}_capture/post.sh tags: - Payments responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPaymentRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/admin/paths/admin_payments_{id}_refund.yaml b/www/apps/api-reference/specs/admin/paths/admin_payments_{id}_refund.yaml index 8cfee91bd0..198385879d 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_payments_{id}_refund.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_payments_{id}_refund.yaml @@ -1,48 +1,32 @@ post: - operationId: PostPaymentsPaymentRefunds - summary: Refund Payment - description: Refund a payment. The payment must be captured first. + operationId: PostPaymentsIdRefund + summary: Add Refunds to Payment + description: Add a list of refunds to a payment. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The payment's ID. required: true - description: The ID of the Payment. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostPaymentRefundsReq.yaml - x-codegen: - method: refundPayment - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_payments_{id}_refund/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_payments_{id}_refund/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_payments_{id}_refund/post.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: ../components/schemas/AdminPostPaymentsRefundsReq.yaml + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_payments_{id}_refund/post.sh tags: - Payments responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRefundRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/admin/paths/admin_price-lists.yaml b/www/apps/api-reference/specs/admin/paths/admin_price-lists.yaml index 521e7e2d0b..71af97f809 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_price-lists.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_price-lists.yaml @@ -3,185 +3,21 @@ get: summary: List Price Lists description: >- Retrieve a list of price lists. The price lists can be filtered by fields - such as `q` or `status`. The price lists can also be sorted or paginated. + such as `id`. The price lists can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: limit - description: Limit the number of price lists returned. - schema: - type: number - default: '10' - - in: query - name: offset - description: The number of price lists to skip when retrieving the price lists. - schema: - type: number - default: '0' - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned price - lists. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned price - lists. - schema: - type: string - - in: query - name: order - description: A price-list field to sort-order the retrieved price lists by. - schema: - type: string - - in: query - name: id - description: Filter by ID - schema: - type: string - - in: query - name: q - description: >- - term to search price lists' description, name, and customer group's - name. - schema: - type: string - - in: query - name: status - style: form - explode: false - description: Filter by status. - schema: - type: array - items: - type: string - enum: - - active - - draft - - in: query - name: name - description: Filter by name - schema: - type: string - - in: query - name: customer_groups - style: form - explode: false - description: Filter by customer-group IDs. - schema: - type: array - items: - type: string - - in: query - name: type - style: form - explode: false - description: Filter by type. - schema: - type: array - items: - type: string - enum: - - sale - - override - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetPriceListPaginationParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_price-lists/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_price-lists/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_price-lists/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPriceListsListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -194,44 +30,33 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} post: - operationId: PostPriceListsPriceList - summary: Create a Price List - description: Create a Price List. + operationId: PostPriceLists + summary: Create Price List + description: Create a price list. x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: - $ref: ../components/schemas/AdminPostPriceListsPriceListReq.yaml - x-codegen: - method: create + $ref: ../components/schemas/AdminPostPriceListsReq.yaml x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_price-lists/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_price-lists/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_price-lists/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPriceListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}.yaml index b51a93221e..ba9185e216 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}.yaml @@ -1,43 +1,29 @@ get: - operationId: GetPriceListsPriceList + operationId: GetPriceListsId summary: Get a Price List - description: Retrieve a Price List's details. + description: >- + Retrieve a price list by its ID. You can expand the price list's relations + or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The price list's ID. required: true - description: The ID of the Price List. schema: type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_price-lists_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_price-lists_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_price-lists_{id}/get.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_price-lists_{id}/get.sh tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPriceListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -50,51 +36,39 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostPriceListsPriceListPriceList - summary: Update a Price List - description: Update a Price List's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Price List. - schema: - type: string requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostPriceListsPriceListPriceListReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_price-lists_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_price-lists_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_price-lists_{id}/post.sh + schema: {} +post: + operationId: PostPriceListsId + summary: Update a Price List + description: Update a price list's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The price list's ID. + required: true + schema: + type: string security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: ../components/schemas/AdminPostPriceListsPriceListReq.yaml + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_price-lists_{id}/post.sh tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPriceListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -108,45 +82,29 @@ post: '500': $ref: ../components/responses/500_error.yaml delete: - operationId: DeletePriceListsPriceList + operationId: DeletePriceListsId summary: Delete a Price List - description: Delete a Price List and its associated prices. + description: Delete a price list. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The price list's ID. required: true - description: The ID of the Price List. schema: type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_price-lists_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_price-lists_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_price-lists_{id}/delete.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_price-lists_{id}/delete.sh tags: - Price Lists responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPriceListDeleteRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -159,3 +117,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_prices_batch.yaml b/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_prices_batch.yaml deleted file mode 100644 index f0aa4ca243..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_prices_batch.yaml +++ /dev/null @@ -1,115 +0,0 @@ -post: - operationId: PostPriceListsPriceListPricesBatch - summary: Add or Update Prices - description: Add or update a list of prices in a Price List. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Price List. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostPriceListPricesPricesReq.yaml - x-codegen: - method: addPrices - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_price-lists_{id}_prices_batch/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_price-lists_{id}_prices_batch/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_price-lists_{id}_prices_batch/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Price Lists - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPriceListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeletePriceListsPriceListPricesBatch - summary: Delete Prices - description: Delete a list of prices in a Price List - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Price List - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminDeletePriceListPricesPricesReq.yaml - x-codegen: - method: deletePrices - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_price-lists_{id}_prices_batch/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_price-lists_{id}_prices_batch/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_price-lists_{id}_prices_batch/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Price Lists - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPriceListDeleteBatchRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_price-lists_{id}_prices_batch_add.yaml b/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_prices_batch_add.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_price-lists_{id}_prices_batch_add.yaml rename to www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_prices_batch_add.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_price-lists_{id}_prices_batch_remove.yaml b/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_prices_batch_remove.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_price-lists_{id}_prices_batch_remove.yaml rename to www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_prices_batch_remove.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_products.yaml b/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_products.yaml deleted file mode 100644 index e2acf32fb2..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_products.yaml +++ /dev/null @@ -1,231 +0,0 @@ -get: - operationId: GetPriceListsPriceListProducts - summary: List Products - description: >- - Retrieve a price list's products. The products can be filtered by fields - such as `q` or `status`. The products can also be sorted or paginated. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: ID of the price list. - schema: - type: string - - in: query - name: q - description: >- - term used to search products' title, description, product variant's - title and sku, and product collection's title. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by product IDs. - schema: - oneOf: - - type: string - description: ID of the product. - - type: array - items: - type: string - description: ID of a product. - - in: query - name: status - description: Filter by product status - style: form - explode: false - schema: - type: array - items: - type: string - enum: - - draft - - proposed - - published - - rejected - - in: query - name: collection_id - description: >- - Filter by product collection ID. Only products in the specified - collections are retrieved. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: tags - description: >- - Filter by tag IDs. Only products having the specified tags are - retrieved. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: title - description: Filter by title - schema: - type: string - - in: query - name: description - description: Filter by description - schema: - type: string - - in: query - name: handle - description: Filter by handle - schema: - type: string - - in: query - name: is_giftcard - description: A boolean value to filter by whether the product is a gift card or not. - schema: - type: boolean - - in: query - name: type - description: Filter product type. - schema: - type: string - - in: query - name: order - description: A product field to sort-order the retrieved products by. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of products to skip when retrieving the products. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of products returned. - schema: - type: integer - default: 50 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - products. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned products. - schema: - type: string - x-codegen: - method: listProducts - queryParams: AdminGetPriceListsPriceListProductsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_price-lists_{id}_products/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_price-lists_{id}_products/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_price-lists_{id}_products/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Price Lists - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPriceListsProductsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_products_prices_batch.yaml b/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_products_prices_batch.yaml deleted file mode 100644 index b6517fe03b..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_products_prices_batch.yaml +++ /dev/null @@ -1,55 +0,0 @@ -delete: - operationId: DeletePriceListsPriceListProductsPricesBatch - summary: Delete Product Prices - description: Delete all the prices associated with multiple products in a price list. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Price List - schema: - type: string - x-codegen: - method: deleteProductsPrices - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_price-lists_{id}_products_prices_batch/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_price-lists_{id}_products_prices_batch/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_price-lists_{id}_products_prices_batch/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Price Lists - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPriceListDeleteProductPricesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_products_{product_id}_prices.yaml b/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_products_{product_id}_prices.yaml deleted file mode 100644 index 89253deeb0..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_products_{product_id}_prices.yaml +++ /dev/null @@ -1,61 +0,0 @@ -delete: - operationId: DeletePriceListsPriceListProductsProductPrices - summary: Delete a Product's Prices - description: Delete all the prices related to a specific product in a price list. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Price List. - schema: - type: string - - in: path - name: product_id - required: true - description: The ID of the product from which the prices will be deleted. - schema: - type: string - x-codegen: - method: deleteProductPrices - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_price-lists_{id}_products_{product_id}_prices/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_price-lists_{id}_products_{product_id}_prices/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_price-lists_{id}_products_{product_id}_prices/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Price Lists - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPriceListDeleteProductPricesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_variants_{variant_id}_prices.yaml b/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_variants_{variant_id}_prices.yaml deleted file mode 100644 index e2ec2c1837..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_price-lists_{id}_variants_{variant_id}_prices.yaml +++ /dev/null @@ -1,61 +0,0 @@ -delete: - operationId: DeletePriceListsPriceListVariantsVariantPrices - summary: Delete a Variant's Prices - description: Delete all the prices related to a specific variant in a price list. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Price List. - schema: - type: string - - in: path - name: variant_id - required: true - description: The ID of the variant. - schema: - type: string - x-codegen: - method: deleteVariantPrices - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_price-lists_{id}_variants_{variant_id}_prices/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_price-lists_{id}_variants_{variant_id}_prices/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_price-lists_{id}_variants_{variant_id}_prices/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Price Lists - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPriceListDeleteVariantPricesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_pricing_rule-types.yaml b/www/apps/api-reference/specs/admin/paths/admin_pricing_rule-types.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_pricing_rule-types.yaml rename to www/apps/api-reference/specs/admin/paths/admin_pricing_rule-types.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_pricing_rule-types_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_pricing_rule-types_{id}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_pricing_rule-types_{id}.yaml rename to www/apps/api-reference/specs/admin/paths/admin_pricing_rule-types_{id}.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_product-categories.yaml b/www/apps/api-reference/specs/admin/paths/admin_product-categories.yaml deleted file mode 100644 index 3b69348c96..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_product-categories.yaml +++ /dev/null @@ -1,178 +0,0 @@ -get: - operationId: GetProductCategories - summary: List Product Categories - description: >- - Retrieve a list of product categories. The product categories can be - filtered by fields such as `q` or `handle`. The product categories can also - be paginated. - x-authenticated: true - x-featureFlag: product_categories - parameters: - - in: query - name: q - description: term to search product categories' names and handles. - schema: - type: string - - in: query - name: handle - description: Filter by handle. - schema: - type: string - - in: query - name: is_internal - description: Filter by whether the category is internal or not. - schema: - type: boolean - - in: query - name: is_active - description: Filter by whether the category is active or not. - schema: - type: boolean - - in: query - name: include_descendants_tree - description: >- - If set to `true`, all nested descendants of a category are included in - the response. - schema: - type: boolean - - in: query - name: parent_category_id - description: Filter by the ID of a parent category. - schema: - type: string - - in: query - name: offset - description: >- - The number of product categories to skip when retrieving the product - categories. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of product categories returned. - schema: - type: integer - default: 100 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - product categories. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned product - categories. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetProductCategoriesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_product-categories/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_product-categories/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_product-categories/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductCategoriesListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostProductCategories - summary: Create a Product Category - description: Create a Product Category. - x-authenticated: true - x-featureFlag: product_categories - parameters: - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - product category. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned product - category. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostProductCategoriesReq.yaml - x-codegen: - method: create - queryParams: AdminPostProductCategoriesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_product-categories/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_product-categories/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_product-categories/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductCategoriesCategoryRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_product-categories_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_product-categories_{id}.yaml deleted file mode 100644 index 89d2f617e0..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_product-categories_{id}.yaml +++ /dev/null @@ -1,194 +0,0 @@ -get: - operationId: GetProductCategoriesCategory - summary: Get a Product Category - description: Retrieve a Product Category's details. - x-authenticated: true - x-featureFlag: product_categories - parameters: - - in: path - name: id - required: true - description: The ID of the Product Category - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - product category. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned product - category. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetProductCategoryParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_product-categories_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_product-categories_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_product-categories_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductCategoriesCategoryRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostProductCategoriesCategory - summary: Update a Product Category - description: Updates a Product Category. - x-authenticated: true - x-featureFlag: product_categories - parameters: - - in: path - name: id - required: true - description: The ID of the Product Category. - schema: - type: string - - in: query - name: expand - description: >- - (Comma separated) Which fields should be expanded in each product - category. - schema: - type: string - - in: query - name: fields - description: >- - (Comma separated) Which fields should be retrieved in each product - category. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostProductCategoriesCategoryReq.yaml - x-codegen: - method: update - queryParams: AdminPostProductCategoriesCategoryParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_product-categories_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_product-categories_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_product-categories_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductCategoriesCategoryRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteProductCategoriesCategory - summary: Delete a Product Category - description: Delete a Product Category. This does not delete associated products. - x-authenticated: true - x-featureFlag: product_categories - parameters: - - in: path - name: id - required: true - description: The ID of the Product Category - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_product-categories_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_product-categories_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_product-categories_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductCategoriesCategoryDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_product-categories_{id}_products_batch.yaml b/www/apps/api-reference/specs/admin/paths/admin_product-categories_{id}_products_batch.yaml deleted file mode 100644 index ff56628e8a..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_product-categories_{id}_products_batch.yaml +++ /dev/null @@ -1,154 +0,0 @@ -post: - operationId: PostProductCategoriesCategoryProductsBatch - summary: Add Products to a Category - description: Add a list of products to a product category. - x-authenticated: true - x-featureFlag: product_categories - parameters: - - in: path - name: id - required: true - description: The ID of the Product Category. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - product category. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned product - category. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostProductCategoriesCategoryProductsBatchReq.yaml - x-codegen: - method: addProducts - queryParams: AdminPostProductCategoriesCategoryProductsBatchParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_product-categories_{id}_products_batch/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_product-categories_{id}_products_batch/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_product-categories_{id}_products_batch/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductCategoriesCategoryRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteProductCategoriesCategoryProductsBatch - summary: Remove Products from Category - description: Remove a list of products from a product category. - x-authenticated: true - x-featureFlag: product_categories - parameters: - - in: path - name: id - required: true - description: The ID of the Product Category. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - product category. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned product - category. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminDeleteProductCategoriesCategoryProductsBatchReq.yaml - x-codegen: - method: removeProducts - queryParams: AdminDeleteProductCategoriesCategoryProductsBatchParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_product-categories_{id}_products_batch/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_product-categories_{id}_products_batch/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_product-categories_{id}_products_batch/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductCategoriesCategoryRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_product-tags.yaml b/www/apps/api-reference/specs/admin/paths/admin_product-tags.yaml deleted file mode 100644 index d48e708d2a..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_product-tags.yaml +++ /dev/null @@ -1,140 +0,0 @@ -get: - operationId: GetProductTags - summary: List Product Tags - description: >- - Retrieve a list of product tags. The product tags can be filtered by fields - such as `q` or `value`. The product tags can also be sorted or paginated. - x-authenticated: true - parameters: - - in: query - name: limit - description: Limit the number of product tags returned. - schema: - type: integer - default: 10 - - in: query - name: offset - description: The number of product tags to skip when retrieving the product tags. - schema: - type: integer - default: 0 - - in: query - name: order - description: A product tag field to sort-order the retrieved product tags by. - schema: - type: string - - in: query - name: discount_condition_id - description: >- - Filter by the ID of a discount condition. Only product tags that this - discount condition is applied to will be retrieved. - schema: - type: string - - in: query - name: value - style: form - explode: false - description: Filter by tag value. - schema: - type: array - items: - type: string - - in: query - name: q - description: term to search product tags' values. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by tag IDs. - schema: - type: array - items: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetProductTagsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_product-tags/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_product-tags/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_product-tags/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Tags - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductTagsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_product-types.yaml b/www/apps/api-reference/specs/admin/paths/admin_product-types.yaml deleted file mode 100644 index 39d754196e..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_product-types.yaml +++ /dev/null @@ -1,141 +0,0 @@ -get: - operationId: GetProductTypes - summary: List Product Types - description: >- - Retrieve a list of product types. The product types can be filtered by - fields such as `q` or `value`. The product types can also be sorted or - paginated. - x-authenticated: true - parameters: - - in: query - name: limit - description: Limit the number of product types returned. - schema: - type: integer - default: 20 - - in: query - name: offset - description: The number of product types to skip when retrieving the product types. - schema: - type: integer - default: 0 - - in: query - name: order - description: A product type field to sort-order the retrieved product types by. - schema: - type: string - - in: query - name: discount_condition_id - description: >- - Filter by the ID of a discount condition. Only product types that this - discount condition is applied to will be retrieved. - schema: - type: string - - in: query - name: value - style: form - explode: false - description: Filter by value. - schema: - type: array - items: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by product type IDs. - schema: - type: array - items: - type: string - - in: query - name: q - description: term to search product types' values. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetProductTypesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_product-types/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_product-types/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_product-types/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Types - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductTypesListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_products.yaml b/www/apps/api-reference/specs/admin/paths/admin_products.yaml index 129116b655..ab6ac1e81f 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_products.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_products.yaml @@ -3,271 +3,26 @@ get: summary: List Products description: >- Retrieve a list of products. The products can be filtered by fields such as - `q` or `status`. The products can also be sorted or paginated. + `id`. The products can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: q - description: >- - term to search products' title, description, variants' title and sku, - and collections' title. - schema: - type: string - - in: query - name: discount_condition_id - description: >- - Filter by the ID of a discount condition. Only products that this - discount condition is applied to will be retrieved. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by product IDs. - schema: - oneOf: - - type: string - description: ID of the product. - - type: array - items: - type: string - description: ID of a product. - - in: query - name: status - style: form - explode: false - description: Filter by status. - schema: - type: array - items: - type: string - enum: - - draft - - proposed - - published - - rejected - - in: query - name: collection_id - style: form - explode: false - description: >- - Filter by product collection IDs. Only products that are associated with - the specified collections will be retrieved. - schema: - type: array - items: - type: string - - in: query - name: tags - style: form - explode: false - description: >- - Filter by product tag IDs. Only products that are associated with the - specified tags will be retrieved. - schema: - type: array - items: - type: string - - in: query - name: price_list_id - style: form - explode: false - description: >- - Filter by IDs of price lists. Only products that these price lists are - applied to will be retrieved. - schema: - type: array - items: - type: string - - in: query - name: sales_channel_id - style: form - explode: false - description: >- - Filter by sales channel IDs. Only products that are available in the - specified sales channels will be retrieved. - schema: - type: array - items: - type: string - - in: query - name: type_id - style: form - explode: false - description: >- - Filter by product type IDs. Only products that are associated with the - specified types will be retrieved. - schema: - type: array - items: - type: string - - in: query - name: category_id - style: form - explode: false - description: >- - Filter by product category IDs. Only products that are associated with - the specified categories will be retrieved. - schema: - type: array - x-featureFlag: product_categories - items: - type: string - - in: query - name: include_category_children - style: form - explode: false - description: >- - whether to include product category children when filtering by - `category_id` - schema: - type: boolean - x-featureFlag: product_categories - - in: query - name: title - description: Filter by title. - schema: - type: string - - in: query - name: description - description: Filter by description. - schema: - type: string - - in: query - name: handle - description: Filter by handle. - schema: - type: string - - in: query - name: is_giftcard - description: Whether to retrieve gift cards or regular products. - schema: - type: boolean - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of products to skip when retrieving the products. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of products returned. - schema: - type: integer - default: 50 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - products. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned products. - schema: - type: string - - in: query - name: order - description: A product field to sort-order the retrieved products by. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetProductsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_products/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_products/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products/get.sh + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + requestBody: + content: + application/json: + schema: + $ref: ../components/schemas/AdminGetProductsParams.yaml + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_products/get.sh tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -282,44 +37,22 @@ get: $ref: ../components/responses/500_error.yaml post: operationId: PostProducts - summary: Create a Product + summary: Create Product + description: Create a product. x-authenticated: true - description: >- - Create a new Product. This API Route can also be used to create a gift card - if the `is_giftcard` field is set to `true`. - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostProductsReq.yaml - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_products/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_products/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products/post.sh + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_products/post.sh tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -332,3 +65,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_products_tag-usage.yaml b/www/apps/api-reference/specs/admin/paths/admin_products_tag-usage.yaml deleted file mode 100644 index 293f2324a4..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_products_tag-usage.yaml +++ /dev/null @@ -1,47 +0,0 @@ -get: - operationId: GetProductsTagUsage - summary: List Tags Usage Number - description: >- - Retrieve a list of Product Tags with how many times each is used in - products. - x-authenticated: true - x-codegen: - method: listTags - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_products_tag-usage/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_products_tag-usage/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_tag-usage/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsListTagsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_products_types.yaml b/www/apps/api-reference/specs/admin/paths/admin_products_types.yaml deleted file mode 100644 index cc1c92a602..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_products_types.yaml +++ /dev/null @@ -1,42 +0,0 @@ -get: - deprecated: true - operationId: GetProductsTypes - summary: List Product Types - description: Retrieve a list of Product Types. - x-authenticated: true - x-codegen: - method: listTypes - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_products_types/get.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_types/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsListTypesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_products_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_products_{id}.yaml index b81c91e549..a631d54dfa 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_products_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_products_{id}.yaml @@ -1,43 +1,29 @@ get: - operationId: GetProductsProduct + operationId: GetProductsId summary: Get a Product - description: Retrieve a Product's details. + description: >- + Retrieve a product by its ID. You can expand the product's relations or + select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string - x-codegen: - method: retrieve + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_products_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_products_{id}/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_products_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -50,51 +36,34 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostProductsProduct - summary: Update a Product - description: Update a Product's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Product. - schema: - type: string requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostProductsProductReq.yaml - x-codegen: - method: update + schema: {} +post: + operationId: PostProductsId + summary: Update a Product + description: Update a product's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_products_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_products_{id}/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_products_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -107,46 +76,34 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteProductsProduct + operationId: DeleteProductsId summary: Delete a Product - description: Delete a Product and its associated product variants and options. + description: Delete a product. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_products_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_products_{id}/delete.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_products_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsDeleteRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -159,3 +116,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_metadata.yaml b/www/apps/api-reference/specs/admin/paths/admin_products_{id}_metadata.yaml deleted file mode 100644 index ec1a8d3bad..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_metadata.yaml +++ /dev/null @@ -1,58 +0,0 @@ -post: - operationId: PostProductsProductMetadata - summary: Set Metadata - description: >- - Set the metadata of a Product. It can be any key-value pair, which allows - adding custom data to a product. - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Product. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostProductsProductMetadataReq.yaml - x-codegen: - method: setMetadata - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_products_{id}_metadata/post.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}_metadata/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_options.yaml b/www/apps/api-reference/specs/admin/paths/admin_products_{id}_options.yaml index c44c2876cd..640e9514b4 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_options.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_products_{id}_options.yaml @@ -1,48 +1,29 @@ -post: - operationId: PostProductsProductOptions - summary: Add a Product Option - description: Add a Product Option to a Product. +get: + operationId: GetProductsIdOptions + summary: List Options + description: >- + Retrieve a list of options in a product. The options can be filtered by + fields like FILTER FIELDS. The options can also be paginated. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostProductsProductOptionsReq.yaml - x-codegen: - method: addOption - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_products_{id}_options/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_products_{id}_options/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}_options/post.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_products_{id}_options/get.sh tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -55,3 +36,47 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} +post: + operationId: PostProductsIdOptions + summary: Add Options to Product + description: Add a list of options to a product. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_products_{id}_options/post.sh + tags: + - Products + responses: + '400': + $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml + '404': + $ref: ../components/responses/not_found_error.yaml + '409': + $ref: ../components/responses/invalid_state_error.yaml + '422': + $ref: ../components/responses/invalid_request_error.yaml + '500': + $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_options_{option_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_products_{id}_options_{option_id}.yaml index 7997789d60..502c75a398 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_options_{option_id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_products_{id}_options_{option_id}.yaml @@ -1,55 +1,35 @@ -post: - operationId: PostProductsProductOptionsOption - summary: Update a Product Option - description: Update a Product Option's details. +get: + operationId: GetProductsIdOptionsOption_id + summary: List Options + description: >- + Retrieve a list of options in a product. The options can be filtered by + fields like FILTER FIELDS. The options can also be paginated. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string - - in: path - name: option_id + - name: option_id + in: path + description: The product's option id. required: true - description: The ID of the Product Option. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostProductsProductOptionsOption.yaml - x-codegen: - method: updateOption - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_products_{id}_options_{option_id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_products_{id}_options_{option_id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_products_{id}_options_{option_id}/post.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_products_{id}_options_{option_id}/get.sh tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -62,56 +42,89 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteProductsProductOptionsOption - summary: Delete a Product Option - description: >- - Delete a Product Option. If there are product variants that use this product - option, they must be deleted before deleting the product option. + requestBody: + content: + application/json: + schema: {} +post: + operationId: PostProductsIdOptionsOption_id + summary: Add Options to Product + description: Add a list of options to a product. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string - - in: path - name: option_id + - name: option_id + in: path + description: The product's option id. required: true - description: The ID of the Product Option. schema: type: string - x-codegen: - method: deleteOption + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client + - lang: Shell + label: cURL source: - $ref: >- - ../code_samples/JavaScript/admin_products_{id}_options_{option_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_products_{id}_options_{option_id}/delete.tsx + $ref: ../code_samples/Shell/admin_products_{id}_options_{option_id}/post.sh + tags: + - Products + responses: + '400': + $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml + '404': + $ref: ../components/responses/not_found_error.yaml + '409': + $ref: ../components/responses/invalid_state_error.yaml + '422': + $ref: ../components/responses/invalid_request_error.yaml + '500': + $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} +delete: + operationId: DeleteProductsIdOptionsOption_id + summary: Remove Options from Product + description: >- + Remove a list of options from a product. This doesn't delete the Option, + only the association between the Option and the product. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string + - name: option_id + in: path + description: The product's option id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: - lang: Shell label: cURL source: $ref: >- ../code_samples/Shell/admin_products_{id}_options_{option_id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsDeleteOptionRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -124,3 +137,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants.yaml b/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants.yaml index 1d892c04cb..f471fbcb4c 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants.yaml @@ -1,163 +1,29 @@ get: - operationId: GetProductsProductVariants - summary: List a Product's Variants - description: > - Retrieve a list of Product Variants associated with a Product. The variants - can be paginated. + operationId: GetProductsIdVariants + summary: List Variants + description: >- + Retrieve a list of variants in a product. The variants can be filtered by + fields like FILTER FIELDS. The variants can also be paginated. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: ID of the product. schema: type: string - - in: query - name: id - description: IDs to filter product variants by. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned product - variants. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - product variants. - schema: - type: string - - in: query - name: offset - description: >- - The number of product variants to skip when retrieving the product - variants. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of product variants returned. - schema: - type: integer - default: 100 - - in: query - name: q - description: Search term to search product variants' title, sku, and products' title. - schema: - type: string - - in: query - name: order - 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 `-`. - schema: - type: string - - in: query - name: manage_inventory - description: Filter product variants by whether their inventory is managed or not. - schema: - type: boolean - - in: query - name: allow_backorder - description: >- - Filter product variants by whether they are allowed to be backordered or - not. - schema: - type: boolean - - in: query - name: inventory_quantity - description: Filter by available inventory quantity - schema: - oneOf: - - type: number - description: a specific number to filter by. - - type: object - description: filter using less and greater than comparisons. - properties: - lt: - type: number - description: filter by inventory quantity less than this number - gt: - type: number - description: filter by inventory quantity greater than this number - lte: - type: number - description: filter by inventory quantity less than or equal to this number - gte: - type: number - description: >- - filter by inventory quantity greater than or equal to this - number - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: listVariants - queryParams: AdminGetProductsVariantsParams + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_products_{id}_variants/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsListVariantsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -170,53 +36,34 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostProductsProductVariants - summary: Create a Product Variant - description: >- - Create a Product Variant associated with a Product. Each product variant - must have a unique combination of Product Option values. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Product. - schema: - type: string requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostProductsProductVariantsReq.yaml - x-codegen: - method: createVariant + schema: {} +post: + operationId: PostProductsIdVariants + summary: Add Variants to Product + description: Add a list of variants to a product. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_products_{id}_variants/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_products_{id}_variants/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_products_{id}_variants/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -229,3 +76,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants_{variant_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants_{variant_id}.yaml index 03690bd85f..30bc5900ee 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants_{variant_id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants_{variant_id}.yaml @@ -1,57 +1,82 @@ -post: - operationId: PostProductsProductVariantsVariant - summary: Update a Product Variant - description: Update a Product Variant's details. +get: + operationId: GetProductsIdVariantsVariant_id + summary: List Variants + description: >- + Retrieve a list of variants in a product. The variants can be filtered by + fields like FILTER FIELDS. The variants can also be paginated. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string - - in: path - name: variant_id + - name: variant_id + in: path + description: The product's variant id. required: true - description: The ID of the Product Variant. schema: type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_products_{id}_variants_{variant_id}/get.sh + tags: + - Products + responses: + '400': + $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml + '404': + $ref: ../components/responses/not_found_error.yaml + '409': + $ref: ../components/responses/invalid_state_error.yaml + '422': + $ref: ../components/responses/invalid_request_error.yaml + '500': + $ref: ../components/responses/500_error.yaml requestBody: content: application/json: - schema: - $ref: >- - ../components/schemas/AdminPostProductsProductVariantsVariantReq.yaml - x-codegen: - method: updateVariant + schema: {} +post: + operationId: PostProductsIdVariantsVariant_id + summary: Add Variants to Product + description: Add a list of variants to a product. + x-authenticated: true + parameters: + - name: id + in: path + description: The product's ID. + required: true + schema: + type: string + - name: variant_id + in: path + description: The product's variant id. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_products_{id}_variants_{variant_id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_products_{id}_variants_{variant_id}/post.tsx - lang: Shell label: cURL source: $ref: >- ../code_samples/Shell/admin_products_{id}_variants_{variant_id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -64,55 +89,43 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteProductsProductVariantsVariant - summary: Delete a Product Variant - description: Delete a Product Variant. + operationId: DeleteProductsIdVariantsVariant_id + summary: Remove Variants from Product + description: >- + Remove a list of variants from a product. This doesn't delete the Variant, + only the association between the Variant and the product. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The product's ID. required: true - description: The ID of the Product. schema: type: string - - in: path - name: variant_id + - name: variant_id + in: path + description: The product's variant id. required: true - description: The ID of the Product Variant. schema: type: string - x-codegen: - method: deleteVariant + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_products_{id}_variants_{variant_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_products_{id}_variants_{variant_id}/delete.tsx - lang: Shell label: cURL source: $ref: >- ../code_samples/Shell/admin_products_{id}_variants_{variant_id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Products responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminProductsDeleteVariantRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -125,3 +138,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_promotions.yaml b/www/apps/api-reference/specs/admin/paths/admin_promotions.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_promotions.yaml rename to www/apps/api-reference/specs/admin/paths/admin_promotions.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_promotions_{id}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}.yaml rename to www/apps/api-reference/specs/admin/paths/admin_promotions_{id}.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_buy-rules_batch_add.yaml b/www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_buy-rules_batch_add.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_buy-rules_batch_add.yaml rename to www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_buy-rules_batch_add.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_buy-rules_batch_remove.yaml b/www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_buy-rules_batch_remove.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_buy-rules_batch_remove.yaml rename to www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_buy-rules_batch_remove.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_rules_batch_add.yaml b/www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_rules_batch_add.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_rules_batch_add.yaml rename to www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_rules_batch_add.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_rules_batch_remove.yaml b/www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_rules_batch_remove.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_rules_batch_remove.yaml rename to www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_rules_batch_remove.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_rules_batch_update.yaml b/www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_rules_batch_update.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_rules_batch_update.yaml rename to www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_rules_batch_update.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_target-rules_batch_add.yaml b/www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_target-rules_batch_add.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_target-rules_batch_add.yaml rename to www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_target-rules_batch_add.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_target-rules_batch_remove.yaml b/www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_target-rules_batch_remove.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_promotions_{id}_target-rules_batch_remove.yaml rename to www/apps/api-reference/specs/admin/paths/admin_promotions_{id}_target-rules_batch_remove.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys.yaml b/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys.yaml deleted file mode 100644 index 69a0dea62a..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys.yaml +++ /dev/null @@ -1,207 +0,0 @@ -get: - operationId: GetPublishableApiKeys - summary: List Publishable API keys - description: >- - Retrieve a list of publishable API keys. The publishable API keys can be - filtered by fields such as `q`. The publishable API keys can also be - paginated. - x-authenticated: true - parameters: - - in: query - name: q - description: term to search publishable API keys' titles. - schema: - type: string - - in: query - name: limit - description: Limit the number of publishable API keys returned. - schema: - type: number - default: '20' - - in: query - name: offset - description: >- - The number of publishable API keys to skip when retrieving the - publishable API keys. - schema: - type: number - default: '0' - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - publishable API keys. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned - publishable API keys. - schema: - type: string - - in: query - name: order - description: A field to sort-order the retrieved publishable API keys by. - schema: - type: string - - in: query - name: created_at - required: false - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - required: false - description: Filter by a update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: revoked_at - required: false - description: Filter by a revocation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: GetPublishableApiKeysParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_publishable-api-keys/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_publishable-api-keys/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_publishable-api-keys/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPublishableApiKeysListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostPublishableApiKeys - summary: Create Publishable API Key - description: Create a Publishable API Key. - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostPublishableApiKeysReq.yaml - x-authenticated: true - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_publishable-api-keys/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_publishable-api-keys/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_publishable-api-keys/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPublishableApiKeysRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}.yaml deleted file mode 100644 index f59456e4ee..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}.yaml +++ /dev/null @@ -1,154 +0,0 @@ -get: - operationId: GetPublishableApiKeysPublishableApiKey - summary: Get a Publishable API Key - description: Retrieve a publishable API key's details. - parameters: - - in: path - name: id - required: true - description: The ID of the Publishable API Key. - schema: - type: string - x-authenticated: true - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_publishable-api-keys_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_publishable-api-keys_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_publishable-api-keys_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPublishableApiKeysRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostPublishableApiKysPublishableApiKey - summary: Update Publishable API Key - description: Update a Publishable API Key's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Publishable API Key. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostPublishableApiKeysPublishableApiKeyReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_publishable-api-keys_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_publishable-api-keys_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_publishable-api-keys_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPublishableApiKeysRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeletePublishableApiKeysPublishableApiKey - summary: Delete Publishable API Key - description: >- - Delete a Publishable API Key. Associated resources, such as sales channels, - are not deleted. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Publishable API Key to delete. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_publishable-api-keys_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_publishable-api-keys_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_publishable-api-keys_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPublishableApiKeyDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}_revoke.yaml b/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}_revoke.yaml deleted file mode 100644 index f335595594..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}_revoke.yaml +++ /dev/null @@ -1,55 +0,0 @@ -post: - operationId: PostPublishableApiKeysPublishableApiKeyRevoke - summary: Revoke a Publishable API Key - description: >- - Revoke a Publishable API Key. Revoking the publishable API Key can't be - undone, and the key can't be used in future requests. - parameters: - - in: path - name: id - required: true - description: The ID of the Publishable API Key. - schema: - type: string - x-authenticated: true - x-codegen: - method: revoke - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_publishable-api-keys_{id}_revoke/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_publishable-api-keys_{id}_revoke/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_publishable-api-keys_{id}_revoke/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPublishableApiKeysRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}_sales-channels.yaml b/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}_sales-channels.yaml deleted file mode 100644 index b17be96a7a..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}_sales-channels.yaml +++ /dev/null @@ -1,64 +0,0 @@ -get: - operationId: GetPublishableApiKeySalesChannels - summary: List Sales Channels - description: >- - List the sales channels associated with a publishable API key. The sales - channels can be filtered by fields such as `q`. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the publishable API key. - schema: - type: string - - in: query - name: q - description: query to search sales channels' names and descriptions. - schema: - type: string - x-codegen: - method: listSalesChannels - queryParams: GetPublishableApiKeySalesChannelsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels/get.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels/get.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPublishableApiKeysListSalesChannelsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}_sales-channels_batch.yaml b/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}_sales-channels_batch.yaml deleted file mode 100644 index 765d78ba7c..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_publishable-api-keys_{id}_sales-channels_batch.yaml +++ /dev/null @@ -1,125 +0,0 @@ -post: - operationId: PostPublishableApiKeySalesChannelsChannelsBatch - summary: Add Sales Channels - description: Add a list of sales channels to a publishable API key. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Publishable Api Key. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostPublishableApiKeySalesChannelsBatchReq.yaml - x-codegen: - method: addSalesChannelsBatch - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels_batch/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels_batch/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels_batch/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPublishableApiKeysRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeletePublishableApiKeySalesChannelsChannelsBatch - summary: Remove Sales Channels - description: >- - Remove a list of sales channels from a publishable API key. This doesn't - delete the sales channels and only removes the association between them and - the publishable API key. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Publishable API Key. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminDeletePublishableApiKeySalesChannelsBatchReq.yaml - x-codegen: - method: deleteSalesChannelsBatch - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_publishable-api-keys_{id}_sales-channels_batch/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_publishable-api-keys_{id}_sales-channels_batch/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_publishable-api-keys_{id}_sales-channels_batch/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Publishable Api Keys - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPublishableApiKeysRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_regions.yaml b/www/apps/api-reference/specs/admin/paths/admin_regions.yaml index bfa341f9ab..27c0595a7c 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_regions.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_regions.yaml @@ -2,132 +2,22 @@ get: operationId: GetRegions summary: List Regions description: >- - Retrieve a list of Regions. The regions can be filtered by fields such as - `created_at`. The regions can also be paginated. + Retrieve a list of regions. The regions can be filtered by fields such as + `id`. The regions can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: q - description: Term used to search regions' name. - schema: - type: string - - in: query - name: order - description: A field to sort-order the retrieved regions by. - schema: - type: string - - in: query - name: limit - schema: - type: integer - default: 50 - required: false - description: Limit the number of regions returned. - - in: query - name: offset - schema: - type: integer - default: 0 - required: false - description: The number of regions to skip when retrieving the regions. - - in: query - name: created_at - required: false - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - required: false - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - required: false - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: AdminGetRegionsParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_regions/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_regions/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_regions/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRegionsListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -140,44 +30,28 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostRegions - summary: Create a Region - description: Create a Region. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostRegionsReq.yaml - x-codegen: - method: create + schema: {} +post: + operationId: PostRegions + summary: Create Region + description: Create a region. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_regions/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_regions/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_regions/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRegionsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -190,3 +64,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_regions_{id}.yaml index 77959ddb8b..6d5e336391 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_regions_{id}.yaml @@ -1,43 +1,29 @@ get: - operationId: GetRegionsRegion + operationId: GetRegionsId summary: Get a Region - description: Retrieve a Region's details. + description: >- + Retrieve a region by its ID. You can expand the region's relations or select + the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The region's ID. required: true - description: The ID of the Region. schema: type: string - x-codegen: - method: retrieve + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_regions_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_regions_{id}/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_regions_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRegionsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -50,51 +36,34 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostRegionsRegion - summary: Update a Region - description: Update a Region's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostRegionsRegionReq.yaml - x-codegen: - method: update + schema: {} +post: + operationId: PostRegionsId + summary: Update a Region + description: Update a region's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The region's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_regions_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_regions_{id}/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_regions_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRegionsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -107,48 +76,34 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteRegionsRegion + operationId: DeleteRegionsId summary: Delete a Region - description: >- - Delete a Region. Associated resources, such as providers or currencies are - not deleted. Associated tax rates are deleted. + description: Delete a region. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The region's ID. required: true - description: The ID of the Region. schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_regions_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_regions_{id}/delete.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_regions_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRegionsDeleteRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -161,3 +116,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_countries.yaml b/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_countries.yaml deleted file mode 100644 index 8ffe359873..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_countries.yaml +++ /dev/null @@ -1,57 +0,0 @@ -post: - operationId: PostRegionsRegionCountries - summary: Add Country - description: Add a Country to the list of Countries in a Region. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostRegionsRegionCountriesReq.yaml - x-codegen: - method: addCountry - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_regions_{id}_countries/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_regions_{id}_countries/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_regions_{id}_countries/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRegionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_countries_{country_code}.yaml b/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_countries_{country_code}.yaml deleted file mode 100644 index 3edf2e65e3..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_countries_{country_code}.yaml +++ /dev/null @@ -1,66 +0,0 @@ -delete: - operationId: PostRegionsRegionCountriesCountry - summary: Remove Country - x-authenticated: true - description: >- - Remove a Country from the list of Countries in a Region. The country will - still be available in the system, and it can be used in other regions. - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - - in: path - name: country_code - description: The 2 character ISO code for the Country. - required: true - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: deleteCountry - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_regions_{id}_countries_{country_code}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_regions_{id}_countries_{country_code}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_regions_{id}_countries_{country_code}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRegionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_fulfillment-options.yaml b/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_fulfillment-options.yaml deleted file mode 100644 index 4a6fe68b25..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_fulfillment-options.yaml +++ /dev/null @@ -1,54 +0,0 @@ -get: - operationId: GetRegionsRegionFulfillmentOptions - summary: List Fulfillment Options - description: Retrieve a list of fulfillment options available in a Region. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - x-codegen: - method: retrieveFulfillmentOptions - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_regions_{id}_fulfillment-options/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_regions_{id}_fulfillment-options/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_regions_{id}_fulfillment-options/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminGetRegionsRegionFulfillmentOptionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_fulfillment-providers.yaml b/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_fulfillment-providers.yaml deleted file mode 100644 index 7b142621e1..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_fulfillment-providers.yaml +++ /dev/null @@ -1,59 +0,0 @@ -post: - operationId: PostRegionsRegionFulfillmentProviders - summary: Add Fulfillment Provider - description: Add a Fulfillment Provider to the list of fulfullment providers in a Region. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostRegionsRegionFulfillmentProvidersReq.yaml - x-codegen: - method: addFulfillmentProvider - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_regions_{id}_fulfillment-providers/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_regions_{id}_fulfillment-providers/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_regions_{id}_fulfillment-providers/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRegionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_fulfillment-providers_{provider_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_fulfillment-providers_{provider_id}.yaml deleted file mode 100644 index 4f7cf35cc5..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_fulfillment-providers_{provider_id}.yaml +++ /dev/null @@ -1,63 +0,0 @@ -delete: - operationId: PostRegionsRegionFulfillmentProvidersProvider - summary: Remove Fulfillment Provider - description: >- - Remove a Fulfillment Provider from a Region. The fulfillment provider will - still be available for usage in other regions. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - - in: path - name: provider_id - required: true - description: The ID of the Fulfillment Provider. - schema: - type: string - x-codegen: - method: deleteFulfillmentProvider - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_regions_{id}_fulfillment-providers_{provider_id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRegionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_payment-providers.yaml b/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_payment-providers.yaml deleted file mode 100644 index fe27ec283f..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_payment-providers.yaml +++ /dev/null @@ -1,58 +0,0 @@ -post: - operationId: PostRegionsRegionPaymentProviders - summary: Add Payment Provider - description: Add a Payment Provider to the list of payment providers in a Region. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostRegionsRegionPaymentProvidersReq.yaml - x-codegen: - method: addPaymentProvider - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_regions_{id}_payment-providers/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_regions_{id}_payment-providers/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_regions_{id}_payment-providers/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRegionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_payment-providers_{provider_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_payment-providers_{provider_id}.yaml deleted file mode 100644 index 0131879952..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_regions_{id}_payment-providers_{provider_id}.yaml +++ /dev/null @@ -1,63 +0,0 @@ -delete: - operationId: PostRegionsRegionPaymentProvidersProvider - summary: Remove Payment Provider - description: >- - Remove a Payment Provider from a Region. The payment provider will still be - available for usage in other regions. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Region. - schema: - type: string - - in: path - name: provider_id - required: true - description: The ID of the Payment Provider. - schema: - type: string - x-codegen: - method: deletePaymentProvider - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_regions_{id}_payment-providers_{provider_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_regions_{id}_payment-providers_{provider_id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_regions_{id}_payment-providers_{provider_id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Regions - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminRegionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_reservations.yaml b/www/apps/api-reference/specs/admin/paths/admin_reservations.yaml deleted file mode 100644 index 22ec0261f0..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_reservations.yaml +++ /dev/null @@ -1,212 +0,0 @@ -get: - operationId: GetReservations - summary: List Reservations - description: >- - Retrieve a list of Reservations. The reservations can be filtered by fields - such as `location_id` or `quantity`. The reservations can also be paginated. - x-authenticated: true - parameters: - - in: query - name: location_id - style: form - explode: false - description: Filter by location ID - schema: - type: array - items: - type: string - - in: query - name: inventory_item_id - style: form - explode: false - description: Filter by inventory item ID. - schema: - type: array - items: - type: string - - in: query - name: line_item_id - style: form - explode: false - description: Filter by line item ID. - schema: - type: array - items: - type: string - - in: query - name: quantity - description: Filter by reservation quantity - schema: - type: object - properties: - lt: - type: number - description: filter by reservation quantity less than this number - gt: - type: number - description: filter by reservation quantity greater than this number - lte: - type: number - description: filter by reservation quantity less than or equal to this number - gte: - type: number - description: >- - filter by reservation quantity greater than or equal to this - number - - in: query - name: description - description: Filter by description. - schema: - oneOf: - - type: string - description: description value to filter by. - - type: object - properties: - contains: - type: string - description: filter by reservation description containing search string. - starts_with: - type: string - description: filter by reservation description starting with search string. - ends_with: - type: string - description: filter by reservation description ending with search string. - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of reservations to skip when retrieving the reservations. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of reservations returned. - schema: - type: integer - default: 20 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - reservations. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned - reservations. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetReservationsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_reservations/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_reservations/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_reservations/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Reservations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReservationsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostReservations - summary: Create a Reservation - description: >- - Create a Reservation which can be associated with any resource, such as an - order's line item. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostReservationsReq.yaml - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_reservations/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_reservations/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_reservations/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Reservations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReservationsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_reservations_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_reservations_{id}.yaml deleted file mode 100644 index 66eb23944b..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_reservations_{id}.yaml +++ /dev/null @@ -1,159 +0,0 @@ -get: - operationId: GetReservationsReservation - summary: Get a Reservation - description: Retrieve a reservation's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the reservation. - schema: - type: string - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_reservations_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_reservations_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_reservations_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Reservations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReservationsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostReservationsReservation - summary: Update a Reservation - description: Update a Reservation's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Reservation. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostReservationsReservationReq.yaml - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_reservations_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_reservations_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_reservations_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Reservations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReservationsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteReservationsReservation - summary: Delete a Reservation - description: >- - Delete a Reservation. Associated resources, such as the line item, will not - be deleted. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Reservation to delete. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_reservations_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_reservations_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_reservations_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Reservations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReservationsDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_return-reasons.yaml b/www/apps/api-reference/specs/admin/paths/admin_return-reasons.yaml deleted file mode 100644 index 699865186d..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_return-reasons.yaml +++ /dev/null @@ -1,95 +0,0 @@ -get: - operationId: GetReturnReasons - summary: List Return Reasons - description: Retrieve a list of Return Reasons. - x-authenticated: true - x-codegen: - method: list - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_return-reasons/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_return-reasons/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_return-reasons/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReturnReasonsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostReturnReasons - summary: Create a Return Reason - description: Create a Return Reason. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostReturnReasonsReq.yaml - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_return-reasons/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_return-reasons/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_return-reasons/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReturnReasonsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_return-reasons_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_return-reasons_{id}.yaml deleted file mode 100644 index c3fab4290f..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_return-reasons_{id}.yaml +++ /dev/null @@ -1,161 +0,0 @@ -get: - operationId: GetReturnReasonsReason - summary: Get a Return Reason - description: Retrieve a Return Reason's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Return Reason. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_return-reasons_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_return-reasons_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_return-reasons_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReturnReasonsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostReturnReasonsReason - summary: Update a Return Reason - description: Update a Return Reason's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Return Reason. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostReturnReasonsReasonReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_return-reasons_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_return-reasons_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_return-reasons_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReturnReasonsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteReturnReason - summary: Delete a Return Reason - description: Delete a return reason. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the return reason - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_return-reasons_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_return-reasons_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_return-reasons_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReturnReasonsDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_returns.yaml b/www/apps/api-reference/specs/admin/paths/admin_returns.yaml deleted file mode 100644 index b42a66200d..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_returns.yaml +++ /dev/null @@ -1,58 +0,0 @@ -get: - operationId: GetReturns - summary: List Returns - description: Retrieve a list of Returns. The returns can be paginated. - parameters: - - in: query - name: limit - description: Limit the number of Returns returned. - schema: - type: number - default: '50' - - in: query - name: offset - description: The number of Returns to skip when retrieving the Returns. - schema: - type: number - default: '0' - x-codegen: - method: list - queryParams: AdminGetReturnsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_returns/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_returns/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_returns/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Returns - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReturnsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_returns_{id}_cancel.yaml b/www/apps/api-reference/specs/admin/paths/admin_returns_{id}_cancel.yaml deleted file mode 100644 index 60377bb750..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_returns_{id}_cancel.yaml +++ /dev/null @@ -1,53 +0,0 @@ -post: - operationId: PostReturnsReturnCancel - summary: Cancel a Return - description: >- - Registers a Return as canceled. The return can be associated with an order, - claim, or swap. - parameters: - - in: path - name: id - required: true - description: The ID of the Return. - schema: - type: string - x-codegen: - method: cancel - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_returns_{id}_cancel/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_returns_{id}_cancel/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_returns_{id}_cancel/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Returns - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReturnsCancelRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_returns_{id}_receive.yaml b/www/apps/api-reference/specs/admin/paths/admin_returns_{id}_receive.yaml deleted file mode 100644 index da69097234..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_returns_{id}_receive.yaml +++ /dev/null @@ -1,58 +0,0 @@ -post: - operationId: PostReturnsReturnReceive - summary: Receive a Return - description: >- - Mark a Return as received. This also updates the status of associated order, - claim, or swap accordingly. - parameters: - - in: path - name: id - required: true - description: The ID of the Return. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostReturnsReturnReceiveReq.yaml - x-codegen: - method: receive - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_returns_{id}_receive/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_returns_{id}_receive/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_returns_{id}_receive/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Returns - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminReturnsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_sales-channels.yaml b/www/apps/api-reference/specs/admin/paths/admin_sales-channels.yaml index 5aeaee384d..57adb7d9b0 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_sales-channels.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_sales-channels.yaml @@ -3,156 +3,21 @@ get: summary: List Sales Channels description: >- Retrieve a list of sales channels. The sales channels can be filtered by - fields such as `q` or `name`. The sales channels can also be sorted or - paginated. + fields such as `id`. The sales channels can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: id - description: Filter by a sales channel ID. - schema: - type: string - - in: query - name: name - description: Filter by name. - schema: - type: string - - in: query - name: description - description: Filter by description. - schema: - type: string - - in: query - name: q - description: term used to search sales channels' names and descriptions. - schema: - type: string - - in: query - name: order - description: A sales-channel field to sort-order the retrieved sales channels by. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of sales channels to skip when retrieving the sales channels. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of sales channels returned. - schema: - type: integer - default: 20 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned sales - channels. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned sales - channels. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetSalesChannelsParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_sales-channels/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_sales-channels/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_sales-channels/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Sales Channels responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminSalesChannelsListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -165,44 +30,28 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostSalesChannels - summary: Create a Sales Channel - description: Create a Sales Channel. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostSalesChannelsReq.yaml - x-codegen: - method: create + schema: {} +post: + operationId: PostSalesChannels + summary: Create Sales Channel + description: Create a sales channel. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_sales-channels/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_sales-channels/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_sales-channels/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Sales Channels responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminSalesChannelsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -215,3 +64,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}.yaml index f8d08b909c..97dda13b58 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}.yaml @@ -1,43 +1,29 @@ get: - operationId: GetSalesChannelsSalesChannel + operationId: GetSalesChannelsId summary: Get a Sales Channel - description: Retrieve a sales channel's details. + description: >- + Retrieve a sales channel by its ID. You can expand the sales channel's + relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The sales channel's ID. required: true - description: The ID of the Sales channel. schema: type: string - x-codegen: - method: retrieve + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_sales-channels_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_sales-channels_{id}/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_sales-channels_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Sales Channels responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminSalesChannelsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -50,51 +36,34 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostSalesChannelsSalesChannel - summary: Update a Sales Channel - description: Update a Sales Channel's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Sales Channel. - schema: - type: string requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminPostSalesChannelsSalesChannelReq.yaml - x-codegen: - method: update + schema: {} +post: + operationId: PostSalesChannelsId + summary: Update a Sales Channel + description: Update a sales channel's details. + x-authenticated: true + parameters: + - name: id + in: path + description: The sales channel's ID. + required: true + schema: + type: string + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_sales-channels_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_sales-channels_{id}/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_sales-channels_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Sales Channels responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminSalesChannelsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -107,48 +76,34 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteSalesChannelsSalesChannel + operationId: DeleteSalesChannelsId summary: Delete a Sales Channel - description: >- - Delete a sales channel. Associated products, stock locations, and other - resources are not deleted. + description: Delete a sales channel. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The sales channel's ID. required: true - description: The ID of the Sales channel. schema: type: string - x-codegen: - method: delete + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_sales-channels_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_sales-channels_{id}/delete.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_sales-channels_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Sales Channels responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminSalesChannelsDeleteRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -161,3 +116,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}_products_batch.yaml b/www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}_products_batch.yaml deleted file mode 100644 index 8c7d65fa3c..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}_products_batch.yaml +++ /dev/null @@ -1,123 +0,0 @@ -post: - operationId: PostSalesChannelsChannelProductsBatch - summary: Add Products to Sales Channel - description: Add a list of products to a sales channel. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Sales channel. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostSalesChannelsChannelProductsBatchReq.yaml - x-codegen: - method: addProducts - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_sales-channels_{id}_products_batch/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_sales-channels_{id}_products_batch/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_sales-channels_{id}_products_batch/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Sales Channels - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminSalesChannelsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteSalesChannelsChannelProductsBatch - summary: Remove Products from Sales Channel - description: >- - Remove a list of products from a sales channel. This does not delete the - product. It only removes the association between the product and the sales - channel. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Sales Channel - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminDeleteSalesChannelsChannelProductsBatchReq.yaml - x-codegen: - method: removeProducts - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_sales-channels_{id}_products_batch/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_sales-channels_{id}_products_batch/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_sales-channels_{id}_products_batch/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Sales Channels - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminSalesChannelsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_sales-channels_{id}_products_batch_add.yaml b/www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}_products_batch_add.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_sales-channels_{id}_products_batch_add.yaml rename to www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}_products_batch_add.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}_stock-locations.yaml b/www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}_stock-locations.yaml deleted file mode 100644 index b4e2c2e06f..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_sales-channels_{id}_stock-locations.yaml +++ /dev/null @@ -1,124 +0,0 @@ -post: - operationId: PostSalesChannelsSalesChannelStockLocation - summary: Associate a Stock Location - description: Associate a stock location with a Sales Channel. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Sales Channel. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostSalesChannelsChannelStockLocationsReq.yaml - x-codegen: - method: addLocation - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_sales-channels_{id}_stock-locations/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_sales-channels_{id}_stock-locations/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_sales-channels_{id}_stock-locations/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Sales Channels - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminSalesChannelsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteSalesChannelsSalesChannelStockLocation - summary: Remove Stock Location from Sales Channels. - description: >- - Remove a stock location from a Sales Channel. This only removes the - association between the stock location and the sales channel. It does not - delete the stock location. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Sales Channel. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminDeleteSalesChannelsChannelStockLocationsReq.yaml - x-codegen: - method: removeLocation - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_sales-channels_{id}_stock-locations/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_sales-channels_{id}_stock-locations/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_sales-channels_{id}_stock-locations/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Sales Channels - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminSalesChannelsDeleteLocationRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_shipping-options.yaml b/www/apps/api-reference/specs/admin/paths/admin_shipping-options.yaml deleted file mode 100644 index a9c1ad7830..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_shipping-options.yaml +++ /dev/null @@ -1,237 +0,0 @@ -get: - operationId: GetShippingOptions - summary: List Shipping Options - description: >- - Retrieve a list of Shipping Options. The shipping options can be filtered by - fields such as `region_id` or `is_return`. The shipping options can also be - sorted or paginated. - x-authenticated: true - parameters: - - in: query - name: name - description: Filter by name. - schema: - type: string - - in: query - name: region_id - description: Filter by the ID of the region the shipping options belong to. - schema: - type: string - - in: query - name: is_return - description: Filter by whether the shipping options are return shipping options. - schema: - type: boolean - - in: query - name: admin_only - description: >- - Filter by whether the shipping options are available for admin users - only. - schema: - type: boolean - - in: query - name: q - description: Term used to search shipping options' name. - schema: - type: string - - in: query - name: order - description: A shipping option field to sort-order the retrieved shipping options by. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by shipping option IDs. - schema: - oneOf: - - type: string - description: ID of the shipping option. - - type: array - items: - type: string - description: ID of a shipping option. - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of users to skip when retrieving the shipping options. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of shipping options returned. - schema: - type: integer - default: 20 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - shipping options. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned shipping - options. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetShippingOptionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_shipping-options/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_shipping-options/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_shipping-options/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminShippingOptionsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostShippingOptions - summary: Create Shipping Option - description: Create a Shipping Option. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostShippingOptionsReq.yaml - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_shipping-options/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_shipping-options/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_shipping-options/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminShippingOptionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_shipping-options_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_shipping-options_{id}.yaml deleted file mode 100644 index 7982c5a43c..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_shipping-options_{id}.yaml +++ /dev/null @@ -1,163 +0,0 @@ -get: - operationId: GetShippingOptionsOption - summary: Get a Shipping Option - description: Retrieve a Shipping Option's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Option. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_shipping-options_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_shipping-options_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_shipping-options_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminShippingOptionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostShippingOptionsOption - summary: Update Shipping Option - description: Update a Shipping Option's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Option. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostShippingOptionsOptionReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_shipping-options_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_shipping-options_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_shipping-options_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminShippingOptionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteShippingOptionsOption - summary: Delete Shipping Option - description: >- - Delete a Shipping Option. Once deleted, it can't be used when creating - orders or returns. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Option. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_shipping-options_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_shipping-options_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_shipping-options_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminShippingOptionsDeleteRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_shipping-profiles.yaml b/www/apps/api-reference/specs/admin/paths/admin_shipping-profiles.yaml deleted file mode 100644 index ba35d5e49d..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_shipping-profiles.yaml +++ /dev/null @@ -1,95 +0,0 @@ -get: - operationId: GetShippingProfiles - summary: List Shipping Profiles - description: Retrieve a list of Shipping Profiles. - x-authenticated: true - x-codegen: - method: list - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_shipping-profiles/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_shipping-profiles/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_shipping-profiles/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Profiles - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminShippingProfilesListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostShippingProfiles - summary: Create a Shipping Profile - description: Create a Shipping Profile. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostShippingProfilesReq.yaml - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_shipping-profiles/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_shipping-profiles/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_shipping-profiles/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Profiles - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminShippingProfilesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_shipping-profiles_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_shipping-profiles_{id}.yaml deleted file mode 100644 index d2066e176c..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_shipping-profiles_{id}.yaml +++ /dev/null @@ -1,160 +0,0 @@ -get: - operationId: GetShippingProfilesProfile - summary: Get a Shipping Profile - description: Retrieve a Shipping Profile's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Profile. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_shipping-profiles_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_shipping-profiles_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_shipping-profiles_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Profiles - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminShippingProfilesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostShippingProfilesProfile - summary: Update a Shipping Profile - description: Update a Shipping Profile's details. - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Profile. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostShippingProfilesProfileReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_shipping-profiles_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_shipping-profiles_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_shipping-profiles_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Profiles - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminShippingProfilesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteShippingProfilesProfile - summary: Delete a Shipping Profile - description: Delete a Shipping Profile. Associated shipping options are deleted as well. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Shipping Profile. - schema: - type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_shipping-profiles_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_shipping-profiles_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_shipping-profiles_{id}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Shipping Profiles - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDeleteShippingProfileRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_stock-locations.yaml b/www/apps/api-reference/specs/admin/paths/admin_stock-locations.yaml index b04a6dd66e..3f3213681c 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_stock-locations.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_stock-locations.yaml @@ -1,215 +1,28 @@ -get: - operationId: GetStockLocations - summary: List Stock Locations - description: >- - Retrieve a list of stock locations. The stock locations can be filtered by - fields such as `name` or `created_at`. The stock locations can also be - sorted or paginated. +post: + operationId: PostStockLocations + summary: Create Stock Location + description: Create a stock location. x-authenticated: true - parameters: - - in: query - name: id - description: Filter by ID. - schema: - type: string - - in: query - name: name - description: Filter by name. - schema: - type: string - - in: query - name: order - description: A stock-location field to sort-order the retrieved stock locations by. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: >- - The number of stock locations to skip when retrieving the stock - locations. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of stock locations returned. - schema: - type: integer - default: 20 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned stock - locations. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned stock - locations. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetStockLocationsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_stock-locations/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_stock-locations/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_stock-locations/get.sh + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] - tags: - - Stock Locations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminStockLocationsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostStockLocations - summary: Create a Stock Location - description: Create a Stock Location. - x-authenticated: true - parameters: - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned stock - location. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned stock - location. - schema: - type: string requestBody: content: application/json: schema: $ref: ../components/schemas/AdminPostStockLocationsReq.yaml - x-codegen: - method: create x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_stock-locations/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_stock-locations/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_stock-locations/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Stock Locations responses: '200': description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminStockLocationsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/admin/paths/admin_stock-locations_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_stock-locations_{id}.yaml index 86c2e6d617..24100d87fe 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_stock-locations_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_stock-locations_{id}.yaml @@ -1,117 +1,31 @@ get: - operationId: GetStockLocationsStockLocation + operationId: GetStockLocationsId summary: Get a Stock Location - description: Retrieve a Stock Location's details. + description: >- + Retrieve a stock location by its ID. You can expand the stock location's + relations or select the fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The stock location's ID. required: true - description: The ID of the Stock Location. schema: type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned stock - location. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned stock - location. - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetStockLocationsLocationParams + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_stock-locations_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_stock-locations_{id}/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_stock-locations_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Stock Locations responses: '200': description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminStockLocationsRes.yaml -post: - operationId: PostStockLocationsStockLocation - summary: Update a Stock Location - description: Update a Stock Location's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Stock Location. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned stock - location. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned stock - location. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostStockLocationsLocationReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_stock-locations_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_stock-locations_{id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_stock-locations_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Stock Locations - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminStockLocationsRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -125,42 +39,40 @@ post: '500': $ref: ../components/responses/500_error.yaml delete: - operationId: DeleteStockLocationsStockLocation + operationId: DeleteStockLocationsId summary: Delete a Stock Location - description: Delete a Stock Location. + description: Delete a stock location. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The stock location's ID. required: true - description: The ID of the Stock Location. schema: type: string - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_stock-locations_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_stock-locations_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_stock-locations_{id}/delete.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_stock-locations_{id}/delete.sh tags: - Stock Locations responses: '200': description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminStockLocationsDeleteRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml + '404': + $ref: ../components/responses/not_found_error.yaml + '409': + $ref: ../components/responses/invalid_state_error.yaml + '422': + $ref: ../components/responses/invalid_request_error.yaml + '500': + $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_store.yaml b/www/apps/api-reference/specs/admin/paths/admin_store.yaml deleted file mode 100644 index 4e6c57fa89..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_store.yaml +++ /dev/null @@ -1,95 +0,0 @@ -get: - operationId: GetStore - summary: Get Store details - description: Retrieve the Store's details. - x-authenticated: true - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_store/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_store/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_store/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Store - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminExtendedStoresRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostStore - summary: Update Store Details - description: Update the Store's details. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostStoreReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_store/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_store/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_store/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Store - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminStoresRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_store_currencies_{code}.yaml b/www/apps/api-reference/specs/admin/paths/admin_store_currencies_{code}.yaml deleted file mode 100644 index ab1f5e055d..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_store_currencies_{code}.yaml +++ /dev/null @@ -1,117 +0,0 @@ -post: - operationId: PostStoreCurrenciesCode - summary: Add a Currency Code - description: >- - Add a Currency Code to the available currencies in a store. This does not - create new currencies, as currencies are defined within the Medusa backend. - To create a currency, you can create a migration that inserts the currency - into the database. - x-authenticated: true - parameters: - - in: path - name: code - required: true - description: The 3 character ISO currency code. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: addCurrency - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_store_currencies_{code}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_store_currencies_{code}/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_store_currencies_{code}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Store - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminStoresRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteStoreCurrenciesCode - summary: Remove a Currency - description: >- - Remove a Currency Code from the available currencies in a store. This does - not completely delete the currency and it can be added again later to the - store. - x-authenticated: true - parameters: - - in: path - name: code - required: true - description: The 3 character ISO currency code. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: deleteCurrency - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_store_currencies_{code}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_store_currencies_{code}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_store_currencies_{code}/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Store - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminStoresRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_store_payment-providers.yaml b/www/apps/api-reference/specs/admin/paths/admin_store_payment-providers.yaml deleted file mode 100644 index 5d9018dd67..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_store_payment-providers.yaml +++ /dev/null @@ -1,45 +0,0 @@ -get: - operationId: GetStorePaymentProviders - summary: List Payment Providers - description: Retrieve a list of available Payment Providers in a store. - x-authenticated: true - x-codegen: - method: listPaymentProviders - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_store_payment-providers/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_store_payment-providers/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_store_payment-providers/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Store - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminPaymentProvidersList.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_store_tax-providers.yaml b/www/apps/api-reference/specs/admin/paths/admin_store_tax-providers.yaml deleted file mode 100644 index d90408c6ab..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_store_tax-providers.yaml +++ /dev/null @@ -1,45 +0,0 @@ -get: - operationId: GetStoreTaxProviders - summary: List Tax Providers - description: Retrieve a list of available Tax Providers in a store. - x-authenticated: true - x-codegen: - method: listTaxProviders - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_store_tax-providers/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_store_tax-providers/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_store_tax-providers/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Store - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxProvidersList.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_stores.yaml b/www/apps/api-reference/specs/admin/paths/admin_stores.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_stores.yaml rename to www/apps/api-reference/specs/admin/paths/admin_stores.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_stores_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_stores_{id}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_stores_{id}.yaml rename to www/apps/api-reference/specs/admin/paths/admin_stores_{id}.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_swaps.yaml b/www/apps/api-reference/specs/admin/paths/admin_swaps.yaml deleted file mode 100644 index 41cfb9b155..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_swaps.yaml +++ /dev/null @@ -1,59 +0,0 @@ -get: - operationId: GetSwaps - summary: List Swaps - description: Retrieve a list of Swaps. The swaps can be paginated. - parameters: - - in: query - name: limit - description: Limit the number of swaps returned. - schema: - type: number - default: '50' - - in: query - name: offset - description: The number of swaps to skip when retrieving the swaps. - schema: - type: number - default: '0' - x-authenticated: true - x-codegen: - method: list - queryParams: AdminGetSwapsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_swaps/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_swaps/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_swaps/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Swaps - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminSwapsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_swaps_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_swaps_{id}.yaml deleted file mode 100644 index 20e67289ed..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_swaps_{id}.yaml +++ /dev/null @@ -1,52 +0,0 @@ -get: - operationId: GetSwapsSwap - summary: Get a Swap - description: Retrieve a Swap's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Swap. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_swaps_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_swaps_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_swaps_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Swaps - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminSwapsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_tax-rates.yaml b/www/apps/api-reference/specs/admin/paths/admin_tax-rates.yaml index c2ff0e31b4..8b95f98131 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_tax-rates.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_tax-rates.yaml @@ -2,190 +2,22 @@ get: operationId: GetTaxRates summary: List Tax Rates description: >- - Retrieve a list of Tax Rates. The tax rates can be filtered by fields such - as `name` or `rate`. The tax rates can also be paginated. + Retrieve a list of tax rates. The tax rates can be filtered by fields such + as `id`. The tax rates can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: name - description: Filter by name. - schema: - type: string - - in: query - name: region_id - style: form - explode: false - description: Filter by Region IDs - schema: - oneOf: - - type: string - - type: array - items: - type: string - - in: query - name: code - description: Filter by code. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: rate - style: form - explode: false - description: Filter by Rate - schema: - oneOf: - - type: number - - type: object - properties: - lt: - type: number - description: filter by rates less than this number - gt: - type: number - description: filter by rates greater than this number - lte: - type: number - description: filter by rates less than or equal to this number - gte: - type: number - description: filter by rates greater than or equal to this number - - in: query - name: q - description: Term used to search tax rates by name. - schema: - type: string - - in: query - name: order - description: A tax rate field to sort-order the retrieved tax rates by. - schema: - type: string - - in: query - name: offset - description: The number of tax rates to skip when retrieving the tax rates. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of tax rates returned. - schema: - type: integer - default: 50 - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned tax - rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-codegen: - method: list - queryParams: AdminGetTaxRatesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_tax-rates/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_tax-rates/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_tax-rates/get.sh + parameters: [] security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_tax-rates/get.sh tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxRatesListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -198,66 +30,33 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} post: operationId: PostTaxRates - summary: Create a Tax Rate - description: Create a Tax Rate. - parameters: - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned tax - rate. - style: form - explode: false - schema: - type: array - items: - type: string + summary: Create Tax Rate + description: Create a tax rate. x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: ../components/schemas/AdminPostTaxRatesReq.yaml - x-codegen: - method: create - queryParams: AdminPostTaxRatesParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_tax-rates/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_tax-rates/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_tax-rates/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxRatesRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}.yaml index 798f39125c..0ee80d9166 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}.yaml @@ -1,64 +1,29 @@ get: - operationId: GetTaxRatesTaxRate + operationId: GetTaxRatesId summary: Get a Tax Rate - description: Retrieve a Tax Rate's details. + description: >- + Retrieve a tax rate by its ID. You can expand the tax rate's relations or + select the fields that should be returned. + x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The tax rate's ID. required: true - description: ID of the tax rate. schema: type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned tax - rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - x-codegen: - method: retrieve - queryParams: AdminGetTaxRatesTaxRateParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_tax-rates_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_tax-rates_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_tax-rates_{id}/get.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_tax-rates_{id}/get.sh tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxRatesRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -71,72 +36,39 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} post: - operationId: PostTaxRatesTaxRate + operationId: PostTaxRatesId summary: Update a Tax Rate - description: Update a Tax Rate's details. + description: Update a tax rate's details. + x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The tax rate's ID. required: true - description: ID of the tax rate. schema: type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned tax - rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: ../components/schemas/AdminPostTaxRatesTaxRateReq.yaml - x-codegen: - method: update - queryParams: AdminPostTaxRatesTaxRateParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_tax-rates_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_tax-rates_{id}/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_tax-rates_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxRatesRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -150,47 +82,29 @@ post: '500': $ref: ../components/responses/500_error.yaml delete: - operationId: DeleteTaxRatesTaxRate + operationId: DeleteTaxRatesId summary: Delete a Tax Rate - description: >- - Delete a Tax Rate. Resources associated with the tax rate, such as products - or product types, are not deleted. + description: Delete a tax rate. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The tax rate's ID. required: true - description: The ID of the Shipping Option. schema: type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_tax-rates_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_tax-rates_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_tax-rates_{id}/delete.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_tax-rates_{id}/delete.sh tags: - Tax Rates responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxRatesDeleteRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -203,3 +117,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_product-types_batch.yaml b/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_product-types_batch.yaml deleted file mode 100644 index a6a7b73e11..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_product-types_batch.yaml +++ /dev/null @@ -1,163 +0,0 @@ -post: - operationId: PostTaxRatesTaxRateProductTypes - summary: Add to Product Types - description: Add Product Types to a Tax Rate. - parameters: - - in: path - name: id - required: true - description: ID of the tax rate. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned tax - rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostTaxRatesTaxRateProductTypesReq.yaml - x-codegen: - method: addProductTypes - queryParams: AdminPostTaxRatesTaxRateProductTypesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_tax-rates_{id}_product-types_batch/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_tax-rates_{id}_product-types_batch/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_tax-rates_{id}_product-types_batch/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Tax Rates - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxRatesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteTaxRatesTaxRateProductTypes - summary: Remove Product Types from Rate - description: >- - Remove product types from a tax rate. This only removes the association - between the product types and the tax rate. It does not delete the product - types. - parameters: - - in: path - name: id - required: true - description: ID of the tax rate. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned tax - rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminDeleteTaxRatesTaxRateProductTypesReq.yaml - x-codegen: - method: removeProductTypes - queryParams: AdminDeleteTaxRatesTaxRateProductTypesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_tax-rates_{id}_product-types_batch/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_tax-rates_{id}_product-types_batch/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_tax-rates_{id}_product-types_batch/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Tax Rates - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxRatesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_products_batch.yaml b/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_products_batch.yaml deleted file mode 100644 index d5c460fb81..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_products_batch.yaml +++ /dev/null @@ -1,159 +0,0 @@ -post: - operationId: PostTaxRatesTaxRateProducts - summary: Add to Products - description: Add products to a tax rate. - parameters: - - in: path - name: id - required: true - description: ID of the tax rate. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned tax - rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostTaxRatesTaxRateProductsReq.yaml - x-codegen: - method: addProducts - queryParams: AdminPostTaxRatesTaxRateProductsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_tax-rates_{id}_products_batch/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_tax-rates_{id}_products_batch/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_tax-rates_{id}_products_batch/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Tax Rates - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxRatesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteTaxRatesTaxRateProducts - summary: Remove Products from Rate - description: >- - Remove products from a tax rate. This only removes the association between - the products and the tax rate. It does not delete the products. - parameters: - - in: path - name: id - required: true - description: ID of the tax rate. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned tax - rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminDeleteTaxRatesTaxRateProductsReq.yaml - x-codegen: - method: removeProducts - queryParams: AdminDeleteTaxRatesTaxRateProductsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_tax-rates_{id}_products_batch/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_tax-rates_{id}_products_batch/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_tax-rates_{id}_products_batch/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Tax Rates - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxRatesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_tax-rates_{id}_rules.yaml b/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_rules.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_tax-rates_{id}_rules.yaml rename to www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_rules.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_tax-rates_{id}_rules_{rule_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_rules_{rule_id}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_tax-rates_{id}_rules_{rule_id}.yaml rename to www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_rules_{rule_id}.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_shipping-options_batch.yaml b/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_shipping-options_batch.yaml deleted file mode 100644 index 5c25dcd132..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_tax-rates_{id}_shipping-options_batch.yaml +++ /dev/null @@ -1,167 +0,0 @@ -post: - operationId: PostTaxRatesTaxRateShippingOptions - summary: Add to Shipping Options - description: Add Shipping Options to a Tax Rate. - parameters: - - in: path - name: id - required: true - description: ID of the tax rate. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned tax - rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminPostTaxRatesTaxRateShippingOptionsReq.yaml - x-codegen: - method: addShippingOptions - queryParams: AdminPostTaxRatesTaxRateShippingOptionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_tax-rates_{id}_shipping-options_batch/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_tax-rates_{id}_shipping-options_batch/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_tax-rates_{id}_shipping-options_batch/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Tax Rates - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxRatesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteTaxRatesTaxRateShippingOptions - summary: Remove Shipping Options from Rate - description: >- - Remove shipping options from a tax rate. This only removes the association - between the shipping options and the tax rate. It does not delete the - shipping options. - parameters: - - in: path - name: id - required: true - description: ID of the tax rate. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned tax rate. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned tax - rate. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/AdminDeleteTaxRatesTaxRateShippingOptionsReq.yaml - x-codegen: - method: removeShippingOptions - queryParams: AdminDeleteTaxRatesTaxRateShippingOptionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/admin_tax-rates_{id}_shipping-options_batch/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/admin_tax-rates_{id}_shipping-options_batch/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/admin_tax-rates_{id}_shipping-options_batch/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Tax Rates - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminTaxRatesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_tax-regions.yaml b/www/apps/api-reference/specs/admin/paths/admin_tax-regions.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_tax-regions.yaml rename to www/apps/api-reference/specs/admin/paths/admin_tax-regions.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_tax-regions_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_tax-regions_{id}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_tax-regions_{id}.yaml rename to www/apps/api-reference/specs/admin/paths/admin_tax-regions_{id}.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_uploads.yaml b/www/apps/api-reference/specs/admin/paths/admin_uploads.yaml deleted file mode 100644 index 5c5b0333fe..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_uploads.yaml +++ /dev/null @@ -1,104 +0,0 @@ -post: - operationId: PostUploads - summary: Upload Files - description: >- - Upload at least one file to a public bucket or storage. The file upload is - handled by the file service installed on the Medusa backend. - x-authenticated: true - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - files: - type: string - format: binary - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_uploads/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_uploads/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_uploads/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Uploads - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminUploadsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteUploads - summary: Delete an Uploaded File - description: >- - Delete an uploaded file from storage. The file is deleted using the - installed file service on the Medusa backend. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminDeleteUploadsReq.yaml - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_uploads/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_uploads/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_uploads/delete.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Uploads - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDeleteUploadsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_uploads_download-url.yaml b/www/apps/api-reference/specs/admin/paths/admin_uploads_download-url.yaml deleted file mode 100644 index 3fb82c3f51..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_uploads_download-url.yaml +++ /dev/null @@ -1,50 +0,0 @@ -post: - operationId: PostUploadsDownloadUrl - summary: Get a File's Download URL - description: >- - Create and retrieve a presigned or public download URL for a file. The URL - creation is handled by the file service installed on the Medusa backend. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminPostUploadsDownloadUrlReq.yaml - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_uploads_download-url/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_uploads_download-url/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_uploads_download-url/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Uploads - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminUploadsDownloadUrlRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_uploads_protected.yaml b/www/apps/api-reference/specs/admin/paths/admin_uploads_protected.yaml deleted file mode 100644 index 2fd2cd20d7..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_uploads_protected.yaml +++ /dev/null @@ -1,54 +0,0 @@ -post: - operationId: PostUploadsProtected - summary: Protected File Upload - description: >- - Upload at least one file to an ACL or a non-public bucket. The file upload - is handled by the file service installed on the Medusa backend. - x-authenticated: true - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - files: - type: string - format: binary - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_uploads_protected/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_uploads_protected/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_uploads_protected/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Uploads - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminUploadsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_users.yaml b/www/apps/api-reference/specs/admin/paths/admin_users.yaml index 23af6b6cb9..795e7ab513 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_users.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_users.yaml @@ -2,160 +2,22 @@ get: operationId: GetUsers summary: List Users description: >- - Retrieves a list of users. The users can be filtered by fields such as `q` - or `email`. The users can also be sorted or paginated. + Retrieve a list of users. The users can be filtered by fields such as `id`. + The users can also be sorted or paginated. x-authenticated: true - parameters: - - in: query - name: email - description: Filter by email. - schema: - type: string - - in: query - name: first_name - description: Filter by first name. - schema: - type: string - - in: query - name: last_name - description: Filter by last name. - schema: - type: string - - in: query - name: q - description: Term used to search users' first name, last name, and email. - schema: - type: string - - in: query - name: order - description: A user field to sort-order the retrieved users by. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by user IDs. - schema: - oneOf: - - type: string - description: ID of the user. - - type: array - items: - type: string - description: ID of a user. - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: deleted_at - description: Filter by a deletion date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: offset - description: The number of users to skip when retrieving the users. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of users returned. - schema: - type: integer - default: 20 - - in: query - name: fields - description: Comma-separated fields that should be included in the returned users. - schema: - type: string - x-codegen: - method: list - queryParams: AdminGetUsersParams + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_users/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_users/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_users/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Users responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminUsersListRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -168,47 +30,28 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostUsers - summary: Create a User - description: >- - Create an admin User. The user has the same privileges as all admin users, - and will be able to authenticate and perform admin functionalities right - after creation. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: ../components/schemas/AdminCreateUserRequest.yaml - x-codegen: - method: create + schema: {} +post: + operationId: PostUsers + summary: Create User + description: Create a user. + x-authenticated: true + parameters: [] + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_users/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_users/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_users/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Users responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminUserRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -221,3 +64,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_users_me.yaml b/www/apps/api-reference/specs/admin/paths/admin_users_me.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_users_me.yaml rename to www/apps/api-reference/specs/admin/paths/admin_users_me.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_users_password-token.yaml b/www/apps/api-reference/specs/admin/paths/admin_users_password-token.yaml deleted file mode 100644 index 48baf75e04..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_users_password-token.yaml +++ /dev/null @@ -1,57 +0,0 @@ -post: - operationId: PostUsersUserPasswordToken - summary: Request Password Reset - description: >- - Generate a password token for an admin user with a given email. This also - triggers the `user.password_reset` event. So, if you have a Notification - Service installed that can handle this event, a notification, such as an - email, will be sent to the user. The token is triggered as part of the - `user.password_reset` event's payload. That token must be used later to - reset the password using the [Reset - Password](https://docs.medusajs.com/api/admin#users_postusersuserpassword) - API Route. - externalDocs: - description: How to reset a user's password - url: >- - https://docs.medusajs.com/modules/users/admin/manage-profile#reset-password - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminResetPasswordTokenRequest.yaml - x-codegen: - method: sendResetPasswordToken - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_users_password-token/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_users_password-token/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_users_password-token/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Users - responses: - '204': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_users_reset-password.yaml b/www/apps/api-reference/specs/admin/paths/admin_users_reset-password.yaml deleted file mode 100644 index 46e9bebb59..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_users_reset-password.yaml +++ /dev/null @@ -1,56 +0,0 @@ -post: - operationId: PostUsersUserPassword - summary: Reset Password - description: >- - Reset the password of an admin User using their reset password token. A user - must request to reset their password first before attempting to reset their - password with this request. - externalDocs: - description: How to reset a user's password - url: >- - https://docs.medusajs.com/modules/users/admin/manage-profile#reset-password - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminResetPasswordRequest.yaml - x-codegen: - method: resetPassword - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_users_reset-password/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_users_reset-password/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_users_reset-password/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Users - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminUserRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_users_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_users_{id}.yaml index 04a88d0f85..2dad04fe01 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_users_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_users_{id}.yaml @@ -1,43 +1,29 @@ get: - operationId: GetUsersUser + operationId: GetUsersId summary: Get a User - description: Retrieve an admin user's details. + description: >- + Retrieve a user by its ID. You can expand the user's relations or select the + fields that should be returned. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The user's ID. required: true - description: The ID of the User. schema: type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_users_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_users_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_users_{id}/get.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_users_{id}/get.sh tags: - Users responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminUserRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -50,51 +36,39 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} post: - operationId: PostUsersUser + operationId: PostUsersId summary: Update a User - description: Update an admin user's details. + description: Update a user's details. + x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The user's ID. required: true - description: The ID of the User. schema: type: string - x-authenticated: true + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] requestBody: content: application/json: schema: $ref: ../components/schemas/AdminUpdateUserRequest.yaml - x-codegen: - method: update x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_users_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_users_{id}/post.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/admin_users_{id}/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] tags: - Users responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminUserRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -108,47 +82,29 @@ post: '500': $ref: ../components/responses/500_error.yaml delete: - operationId: DeleteUsersUser + operationId: DeleteUsersId summary: Delete a User - description: >- - Delete a User. Once deleted, the user will not be able to authenticate or - perform admin functionalities. + description: Delete a user. x-authenticated: true parameters: - - in: path - name: id + - name: id + in: path + description: The user's ID. required: true - description: The ID of the User. schema: type: string - x-codegen: - method: delete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_users_{id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_users_{id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_users_{id}/delete.sh security: - api_token: [] - cookie_auth: [] - jwt_token: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_users_{id}/delete.sh tags: - Users responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminDeleteUserRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -161,3 +117,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/admin/paths/admin_variants.yaml b/www/apps/api-reference/specs/admin/paths/admin_variants.yaml deleted file mode 100644 index e8603018f6..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_variants.yaml +++ /dev/null @@ -1,188 +0,0 @@ -get: - operationId: GetVariants - summary: List Product Variants - description: >- - Retrieve a list of Product Variants. The product variant can be filtered by - fields such as `id` or `title`. The product variant can also be paginated. - x-authenticated: true - parameters: - - in: query - name: id - style: form - explode: false - description: Filter by product variant IDs. - schema: - oneOf: - - type: string - description: A product variant ID. - - type: array - description: An array of product variant IDs. - items: - type: string - - in: query - name: expand - description: >- - "Comma-separated relations that should be expanded in the returned - product variants." - schema: - type: string - - in: query - name: fields - description: >- - "Comma-separated fields that should be included in the returned product - variants." - schema: - type: string - - in: query - name: offset - description: >- - The number of product variants to skip when retrieving the product - variants. - schema: - type: number - default: '0' - - in: query - name: limit - description: Limit the number of product variants returned. - schema: - type: number - default: '100' - - in: query - name: order - 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 `-`. - schema: - type: string - - in: query - name: manage_inventory - description: Filter product variants by whether their inventory is managed or not. - schema: - type: boolean - - in: query - name: allow_backorder - description: >- - Filter product variants by whether they are allowed to be backordered or - not. - schema: - type: boolean - - in: query - name: cart_id - style: form - explode: false - description: The ID of the cart to use for the price selection context. - schema: - type: string - - in: query - name: region_id - style: form - explode: false - description: The ID of the region to use for the price selection context. - schema: - type: string - externalDocs: - description: Price selection context overview - url: >- - https://docs.medusajs.com/modules/price-lists/price-selection-strategy#context-object - - in: query - name: currency_code - style: form - explode: false - description: >- - The 3 character ISO currency code to use for the price selection - context. - schema: - type: string - externalDocs: - description: Price selection context overview - url: >- - https://docs.medusajs.com/modules/price-lists/price-selection-strategy#context-object - - in: query - name: customer_id - style: form - explode: false - description: The ID of the customer to use for the price selection context. - schema: - type: string - externalDocs: - description: Price selection context overview - url: >- - https://docs.medusajs.com/modules/price-lists/price-selection-strategy#context-object - - in: query - name: title - style: form - explode: false - description: Filter by title. - schema: - oneOf: - - type: string - description: a single title to filter by - - type: array - description: multiple titles to filter by - items: - type: string - - in: query - name: inventory_quantity - description: Filter by available inventory quantity - schema: - oneOf: - - type: number - description: a specific number to filter by. - - type: object - description: filter using less and greater than comparisons. - properties: - lt: - type: number - description: filter by inventory quantity less than this number - gt: - type: number - description: filter by inventory quantity greater than this number - lte: - type: number - description: filter by inventory quantity less than or equal to this number - gte: - type: number - description: >- - filter by inventory quantity greater than or equal to this - number - x-codegen: - method: list - queryParams: AdminGetVariantsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_variants/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_variants/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_variants/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Variants - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminVariantsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_variants_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_variants_{id}.yaml deleted file mode 100644 index 373135b647..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_variants_{id}.yaml +++ /dev/null @@ -1,67 +0,0 @@ -get: - operationId: GetVariantsVariant - summary: Get a Product variant - description: Retrieve a product variant's details. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the product variant. - schema: - type: string - - in: query - name: expand - description: >- - "Comma-separated relations that should be expanded in the returned - product variant." - schema: - type: string - - in: query - name: fields - description: >- - "Comma-separated fields that should be included in the returned product - variant." - schema: - type: string - x-codegen: - method: retrieve - queryParams: AdminGetVariantParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_variants_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_variants_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_variants_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Variants - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminVariantsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/admin/paths/admin_variants_{id}_inventory.yaml b/www/apps/api-reference/specs/admin/paths/admin_variants_{id}_inventory.yaml deleted file mode 100644 index cf22026890..0000000000 --- a/www/apps/api-reference/specs/admin/paths/admin_variants_{id}_inventory.yaml +++ /dev/null @@ -1,52 +0,0 @@ -get: - operationId: GetVariantsVariantInventory - summary: Get Variant's Inventory - description: Retrieve the available inventory of a Product Variant. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The Product Variant ID. - schema: - type: string - x-codegen: - method: getInventory - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/admin_variants_{id}_inventory/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/admin_variants_{id}_inventory/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/admin_variants_{id}_inventory/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Variants - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/AdminGetVariantsVariantInventoryRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions.yaml b/www/apps/api-reference/specs/admin/paths/admin_workflows-executions.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions.yaml rename to www/apps/api-reference/specs/admin/paths/admin_workflows-executions.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{id}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{id}.yaml rename to www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{id}.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_run.yaml b/www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_run.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_run.yaml rename to www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_run.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_steps_failure.yaml b/www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_steps_failure.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_steps_failure.yaml rename to www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_steps_failure.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_steps_success.yaml b/www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_steps_success.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_steps_success.yaml rename to www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_steps_success.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_subscribe.yaml b/www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_subscribe.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_subscribe.yaml rename to www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_subscribe.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_{transaction_id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_{transaction_id}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_{transaction_id}.yaml rename to www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_{transaction_id}.yaml diff --git a/www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe.yaml b/www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/paths/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe.yaml rename to www/apps/api-reference/specs/admin/paths/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe.yaml diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth/delete.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth/delete.js deleted file mode 100644 index 57c19c98ad..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth/delete.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.auth.deleteSession() -.then(() => { - // customer logged out successfully -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth/get.js deleted file mode 100644 index 6af347259c..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged -medusa.auth.getSession() -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth/post.js deleted file mode 100644 index 0e7c68a624..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.auth.authenticate({ - email: "user@example.com", - password: "user@example.com" -}) -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth_token/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth_token/post.js deleted file mode 100644 index 20dc73ca00..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth_token/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.auth.getToken({ - email: 'user@example.com', - password: 'supersecret' -}) -.then(({ access_token }) => { - console.log(access_token); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth_{email}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth_{email}/get.js deleted file mode 100644 index a28a5ae8a0..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_auth_{email}/get.js +++ /dev/null @@ -1,3 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.auth.exists("user@example.com") diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts/post.js deleted file mode 100644 index 9024defc29..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts/post.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.create() -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}/get.js deleted file mode 100644 index 69ada822d3..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.retrieve(cartId) -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}/post.js deleted file mode 100644 index ec553a1c5c..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}/post.js +++ /dev/null @@ -1,8 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.update(cartId, { - email: "user@example.com" -}) -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_complete/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_complete/post.js deleted file mode 100644 index c146a2a6c1..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_complete/post.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.complete(cartId) -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_discounts_{code}/delete.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_discounts_{code}/delete.js deleted file mode 100644 index aa52289e46..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_discounts_{code}/delete.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.deleteDiscount(cartId, code) -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_line-items/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_line-items/post.js deleted file mode 100644 index cd32dd64ad..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_line-items/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.lineItems.create(cart_id, { - variant_id, - quantity: 1 -}) -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_line-items_{line_id}/delete.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_line-items_{line_id}/delete.js deleted file mode 100644 index 574a156c07..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_line-items_{line_id}/delete.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.lineItems.delete(cartId, lineId) -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_line-items_{line_id}/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_line-items_{line_id}/post.js deleted file mode 100644 index 4a48648faf..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_line-items_{line_id}/post.js +++ /dev/null @@ -1,8 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.lineItems.update(cartId, lineId, { - quantity: 1 -}) -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-session/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-session/post.js deleted file mode 100644 index 092175fa75..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-session/post.js +++ /dev/null @@ -1,8 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.setPaymentSession(cartId, { - provider_id: "manual" -}) -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions/post.js deleted file mode 100644 index 04f47612d5..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions/post.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.createPaymentSessions(cartId) -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}/delete.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}/delete.js deleted file mode 100644 index d943b70afe..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}/delete.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.deletePaymentSession(cartId, "manual") -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}/post.js deleted file mode 100644 index 47742d12c2..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.updatePaymentSession(cartId, "manual", { - data: { - - } -}) -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.js deleted file mode 100644 index a6e94cbd04..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.refreshPaymentSession(cartId, "manual") -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_shipping-methods/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_shipping-methods/post.js deleted file mode 100644 index 97ea371adf..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_shipping-methods/post.js +++ /dev/null @@ -1,8 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.carts.addShippingMethod(cartId, { - option_id -}) -.then(({ cart }) => { - console.log(cart.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_collections/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_collections/get.js deleted file mode 100644 index bac19e5f96..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_collections/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.collections.list() -.then(({ collections, limit, offset, count }) => { - console.log(collections.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_collections_{id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_collections_{id}/get.js deleted file mode 100644 index da1058fcc8..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_collections_{id}/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.collections.retrieve(collectionId) -.then(({ collection }) => { - console.log(collection.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers/post.js deleted file mode 100644 index e3a8ed6cfb..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers/post.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.customers.create({ - first_name: "Alec", - last_name: "Reynolds", - email: "user@example.com", - password: "supersecret" -}) -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me/get.js deleted file mode 100644 index 0074f411fd..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged -medusa.customers.retrieve() -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me/post.js deleted file mode 100644 index e37d3a0676..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged -medusa.customers.update({ - first_name: "Laury" -}) -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses/post.js deleted file mode 100644 index 8530ec651e..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses/post.js +++ /dev/null @@ -1,19 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged -medusa.customers.addresses.addAddress({ - address: { - first_name: "Celia", - last_name: "Schumm", - address_1: "225 Bednar Curve", - city: "Danielville", - country_code: "US", - postal_code: "85137", - phone: "981-596-6748 x90188", - company: "Wyman LLC", - province: "Georgia", - } -}) -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses_{address_id}/delete.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses_{address_id}/delete.js deleted file mode 100644 index 1b24012605..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses_{address_id}/delete.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged -medusa.customers.addresses.deleteAddress(addressId) -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses_{address_id}/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses_{address_id}/post.js deleted file mode 100644 index 265f70ba62..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses_{address_id}/post.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged -medusa.customers.addresses.updateAddress(addressId, { - first_name: "Gina" -}) -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_orders/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_orders/get.js deleted file mode 100644 index 9fc4bda68d..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_orders/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged -medusa.customers.listOrders() -.then(({ orders, limit, offset, count }) => { - console.log(orders); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_payment-methods/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_payment-methods/get.js deleted file mode 100644 index f8a9fab751..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_payment-methods/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged -medusa.customers.paymentMethods.list() -.then(({ payment_methods }) => { - console.log(payment_methods.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_password-reset/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_password-reset/post.js deleted file mode 100644 index 2a09881c00..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_password-reset/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.customers.resetPassword({ - email: "user@example.com", - password: "supersecret", - token: "supersecrettoken" -}) -.then(({ customer }) => { - console.log(customer.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_password-token/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_password-token/post.js deleted file mode 100644 index 57d7adff0d..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_password-token/post.js +++ /dev/null @@ -1,11 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.customers.generatePasswordToken({ - email: "user@example.com" -}) -.then(() => { - // successful -}) -.catch(() => { - // failed -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_gift-cards_{code}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_gift-cards_{code}/get.js deleted file mode 100644 index 699716e7f2..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_gift-cards_{code}/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.giftCards.retrieve(code) -.then(({ gift_card }) => { - console.log(gift_card.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_order-edits_{id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_order-edits_{id}/get.js deleted file mode 100644 index 3000f48539..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_order-edits_{id}/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.orderEdits.retrieve(orderEditId) -.then(({ order_edit }) => { - console.log(order_edit.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_order-edits_{id}_complete/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_order-edits_{id}_complete/post.js deleted file mode 100644 index ffe9b8856a..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_order-edits_{id}_complete/post.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.orderEdits.complete(orderEditId) -.then(({ order_edit }) => { - console.log(order_edit.id) -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_order-edits_{id}_decline/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_order-edits_{id}_decline/post.js deleted file mode 100644 index 0da8cade93..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_order-edits_{id}_decline/post.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.orderEdits.decline(orderEditId) -.then(({ order_edit }) => { - console.log(order_edit.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders/get.js deleted file mode 100644 index 21e2d24916..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders/get.js +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.orders.lookupOrder({ - display_id: 1, - email: "user@example.com" -}) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_batch_customer_token/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_batch_customer_token/post.js deleted file mode 100644 index 961a68b881..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_batch_customer_token/post.js +++ /dev/null @@ -1,12 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.orders.requestCustomerOrders({ - order_ids, -}) -.then(() => { - // successful -}) -.catch(() => { - // an error occurred -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_cart_{cart_id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_cart_{cart_id}/get.js deleted file mode 100644 index 52f1632cee..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_cart_{cart_id}/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.orders.retrieveByCartId(cartId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_customer_confirm/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_customer_confirm/post.js deleted file mode 100644 index b8d4a495fd..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_customer_confirm/post.js +++ /dev/null @@ -1,12 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.orders.confirmRequest( - token, -) -.then(() => { - // successful -}) -.catch(() => { - // an error occurred -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_{id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_{id}/get.js deleted file mode 100644 index d71044e4bd..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_{id}/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.orders.retrieve(orderId) -.then(({ order }) => { - console.log(order.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}/get.js deleted file mode 100644 index d0ea61ee9a..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.paymentCollections.retrieve(paymentCollectionId) -.then(({ payment_collection }) => { - console.log(payment_collection.id) -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions/post.js deleted file mode 100644 index af30eb8c00..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.paymentCollections.managePaymentSession(payment_id, { provider_id: "stripe" }) -.then(({ payment_collection }) => { - console.log(payment_collection.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_batch/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_batch/post.js deleted file mode 100644 index 47433b822e..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_batch/post.js +++ /dev/null @@ -1,36 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token - -// Total amount = 10000 - -// Example 1: Adding two new sessions -medusa.paymentCollections.managePaymentSessionsBatch(paymentId, { - sessions: [ - { - provider_id: "stripe", - amount: 5000, - }, - { - provider_id: "manual", - amount: 5000, - }, - ] -}) -.then(({ payment_collection }) => { - console.log(payment_collection.id); -}) - -// Example 2: Updating one session and removing the other -medusa.paymentCollections.managePaymentSessionsBatch(paymentId, { - sessions: [ - { - provider_id: "stripe", - amount: 10000, - session_id: "ps_123456" - }, - ] -}) -.then(({ payment_collection }) => { - console.log(payment_collection.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_batch_authorize/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_batch_authorize/post.js deleted file mode 100644 index 75c2b76bd4..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_batch_authorize/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.paymentCollections.authorize(paymentId) -.then(({ payment_collection }) => { - console.log(payment_collection.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_{session_id}/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_{session_id}/post.js deleted file mode 100644 index ac448401c8..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_{session_id}/post.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.paymentCollections.refreshPaymentSession(paymentCollectionId, sessionId) -.then(({ payment_session }) => { - console.log(payment_session.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_{session_id}_authorize/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_{session_id}_authorize/post.js deleted file mode 100644 index 0f8f404651..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_payment-collections_{id}_sessions_{session_id}_authorize/post.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.paymentCollections.authorize(paymentId, sessionId) -.then(({ payment_collection }) => { - console.log(payment_collection.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-categories/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-categories/get.js deleted file mode 100644 index 209e588278..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-categories/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.productCategories.list() -.then(({ product_categories, limit, offset, count }) => { - console.log(product_categories.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-categories_{id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-categories_{id}/get.js deleted file mode 100644 index f9f29cb332..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-categories_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.productCategories.retrieve(productCategoryId) -.then(({ product_category }) => { - console.log(product_category.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-tags/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-tags/get.js deleted file mode 100644 index 1eb88b7e7b..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-tags/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.productTags.list() -.then(({ product_tags }) => { - console.log(product_tags.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-types/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-types/get.js deleted file mode 100644 index c743a2291c..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_product-types/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.productTypes.list() -.then(({ product_types }) => { - console.log(product_types.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_products/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_products/get.js deleted file mode 100644 index 596abe3f0e..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_products/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.products.list() -.then(({ products, limit, offset, count }) => { - console.log(products.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_products_search/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_products_search/post.js deleted file mode 100644 index bfdccf1e16..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_products_search/post.js +++ /dev/null @@ -1,8 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.products.search({ - q: "Shirt" -}) -.then(({ hits }) => { - console.log(hits.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_products_{id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_products_{id}/get.js deleted file mode 100644 index 54c51f2c72..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_products_{id}/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.products.retrieve(productId) -.then(({ product }) => { - console.log(product.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_regions/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_regions/get.js deleted file mode 100644 index 7880325269..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_regions/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.regions.list() -.then(({ regions, count, limit, offset }) => { - console.log(regions.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_regions_{id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_regions_{id}/get.js deleted file mode 100644 index 534cf52c6b..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_regions_{id}/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.regions.retrieve(regionId) -.then(({ region }) => { - console.log(region.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_return-reasons/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_return-reasons/get.js deleted file mode 100644 index 28796b8688..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_return-reasons/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.returnReasons.list() -.then(({ return_reasons }) => { - console.log(return_reasons.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_return-reasons_{id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_return-reasons_{id}/get.js deleted file mode 100644 index 2cfe70cf1b..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_return-reasons_{id}/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.returnReasons.retrieve(reasonId) -.then(({ return_reason }) => { - console.log(return_reason.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_returns/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_returns/post.js deleted file mode 100644 index d74df1284b..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_returns/post.js +++ /dev/null @@ -1,14 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.returns.create({ - order_id, - items: [ - { - item_id, - quantity: 1 - } - ] -}) -.then((data) => { - console.log(data.return.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_shipping-options/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_shipping-options/get.js deleted file mode 100644 index 58d3105cf8..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_shipping-options/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.shippingOptions.list() -.then(({ shipping_options }) => { - console.log(shipping_options.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_shipping-options_{cart_id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_shipping-options_{cart_id}/get.js deleted file mode 100644 index 9fa3a08540..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_shipping-options_{cart_id}/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.shippingOptions.listCartOptions(cartId) -.then(({ shipping_options }) => { - console.log(shipping_options.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_swaps/post.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_swaps/post.js deleted file mode 100644 index 422457df9f..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_swaps/post.js +++ /dev/null @@ -1,20 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.swaps.create({ - order_id, - return_items: [ - { - item_id, - quantity: 1 - } - ], - additional_items: [ - { - variant_id, - quantity: 1 - } - ] -}) -.then(({ swap }) => { - console.log(swap.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_swaps_{cart_id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_swaps_{cart_id}/get.js deleted file mode 100644 index 6f1dd1d3a5..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_swaps_{cart_id}/get.js +++ /dev/null @@ -1,6 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -medusa.swaps.retrieveByCartId(cartId) -.then(({ swap }) => { - console.log(swap.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_variants/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_variants/get.js deleted file mode 100644 index 3eff911a1a..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_variants/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.product.variants.list() -.then(({ variants }) => { - console.log(variants.length); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_variants_{id}/get.js b/www/apps/api-reference/specs/store/code_samples/JavaScript/store_variants_{id}/get.js deleted file mode 100644 index 22555a6a1e..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/JavaScript/store_variants_{id}/get.js +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.product.variants.retrieve(productVariantId) -.then(({ variant }) => { - console.log(variant.id); -}) diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_auth/delete.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_auth/delete.sh deleted file mode 100644 index c1f3e1d616..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_auth/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl -X DELETE '{backend_url}/store/auth' \ --H 'Authorization: Bearer {access_token}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_auth/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_auth/get.sh deleted file mode 100644 index 1130a2116a..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_auth/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/store/auth' \ --H 'Authorization: Bearer {access_token}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_auth/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_auth/post.sh deleted file mode 100644 index 8ed9a1bbdd..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_auth/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/store/auth' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "password": "supersecret" -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_auth_token/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_auth_token/post.sh deleted file mode 100644 index c969e0fe3b..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_auth_token/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/store/auth/token' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "password": "supersecret" -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_auth_{email}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_auth_{email}/get.sh deleted file mode 100644 index 9db92183c3..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_auth_{email}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/auth/user@example.com' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts/post.sh index 35773c3a28..391027d3d6 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts/post.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts/post.sh @@ -1 +1 @@ -curl -X POST '{backend_url}/store/carts' +curl -X POST '{backend_url}/store/carts' \ No newline at end of file diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}/get.sh index e310cffd4d..dd696e7372 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}/get.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}/get.sh @@ -1 +1 @@ -curl '{backend_url}/store/carts/{id}' +curl '{backend_url}/store/carts/{id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}/post.sh index de30943ce4..39ee5de507 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}/post.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}/post.sh @@ -1,5 +1 @@ -curl -X POST '{backend_url}/store/carts/{id}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com" -}' +curl -X POST '{backend_url}/store/carts/{id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_complete/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_complete/post.sh deleted file mode 100644 index c91d1c5261..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_complete/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/carts/{id}/complete' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_discounts_{code}/delete.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_discounts_{code}/delete.sh deleted file mode 100644 index 0826678b4f..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_discounts_{code}/delete.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X DELETE '{backend_url}/store/carts/{id}/discounts/{code}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items/post.sh index b50a706000..3fab2d4346 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items/post.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items/post.sh @@ -1,6 +1 @@ -curl -X POST '{backend_url}/store/carts/{id}/line-items' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "variant_id": "{variant_id}", - "quantity": 1 -}' +curl -X POST '{backend_url}/store/carts/{id}/line-items' \ No newline at end of file diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/delete.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/delete.sh index 0dd4cb6f33..3673916dd9 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/delete.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/delete.sh @@ -1 +1 @@ -curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}' +curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/post.sh index 15aad42d69..f59518edc7 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/post.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_line-items_{line_id}/post.sh @@ -1,5 +1 @@ -curl -X POST '{backend_url}/store/carts/{id}/line-items/{line_id}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "quantity": 1 -}' +curl -X POST '{backend_url}/store/carts/{id}/line-items/{line_id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_payment-collections/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-collections/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_payment-collections/post.sh rename to www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-collections/post.sh diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-session/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-session/post.sh deleted file mode 100644 index 6234e08554..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-session/post.sh +++ /dev/null @@ -1,5 +0,0 @@ -curl -X POST '{backend_url}/store/carts/{id}/payment-sessions' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "provider_id": "manual" -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions/post.sh deleted file mode 100644 index 6961a5194c..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/carts/{id}/payment-sessions' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}/delete.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}/delete.sh deleted file mode 100644 index f5a7948e9f..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}/delete.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X DELETE '{backend_url}/store/carts/{id}/payment-sessions/{provider_id}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}/post.sh deleted file mode 100644 index af5abe0355..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}/post.sh +++ /dev/null @@ -1,5 +0,0 @@ -curl -X POST '{backend_url}/store/carts/{id}/payment-sessions/manual' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "data": {} -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.sh deleted file mode 100644 index bb4d9e4db9..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/carts/{id}/payment-sessions/{provider_id}/refresh' diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_promotions/delete.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_promotions/delete.sh similarity index 100% rename from www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_promotions/delete.sh rename to www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_promotions/delete.sh diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_promotions/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_promotions/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/store/code_samples/Shell/store_carts_{id}_promotions/post.sh rename to www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_promotions/post.sh diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_shipping-methods/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_shipping-methods/post.sh deleted file mode 100644 index 3e1e7f223e..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_shipping-methods/post.sh +++ /dev/null @@ -1,5 +0,0 @@ -curl -X POST '{backend_url}/store/carts/{id}/shipping-methods' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "option_id": "{option_id}", -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_taxes/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_taxes/post.sh index 105391345d..7d0ce0080e 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_taxes/post.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_carts_{id}_taxes/post.sh @@ -1 +1 @@ -curl -X POST '{backend_url}/store/carts/{id}/taxes' +curl -X POST '{backend_url}/store/carts/{id}/taxes' \ No newline at end of file diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_collections/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_collections/get.sh deleted file mode 100644 index 301b99f51d..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_collections/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/collections' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_collections_{id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_collections_{id}/get.sh deleted file mode 100644 index 2e4465790e..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_collections_{id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/collections/{id}' diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_currencies/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_currencies/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/store/code_samples/Shell/store_currencies/get.sh rename to www/apps/api-reference/specs/store/code_samples/Shell/store_currencies/get.sh diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_currencies_{code}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_currencies_{code}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/store/code_samples/Shell/store_currencies_{code}/get.sh rename to www/apps/api-reference/specs/store/code_samples/Shell/store_currencies_{code}/get.sh diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers/post.sh index a99f8c5936..080e5f6f70 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers/post.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers/post.sh @@ -1,8 +1 @@ -curl -X POST '{backend_url}/store/customers' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "first_name": "Alec", - "last_name": "Reynolds", - "email": "user@example.com", - "password": "supersecret" -}' +curl -X POST '{backend_url}/store/customers' \ No newline at end of file diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me/get.sh index beb12de62d..fe3d326466 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me/get.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me/get.sh @@ -1,2 +1 @@ -curl '{backend_url}/store/customers/me' \ --H 'Authorization: Bearer {access_token}' +curl '{backend_url}/store/customers/me' \ No newline at end of file diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me/post.sh deleted file mode 100644 index 390872ff80..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me/post.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X POST '{backend_url}/store/customers/me' \ --H 'Authorization: Bearer {access_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "first_name": "Laury" -}' diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses/get.sh rename to www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses/get.sh diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses/post.sh index 2565459f5a..2106fe7e19 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses/post.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses/post.sh @@ -1,13 +1 @@ -curl -X POST '{backend_url}/store/customers/me/addresses' \ --H 'Authorization: Bearer {access_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "address": { - "first_name": "Celia", - "last_name": "Schumm", - "address_1": "225 Bednar Curve", - "city": "Danielville", - "country_code": "US", - "postal_code": "85137" - } -}' +curl -X POST '{backend_url}/store/customers/me/addresses' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/delete.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/delete.sh index 609da1616a..9f87b916e6 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/delete.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/delete.sh @@ -1,2 +1 @@ -curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}' \ --H 'Authorization: Bearer {access_token}' +curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses_{address_id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/store/code_samples/Shell/store_customers_me_addresses_{address_id}/get.sh rename to www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/get.sh diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/post.sh index 402c7fe335..476a0feca9 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/post.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/post.sh @@ -1,6 +1 @@ -curl -X POST '{backend_url}/store/customers/me/addresses/{address_id}' \ --H 'Authorization: Bearer {access_token}' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "first_name": "Gina" -}' +curl -X POST '{backend_url}/store/customers/me/addresses/{address_id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_orders/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_orders/get.sh deleted file mode 100644 index fb9434ba22..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_orders/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/store/customers/me/orders' \ --H 'Authorization: Bearer {access_token}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_payment-methods/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_payment-methods/get.sh deleted file mode 100644 index 209780f74d..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_payment-methods/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/store/customers/me/payment-methods' \ --H 'Authorization: Bearer {access_token}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_password-reset/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_password-reset/post.sh deleted file mode 100644 index 52f616c440..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_password-reset/post.sh +++ /dev/null @@ -1,7 +0,0 @@ -curl -X POST '{backend_url}/store/customers/password-reset' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com", - "password": "supersecret", - "token": "supersecrettoken" -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_password-token/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_password-token/post.sh deleted file mode 100644 index 173acf3cf3..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers_password-token/post.sh +++ /dev/null @@ -1,5 +0,0 @@ -curl -X POST '{backend_url}/store/customers/password-token' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "user@example.com" -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{code}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{code}/get.sh deleted file mode 100644 index 8af3faf218..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{code}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/gift-cards/{code}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_order-edits_{id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_order-edits_{id}/get.sh deleted file mode 100644 index fb7ab82897..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_order-edits_{id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/order-edits/{id}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_order-edits_{id}_complete/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_order-edits_{id}_complete/post.sh deleted file mode 100644 index 10705e54e6..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_order-edits_{id}_complete/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/order-edits/{id}/complete' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_order-edits_{id}_decline/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_order-edits_{id}_decline/post.sh deleted file mode 100644 index 86177aabd0..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_order-edits_{id}_decline/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/order-edits/{id}/decline' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_orders/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_orders/get.sh deleted file mode 100644 index 0ee25c0597..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_orders/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/orders?display_id=1&email=user@example.com' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_batch_customer_token/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_batch_customer_token/post.sh deleted file mode 100644 index 43cbb40a84..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_batch_customer_token/post.sh +++ /dev/null @@ -1,5 +0,0 @@ -curl -X POST '{backend_url}/store/batch/customer/token' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "order_ids": ["id"], -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_cart_{cart_id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_cart_{cart_id}/get.sh deleted file mode 100644 index df5a94a490..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_cart_{cart_id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/orders/cart/{cart_id}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_customer_confirm/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_customer_confirm/post.sh deleted file mode 100644 index 72a8f4c650..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_customer_confirm/post.sh +++ /dev/null @@ -1,5 +0,0 @@ -curl -X POST '{backend_url}/store/orders/customer/confirm' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "token": "{token}", -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_{id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_{id}/get.sh deleted file mode 100644 index 1fe26c0e67..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_orders_{id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/orders/{id}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}/get.sh deleted file mode 100644 index 029d765835..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/payment-collections/{id}' diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_payment-collections_{id}_payment-sessions/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_payment-sessions/post.sh similarity index 100% rename from www/apps/api-reference/specs-v2/store/code_samples/Shell/store_payment-collections_{id}_payment-sessions/post.sh rename to www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_payment-sessions/post.sh diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions/post.sh deleted file mode 100644 index 94a2cc4ed8..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions/post.sh +++ /dev/null @@ -1,5 +0,0 @@ -curl -X POST '{backend_url}/store/payment-collections/{id}/sessions' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "provider_id": "stripe" -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_batch/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_batch/post.sh deleted file mode 100644 index bb9844dc68..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_batch/post.sh +++ /dev/null @@ -1,14 +0,0 @@ -curl -X POST '{backend_url}/store/payment-collections/{id}/sessions/batch' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "sessions": [ - { - "provider_id": "stripe", - "amount": 5000 - }, - { - "provider_id": "manual", - "amount": 5000 - } - ] -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_batch_authorize/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_batch_authorize/post.sh deleted file mode 100644 index c20efed601..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_batch_authorize/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/payment-collections/{id}/sessions/batch/authorize' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_{session_id}/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_{session_id}/post.sh deleted file mode 100644 index f80bd9e27a..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_{session_id}/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/payment-collections/{id}/sessions/{session_id}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_{session_id}_authorize/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_{session_id}_authorize/post.sh deleted file mode 100644 index 2fc63ad5ff..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_payment-collections_{id}_sessions_{session_id}_authorize/post.sh +++ /dev/null @@ -1 +0,0 @@ -curl -X POST '{backend_url}/store/payment-collections/{id}/sessions/{session_id}/authorize' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_product-categories/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_product-categories/get.sh deleted file mode 100644 index 5817a4a42d..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_product-categories/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/store/product-categories' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_product-categories_{id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_product-categories_{id}/get.sh deleted file mode 100644 index 7367240d94..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_product-categories_{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl '{backend_url}/store/product-categories/{id}' \ --H 'x-medusa-access-token: {api_token}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_product-tags/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_product-tags/get.sh deleted file mode 100644 index 9f68968cba..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_product-tags/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/product-tags' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_product-types/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_product-types/get.sh deleted file mode 100644 index 5d2e7d0bf7..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_product-types/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/product-types' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_products/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_products/get.sh deleted file mode 100644 index 7d1b4cf170..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_products/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/products' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_products_search/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_products_search/post.sh deleted file mode 100644 index c2a35aac84..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_products_search/post.sh +++ /dev/null @@ -1,5 +0,0 @@ -curl -X POST '{backend_url}/store/products/search' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "q": "Shirt" -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_products_{id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_products_{id}/get.sh deleted file mode 100644 index b3877d47f0..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_products_{id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/products/{id}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_regions/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_regions/get.sh index b9e54f8a73..b97508bcb2 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_regions/get.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_regions/get.sh @@ -1 +1 @@ -curl '{backend_url}/store/regions' +curl '{backend_url}/store/regions' \ No newline at end of file diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_regions_{id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_regions_{id}/get.sh index 5ee01af869..7b9352b895 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_regions_{id}/get.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_regions_{id}/get.sh @@ -1 +1 @@ -curl '{backend_url}/store/regions/{id}' +curl '{backend_url}/store/regions/{id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs-v2/store/code_samples/Shell/store_regions_{id}_payment-providers/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_regions_{id}_payment-providers/get.sh similarity index 100% rename from www/apps/api-reference/specs-v2/store/code_samples/Shell/store_regions_{id}_payment-providers/get.sh rename to www/apps/api-reference/specs/store/code_samples/Shell/store_regions_{id}_payment-providers/get.sh diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_return-reasons/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_return-reasons/get.sh deleted file mode 100644 index 92af14fe15..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_return-reasons/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/return-reasons' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_return-reasons_{id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_return-reasons_{id}/get.sh deleted file mode 100644 index 4150f8d99b..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_return-reasons_{id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/return-reasons/{id}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_returns/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_returns/post.sh deleted file mode 100644 index 03f1ad4a7d..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_returns/post.sh +++ /dev/null @@ -1,11 +0,0 @@ -curl -X POST '{backend_url}/store/returns' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "order_id": "asfasf", - "items": [ - { - "item_id": "assfasf", - "quantity": 1 - } - ] -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_shipping-options/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_shipping-options/get.sh deleted file mode 100644 index 7763943992..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_shipping-options/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/shipping-options' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_shipping-options_{cart_id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_shipping-options_{cart_id}/get.sh index e418e45403..86ae6e7eb3 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_shipping-options_{cart_id}/get.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_shipping-options_{cart_id}/get.sh @@ -1 +1 @@ -curl '{backend_url}/store/shipping-options/{cart_id}' +curl '{backend_url}/store/shipping-options/{cart_id}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_swaps/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_swaps/post.sh deleted file mode 100644 index 042eda0501..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_swaps/post.sh +++ /dev/null @@ -1,17 +0,0 @@ -curl -X POST '{backend_url}/store/swaps' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "order_id": "{order_id}", - "return_items": [ - { - "item_id": "{item_id}", - "quantity": 1 - } - ], - "additional_items": [ - { - "variant_id": "{variant_id}", - "quantity": 1 - } - ] -}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_swaps_{cart_id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_swaps_{cart_id}/get.sh deleted file mode 100644 index 4fe5252145..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_swaps_{cart_id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/swaps/{cart_id}' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_variants/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_variants/get.sh deleted file mode 100644 index b409b67bb7..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_variants/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/variants' diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_variants_{id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_variants_{id}/get.sh deleted file mode 100644 index 52f18abaa0..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_variants_{id}/get.sh +++ /dev/null @@ -1 +0,0 @@ -curl '{backend_url}/store/variants/{id}' diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts/post.tsx deleted file mode 100644 index c36ba4eeaa..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useCreateCart } from "medusa-react" - -type Props = { - regionId: string -} - -const Cart = ({ regionId }: Props) => { - const createCart = useCreateCart() - - const handleCreate = () => { - createCart.mutate({ - region_id: regionId - // creates an empty cart - }, { - onSuccess: ({ cart }) => { - console.log(cart.items) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}/get.tsx deleted file mode 100644 index fe6cb42205..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}/get.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { useGetCart } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const { cart, isLoading } = useGetCart(cartId) - - return ( -
- {isLoading && Loading...} - {cart && cart.items.length === 0 && ( - Cart is empty - )} - {cart && cart.items.length > 0 && ( -
    - {cart.items.map((item) => ( -
  • {item.title}
  • - ))} -
- )} -
- ) -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}/post.tsx deleted file mode 100644 index ead0e6cbf6..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}/post.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useUpdateCart } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const updateCart = useUpdateCart(cartId) - - const handleUpdate = ( - email: string - ) => { - updateCart.mutate({ - email - }, { - onSuccess: ({ cart }) => { - console.log(cart.email) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_complete/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_complete/post.tsx deleted file mode 100644 index 874a66f2c8..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_complete/post.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useCompleteCart } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const completeCart = useCompleteCart(cartId) - - const handleComplete = () => { - completeCart.mutate(void 0, { - onSuccess: ({ data, type }) => { - console.log(data.id, type) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_line-items/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_line-items/post.tsx deleted file mode 100644 index 5c417e22e4..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_line-items/post.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { useCreateLineItem } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const createLineItem = useCreateLineItem(cartId) - - const handleAddItem = ( - variantId: string, - quantity: number - ) => { - createLineItem.mutate({ - variant_id: variantId, - quantity, - }, { - onSuccess: ({ cart }) => { - console.log(cart.items) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_line-items_{line_id}/delete.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_line-items_{line_id}/delete.tsx deleted file mode 100644 index 20f97ee859..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_line-items_{line_id}/delete.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useDeleteLineItem } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const deleteLineItem = useDeleteLineItem(cartId) - - const handleDeleteItem = ( - lineItemId: string - ) => { - deleteLineItem.mutate({ - lineId: lineItemId, - }, { - onSuccess: ({ cart }) => { - console.log(cart.items) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_line-items_{line_id}/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_line-items_{line_id}/post.tsx deleted file mode 100644 index 628821d3b6..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_line-items_{line_id}/post.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { useUpdateLineItem } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const updateLineItem = useUpdateLineItem(cartId) - - const handleUpdateItem = ( - lineItemId: string, - quantity: number - ) => { - updateLineItem.mutate({ - lineId: lineItemId, - quantity, - }, { - onSuccess: ({ cart }) => { - console.log(cart.items) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-session/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-session/post.tsx deleted file mode 100644 index a4c04460ab..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-session/post.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useSetPaymentSession } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const setPaymentSession = useSetPaymentSession(cartId) - - const handleSetPaymentSession = ( - providerId: string - ) => { - setPaymentSession.mutate({ - provider_id: providerId, - }, { - onSuccess: ({ cart }) => { - console.log(cart.payment_session) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions/post.tsx deleted file mode 100644 index 7d87bea9e8..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions/post.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useCreatePaymentSession } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const createPaymentSession = useCreatePaymentSession(cartId) - - const handleComplete = () => { - createPaymentSession.mutate(void 0, { - onSuccess: ({ cart }) => { - console.log(cart.payment_sessions) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}/delete.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}/delete.tsx deleted file mode 100644 index aa3a9dd1ff..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}/delete.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useDeletePaymentSession } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const deletePaymentSession = useDeletePaymentSession(cartId) - - const handleDeletePaymentSession = ( - providerId: string - ) => { - deletePaymentSession.mutate({ - provider_id: providerId, - }, { - onSuccess: ({ cart }) => { - console.log(cart.payment_sessions) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}/post.tsx deleted file mode 100644 index 65b49954d4..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}/post.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { useUpdatePaymentSession } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const updatePaymentSession = useUpdatePaymentSession(cartId) - - const handleUpdate = ( - providerId: string, - data: Record - ) => { - updatePaymentSession.mutate({ - provider_id: providerId, - data - }, { - onSuccess: ({ cart }) => { - console.log(cart.payment_session) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.tsx deleted file mode 100644 index d509ad98d4..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useRefreshPaymentSession } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const refreshPaymentSession = useRefreshPaymentSession(cartId) - - const handleRefresh = ( - providerId: string - ) => { - refreshPaymentSession.mutate({ - provider_id: providerId, - }, { - onSuccess: ({ cart }) => { - console.log(cart.payment_sessions) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_shipping-methods/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_shipping-methods/post.tsx deleted file mode 100644 index a58b003c15..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_carts_{id}_shipping-methods/post.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useAddShippingMethodToCart } from "medusa-react" - -type Props = { - cartId: string -} - -const Cart = ({ cartId }: Props) => { - const addShippingMethod = useAddShippingMethodToCart(cartId) - - const handleAddShippingMethod = ( - optionId: string - ) => { - addShippingMethod.mutate({ - option_id: optionId, - }, { - onSuccess: ({ cart }) => { - console.log(cart.shipping_methods) - } - }) - } - - // ... -} - -export default Cart diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_collections/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_collections/get.tsx deleted file mode 100644 index 23dd8ed79b..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_collections/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useCollections } from "medusa-react" - -const ProductCollections = () => { - const { collections, isLoading } = useCollections() - - return ( -
- {isLoading && Loading...} - {collections && collections.length === 0 && ( - No Product Collections - )} - {collections && collections.length > 0 && ( -
    - {collections.map((collection) => ( -
  • {collection.title}
  • - ))} -
- )} -
- ) -} - -export default ProductCollections diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_collections_{id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_collections_{id}/get.tsx deleted file mode 100644 index b5d751af58..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_collections_{id}/get.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useCollection } from "medusa-react" - -type Props = { - collectionId: string -} - -const ProductCollection = ({ collectionId }: Props) => { - const { collection, isLoading } = useCollection(collectionId) - - return ( -
- {isLoading && Loading...} - {collection && {collection.title}} -
- ) -} - -export default ProductCollection diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_customers/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_customers/post.tsx deleted file mode 100644 index 548ab3efaf..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_customers/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useCreateCustomer } from "medusa-react" - -const RegisterCustomer = () => { - const createCustomer = useCreateCustomer() - // ... - - const handleCreate = ( - customerData: { - first_name: string - last_name: string - email: string - password: string - } - ) => { - // ... - createCustomer.mutate(customerData, { - onSuccess: ({ customer }) => { - console.log(customer.id) - } - }) - } - - // ... -} - -export default RegisterCustomer diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_customers_me/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_customers_me/get.tsx deleted file mode 100644 index ce95652d66..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_customers_me/get.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from "react" -import { useMeCustomer } from "medusa-react" - -const Customer = () => { - const { customer, isLoading } = useMeCustomer() - - return ( -
- {isLoading && Loading...} - {customer && ( - {customer.first_name} {customer.last_name} - )} -
- ) -} - -export default Customer diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_customers_me/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_customers_me/post.tsx deleted file mode 100644 index 8e6a6aa413..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_customers_me/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useUpdateMe } from "medusa-react" - -type Props = { - customerId: string -} - -const Customer = ({ customerId }: Props) => { - const updateCustomer = useUpdateMe() - // ... - - const handleUpdate = ( - firstName: string - ) => { - // ... - updateCustomer.mutate({ - id: customerId, - first_name: firstName, - }, { - onSuccess: ({ customer }) => { - console.log(customer.first_name) - } - }) - } - - // ... -} - -export default Customer diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_customers_me_orders/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_customers_me_orders/get.tsx deleted file mode 100644 index 7c52e6b0c3..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_customers_me_orders/get.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useCustomerOrders } from "medusa-react" - -const Orders = () => { - // refetch a function that can be used to - // re-retrieve orders after the customer logs in - const { orders, isLoading } = useCustomerOrders() - - return ( -
- {isLoading && Loading orders...} - {orders?.length && ( -
    - {orders.map((order) => ( -
  • {order.display_id}
  • - ))} -
- )} -
- ) -} - -export default Orders diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_gift-cards_{code}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_gift-cards_{code}/get.tsx deleted file mode 100644 index 2102428d0b..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_gift-cards_{code}/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useGiftCard } from "medusa-react" - -type Props = { - giftCardCode: string -} - -const GiftCard = ({ giftCardCode }: Props) => { - const { gift_card, isLoading, isError } = useGiftCard( - giftCardCode - ) - - return ( -
- {isLoading && Loading...} - {gift_card && {gift_card.value}} - {isError && Gift Card does not exist} -
- ) -} - -export default GiftCard diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_order-edits_{id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_order-edits_{id}/get.tsx deleted file mode 100644 index 1b45b93e74..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_order-edits_{id}/get.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useOrderEdit } from "medusa-react" - -type Props = { - orderEditId: string -} - -const OrderEdit = ({ orderEditId }: Props) => { - const { order_edit, isLoading } = useOrderEdit(orderEditId) - - return ( -
- {isLoading && Loading...} - {order_edit && ( -
    - {order_edit.changes.map((change) => ( -
  • {change.type}
  • - ))} -
- )} -
- ) -} - -export default OrderEdit diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_order-edits_{id}_complete/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_order-edits_{id}_complete/post.tsx deleted file mode 100644 index 339cbea3d5..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_order-edits_{id}_complete/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useCompleteOrderEdit } from "medusa-react" - -type Props = { - orderEditId: string -} - -const OrderEdit = ({ orderEditId }: Props) => { - const completeOrderEdit = useCompleteOrderEdit( - orderEditId - ) - // ... - - const handleCompleteOrderEdit = () => { - completeOrderEdit.mutate(void 0, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.confirmed_at) - } - }) - } - - // ... -} - -export default OrderEdit diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_order-edits_{id}_decline/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_order-edits_{id}_decline/post.tsx deleted file mode 100644 index 669564255f..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_order-edits_{id}_decline/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useDeclineOrderEdit } from "medusa-react" - -type Props = { - orderEditId: string -} - -const OrderEdit = ({ orderEditId }: Props) => { - const declineOrderEdit = useDeclineOrderEdit(orderEditId) - // ... - - const handleDeclineOrderEdit = ( - declinedReason: string - ) => { - declineOrderEdit.mutate({ - declined_reason: declinedReason, - }, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.declined_at) - } - }) - } - - // ... -} - -export default OrderEdit diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_orders/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_orders/get.tsx deleted file mode 100644 index c1155eb5ec..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_orders/get.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react" -import { useOrders } from "medusa-react" - -type Props = { - displayId: number - email: string -} - -const Order = ({ - displayId, - email -}: Props) => { - const { - order, - isLoading, - } = useOrders({ - display_id: displayId, - email, - }) - - return ( -
- {isLoading && Loading...} - {order && {order.display_id}} - -
- ) -} - -export default Order diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_batch_customer_token/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_batch_customer_token/post.tsx deleted file mode 100644 index 4c6135561a..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_batch_customer_token/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useRequestOrderAccess } from "medusa-react" - -const ClaimOrder = () => { - const claimOrder = useRequestOrderAccess() - - const handleClaimOrder = ( - orderIds: string[] - ) => { - claimOrder.mutate({ - order_ids: orderIds - }, { - onSuccess: () => { - // successful - }, - onError: () => { - // an error occurred. - } - }) - } - - // ... -} - -export default ClaimOrder diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_cart_{cart_id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_cart_{cart_id}/get.tsx deleted file mode 100644 index 7607d71ff3..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_cart_{cart_id}/get.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useCartOrder } from "medusa-react" - -type Props = { - cartId: string -} - -const Order = ({ cartId }: Props) => { - const { - order, - isLoading, - } = useCartOrder(cartId) - - return ( -
- {isLoading && Loading...} - {order && {order.display_id}} - -
- ) -} - -export default Order diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_customer_confirm/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_customer_confirm/post.tsx deleted file mode 100644 index defce9a56f..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_customer_confirm/post.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react" -import { useGrantOrderAccess } from "medusa-react" - -const ClaimOrder = () => { - const confirmOrderRequest = useGrantOrderAccess() - - const handleOrderRequestConfirmation = ( - token: string - ) => { - confirmOrderRequest.mutate({ - token - }, { - onSuccess: () => { - // successful - }, - onError: () => { - // an error occurred. - } - }) - } - - // ... -} - -export default ClaimOrder diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_{id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_{id}/get.tsx deleted file mode 100644 index b8b6ecbb87..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_orders_{id}/get.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useOrder } from "medusa-react" - -type Props = { - orderId: string -} - -const Order = ({ orderId }: Props) => { - const { - order, - isLoading, - } = useOrder(orderId) - - return ( -
- {isLoading && Loading...} - {order && {order.display_id}} - -
- ) -} - -export default Order diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}/get.tsx deleted file mode 100644 index eaf8e3a0ee..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}/get.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { usePaymentCollection } from "medusa-react" - -type Props = { - paymentCollectionId: string -} - -const PaymentCollection = ({ - paymentCollectionId -}: Props) => { - const { - payment_collection, - isLoading - } = usePaymentCollection( - paymentCollectionId - ) - - return ( -
- {isLoading && Loading...} - {payment_collection && ( - {payment_collection.status} - )} -
- ) -} - -export default PaymentCollection diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions/post.tsx deleted file mode 100644 index 216c504128..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions/post.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react" -import { useManagePaymentSession } from "medusa-react" - -type Props = { - paymentCollectionId: string -} - -const PaymentCollection = ({ - paymentCollectionId -}: Props) => { - const managePaymentSession = useManagePaymentSession( - paymentCollectionId - ) - - const handleManagePaymentSession = ( - providerId: string - ) => { - managePaymentSession.mutate({ - provider_id: providerId - }, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.payment_sessions) - } - }) - } - - // ... -} - -export default PaymentCollection diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_batch/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_batch/post.tsx deleted file mode 100644 index 934d364c30..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_batch/post.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import React from "react" -import { useManageMultiplePaymentSessions } from "medusa-react" - -type Props = { - paymentCollectionId: string -} - -const PaymentCollection = ({ - paymentCollectionId -}: Props) => { - const managePaymentSessions = useManageMultiplePaymentSessions( - paymentCollectionId - ) - - const handleManagePaymentSessions = () => { - // Total amount = 10000 - - // Example 1: Adding two new sessions - managePaymentSessions.mutate({ - sessions: [ - { - provider_id: "stripe", - amount: 5000, - }, - { - provider_id: "manual", - amount: 5000, - }, - ] - }, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.payment_sessions) - } - }) - - // Example 2: Updating one session and removing the other - managePaymentSessions.mutate({ - sessions: [ - { - provider_id: "stripe", - amount: 10000, - session_id: "ps_123456" - }, - ] - }, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.payment_sessions) - } - }) - } - - // ... -} - -export default PaymentCollection diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_batch_authorize/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_batch_authorize/post.tsx deleted file mode 100644 index 8e3459019f..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_batch_authorize/post.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useAuthorizePaymentSessionsBatch } from "medusa-react" - -type Props = { - paymentCollectionId: string -} - -const PaymentCollection = ({ - paymentCollectionId -}: Props) => { - const authorizePaymentSessions = useAuthorizePaymentSessionsBatch( - paymentCollectionId - ) - // ... - - const handleAuthorizePayments = (paymentSessionIds: string[]) => { - authorizePaymentSessions.mutate({ - session_ids: paymentSessionIds - }, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.payment_sessions) - } - }) - } - - // ... -} - -export default PaymentCollection diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_{session_id}/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_{session_id}/post.tsx deleted file mode 100644 index dba59b0c5d..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_{session_id}/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { usePaymentCollectionRefreshPaymentSession } from "medusa-react" - -type Props = { - paymentCollectionId: string -} - -const PaymentCollection = ({ - paymentCollectionId -}: Props) => { - const refreshPaymentSession = usePaymentCollectionRefreshPaymentSession( - paymentCollectionId - ) - // ... - - const handleRefreshPaymentSession = (paymentSessionId: string) => { - refreshPaymentSession.mutate(paymentSessionId, { - onSuccess: ({ payment_session }) => { - console.log(payment_session.status) - } - }) - } - - // ... -} - -export default PaymentCollection diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_{session_id}_authorize/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_{session_id}_authorize/post.tsx deleted file mode 100644 index 6ed3e57549..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_payment-collections_{id}_sessions_{session_id}_authorize/post.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useAuthorizePaymentSession } from "medusa-react" - -type Props = { - paymentCollectionId: string -} - -const PaymentCollection = ({ - paymentCollectionId -}: Props) => { - const authorizePaymentSession = useAuthorizePaymentSession( - paymentCollectionId - ) - // ... - - const handleAuthorizePayment = (paymentSessionId: string) => { - authorizePaymentSession.mutate(paymentSessionId, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.payment_sessions) - } - }) - } - - // ... -} - -export default PaymentCollection diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_product-categories/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_product-categories/get.tsx deleted file mode 100644 index 0cc7622151..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_product-categories/get.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useProductCategories } from "medusa-react" - -function Categories() { - const { - product_categories, - isLoading, - } = useProductCategories() - - return ( -
- {isLoading && Loading...} - {product_categories && !product_categories.length && ( - No Categories - )} - {product_categories && product_categories.length > 0 && ( -
    - {product_categories.map( - (category) => ( -
  • {category.name}
  • - ) - )} -
- )} -
- ) -} - -export default Categories diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_product-categories_{id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_product-categories_{id}/get.tsx deleted file mode 100644 index d2ce454ac8..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_product-categories_{id}/get.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useProductCategory } from "medusa-react" - -type Props = { - categoryId: string -} - -const Category = ({ categoryId }: Props) => { - const { product_category, isLoading } = useProductCategory( - categoryId - ) - - return ( -
- {isLoading && Loading...} - {product_category && {product_category.name}} -
- ) -} - -export default Category diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_product-tags/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_product-tags/get.tsx deleted file mode 100644 index 61ef45f793..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_product-tags/get.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useProductTags } from "medusa-react" - -function Tags() { - const { - product_tags, - isLoading, - } = useProductTags() - - return ( -
- {isLoading && Loading...} - {product_tags && !product_tags.length && ( - No Product Tags - )} - {product_tags && product_tags.length > 0 && ( -
    - {product_tags.map( - (tag) => ( -
  • {tag.value}
  • - ) - )} -
- )} -
- ) -} - -export default Tags diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_product-types/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_product-types/get.tsx deleted file mode 100644 index aa48e9ff68..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_product-types/get.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react" -import { useProductTypes } from "medusa-react" - -function Types() { - const { - product_types, - isLoading, - } = useProductTypes() - - return ( -
- {isLoading && Loading...} - {product_types && !product_types.length && ( - No Product Types - )} - {product_types && product_types.length > 0 && ( -
    - {product_types.map( - (type) => ( -
  • {type.value}
  • - ) - )} -
- )} -
- ) -} - -export default Types diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_products/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_products/get.tsx deleted file mode 100644 index 3822ddde6a..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_products/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useProducts } from "medusa-react" - -const Products = () => { - const { products, isLoading } = useProducts() - - return ( -
- {isLoading && Loading...} - {products && !products.length && No Products} - {products && products.length > 0 && ( -
    - {products.map((product) => ( -
  • {product.title}
  • - ))} -
- )} -
- ) -} - -export default Products diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_products_{id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_products_{id}/get.tsx deleted file mode 100644 index efb6a91f5b..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_products_{id}/get.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react" -import { useProduct } from "medusa-react" - -type Props = { - productId: string -} - -const Product = ({ productId }: Props) => { - const { product, isLoading } = useProduct(productId) - - return ( -
- {isLoading && Loading...} - {product && {product.title}} -
- ) -} - -export default Product diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_regions/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_regions/get.tsx deleted file mode 100644 index f8353df871..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_regions/get.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react" -import { useRegions } from "medusa-react" - -const Regions = () => { - const { regions, isLoading } = useRegions() - - return ( -
- {isLoading && Loading...} - {regions?.length && ( -
    - {regions.map((region) => ( -
  • - {region.name} -
  • - ))} -
- )} -
- ) -} - -export default Regions diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_regions_{id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_regions_{id}/get.tsx deleted file mode 100644 index e09ef20244..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_regions_{id}/get.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { useRegion } from "medusa-react" - -type Props = { - regionId: string -} - -const Region = ({ regionId }: Props) => { - const { region, isLoading } = useRegion( - regionId - ) - - return ( -
- {isLoading && Loading...} - {region && {region.name}} -
- ) -} - -export default Region diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_return-reasons/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_return-reasons/get.tsx deleted file mode 100644 index 3e4d392979..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_return-reasons/get.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { useReturnReasons } from "medusa-react" - -const ReturnReasons = () => { - const { - return_reasons, - isLoading - } = useReturnReasons() - - return ( -
- {isLoading && Loading...} - {return_reasons?.length && ( -
    - {return_reasons.map((returnReason) => ( -
  • - {returnReason.label} -
  • - ))} -
- )} -
- ) -} - -export default ReturnReasons diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_return-reasons_{id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_return-reasons_{id}/get.tsx deleted file mode 100644 index f9a3247f64..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_return-reasons_{id}/get.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react" -import { useReturnReason } from "medusa-react" - -type Props = { - returnReasonId: string -} - -const ReturnReason = ({ returnReasonId }: Props) => { - const { - return_reason, - isLoading - } = useReturnReason( - returnReasonId - ) - - return ( -
- {isLoading && Loading...} - {return_reason && {return_reason.label}} -
- ) -} - -export default ReturnReason diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_returns/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_returns/post.tsx deleted file mode 100644 index fc53926cb4..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_returns/post.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from "react" -import { useCreateReturn } from "medusa-react" - -type CreateReturnData = { - items: { - item_id: string, - quantity: number - }[] - return_shipping: { - option_id: string - } -} - -type Props = { - orderId: string -} - -const CreateReturn = ({ orderId }: Props) => { - const createReturn = useCreateReturn() - // ... - - const handleCreate = (data: CreateReturnData) => { - createReturn.mutate({ - ...data, - order_id: orderId - }, { - onSuccess: ({ return: returnData }) => { - console.log(returnData.id) - } - }) - } - - // ... -} - -export default CreateReturn diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_shipping-options/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_shipping-options/get.tsx deleted file mode 100644 index cffe845c90..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_shipping-options/get.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { useShippingOptions } from "medusa-react" - -const ShippingOptions = () => { - const { - shipping_options, - isLoading, - } = useShippingOptions() - - return ( -
- {isLoading && Loading...} - {shipping_options?.length && - shipping_options?.length > 0 && ( -
    - {shipping_options?.map((shipping_option) => ( -
  • - {shipping_option.id} -
  • - ))} -
- )} -
- ) -} - -export default ShippingOptions diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_shipping-options_{cart_id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_shipping-options_{cart_id}/get.tsx deleted file mode 100644 index feaf93d957..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_shipping-options_{cart_id}/get.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from "react" -import { useCartShippingOptions } from "medusa-react" - -type Props = { - cartId: string -} - -const ShippingOptions = ({ cartId }: Props) => { - const { shipping_options, isLoading } = - useCartShippingOptions(cartId) - - return ( -
- {isLoading && Loading...} - {shipping_options && !shipping_options.length && ( - No shipping options - )} - {shipping_options && ( -
    - {shipping_options.map( - (shipping_option) => ( -
  • - {shipping_option.name} -
  • - ) - )} -
- )} -
- ) -} - -export default ShippingOptions diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_swaps/post.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_swaps/post.tsx deleted file mode 100644 index 17f7c7d3cd..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_swaps/post.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import React from "react" -import { useCreateSwap } from "medusa-react" - -type Props = { - orderId: string -} - -type CreateData = { - return_items: { - item_id: string - quantity: number - }[] - additional_items: { - variant_id: string - quantity: number - }[] - return_shipping_option: string -} - -const CreateSwap = ({ - orderId -}: Props) => { - const createSwap = useCreateSwap() - // ... - - const handleCreate = ( - data: CreateData - ) => { - createSwap.mutate({ - ...data, - order_id: orderId - }, { - onSuccess: ({ swap }) => { - console.log(swap.id) - } - }) - } - - // ... -} - -export default CreateSwap diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_swaps_{cart_id}/get.tsx b/www/apps/api-reference/specs/store/code_samples/tsx/store_swaps_{cart_id}/get.tsx deleted file mode 100644 index 6a73a86df7..0000000000 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_swaps_{cart_id}/get.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react" -import { useCartSwap } from "medusa-react" -type Props = { - cartId: string -} - -const Swap = ({ cartId }: Props) => { - const { - swap, - isLoading, - } = useCartSwap(cartId) - - return ( -
- {isLoading && Loading...} - {swap && {swap.id}} - -
- ) -} - -export default Swap diff --git a/www/apps/api-reference/specs/store/components/schemas/Address.yaml b/www/apps/api-reference/specs/store/components/schemas/Address.yaml deleted file mode 100644 index e0aee13932..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Address.yaml +++ /dev/null @@ -1,119 +0,0 @@ -title: Address -description: >- - An address is used across the Medusa backend within other schemas and object - types. For example, a customer's billing and shipping addresses both use the - Address entity. -type: object -required: - - address_1 - - address_2 - - city - - company - - country_code - - created_at - - customer_id - - deleted_at - - first_name - - id - - last_name - - metadata - - phone - - postal_code - - province - - updated_at -properties: - id: - type: string - description: ID of the address - example: addr_01G8ZC9VS1XVE149MGH2J7QSSH - customer_id: - description: ID of the customer this address belongs to - nullable: true - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: Available if the relation `customer` is expanded. - nullable: true - type: object - company: - description: Company name - nullable: true - type: string - example: Acme - first_name: - description: First name - nullable: true - type: string - example: Arno - last_name: - description: Last name - nullable: true - type: string - example: Willms - address_1: - description: Address line 1 - nullable: true - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - nullable: true - type: string - example: Suite 369 - city: - description: City - nullable: true - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - nullable: true - type: string - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - country: - description: A country object. - x-expandable: country - nullable: true - $ref: ./Country.yaml - province: - description: Province - nullable: true - type: string - example: Kentucky - postal_code: - description: Postal Code - nullable: true - type: string - example: 72093 - phone: - description: Phone Number - nullable: true - type: string - example: 16128234334802 - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/AddressCreatePayload.yaml b/www/apps/api-reference/specs/store/components/schemas/AddressCreatePayload.yaml deleted file mode 100644 index 1094c0f176..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/AddressCreatePayload.yaml +++ /dev/null @@ -1,57 +0,0 @@ -type: object -description: Address fields used when creating an address. -required: - - first_name - - last_name - - address_1 - - city - - country_code - - postal_code -properties: - first_name: - description: First name - type: string - example: Arno - last_name: - description: Last name - type: string - example: Willms - phone: - type: string - description: Phone Number - example: 16128234334802 - company: - type: string - address_1: - description: Address line 1 - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - type: string - example: Suite 369 - city: - description: City - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - type: string - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - province: - description: Province - type: string - example: Kentucky - postal_code: - description: Postal Code - type: string - example: 72093 - metadata: - type: object - example: - car: white - description: An optional key-value map with additional details diff --git a/www/apps/api-reference/specs/store/components/schemas/AddressPayload.yaml b/www/apps/api-reference/specs/store/components/schemas/AddressPayload.yaml deleted file mode 100644 index 826bf11526..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/AddressPayload.yaml +++ /dev/null @@ -1,51 +0,0 @@ -type: object -description: Address fields used when creating/updating an address. -properties: - first_name: - description: First name - type: string - example: Arno - last_name: - description: Last name - type: string - example: Willms - phone: - type: string - description: Phone Number - example: 16128234334802 - company: - type: string - description: Company - address_1: - description: Address line 1 - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - type: string - example: Suite 369 - city: - description: City - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - type: string - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - province: - description: Province - type: string - example: Kentucky - postal_code: - description: Postal Code - type: string - example: 72093 - metadata: - type: object - example: - car: white - description: An optional key-value map with additional details diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminDeletePricingRuleTypesRuleTypeReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminDeletePricingRuleTypesRuleTypeReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminDeletePricingRuleTypesRuleTypeReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminDeletePricingRuleTypesRuleTypeReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminGetPricingRuleTypesParams.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminGetPricingRuleTypesParams.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminGetPricingRuleTypesParams.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminGetPricingRuleTypesParams.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminGetPricingRuleTypesRuleTypeParams.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminGetPricingRuleTypesRuleTypeParams.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminGetPricingRuleTypesRuleTypeParams.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminGetPricingRuleTypesRuleTypeParams.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminGetProductsParams.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminGetProductsParams.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminGetProductsParams.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminGetProductsParams.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminGetPromotionsParams.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminGetPromotionsParams.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminGetPromotionsParams.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminGetPromotionsParams.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostCampaignsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostCampaignsReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostCampaignsReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostCampaignsReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchAddReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchAddReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchAddReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchAddReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostInventoryItemsInventoryItemReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostInventoryItemsItemLocationLevelsLevelReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostInventoryItemsItemLocationLevelsReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostInventoryItemsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostInventoryItemsReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostInventoryItemsReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostInventoryItemsReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostInvitesInviteAcceptReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostInvitesInviteAcceptReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostInvitesInviteAcceptReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostInvitesInviteAcceptReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPaymentsCapturesReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPaymentsCapturesReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPaymentsCapturesReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPaymentsCapturesReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPaymentsRefundsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPaymentsRefundsReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPaymentsRefundsReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPaymentsRefundsReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPriceListsPriceListPricesBatchAddReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPriceListsPriceListPricesBatchAddReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPriceListsPriceListPricesBatchAddReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPriceListsPriceListPricesBatchAddReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPriceListsPriceListPricesBatchRemoveReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPriceListsPriceListPricesBatchRemoveReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPriceListsPriceListPricesBatchRemoveReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPriceListsPriceListPricesBatchRemoveReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPriceListsPriceListReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPriceListsPriceListReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostPriceListsPriceListReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPriceListsPriceListReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPriceListsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPriceListsReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPriceListsReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPriceListsReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPricingRuleTypesReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPricingRuleTypesReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPricingRuleTypesReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPricingRuleTypesReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPricingRuleTypesRuleTypeReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPricingRuleTypesRuleTypeReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPricingRuleTypesRuleTypeReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPricingRuleTypesRuleTypeReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPromotionsPromotionReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPromotionsPromotionReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPromotionsPromotionReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPromotionsPromotionReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPromotionsPromotionRulesBatchAddReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPromotionsPromotionRulesBatchRemoveReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPromotionsPromotionRulesBatchUpdateReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostPromotionsPromotionRulesBatchUpdateReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostPromotionsPromotionRulesBatchUpdateReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostPromotionsPromotionRulesBatchUpdateReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostStockLocationsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostStockLocationsReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostStockLocationsReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostStockLocationsReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostTaxRatesReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostTaxRatesReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostTaxRatesReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostTaxRatesReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostTaxRatesTaxRateReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostTaxRatesTaxRateReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminPostTaxRatesTaxRateReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostTaxRatesTaxRateReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostTaxRatesTaxRateRulesReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostTaxRatesTaxRateRulesReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostTaxRatesTaxRateRulesReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostTaxRatesTaxRateRulesReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostTaxRegionsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostTaxRegionsReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostTaxRegionsReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostTaxRegionsReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostWorkflowsAsyncResponseReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostWorkflowsAsyncResponseReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostWorkflowsAsyncResponseReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostWorkflowsAsyncResponseReq.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/AdminPostWorkflowsRunReq.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPostWorkflowsRunReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/AdminPostWorkflowsRunReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminPostWorkflowsRunReq.yaml diff --git a/www/apps/api-reference/specs-v2/admin/components/schemas/AdminUpdateUserRequest.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminUpdateUserRequest.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/admin/components/schemas/AdminUpdateUserRequest.yaml rename to www/apps/api-reference/specs/store/components/schemas/AdminUpdateUserRequest.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/ApplicationMethod.yaml b/www/apps/api-reference/specs/store/components/schemas/ApplicationMethod.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/ApplicationMethod.yaml rename to www/apps/api-reference/specs/store/components/schemas/ApplicationMethod.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/ApplicationMethodsMethodPostReq.yaml b/www/apps/api-reference/specs/store/components/schemas/ApplicationMethodsMethodPostReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/ApplicationMethodsMethodPostReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/ApplicationMethodsMethodPostReq.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/BatchJob.yaml b/www/apps/api-reference/specs/store/components/schemas/BatchJob.yaml deleted file mode 100644 index a70156fe2c..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/BatchJob.yaml +++ /dev/null @@ -1,171 +0,0 @@ -title: Batch Job -description: >- - A Batch Job indicates an asynchronus task stored in the Medusa backend. Its - status determines whether it has been executed or not. -type: object -required: - - canceled_at - - completed_at - - confirmed_at - - context - - created_at - - created_by - - deleted_at - - dry_run - - failed_at - - id - - pre_processed_at - - processing_at - - result - - status - - type - - updated_at -properties: - id: - description: The unique identifier for the batch job. - type: string - example: batch_01G8T782965PYFG0751G0Z38B4 - type: - description: The type of batch job. - type: string - enum: - - product-import - - product-export - status: - description: The status of the batch job. - type: string - enum: - - created - - pre_processed - - confirmed - - processing - - completed - - canceled - - failed - default: created - created_by: - description: The unique identifier of the user that created the batch job. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - created_by_user: - description: The details of the user that created the batch job. - x-expandable: created_by_user - nullable: true - $ref: ./User.yaml - context: - description: >- - The context of the batch job, the type of the batch job determines what - the context should contain. - nullable: true - type: object - example: - shape: - prices: - - region: null - currency_code: eur - dynamicImageColumnCount: 4 - dynamicOptionColumnCount: 2 - list_config: - skip: 0 - take: 50 - order: - created_at: DESC - relations: - - variants - - variant.prices - - images - dry_run: - description: Specify if the job must apply the modifications or not. - type: boolean - default: false - result: - description: The result of the batch job. - nullable: true - allOf: - - type: object - example: {} - - type: object - properties: - count: - type: number - advancement_count: - type: number - progress: - type: number - errors: - type: object - properties: - message: - type: string - code: - oneOf: - - type: string - - type: number - err: - type: array - stat_descriptors: - type: object - properties: - key: - type: string - name: - type: string - message: - type: string - file_key: - type: string - file_size: - type: number - example: - errors: - - err: [] - code: unknown - message: Method not implemented. - stat_descriptors: - - key: product-export-count - name: Product count to export - message: There will be 8 products exported by this action - pre_processed_at: - description: The date from which the job has been pre-processed. - nullable: true - type: string - format: date-time - processing_at: - description: The date the job is processing at. - nullable: true - type: string - format: date-time - confirmed_at: - description: The date when the confirmation has been done. - nullable: true - type: string - format: date-time - completed_at: - description: The date of the completion. - nullable: true - type: string - format: date-time - canceled_at: - description: The date of the concellation. - nullable: true - type: string - format: date-time - failed_at: - description: The date when the job failed. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was last updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/Campaign.yaml b/www/apps/api-reference/specs/store/components/schemas/Campaign.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/Campaign.yaml rename to www/apps/api-reference/specs/store/components/schemas/Campaign.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CampaignBudget.yaml b/www/apps/api-reference/specs/store/components/schemas/CampaignBudget.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CampaignBudget.yaml rename to www/apps/api-reference/specs/store/components/schemas/CampaignBudget.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/Cart.yaml b/www/apps/api-reference/specs/store/components/schemas/Cart.yaml deleted file mode 100644 index 4283873041..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Cart.yaml +++ /dev/null @@ -1,243 +0,0 @@ -title: Cart -description: >- - A cart represents a virtual shopping bag. It can be used to complete an order, - a swap, or a claim. -type: object -required: - - billing_address_id - - completed_at - - context - - created_at - - customer_id - - deleted_at - - email - - id - - idempotency_key - - metadata - - payment_authorized_at - - payment_id - - payment_session - - region_id - - shipping_address_id - - type - - updated_at -properties: - id: - description: The cart's ID - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - email: - description: The email associated with the cart - nullable: true - type: string - format: email - billing_address_id: - description: The billing address's ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the cart. - x-expandable: billing_address - nullable: true - $ref: ./Address.yaml - shipping_address_id: - description: The shipping address's ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address associated with the cart. - x-expandable: shipping_address - nullable: true - $ref: ./Address.yaml - items: - description: The line items added to the cart. - type: array - x-expandable: items - items: - $ref: ./LineItem.yaml - region_id: - description: The region's ID - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region associated with the cart. - x-expandable: region - nullable: true - $ref: ./Region.yaml - discounts: - description: An array of details of all discounts applied to the cart. - type: array - x-expandable: discounts - items: - $ref: ./Discount.yaml - gift_cards: - description: An array of details of all gift cards applied to the cart. - type: array - x-expandable: gift_cards - items: - $ref: ./GiftCard.yaml - customer_id: - description: The customer's ID - nullable: true - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer the cart belongs to. - x-expandable: customer - nullable: true - type: object - payment_session: - description: The details of the selected payment session in the cart. - x-expandable: payment_session - nullable: true - type: object - payment_sessions: - description: The details of all payment sessions created on the cart. - type: array - x-expandable: payment_sessions - items: - type: object - payment_id: - description: The payment's ID if available - nullable: true - type: string - example: pay_01G8ZCC5W42ZNY842124G7P5R9 - payment: - description: The details of the payment associated with the cart. - nullable: true - x-expandable: payment - type: object - shipping_methods: - description: The details of the shipping methods added to the cart. - type: array - x-expandable: shipping_methods - items: - $ref: ./ShippingMethod.yaml - type: - description: The cart's type. - type: string - enum: - - default - - swap - - draft_order - - payment_link - - claim - default: default - completed_at: - description: The date with timezone at which the cart was completed. - nullable: true - type: string - format: date-time - payment_authorized_at: - description: The date with timezone at which the payment was authorized. - nullable: true - type: string - format: date-time - idempotency_key: - description: >- - Randomly generated key used to continue the completion of a cart in case - of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - context: - description: The context of the cart which can include info like IP or user agent. - nullable: true - type: object - example: - ip: '::1' - user_agent: PostmanRuntime/7.29.2 - sales_channel_id: - description: The sales channel ID the cart is associated with. - nullable: true - type: string - example: null - sales_channel: - description: The details of the sales channel associated with the cart. - nullable: true - x-expandable: sales_channel - $ref: ./SalesChannel.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - shipping_total: - description: The total of shipping - type: integer - example: 1000 - discount_total: - description: The total of discount rounded - type: integer - example: 800 - raw_discount_total: - description: The total of discount - type: integer - example: 800 - item_tax_total: - description: The total of items with taxes - type: integer - example: 8000 - shipping_tax_total: - description: The total of shipping with taxes - type: integer - example: 1000 - tax_total: - description: The total of tax - type: integer - example: 0 - refunded_total: - description: >- - The total amount refunded if the order associated with this cart is - returned. - type: integer - example: 0 - total: - description: The total amount of the cart - type: integer - example: 8200 - subtotal: - description: The subtotal of the cart - type: integer - example: 8000 - refundable_amount: - description: The amount that can be refunded - type: integer - example: 8200 - gift_card_total: - description: The total of gift cards - type: integer - example: 0 - gift_card_tax_total: - description: The total of gift cards with taxes - type: integer - example: 0 - sales_channels: - description: The associated sales channels. - type: array - nullable: true - x-expandable: sales_channels - items: - $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/ClaimImage.yaml b/www/apps/api-reference/specs/store/components/schemas/ClaimImage.yaml deleted file mode 100644 index 7b64e6be1d..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ClaimImage.yaml +++ /dev/null @@ -1,51 +0,0 @@ -title: Claim Image -description: The details of an image attached to a claim. -type: object -required: - - claim_item_id - - created_at - - deleted_at - - id - - metadata - - updated_at - - url -properties: - id: - description: The claim image's ID - type: string - example: cimg_01G8ZH853Y6TFXWPG5EYE81X63 - claim_item_id: - description: The ID of the claim item associated with the image - type: string - claim_item: - description: The details of the claim item this image is associated with. - nullable: true - x-expandable: claim_item - type: object - url: - description: The URL of the image - type: string - format: uri - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ClaimItem.yaml b/www/apps/api-reference/specs/store/components/schemas/ClaimItem.yaml deleted file mode 100644 index 6d9a8a9b67..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ClaimItem.yaml +++ /dev/null @@ -1,106 +0,0 @@ -title: Claim Item -description: >- - A claim item is an item created as part of a claim. It references an item in - the order that should be exchanged or refunded. -type: object -required: - - claim_order_id - - created_at - - deleted_at - - id - - item_id - - metadata - - note - - quantity - - reason - - updated_at - - variant_id -properties: - id: - description: The claim item's ID - type: string - example: citm_01G8ZH853Y6TFXWPG5EYE81X63 - images: - description: The claim images that are attached to the claim item. - type: array - x-expandable: images - items: - $ref: ./ClaimImage.yaml - claim_order_id: - description: The ID of the claim this item is associated with. - type: string - claim_order: - description: The details of the claim this item belongs to. - x-expandable: claim_order - nullable: true - type: object - item_id: - description: The ID of the line item that the claim item refers to. - type: string - example: item_01G8ZM25TN49YV9EQBE2NC27KC - item: - description: >- - The details of the line item in the original order that this claim item - refers to. - x-expandable: item - nullable: true - $ref: ./LineItem.yaml - variant_id: - description: The ID of the product variant that is claimed. - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: >- - The details of the product variant to potentially replace the item in the - original order. - x-expandable: variant - nullable: true - $ref: ./ProductVariant.yaml - reason: - description: The reason for the claim - type: string - enum: - - missing_item - - wrong_item - - production_failure - - other - note: - description: An optional note about the claim, for additional information - nullable: true - type: string - example: I don't like it. - quantity: - description: >- - The quantity of the item that is being claimed; must be less than or equal - to the amount purchased in the original order. - type: integer - example: 1 - tags: - description: User defined tags for easy filtering and grouping. - type: array - x-expandable: tags - items: - $ref: ./ClaimTag.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ClaimOrder.yaml b/www/apps/api-reference/specs/store/components/schemas/ClaimOrder.yaml deleted file mode 100644 index e3de8e9d1b..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ClaimOrder.yaml +++ /dev/null @@ -1,157 +0,0 @@ -title: Claim -description: >- - A Claim represents a group of faulty or missing items. It consists of claim - items that refer to items in the original order that should be replaced or - refunded. It also includes details related to shipping and fulfillment. -type: object -required: - - canceled_at - - created_at - - deleted_at - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - order_id - - payment_status - - refund_amount - - shipping_address_id - - type - - updated_at -properties: - id: - description: The claim's ID - type: string - example: claim_01G8ZH853Y6TFXWPG5EYE81X63 - type: - description: The claim's type - type: string - enum: - - refund - - replace - payment_status: - description: The status of the claim's payment - type: string - enum: - - na - - not_refunded - - refunded - default: na - fulfillment_status: - description: The claim's fulfillment status - type: string - enum: - - not_fulfilled - - partially_fulfilled - - fulfilled - - partially_shipped - - shipped - - partially_returned - - returned - - canceled - - requires_action - default: not_fulfilled - claim_items: - description: The details of the items that should be replaced or refunded. - type: array - x-expandable: claim_items - items: - $ref: ./ClaimItem.yaml - additional_items: - description: >- - The details of the new items to be shipped when the claim's type is - `replace` - type: array - x-expandable: additional_items - items: - $ref: ./LineItem.yaml - order_id: - description: The ID of the order that the claim comes from. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that this claim was created for. - x-expandable: order - nullable: true - type: object - return_order: - description: >- - The details of the return associated with the claim if the claim's type is - `replace`. - x-expandable: return_order - nullable: true - type: object - shipping_address_id: - description: The ID of the address that the new items should be shipped to - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the address that new items should be shipped to. - x-expandable: shipping_address - nullable: true - $ref: ./Address.yaml - shipping_methods: - description: >- - The details of the shipping methods that the claim order will be shipped - with. - type: array - x-expandable: shipping_methods - items: - $ref: ./ShippingMethod.yaml - fulfillments: - description: The fulfillments of the new items to be shipped - type: array - x-expandable: fulfillments - items: - type: object - refund_amount: - description: The amount that will be refunded in conjunction with the claim - nullable: true - type: integer - example: 1000 - canceled_at: - description: The date with timezone at which the claim was canceled. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - no_notification: - description: >- - Flag for describing whether or not notifications related to this should be - send. - nullable: true - type: boolean - example: false - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the cart - associated with the claim in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. diff --git a/www/apps/api-reference/specs/store/components/schemas/ClaimTag.yaml b/www/apps/api-reference/specs/store/components/schemas/ClaimTag.yaml deleted file mode 100644 index 4c8924448f..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ClaimTag.yaml +++ /dev/null @@ -1,44 +0,0 @@ -title: Claim Tag -description: >- - Claim Tags are user defined tags that can be assigned to claim items for easy - filtering and grouping. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value -properties: - id: - description: The claim tag's ID - type: string - example: ctag_01G8ZCC5Y63B95V6B5SHBZ91S4 - value: - description: The value that the claim tag holds - type: string - example: Damaged - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/Country.yaml b/www/apps/api-reference/specs/store/components/schemas/Country.yaml deleted file mode 100644 index cfa712f0ff..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Country.yaml +++ /dev/null @@ -1,58 +0,0 @@ -title: Country -description: Country details -type: object -required: - - display_name - - id - - iso_2 - - iso_3 - - name - - num_code - - region_id -properties: - id: - description: The country's ID - type: string - example: 109 - iso_2: - description: The 2 character ISO code of the country in lower case - type: string - example: it - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - iso_3: - description: The 2 character ISO code of the country in lower case - type: string - example: ita - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements - description: See a list of codes. - num_code: - description: The numerical ISO code for the country. - type: string - example: 380 - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_numeric#Officially_assigned_code_elements - description: See a list of codes. - name: - description: The normalized country name in upper case. - type: string - example: ITALY - display_name: - description: The country name appropriate for display. - type: string - example: Italy - region_id: - description: The region ID this country is associated with. - nullable: true - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region the country is associated with. - x-expandable: region - nullable: true - type: object diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateAddress.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateAddress.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateAddress.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateApiKey.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateApiKey.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateApiKey.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateApiKey.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateApplicationMethod.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateApplicationMethod.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateApplicationMethod.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateApplicationMethod.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateCampaign.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateCampaign.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateCampaign.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateCampaign.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateCampaignBudget.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateCampaignBudget.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateCampaignBudget.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateCampaignBudget.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateCartAddress.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateCartAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateCartAddress.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateCartAddress.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateCartCreateLineItem.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateCartCreateLineItem.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateCartCreateLineItem.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateCartCreateLineItem.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateCartWorkflowInput.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateCartWorkflowInput.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateCartWorkflowInput.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateCartWorkflowInput.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateCustomer.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateCustomer.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateCustomer.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateCustomer.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateCustomerAddress.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateCustomerAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateCustomerAddress.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateCustomerAddress.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateCustomerGroup.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateCustomerGroup.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateCustomerGroup.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateCustomerGroup.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateDefaultTaxRate.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateDefaultTaxRate.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateDefaultTaxRate.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateDefaultTaxRate.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateInvite.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateInvite.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateInvite.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateInvite.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateProduct.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateProduct.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateProduct.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateProduct.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateProductCollection.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateProductCollection.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateProductCollection.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateProductCollection.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateProductOption.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateProductOption.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateProductOption.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateProductOption.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateProductTag.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateProductTag.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateProductTag.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateProductTag.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateProductType.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateProductType.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateProductType.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateProductType.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateProductVariant.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateProductVariant.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateProductVariant.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateProductVariant.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateProductVariantOption.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateProductVariantOption.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateProductVariantOption.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateProductVariantOption.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreatePromotion.yaml b/www/apps/api-reference/specs/store/components/schemas/CreatePromotion.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreatePromotion.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreatePromotion.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreatePromotionRule.yaml b/www/apps/api-reference/specs/store/components/schemas/CreatePromotionRule.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreatePromotionRule.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreatePromotionRule.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateRegion.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateRegion.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateRegion.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateRegion.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/CreateStockLocationInput.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateStockLocationInput.yaml deleted file mode 100644 index 6a8d7255f5..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/CreateStockLocationInput.yaml +++ /dev/null @@ -1,22 +0,0 @@ -title: Create Stock Location Input -description: Represents the Input to create a Stock Location -type: object -required: - - name -properties: - name: - type: string - description: The stock location name - address_id: - type: string - description: The Stock location address ID - address: - description: Stock location address object - allOf: - - $ref: ./StockLocationAddressInput.yaml - - type: object - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateTaxRateRule.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateTaxRateRule.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateTaxRateRule.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateTaxRateRule.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CreateUser.yaml b/www/apps/api-reference/specs/store/components/schemas/CreateUser.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CreateUser.yaml rename to www/apps/api-reference/specs/store/components/schemas/CreateUser.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/Currency.yaml b/www/apps/api-reference/specs/store/components/schemas/Currency.yaml deleted file mode 100644 index adfb21705c..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Currency.yaml +++ /dev/null @@ -1,33 +0,0 @@ -title: Currency -description: Currency -type: object -required: - - code - - name - - symbol - - symbol_native -properties: - code: - description: The 3 character ISO code for the currency. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - symbol: - description: The symbol used to indicate the currency. - type: string - example: $ - symbol_native: - description: The native symbol used to indicate the currency. - type: string - example: $ - name: - description: The written name of the currency - type: string - example: US Dollar - includes_tax: - description: Whether the currency prices include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false diff --git a/www/apps/api-reference/specs/store/components/schemas/CustomShippingOption.yaml b/www/apps/api-reference/specs/store/components/schemas/CustomShippingOption.yaml deleted file mode 100644 index 472d04273b..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/CustomShippingOption.yaml +++ /dev/null @@ -1,68 +0,0 @@ -title: Custom Shipping Option -description: >- - Custom Shipping Options are overridden Shipping Options. Admins can attach a - Custom Shipping Option to a cart in order to set a custom price for a - particular Shipping Option. -type: object -required: - - cart_id - - created_at - - deleted_at - - id - - metadata - - price - - shipping_option_id - - updated_at -properties: - id: - description: The custom shipping option's ID - type: string - example: cso_01G8X99XNB77DMFBJFWX6DN9V9 - price: - description: >- - The custom price set that will override the shipping option's original - price - type: integer - example: 1000 - shipping_option_id: - description: The ID of the Shipping Option that the custom shipping option overrides - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the overridden shipping options. - x-expandable: shipping_option - nullable: true - $ref: ./ShippingOption.yaml - cart_id: - description: The ID of the Cart that the custom shipping option is attached to - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart this shipping option belongs to. - x-expandable: cart - nullable: true - $ref: ./Cart.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/Customer.yaml b/www/apps/api-reference/specs/store/components/schemas/Customer.yaml index ecc9c83ee4..063a4ff87a 100644 --- a/www/apps/api-reference/specs/store/components/schemas/Customer.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/Customer.yaml @@ -1,94 +1,87 @@ -title: Customer -description: A customer can make purchases in your store and manage their profile. type: object -required: - - billing_address_id - - created_at - - deleted_at - - email - - first_name - - has_account - - id - - last_name - - metadata - - phone - - updated_at +description: The context's customer. +x-schemaName: Customer properties: id: - description: The customer's ID type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 + title: id + description: The customer's ID. email: - description: The customer's email type: string + title: email + description: The customer's email. format: email + default_billing_address_id: + type: string + title: default_billing_address_id + description: The customer's default billing address id. + default_shipping_address_id: + type: string + title: default_shipping_address_id + description: The customer's default shipping address id. + company_name: + type: string + title: company_name + description: The customer's company name. first_name: - description: The customer's first name - nullable: true type: string - example: Arno + title: first_name + description: The customer's first name. last_name: - description: The customer's last name - nullable: true type: string - example: Willms - billing_address_id: - description: The customer's billing address ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the customer. - x-expandable: billing_address - nullable: true - $ref: ./Address.yaml - shipping_addresses: - description: The details of the shipping addresses associated with the customer. + title: last_name + description: The customer's last name. + addresses: type: array - x-expandable: shipping_addresses - items: - $ref: ./Address.yaml - phone: - description: The customer's phone number - nullable: true - type: string - example: 16128234334802 - has_account: - description: Whether the customer has an account or not - type: boolean - default: false - orders: - description: The details of the orders this customer placed. - type: array - x-expandable: orders + description: The customer's addresses. items: type: object + description: The address's addresses. + x-schemaName: CustomerAddress + properties: {} + phone: + type: string + title: phone + description: The customer's phone. groups: - description: The customer groups the customer belongs to. type: array - x-expandable: groups + description: The customer's groups. items: - $ref: ./CustomerGroup.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time + type: object + description: The group's groups. + properties: {} metadata: - description: An optional key-value map with additional details - nullable: true type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute + description: The customer's metadata. + properties: {} + created_by: + type: string + title: created_by + description: The customer's created by. + deleted_at: + oneOf: + - type: string + title: deleted_at + description: The customer's deleted at. + - type: string + title: deleted_at + description: The customer's deleted at. + format: date-time + created_at: + oneOf: + - type: string + title: created_at + description: The customer's created at. + - type: string + title: created_at + description: The customer's created at. + format: date-time + updated_at: + oneOf: + - type: string + title: updated_at + description: The customer's updated at. + - type: string + title: updated_at + description: The customer's updated at. + format: date-time diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CustomerAddress.yaml b/www/apps/api-reference/specs/store/components/schemas/CustomerAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CustomerAddress.yaml rename to www/apps/api-reference/specs/store/components/schemas/CustomerAddress.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/CustomerGroup.yaml b/www/apps/api-reference/specs/store/components/schemas/CustomerGroup.yaml deleted file mode 100644 index a572493cad..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/CustomerGroup.yaml +++ /dev/null @@ -1,56 +0,0 @@ -title: Customer Group -description: >- - A customer group that can be used to organize customers into groups of similar - traits. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - name - - updated_at -properties: - id: - description: The customer group's ID - type: string - example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63 - name: - description: The name of the customer group - type: string - example: VIP - customers: - description: The details of the customers that belong to the customer group. - type: array - x-expandable: customers - items: - type: object - price_lists: - description: The price lists that are associated with the customer group. - type: array - x-expandable: price_lists - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CustomerGroupUpdatableFields.yaml b/www/apps/api-reference/specs/store/components/schemas/CustomerGroupUpdatableFields.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CustomerGroupUpdatableFields.yaml rename to www/apps/api-reference/specs/store/components/schemas/CustomerGroupUpdatableFields.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CustomerGroupsBatchCustomer.yaml b/www/apps/api-reference/specs/store/components/schemas/CustomerGroupsBatchCustomer.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CustomerGroupsBatchCustomer.yaml rename to www/apps/api-reference/specs/store/components/schemas/CustomerGroupsBatchCustomer.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/CustomerUpdatableFields.yaml b/www/apps/api-reference/specs/store/components/schemas/CustomerUpdatableFields.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/CustomerUpdatableFields.yaml rename to www/apps/api-reference/specs/store/components/schemas/CustomerUpdatableFields.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/Discount.yaml b/www/apps/api-reference/specs/store/components/schemas/Discount.yaml deleted file mode 100644 index 796477999f..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Discount.yaml +++ /dev/null @@ -1,121 +0,0 @@ -title: Discount -description: A discount can be applied to a cart for promotional purposes. -type: object -required: - - code - - created_at - - deleted_at - - ends_at - - id - - is_disabled - - is_dynamic - - metadata - - parent_discount_id - - rule_id - - starts_at - - updated_at - - usage_count - - usage_limit - - valid_duration -properties: - id: - description: The discount's ID - type: string - example: disc_01F0YESMW10MGHWJKZSDDMN0VN - code: - description: >- - A unique code for the discount - this will be used by the customer to - apply the discount - type: string - example: 10DISC - is_dynamic: - description: >- - A flag to indicate if multiple instances of the discount can be generated. - I.e. for newsletter discounts - type: boolean - example: false - rule_id: - description: >- - The ID of the discount rule that defines how the discount will be applied - to a cart. - nullable: true - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - rule: - description: >- - The details of the discount rule that defines how the discount will be - applied to a cart.. - x-expandable: rule - nullable: true - $ref: ./DiscountRule.yaml - is_disabled: - description: >- - Whether the Discount has been disabled. Disabled discounts cannot be - applied to carts - type: boolean - example: false - parent_discount_id: - description: >- - The Discount that the discount was created from. This will always be a - dynamic discount - nullable: true - type: string - example: disc_01G8ZH853YPY9B94857DY91YGW - parent_discount: - description: The details of the parent discount that this discount was created from. - x-expandable: parent_discount - nullable: true - type: object - starts_at: - description: The time at which the discount can be used. - type: string - format: date-time - ends_at: - description: The time at which the discount can no longer be used. - nullable: true - type: string - format: date-time - valid_duration: - description: Duration the discount runs between - nullable: true - type: string - example: P3Y6M4DT12H30M5S - regions: - description: The details of the regions in which the Discount can be used. - type: array - x-expandable: regions - items: - $ref: ./Region.yaml - usage_limit: - description: The maximum number of times that a discount can be used. - nullable: true - type: integer - example: 100 - usage_count: - description: The number of times a discount has been used. - type: integer - example: 50 - default: 0 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/DiscountCondition.yaml b/www/apps/api-reference/specs/store/components/schemas/DiscountCondition.yaml deleted file mode 100644 index 4652b43d56..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/DiscountCondition.yaml +++ /dev/null @@ -1,105 +0,0 @@ -title: Discount Condition -description: Holds rule conditions for when a discount is applicable -type: object -required: - - created_at - - deleted_at - - discount_rule_id - - id - - metadata - - operator - - type - - updated_at -properties: - id: - description: The discount condition's ID - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - type: - description: >- - The type of the condition. The type affects the available resources - associated with the condition. For example, if the type is `products`, - that means the `products` relation will hold the products associated with - this condition and other relations will be empty. - type: string - enum: - - products - - product_types - - product_collections - - product_tags - - customer_groups - operator: - description: >- - The operator of the condition. `in` indicates that discountable resources - are within the specified resources. `not_in` indicates that discountable - resources are everything but the specified resources. - type: string - enum: - - in - - not_in - discount_rule_id: - description: The ID of the discount rule associated with the condition - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - discount_rule: - description: The details of the discount rule associated with the condition. - x-expandable: discount_rule - nullable: true - $ref: ./DiscountRule.yaml - products: - description: products associated with this condition if `type` is `products`. - type: array - x-expandable: products - items: - $ref: ./Product.yaml - product_types: - description: Product types associated with this condition if `type` is `product_types`. - type: array - x-expandable: product_types - items: - $ref: ./ProductType.yaml - product_tags: - description: Product tags associated with this condition if `type` is `product_tags`. - type: array - x-expandable: product_tags - items: - $ref: ./ProductTag.yaml - product_collections: - description: >- - Product collections associated with this condition if `type` is - `product_collections`. - type: array - x-expandable: product_collections - items: - $ref: ./ProductCollection.yaml - customer_groups: - description: >- - Customer groups associated with this condition if `type` is - `customer_groups`. - type: array - x-expandable: customer_groups - items: - $ref: ./CustomerGroup.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/DiscountConditionCustomerGroup.yaml b/www/apps/api-reference/specs/store/components/schemas/DiscountConditionCustomerGroup.yaml deleted file mode 100644 index 2f55e79142..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/DiscountConditionCustomerGroup.yaml +++ /dev/null @@ -1,44 +0,0 @@ -title: Product Tag Discount Condition -description: Associates a discount condition with a customer group -type: object -required: - - condition_id - - created_at - - customer_group_id - - metadata - - updated_at -properties: - customer_group_id: - description: The ID of the Product Tag - type: string - example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63 - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - customer_group: - description: Available if the relation `customer_group` is expanded. - nullable: true - $ref: ./CustomerGroup.yaml - discount_condition: - description: Available if the relation `discount_condition` is expanded. - nullable: true - $ref: ./DiscountCondition.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProduct.yaml b/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProduct.yaml deleted file mode 100644 index 2fb9699b9e..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProduct.yaml +++ /dev/null @@ -1,46 +0,0 @@ -title: Product Discount Condition -description: This represents the association between a discount condition and a product -type: object -required: - - condition_id - - created_at - - metadata - - product_id - - updated_at -properties: - product_id: - description: The ID of the Product Tag - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product: - description: The details of the product. - x-expandable: product - nullable: true - $ref: ./Product.yaml - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: ./DiscountCondition.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProductCollection.yaml b/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProductCollection.yaml deleted file mode 100644 index 5e8b88b9e3..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProductCollection.yaml +++ /dev/null @@ -1,48 +0,0 @@ -title: Product Collection Discount Condition -description: >- - This represents the association between a discount condition and a product - collection -type: object -required: - - condition_id - - created_at - - metadata - - product_collection_id - - updated_at -properties: - product_collection_id: - description: The ID of the Product Collection - type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_collection: - description: The details of the product collection. - x-expandable: product_collection - nullable: true - $ref: ./ProductCollection.yaml - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: ./DiscountCondition.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProductTag.yaml b/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProductTag.yaml deleted file mode 100644 index 58ba07c6c3..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProductTag.yaml +++ /dev/null @@ -1,46 +0,0 @@ -title: Product Tag Discount Condition -description: This represents the association between a discount condition and a product tag -type: object -required: - - condition_id - - created_at - - metadata - - product_tag_id - - updated_at -properties: - product_tag_id: - description: The ID of the Product Tag - type: string - example: ptag_01F0YESHPZYY3H4SJ3A5918SBN - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_tag: - description: The details of the product tag. - x-expandable: product_tag - nullable: true - $ref: ./ProductTag.yaml - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: ./DiscountCondition.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProductType.yaml b/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProductType.yaml deleted file mode 100644 index d93129494c..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/DiscountConditionProductType.yaml +++ /dev/null @@ -1,48 +0,0 @@ -title: Product Type Discount Condition -description: >- - This represents the association between a discount condition and a product - type -type: object -required: - - condition_id - - created_at - - metadata - - product_type_id - - updated_at -properties: - product_type_id: - description: The ID of the Product Tag - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_type: - description: The details of the product type. - x-expandable: product_type - nullable: true - $ref: ./ProductType.yaml - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: ./DiscountCondition.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/DiscountRule.yaml b/www/apps/api-reference/specs/store/components/schemas/DiscountRule.yaml deleted file mode 100644 index caa7f9d604..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/DiscountRule.yaml +++ /dev/null @@ -1,79 +0,0 @@ -title: Discount Rule -description: A discount rule defines how a Discount is calculated when applied to a Cart. -type: object -required: - - allocation - - created_at - - deleted_at - - description - - id - - metadata - - type - - updated_at - - value -properties: - id: - description: The discount rule's ID - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - type: - description: >- - The type of the Discount, can be `fixed` for discounts that reduce the - price by a fixed amount, `percentage` for percentage reductions or - `free_shipping` for shipping vouchers. - type: string - enum: - - fixed - - percentage - - free_shipping - example: percentage - description: - description: A short description of the discount - nullable: true - type: string - example: 10 Percent - value: - description: >- - The value that the discount represents; this will depend on the type of - the discount - type: integer - example: 10 - allocation: - description: The scope that the discount should apply to. - nullable: true - type: string - enum: - - total - - item - example: total - conditions: - description: >- - The details of the discount conditions associated with the rule. They can - be used to limit when the discount can be used. - type: array - x-expandable: conditions - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/DraftOrder.yaml b/www/apps/api-reference/specs/store/components/schemas/DraftOrder.yaml deleted file mode 100644 index 86ff90bf25..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/DraftOrder.yaml +++ /dev/null @@ -1,103 +0,0 @@ -title: DraftOrder -description: >- - A draft order is created by an admin without direct involvement of the - customer. Once its payment is marked as captured, it is transformed into an - order. -type: object -required: - - canceled_at - - cart_id - - completed_at - - created_at - - display_id - - id - - idempotency_key - - metadata - - no_notification_order - - order_id - - status - - updated_at -properties: - id: - description: The draft order's ID - type: string - example: dorder_01G8TJFKBG38YYFQ035MSVG03C - status: - description: >- - The status of the draft order. It's changed to `completed` when it's - transformed to an order. - type: string - enum: - - open - - completed - default: open - display_id: - description: The draft order's display ID - type: string - example: 2 - cart_id: - description: The ID of the cart associated with the draft order. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart associated with the draft order. - x-expandable: cart - nullable: true - type: object - order_id: - description: >- - The ID of the order created from the draft order when its payment is - captured. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: >- - The details of the order created from the draft order when its payment is - captured. - x-expandable: order - nullable: true - type: object - canceled_at: - description: The date the draft order was canceled at. - nullable: true - type: string - format: date-time - completed_at: - description: The date the draft order was completed at. - nullable: true - type: string - format: date-time - no_notification_order: - description: Whether to send the customer notifications regarding order updates. - nullable: true - type: boolean - example: false - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the cart - associated with the draft order in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ExtendedStoreDTO.yaml b/www/apps/api-reference/specs/store/components/schemas/ExtendedStoreDTO.yaml deleted file mode 100644 index fe169bafc5..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ExtendedStoreDTO.yaml +++ /dev/null @@ -1,21 +0,0 @@ -allOf: - - $ref: ./Store.yaml - - type: object - required: - - payment_providers - - fulfillment_providers - - feature_flags - - modules - properties: - payment_providers: - description: The store's payment providers. - $ref: ./PaymentProvider.yaml - fulfillment_providers: - description: The store's fulfillment providers. - $ref: ./FulfillmentProvider.yaml - feature_flags: - description: The feature flags enabled in the store's backend. - $ref: ./FeatureFlagsResponse.yaml - modules: - description: The modules installed in the store's backend. - $ref: ./ModulesResponse.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/FeatureFlagsResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/FeatureFlagsResponse.yaml deleted file mode 100644 index ce55d9ccc4..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/FeatureFlagsResponse.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: array -items: - type: object - required: - - key - - value - properties: - key: - description: The key of the feature flag. - type: string - value: - description: The value of the feature flag. - type: boolean diff --git a/www/apps/api-reference/specs/store/components/schemas/Fulfillment.yaml b/www/apps/api-reference/specs/store/components/schemas/Fulfillment.yaml deleted file mode 100644 index b9f77587a4..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Fulfillment.yaml +++ /dev/null @@ -1,151 +0,0 @@ -title: Fulfillment -description: >- - A Fulfillment is created once an admin can prepare the purchased goods. - Fulfillments will eventually be shipped and hold information about how to - track shipments. Fulfillments are created through a fulfillment provider, - which typically integrates a third-party shipping service. Fulfillments can be - associated with orders, claims, swaps, and returns. -type: object -required: - - canceled_at - - claim_order_id - - created_at - - data - - id - - idempotency_key - - location_id - - metadata - - no_notification - - order_id - - provider_id - - shipped_at - - swap_id - - tracking_numbers - - updated_at -properties: - id: - description: The fulfillment's ID - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - claim_order_id: - description: The ID of the Claim that the Fulfillment belongs to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the fulfillment may belong to. - x-expandable: claim_order - nullable: true - type: object - swap_id: - description: The ID of the Swap that the Fulfillment belongs to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the fulfillment may belong to. - x-expandable: swap - nullable: true - type: object - order_id: - description: The ID of the Order that the Fulfillment belongs to. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the fulfillment may belong to. - x-expandable: order - nullable: true - type: object - provider_id: - description: >- - The ID of the Fulfillment Provider responsible for handling the - fulfillment. - type: string - example: manual - provider: - description: >- - The details of the fulfillment provider responsible for handling the - fulfillment. - x-expandable: provider - nullable: true - $ref: ./FulfillmentProvider.yaml - location_id: - description: The ID of the stock location the fulfillment will be shipped from - nullable: true - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK - items: - description: >- - The Fulfillment Items in the Fulfillment. These hold information about how - many of each Line Item has been fulfilled. - type: array - x-expandable: items - items: - $ref: ./FulfillmentItem.yaml - tracking_links: - description: >- - The Tracking Links that can be used to track the status of the - Fulfillment. These will usually be provided by the Fulfillment Provider. - type: array - x-expandable: tracking_links - items: - $ref: ./TrackingLink.yaml - tracking_numbers: - description: >- - The tracking numbers that can be used to track the status of the - fulfillment. - deprecated: true - type: array - items: - type: string - data: - description: >- - This contains all the data necessary for the Fulfillment provider to - handle the fulfillment. - type: object - example: {} - shipped_at: - description: The date with timezone at which the Fulfillment was shipped. - nullable: true - type: string - format: date-time - no_notification: - description: >- - Flag for describing whether or not notifications related to this should be - sent. - nullable: true - type: boolean - example: false - canceled_at: - description: The date with timezone at which the Fulfillment was canceled. - nullable: true - type: string - format: date-time - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the fulfillment - in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/FulfillmentItem.yaml b/www/apps/api-reference/specs/store/components/schemas/FulfillmentItem.yaml deleted file mode 100644 index 7204760274..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/FulfillmentItem.yaml +++ /dev/null @@ -1,30 +0,0 @@ -title: Fulfillment Item -description: This represents the association between a Line Item and a Fulfillment. -type: object -required: - - fulfillment_id - - item_id - - quantity -properties: - fulfillment_id: - description: The ID of the Fulfillment that the Fulfillment Item belongs to. - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - item_id: - description: The ID of the Line Item that the Fulfillment Item references. - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - fulfillment: - description: The details of the fulfillment. - x-expandable: fulfillment - nullable: true - type: object - item: - description: The details of the line item. - x-expandable: item - nullable: true - $ref: ./LineItem.yaml - quantity: - description: The quantity of the Line Item that is included in the Fulfillment. - type: integer - example: 1 diff --git a/www/apps/api-reference/specs/store/components/schemas/FulfillmentProvider.yaml b/www/apps/api-reference/specs/store/components/schemas/FulfillmentProvider.yaml deleted file mode 100644 index 366e045f2f..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/FulfillmentProvider.yaml +++ /dev/null @@ -1,21 +0,0 @@ -title: Fulfillment Provider -description: >- - A fulfillment provider represents a fulfillment service installed in the - Medusa backend, either through a plugin or backend customizations. It holds - the fulfillment service's installation status. -type: object -required: - - id - - is_installed -properties: - id: - description: The ID of the fulfillment provider as given by the fulfillment service. - type: string - example: manual - is_installed: - description: >- - Whether the fulfillment service is installed in the current version. If a - fulfillment service is no longer installed, the `is_installed` attribute - is set to `false`. - type: boolean - default: true diff --git a/www/apps/api-reference/specs/store/components/schemas/GiftCard.yaml b/www/apps/api-reference/specs/store/components/schemas/GiftCard.yaml deleted file mode 100644 index cd3b03dc19..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/GiftCard.yaml +++ /dev/null @@ -1,96 +0,0 @@ -title: Gift Card -description: >- - Gift Cards are redeemable and represent a value that can be used towards the - payment of an Order. -type: object -required: - - balance - - code - - created_at - - deleted_at - - ends_at - - id - - is_disabled - - metadata - - order_id - - region_id - - tax_rate - - updated_at - - value -properties: - id: - description: The gift card's ID - type: string - example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ - code: - description: >- - The unique code that identifies the Gift Card. This is used by the - Customer to redeem the value of the Gift Card. - type: string - example: 3RFT-MH2C-Y4YZ-XMN4 - value: - description: The value that the Gift Card represents. - type: integer - example: 10 - balance: - description: The remaining value on the Gift Card. - type: integer - example: 10 - region_id: - description: The ID of the region this gift card is available in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this gift card is available in. - x-expandable: region - nullable: true - $ref: ./Region.yaml - order_id: - description: The ID of the order that the gift card was purchased in. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the gift card was purchased in. - x-expandable: region - nullable: true - type: object - is_disabled: - description: >- - Whether the Gift Card has been disabled. Disabled Gift Cards cannot be - applied to carts. - type: boolean - default: false - ends_at: - description: The time at which the Gift Card can no longer be used. - nullable: true - type: string - format: date-time - tax_rate: - description: The gift card's tax rate that will be applied on calculating totals - nullable: true - type: number - example: 0 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/GiftCardTransaction.yaml b/www/apps/api-reference/specs/store/components/schemas/GiftCardTransaction.yaml deleted file mode 100644 index e1f3f9b490..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/GiftCardTransaction.yaml +++ /dev/null @@ -1,54 +0,0 @@ -title: Gift Card Transaction -description: >- - Gift Card Transactions are created once a Customer uses a Gift Card to pay for - their Order. -type: object -required: - - amount - - created_at - - gift_card_id - - id - - is_taxable - - order_id - - tax_rate -properties: - id: - description: The gift card transaction's ID - type: string - example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A - gift_card_id: - description: The ID of the Gift Card that was used in the transaction. - type: string - example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ - gift_card: - description: The details of the gift card associated used in this transaction. - x-expandable: gift_card - nullable: true - type: object - order_id: - description: The ID of the order that the gift card was used for payment. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the gift card was used for payment. - x-expandable: order - nullable: true - type: object - amount: - description: The amount that was used from the Gift Card. - type: integer - example: 10 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - is_taxable: - description: Whether the transaction is taxable or not. - nullable: true - type: boolean - example: false - tax_rate: - description: The tax rate of the transaction - nullable: true - type: number - example: 0 diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/IdObject.yaml b/www/apps/api-reference/specs/store/components/schemas/IdObject.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/IdObject.yaml rename to www/apps/api-reference/specs/store/components/schemas/IdObject.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/IdempotencyKey.yaml b/www/apps/api-reference/specs/store/components/schemas/IdempotencyKey.yaml deleted file mode 100644 index 9a8760eec9..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/IdempotencyKey.yaml +++ /dev/null @@ -1,69 +0,0 @@ -title: Idempotency Key -description: >- - Idempotency Key is used to continue a process in case of any failure that - might occur. -type: object -required: - - created_at - - id - - idempotency_key - - locked_at - - recovery_point - - response_code - - response_body - - request_method - - request_params - - request_path -properties: - id: - description: The idempotency key's ID - type: string - example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A - idempotency_key: - description: >- - The unique randomly generated key used to determine the state of a - process. - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: Date which the idempotency key was locked. - type: string - format: date-time - locked_at: - description: Date which the idempotency key was locked. - nullable: true - type: string - format: date-time - request_method: - description: The method of the request - nullable: true - type: string - example: POST - request_params: - description: The parameters passed to the request - nullable: true - type: object - example: - id: cart_01G8ZH853Y6TFXWPG5EYE81X63 - request_path: - description: The request's path - nullable: true - type: string - example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete - response_code: - description: The response's code. - nullable: true - type: string - example: 200 - response_body: - description: The response's body - nullable: true - type: object - example: - id: cart_01G8ZH853Y6TFXWPG5EYE81X63 - recovery_point: - description: Where to continue from. - type: string - default: started diff --git a/www/apps/api-reference/specs/store/components/schemas/Image.yaml b/www/apps/api-reference/specs/store/components/schemas/Image.yaml deleted file mode 100644 index c837dd4b5d..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Image.yaml +++ /dev/null @@ -1,44 +0,0 @@ -title: Image -description: >- - An Image is used to store details about uploaded images. Images are uploaded - by the File Service, and the URL is provided by the File Service. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - url -properties: - id: - type: string - description: The image's ID - example: img_01G749BFYR6T8JTVW6SGW3K3E6 - url: - description: The URL at which the image file can be found. - type: string - format: uri - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/InventoryItemDTO.yaml b/www/apps/api-reference/specs/store/components/schemas/InventoryItemDTO.yaml deleted file mode 100644 index 641ec3a26f..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/InventoryItemDTO.yaml +++ /dev/null @@ -1,82 +0,0 @@ -type: object -required: - - sku -properties: - id: - description: The inventory item's ID. - type: string - example: iitem_12334 - sku: - description: The Stock Keeping Unit (SKU) code of the Inventory Item. - type: string - hs_code: - description: >- - The Harmonized System code of the Inventory Item. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - type: string - origin_country: - description: >- - The country in which the Inventory Item was produced. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - type: string - mid_code: - description: >- - The Manufacturers Identification code that identifies the manufacturer of - the Inventory Item. May be used by Fulfillment Providers to pass customs - information to shipping carriers. - type: string - title: - description: Title of the inventory item - type: string - description: - description: Description of the inventory item - type: string - thumbnail: - description: Thumbnail for the inventory item - type: string - material: - description: >- - The material and composition that the Inventory Item is made of, May be - used by Fulfillment Providers to pass customs information to shipping - carriers. - type: string - weight: - description: >- - The weight of the Inventory Item. May be used in shipping rate - calculations. - type: number - height: - description: >- - The height of the Inventory Item. May be used in shipping rate - calculations. - type: number - width: - description: >- - The width of the Inventory Item. May be used in shipping rate - calculations. - type: number - length: - description: >- - The length of the Inventory Item. May be used in shipping rate - calculations. - type: number - requires_shipping: - description: Whether the item requires shipping. - type: boolean - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/InventoryLevelDTO.yaml b/www/apps/api-reference/specs/store/components/schemas/InventoryLevelDTO.yaml deleted file mode 100644 index 8540f71c95..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/InventoryLevelDTO.yaml +++ /dev/null @@ -1,37 +0,0 @@ -type: object -required: - - inventory_item_id - - location_id - - stocked_quantity - - reserved_quantity - - incoming_quantity -properties: - location_id: - description: the item location ID - type: string - stocked_quantity: - description: the total stock quantity of an inventory item at the given location ID - type: number - reserved_quantity: - description: the reserved stock quantity of an inventory item at the given location ID - type: number - incoming_quantity: - description: the incoming stock quantity of an inventory item at the given location ID - type: number - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/Invite.yaml b/www/apps/api-reference/specs/store/components/schemas/Invite.yaml deleted file mode 100644 index 4ab1e33195..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Invite.yaml +++ /dev/null @@ -1,68 +0,0 @@ -title: Invite -description: >- - An invite is created when an admin user invites a new user to join the store's - team. Once the invite is accepted, it's deleted. -type: object -required: - - accepted - - created_at - - deleted_at - - expires_at - - id - - metadata - - role - - token - - updated_at - - user_email -properties: - id: - type: string - description: The invite's ID - example: invite_01G8TKE4XYCTHSCK2GDEP47RE1 - user_email: - description: The email of the user being invited. - type: string - format: email - role: - description: The user's role. These roles don't change the privileges of the user. - nullable: true - type: string - enum: - - admin - - member - - developer - default: member - accepted: - description: Whether the invite was accepted or not. - type: boolean - default: false - token: - description: The token used to accept the invite. - type: string - expires_at: - description: The date the invite expires at. - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/LineItem.yaml b/www/apps/api-reference/specs/store/components/schemas/LineItem.yaml deleted file mode 100644 index 155bafaedd..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/LineItem.yaml +++ /dev/null @@ -1,243 +0,0 @@ -title: Line Item -description: >- - Line Items are created when a product is added to a Cart. When Line Items are - purchased they will get copied to the resulting order, swap, or claim, and can - eventually be referenced in Fulfillments and Returns. Line items may also be - used for order edits. -type: object -required: - - allow_discounts - - cart_id - - claim_order_id - - created_at - - description - - fulfilled_quantity - - has_shipping - - id - - is_giftcard - - is_return - - metadata - - order_edit_id - - order_id - - original_item_id - - quantity - - returned_quantity - - shipped_quantity - - should_merge - - swap_id - - thumbnail - - title - - unit_price - - updated_at - - variant_id -properties: - id: - description: The line item's ID - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - cart_id: - description: The ID of the cart that the line item may belongs to. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the line item may belongs to. - x-expandable: cart - nullable: true - type: object - order_id: - description: The ID of the order that the line item may belongs to. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the line item may belongs to. - x-expandable: order - nullable: true - type: object - swap_id: - description: The ID of the swap that the line item may belong to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the line item may belong to. - x-expandable: swap - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the line item may belong to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the line item may belong to. - x-expandable: claim_order - nullable: true - type: object - tax_lines: - description: The details of the item's tax lines. - x-expandable: tax_lines - type: array - items: - $ref: ./LineItemTaxLine.yaml - adjustments: - description: >- - The details of the item's adjustments, which are available when a discount - is applied on the item. - x-expandable: adjustments - type: array - items: - $ref: ./LineItemAdjustment.yaml - original_item_id: - description: >- - The ID of the original line item. This is useful if the line item belongs - to a resource that references an order, such as a return or an order edit. - nullable: true - type: string - order_edit_id: - description: The ID of the order edit that the item may belong to. - nullable: true - type: string - order_edit: - description: The details of the order edit. - x-expandable: order_edit - nullable: true - type: object - title: - description: The title of the Line Item. - type: string - example: Medusa Coffee Mug - description: - description: A more detailed description of the contents of the Line Item. - nullable: true - type: string - example: One Size - thumbnail: - description: A URL string to a small image of the contents of the Line Item. - nullable: true - type: string - format: uri - example: https://medusa-public-images.s3.eu-west-1.amazonaws.com/coffee-mug.png - is_return: - description: Is the item being returned - type: boolean - default: false - is_giftcard: - description: Flag to indicate if the Line Item is a Gift Card. - type: boolean - default: false - should_merge: - description: >- - Flag to indicate if new Line Items with the same variant should be merged - or added as an additional Line Item. - type: boolean - default: true - allow_discounts: - description: >- - Flag to indicate if the Line Item should be included when doing discount - calculations. - type: boolean - default: true - has_shipping: - description: Flag to indicate if the Line Item has fulfillment associated with it. - nullable: true - type: boolean - example: false - unit_price: - description: >- - The price of one unit of the content in the Line Item. This should be in - the currency defined by the Cart/Order/Swap/Claim that the Line Item - belongs to. - type: integer - example: 8000 - variant_id: - description: The id of the Product Variant contained in the Line Item. - nullable: true - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that this item was created from. - x-expandable: variant - nullable: true - $ref: ./ProductVariant.yaml - quantity: - description: The quantity of the content in the Line Item. - type: integer - example: 1 - fulfilled_quantity: - description: The quantity of the Line Item that has been fulfilled. - nullable: true - type: integer - example: 0 - returned_quantity: - description: The quantity of the Line Item that has been returned. - nullable: true - type: integer - example: 0 - shipped_quantity: - description: The quantity of the Line Item that has been shipped. - nullable: true - type: integer - example: 0 - refundable: - description: >- - The amount that can be refunded from the given Line Item. Takes taxes and - discounts into consideration. - type: integer - example: 0 - subtotal: - description: The subtotal of the line item - type: integer - example: 8000 - tax_total: - description: The total of tax of the line item - type: integer - example: 0 - total: - description: The total amount of the line item - type: integer - example: 8000 - original_total: - description: The original total amount of the line item - type: integer - example: 8000 - original_tax_total: - description: The original tax total amount of the line item - type: integer - example: 0 - discount_total: - description: The total of discount of the line item rounded - type: integer - example: 0 - raw_discount_total: - description: The total of discount of the line item - type: integer - example: 0 - gift_card_total: - description: The total of the gift card of the line item - type: integer - example: 0 - includes_tax: - description: Indicates if the line item unit_price include tax - x-featureFlag: tax_inclusive_pricing - type: boolean - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/LineItemAdjustment.yaml b/www/apps/api-reference/specs/store/components/schemas/LineItemAdjustment.yaml deleted file mode 100644 index 7d30b61c15..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/LineItemAdjustment.yaml +++ /dev/null @@ -1,52 +0,0 @@ -title: Line Item Adjustment -description: A Line Item Adjustment includes details on discounts applied on a line item. -type: object -required: - - amount - - description - - discount_id - - id - - item_id - - metadata -properties: - id: - description: The Line Item Adjustment's ID - type: string - example: lia_01G8TKE4XYCTHSCK2GDEP47RE1 - item_id: - description: The ID of the line item - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: The details of the line item. - x-expandable: item - nullable: true - type: object - description: - description: The line item's adjustment description - type: string - example: Adjusted item's price. - discount_id: - description: The ID of the discount associated with the adjustment - nullable: true - type: string - example: disc_01F0YESMW10MGHWJKZSDDMN0VN - discount: - description: The details of the discount associated with the adjustment. - x-expandable: discount - nullable: true - $ref: ./Discount.yaml - amount: - description: The adjustment amount - type: number - example: 1000 - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/LineItemTaxLine.yaml b/www/apps/api-reference/specs/store/components/schemas/LineItemTaxLine.yaml deleted file mode 100644 index 69832cdd1e..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/LineItemTaxLine.yaml +++ /dev/null @@ -1,57 +0,0 @@ -title: Line Item Tax Line -description: A Line Item Tax Line represents the taxes applied on a line item. -type: object -required: - - code - - created_at - - id - - item_id - - metadata - - name - - rate - - updated_at -properties: - id: - description: The line item tax line's ID - type: string - example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - item_id: - description: The ID of the line item - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: The details of the line item. - x-expandable: item - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ModulesResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/ModulesResponse.yaml deleted file mode 100644 index f90e78d9f9..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ModulesResponse.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: array -items: - type: object - required: - - module - - resolution - properties: - module: - description: The key of the module. - type: string - resolution: - description: The resolution path of the module or false if module is not installed. - type: string diff --git a/www/apps/api-reference/specs/store/components/schemas/MoneyAmount.yaml b/www/apps/api-reference/specs/store/components/schemas/MoneyAmount.yaml deleted file mode 100644 index 920f9a3242..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/MoneyAmount.yaml +++ /dev/null @@ -1,101 +0,0 @@ -title: Money Amount -description: >- - A Money Amount represent a price amount, for example, a product variant's - price or a price in a price list. Each Money Amount either has a Currency or - Region associated with it to indicate the pricing in a given Currency or, for - fully region-based pricing, the given price in a specific Region. If - region-based pricing is used, the amount will be in the currency defined for - the Region. -type: object -required: - - amount - - created_at - - currency_code - - deleted_at - - id - - max_quantity - - min_quantity - - price_list_id - - region_id - - updated_at - - variant_id -properties: - id: - description: The money amount's ID - type: string - example: ma_01F0YESHRFQNH5S8Q0PK84YYZN - currency_code: - description: The 3 character currency code that the money amount may belong to. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency that the money amount may belong to. - x-expandable: currency - nullable: true - $ref: ./Currency.yaml - amount: - description: >- - The amount in the smallest currecny unit (e.g. cents 100 cents to charge - $1) that the Product Variant will cost. - type: integer - example: 100 - min_quantity: - description: >- - The minimum quantity that the Money Amount applies to. If this value is - not set, the Money Amount applies to all quantities. - nullable: true - type: integer - example: 1 - max_quantity: - description: >- - The maximum quantity that the Money Amount applies to. If this value is - not set, the Money Amount applies to all quantities. - nullable: true - type: integer - example: 1 - price_list_id: - description: The ID of the price list that the money amount may belong to. - nullable: true - type: string - example: pl_01G8X3CKJXCG5VXVZ87H9KC09W - price_list: - description: The details of the price list that the money amount may belong to. - x-expandable: price_list - nullable: true - type: object - variant_id: - description: The ID of the Product Variant contained in the Line Item. - nullable: true - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that the money amount may belong to. - x-expandable: variant - nullable: true - type: object - region_id: - description: The region's ID - nullable: true - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region that the money amount may belong to. - x-expandable: region - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/Note.yaml b/www/apps/api-reference/specs/store/components/schemas/Note.yaml deleted file mode 100644 index 9a33972604..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Note.yaml +++ /dev/null @@ -1,62 +0,0 @@ -title: Note -description: >- - A Note is an element that can be used in association with different resources - to allow admin users to describe additional information. For example, they can - be used to add additional information about orders. -type: object -required: - - author_id - - created_at - - deleted_at - - id - - metadata - - resource_id - - resource_type - - updated_at - - value -properties: - id: - description: The note's ID - type: string - example: note_01G8TM8ENBMC7R90XRR1G6H26Q - resource_type: - description: The type of resource that the Note refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Note refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - value: - description: The contents of the note. - type: string - example: This order must be fulfilled on Monday - author_id: - description: The ID of the user that created the note. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - author: - description: The details of the user that created the note. - x-expandable: author - nullable: true - $ref: ./User.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white diff --git a/www/apps/api-reference/specs/store/components/schemas/Notification.yaml b/www/apps/api-reference/specs/store/components/schemas/Notification.yaml deleted file mode 100644 index 0d00e6fed4..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Notification.yaml +++ /dev/null @@ -1,93 +0,0 @@ -title: Notification -description: >- - A notification is an alert sent, typically to customers, using the installed - Notification Provider as a reaction to internal events such as `order.placed`. - Notifications can be resent. -type: object -required: - - created_at - - customer_id - - data - - event_name - - id - - parent_id - - provider_id - - resource_type - - resource_id - - to - - updated_at -properties: - id: - description: The notification's ID - type: string - example: noti_01G53V9Y6CKMCGBM1P0X7C28RX - event_name: - description: The name of the event that the notification was sent for. - nullable: true - type: string - example: order.placed - resource_type: - description: The type of resource that the Notification refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Notification refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - customer_id: - description: The ID of the customer that this notification was sent to. - nullable: true - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer that this notification was sent to. - x-expandable: customer - nullable: true - $ref: ./Customer.yaml - to: - description: >- - The address that the Notification was sent to. This will usually be an - email address, but can represent other addresses such as a chat bot user - ID. - type: string - example: user@example.com - data: - description: >- - The data that the Notification was sent with. This contains all the data - necessary for the Notification Provider to initiate a resend. - type: object - example: {} - parent_id: - description: The notification's parent ID - nullable: true - type: string - example: noti_01G53V9Y6CKMCGBM1P0X7C28RX - parent_notification: - description: The details of the parent notification. - x-expandable: parent_notification - nullable: true - type: object - resends: - description: The details of all resends of the notification. - type: array - x-expandable: resends - items: - type: object - provider_id: - description: The ID of the notification provider used to send the notification. - nullable: true - type: string - example: sengrid - provider: - description: The notification provider used to send the notification. - x-expandable: provider - nullable: true - $ref: ./NotificationProvider.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/NotificationProvider.yaml b/www/apps/api-reference/specs/store/components/schemas/NotificationProvider.yaml deleted file mode 100644 index d2d2e53288..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/NotificationProvider.yaml +++ /dev/null @@ -1,21 +0,0 @@ -title: Notification Provider -description: >- - A notification provider represents a notification service installed in the - Medusa backend, either through a plugin or backend customizations. It holds - the notification service's installation status. -type: object -required: - - id - - is_installed -properties: - id: - description: The ID of the notification provider as given by the notification service. - type: string - example: sendgrid - is_installed: - description: >- - Whether the notification service is installed in the current version. If a - notification service is no longer installed, the `is_installed` attribute - is set to `false`. - type: boolean - default: true diff --git a/www/apps/api-reference/specs/store/components/schemas/OAuth.yaml b/www/apps/api-reference/specs/store/components/schemas/OAuth.yaml deleted file mode 100644 index b1ca6bf402..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/OAuth.yaml +++ /dev/null @@ -1,40 +0,0 @@ -title: OAuth -description: >- - An Oauth app is typically created by a plugin to handle authentication to - third-party services. -type: object -required: - - application_name - - data - - display_name - - id - - install_url - - uninstall_url -properties: - id: - description: The app's ID - type: string - example: example_app - display_name: - description: The app's display name - type: string - example: Example app - application_name: - description: The app's name - type: string - example: example - install_url: - description: The URL to install the app - nullable: true - type: string - format: uri - uninstall_url: - description: The URL to uninstall the app - nullable: true - type: string - format: uri - data: - description: Any data necessary to the app. - nullable: true - type: object - example: {} diff --git a/www/apps/api-reference/specs/store/components/schemas/Order.yaml b/www/apps/api-reference/specs/store/components/schemas/Order.yaml deleted file mode 100644 index 9fb3daeff9..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Order.yaml +++ /dev/null @@ -1,349 +0,0 @@ -title: Order -description: >- - An order is a purchase made by a customer. It holds details about payment and - fulfillment of the order. An order may also be created from a draft order, - which is created by an admin user. -type: object -required: - - billing_address_id - - canceled_at - - cart_id - - created_at - - currency_code - - customer_id - - draft_order_id - - display_id - - email - - external_id - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - object - - payment_status - - region_id - - shipping_address_id - - status - - tax_rate - - updated_at -properties: - id: - description: The order's ID - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - status: - description: The order's status - type: string - enum: - - pending - - completed - - archived - - canceled - - requires_action - default: pending - fulfillment_status: - description: The order's fulfillment status - type: string - enum: - - not_fulfilled - - partially_fulfilled - - fulfilled - - partially_shipped - - shipped - - partially_returned - - returned - - canceled - - requires_action - default: not_fulfilled - payment_status: - description: The order's payment status - type: string - enum: - - not_paid - - awaiting - - captured - - partially_refunded - - refunded - - canceled - - requires_action - default: not_paid - display_id: - description: The order's display ID - type: integer - example: 2 - cart_id: - description: The ID of the cart associated with the order - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart associated with the order. - x-expandable: cart - nullable: true - type: object - customer_id: - description: The ID of the customer associated with the order - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer associated with the order. - x-expandable: customer - nullable: true - type: object - email: - description: The email associated with the order - type: string - format: email - billing_address_id: - description: The ID of the billing address associated with the order - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the order. - x-expandable: billing_address - nullable: true - $ref: ./Address.yaml - shipping_address_id: - description: The ID of the shipping address associated with the order - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address associated with the order. - x-expandable: shipping_address - nullable: true - $ref: ./Address.yaml - region_id: - description: The ID of the region this order was created in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this order was created in. - x-expandable: region - nullable: true - $ref: ./Region.yaml - currency_code: - description: The 3 character currency code that is used in the order - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency used in the order. - x-expandable: currency - nullable: true - $ref: ./Currency.yaml - tax_rate: - description: The order's tax rate - nullable: true - type: number - example: 0 - discounts: - description: The details of the discounts applied on the order. - type: array - x-expandable: discounts - items: - $ref: ./Discount.yaml - gift_cards: - description: The details of the gift card used in the order. - type: array - x-expandable: gift_cards - items: - $ref: ./GiftCard.yaml - shipping_methods: - description: The details of the shipping methods used in the order. - type: array - x-expandable: shipping_methods - items: - $ref: ./ShippingMethod.yaml - payments: - description: The details of the payments used in the order. - type: array - x-expandable: payments - items: - type: object - fulfillments: - description: The details of the fulfillments created for the order. - type: array - x-expandable: fulfillments - items: - type: object - returns: - description: The details of the returns created for the order. - type: array - x-expandable: returns - items: - type: object - claims: - description: The details of the claims created for the order. - type: array - x-expandable: claims - items: - type: object - refunds: - description: The details of the refunds created for the order. - type: array - x-expandable: refunds - items: - type: object - swaps: - description: The details of the swaps created for the order. - type: array - x-expandable: swaps - items: - type: object - draft_order_id: - description: The ID of the draft order this order was created from. - nullable: true - type: string - example: null - draft_order: - description: The details of the draft order this order was created from. - x-expandable: draft_order - nullable: true - type: object - items: - description: The details of the line items that belong to the order. - x-expandable: items - type: array - items: - $ref: ./LineItem.yaml - edits: - description: The details of the order edits done on the order. - type: array - x-expandable: edits - items: - type: object - gift_card_transactions: - description: The gift card transactions made in the order. - type: array - x-expandable: gift_card_transactions - items: - $ref: ./GiftCardTransaction.yaml - canceled_at: - description: The date the order was canceled on. - nullable: true - type: string - format: date-time - no_notification: - description: >- - Flag for describing whether or not notifications related to this should be - send. - nullable: true - type: boolean - example: false - idempotency_key: - description: >- - Randomly generated key used to continue the processing of the order in - case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - external_id: - description: The ID of an external order. - nullable: true - type: string - example: null - sales_channel_id: - description: The ID of the sales channel this order belongs to. - nullable: true - type: string - example: null - sales_channel: - description: The details of the sales channel this order belongs to. - x-expandable: sales_channel - nullable: true - $ref: ./SalesChannel.yaml - shipping_total: - type: integer - description: The total of shipping - example: 1000 - nullable: true - shipping_tax_total: - type: integer - description: The tax total applied on shipping - example: 1000 - raw_discount_total: - description: The total of discount - type: integer - example: 800 - discount_total: - description: The total of discount rounded - type: integer - example: 800 - tax_total: - description: The total of tax - type: integer - example: 0 - item_tax_total: - description: The tax total applied on items - type: integer - example: 0 - nullable: true - refunded_total: - description: The total amount refunded if the order is returned. - type: integer - example: 0 - total: - description: The total amount of the order - type: integer - example: 8200 - subtotal: - description: The subtotal of the order - type: integer - example: 8000 - paid_total: - description: The total amount paid - type: integer - example: 8000 - refundable_amount: - description: The amount that can be refunded - type: integer - example: 8200 - gift_card_total: - description: The total of gift cards - type: integer - example: 0 - gift_card_tax_total: - description: The total of gift cards with taxes - type: integer - example: 0 - returnable_items: - description: >- - The details of the line items that are returnable as part of the order, - swaps, or claims - type: array - x-expandable: returnable_items - items: - $ref: ./LineItem.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - sales_channels: - description: The associated sales channels. - type: array - nullable: true - x-expandable: sales_channels - x-featureFlag: medusa_v2 - items: - $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/OrderEdit.yaml b/www/apps/api-reference/specs/store/components/schemas/OrderEdit.yaml deleted file mode 100644 index 27f1077bdb..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/OrderEdit.yaml +++ /dev/null @@ -1,170 +0,0 @@ -title: Order Edit -description: >- - Order edit allows modifying items in an order, such as adding, updating, or - deleting items from the original order. Once the order edit is confirmed, the - changes are reflected on the original order. -type: object -required: - - canceled_at - - canceled_by - - confirmed_by - - confirmed_at - - created_at - - created_by - - declined_at - - declined_by - - declined_reason - - id - - internal_note - - order_id - - payment_collection_id - - requested_at - - requested_by - - status - - updated_at -properties: - id: - description: The order edit's ID - type: string - example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK - order_id: - description: The ID of the order that is edited - type: string - example: order_01G2SG30J8C85S4A5CHM2S1NS2 - order: - description: The details of the order that this order edit was created for. - x-expandable: order - nullable: true - type: object - changes: - description: The details of all the changes on the original order's line items. - x-expandable: changes - type: array - items: - $ref: ./OrderItemChange.yaml - internal_note: - description: An optional note with additional details about the order edit. - nullable: true - type: string - example: Included two more items B to the order. - created_by: - description: The unique identifier of the user or customer who created the order edit. - type: string - requested_by: - description: >- - The unique identifier of the user or customer who requested the order - edit. - nullable: true - type: string - requested_at: - description: The date with timezone at which the edit was requested. - nullable: true - type: string - format: date-time - confirmed_by: - description: >- - The unique identifier of the user or customer who confirmed the order - edit. - nullable: true - type: string - confirmed_at: - description: The date with timezone at which the edit was confirmed. - nullable: true - type: string - format: date-time - declined_by: - description: The unique identifier of the user or customer who declined the order edit. - nullable: true - type: string - declined_at: - description: The date with timezone at which the edit was declined. - nullable: true - type: string - format: date-time - declined_reason: - description: An optional note why the order edit is declined. - nullable: true - type: string - canceled_by: - description: >- - The unique identifier of the user or customer who cancelled the order - edit. - nullable: true - type: string - canceled_at: - description: The date with timezone at which the edit was cancelled. - nullable: true - type: string - format: date-time - subtotal: - description: The total of subtotal - type: integer - example: 8000 - discount_total: - description: The total of discount - type: integer - example: 800 - shipping_total: - description: The total of the shipping amount - type: integer - example: 800 - gift_card_total: - description: The total of the gift card amount - type: integer - example: 800 - gift_card_tax_total: - description: The total of the gift card tax amount - type: integer - example: 800 - tax_total: - description: The total of tax - type: integer - example: 0 - total: - description: The total amount of the edited order. - type: integer - example: 8200 - difference_due: - description: >- - The difference between the total amount of the order and total amount of - edited order. - type: integer - example: 8200 - status: - description: The status of the order edit. - type: string - enum: - - confirmed - - declined - - requested - - created - - canceled - items: - description: >- - The details of the cloned items from the original order with the new - changes. Once the order edit is confirmed, these line items are associated - with the original order. - type: array - x-expandable: items - items: - $ref: ./LineItem.yaml - payment_collection_id: - description: The ID of the payment collection - nullable: true - type: string - example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK - payment_collection: - description: >- - The details of the payment collection used to authorize additional payment - if necessary. - x-expandable: payment_collection - nullable: true - $ref: ./PaymentCollection.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/OrderItemChange.yaml b/www/apps/api-reference/specs/store/components/schemas/OrderItemChange.yaml deleted file mode 100644 index a1cbe55425..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/OrderItemChange.yaml +++ /dev/null @@ -1,73 +0,0 @@ -title: Order Item Change -description: >- - An order item change is a change made within an order edit to an order's - items. These changes are not reflected on the original order until the order - edit is confirmed. -type: object -required: - - created_at - - deleted_at - - id - - line_item_id - - order_edit_id - - original_line_item_id - - type - - updated_at -properties: - id: - description: The order item change's ID - type: string - example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK - type: - description: The order item change's status - type: string - enum: - - item_add - - item_remove - - item_update - order_edit_id: - description: The ID of the order edit - type: string - example: oe_01G2SG30J8C85S4A5CHM2S1NS2 - order_edit: - description: The details of the order edit the item change is associated with. - x-expandable: order_edit - nullable: true - type: object - original_line_item_id: - description: The ID of the original line item in the order - nullable: true - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - original_line_item: - description: >- - The details of the original line item this item change references. This is - used if the item change updates or deletes the original item. - x-expandable: original_line_item - nullable: true - $ref: ./LineItem.yaml - line_item_id: - description: The ID of the cloned line item. - nullable: true - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - line_item: - description: >- - The details of the resulting line item after the item change. This line - item is then used in the original order once the order edit is confirmed. - x-expandable: line_item - nullable: true - $ref: ./LineItem.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/Payment.yaml b/www/apps/api-reference/specs/store/components/schemas/Payment.yaml deleted file mode 100644 index cf84c788ad..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Payment.yaml +++ /dev/null @@ -1,133 +0,0 @@ -title: Payment -description: >- - A payment is originally created from a payment session. Once a payment session - is authorized, the payment is created to represent the authorized amount with - a given payment method. Payments can be captured, canceled or refunded. - Payments can be made towards orders, swaps, order edits, or other resources. -type: object -required: - - amount - - amount_refunded - - canceled_at - - captured_at - - cart_id - - created_at - - currency_code - - data - - id - - idempotency_key - - metadata - - order_id - - provider_id - - swap_id - - updated_at -properties: - id: - description: The payment's ID - type: string - example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE - swap_id: - description: The ID of the swap that this payment was potentially created for. - nullable: true - type: string - example: null - swap: - description: The details of the swap that this payment was potentially created for. - x-expandable: swap - nullable: true - type: object - cart_id: - description: The ID of the cart that the payment session was potentially created for. - nullable: true - type: string - cart: - description: >- - The details of the cart that the payment session was potentially created - for. - x-expandable: cart - nullable: true - type: object - order_id: - description: The ID of the order that the payment session was potentially created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: >- - The details of the order that the payment session was potentially created - for. - x-expandable: order - nullable: true - type: object - amount: - description: The amount that the Payment has been authorized for. - type: integer - example: 100 - currency_code: - description: The 3 character ISO currency code of the payment. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency of the payment. - x-expandable: currency - nullable: true - $ref: ./Currency.yaml - amount_refunded: - description: >- - The amount of the original Payment amount that has been refunded back to - the Customer. - type: integer - default: 0 - example: 0 - provider_id: - description: The id of the Payment Provider that is responsible for the Payment - type: string - example: manual - data: - description: >- - The data required for the Payment Provider to identify, modify and process - the Payment. Typically this will be an object that holds an id to the - external payment session, but can be an empty object if the Payment - Provider doesn't hold any state. - type: object - example: {} - captured_at: - description: The date with timezone at which the Payment was captured. - nullable: true - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Payment was canceled. - nullable: true - type: string - format: date-time - idempotency_key: - description: >- - Randomly generated key used to continue the completion of a payment in - case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/PaymentCollection.yaml b/www/apps/api-reference/specs/store/components/schemas/PaymentCollection.yaml deleted file mode 100644 index 4c8342dae9..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/PaymentCollection.yaml +++ /dev/null @@ -1,113 +0,0 @@ -title: Payment Collection -description: >- - A payment collection allows grouping and managing a list of payments at one. - This can be helpful when making additional payment for order edits or - integrating installment payments. -type: object -required: - - amount - - authorized_amount - - created_at - - created_by - - currency_code - - deleted_at - - description - - id - - metadata - - region_id - - status - - type - - updated_at -properties: - id: - description: The payment collection's ID - type: string - example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK - type: - description: The type of the payment collection - type: string - enum: - - order_edit - status: - description: The type of the payment collection - type: string - enum: - - not_paid - - awaiting - - authorized - - partially_authorized - - canceled - description: - description: Description of the payment collection - nullable: true - type: string - amount: - description: Amount of the payment collection. - type: integer - authorized_amount: - description: Authorized amount of the payment collection. - nullable: true - type: integer - region_id: - description: The ID of the region this payment collection is associated with. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this payment collection is associated with. - x-expandable: region - nullable: true - $ref: ./Region.yaml - currency_code: - description: >- - The three character ISO code for the currency this payment collection is - associated with. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency this payment collection is associated with. - x-expandable: currency - nullable: true - $ref: ./Currency.yaml - payment_sessions: - description: >- - The details of the payment sessions created as part of the payment - collection. - type: array - x-expandable: payment_sessions - items: - $ref: ./PaymentSession.yaml - payments: - description: The details of the payments created as part of the payment collection. - type: array - x-expandable: payments - items: - $ref: ./Payment.yaml - created_by: - description: The ID of the user that created the payment collection. - type: string - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/PaymentProvider.yaml b/www/apps/api-reference/specs/store/components/schemas/PaymentProvider.yaml deleted file mode 100644 index 4a54a90729..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/PaymentProvider.yaml +++ /dev/null @@ -1,21 +0,0 @@ -title: Payment Provider -description: >- - A payment provider represents a payment service installed in the Medusa - backend, either through a plugin or backend customizations. It holds the - payment service's installation status. -type: object -required: - - id - - is_installed -properties: - id: - description: The ID of the payment provider as given by the payment service. - type: string - example: manual - is_installed: - description: >- - Whether the payment service is installed in the current version. If a - payment service is no longer installed, the `is_installed` attribute is - set to `false`. - type: boolean - default: true diff --git a/www/apps/api-reference/specs/store/components/schemas/PaymentSession.yaml b/www/apps/api-reference/specs/store/components/schemas/PaymentSession.yaml deleted file mode 100644 index ccf7cbcda8..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/PaymentSession.yaml +++ /dev/null @@ -1,105 +0,0 @@ -title: Payment Session -description: >- - A Payment Session is created when a Customer initilizes the checkout flow, and - can be used to hold the state of a payment flow. Each Payment Session is - controlled by a Payment Provider, which is responsible for the communication - with external payment services. Authorized Payment Sessions will eventually - get promoted to Payments to indicate that they are authorized for payment - processing such as capture or refund. Payment sessions can also be used as - part of payment collections. -type: object -required: - - amount - - cart_id - - created_at - - data - - id - - is_initiated - - is_selected - - idempotency_key - - payment_authorized_at - - provider_id - - status - - updated_at -properties: - id: - description: The payment session's ID - type: string - example: ps_01G901XNSRM2YS3ASN9H5KG3FZ - cart_id: - description: The ID of the cart that the payment session was created for. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the payment session was created for. - x-expandable: cart - nullable: true - $ref: ./Cart.yaml - provider_id: - description: The ID of the Payment Provider that is responsible for the Payment Session - type: string - example: manual - is_selected: - description: >- - A flag to indicate if the Payment Session has been selected as the method - that will be used to complete the purchase. - nullable: true - type: boolean - example: true - is_initiated: - description: >- - A flag to indicate if a communication with the third party provider has - been initiated. - type: boolean - default: false - example: true - status: - description: >- - Indicates the status of the Payment Session. Will default to `pending`, - and will eventually become `authorized`. Payment Sessions may have the - status of `requires_more` to indicate that further actions are to be - completed by the Customer. - type: string - enum: - - authorized - - pending - - requires_more - - error - - canceled - example: pending - data: - description: >- - The data required for the Payment Provider to identify, modify and process - the Payment Session. Typically this will be an object that holds an id to - the external payment session, but can be an empty object if the Payment - Provider doesn't hold any state. - type: object - example: {} - idempotency_key: - description: >- - Randomly generated key used to continue the completion of a cart in case - of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - amount: - description: The amount that the Payment Session has been authorized for. - nullable: true - type: integer - example: 100 - payment_authorized_at: - description: The date with timezone at which the Payment Session was authorized. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/PriceList.yaml b/www/apps/api-reference/specs/store/components/schemas/PriceList.yaml deleted file mode 100644 index cb1f79566a..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/PriceList.yaml +++ /dev/null @@ -1,83 +0,0 @@ -title: Price List -description: >- - A Price List represents a set of prices that override the default price for - one or more product variants. -type: object -required: - - created_at - - deleted_at - - description - - ends_at - - id - - name - - starts_at - - status - - type - - updated_at -properties: - id: - description: The price list's ID - type: string - example: pl_01G8X3CKJXCG5VXVZ87H9KC09W - name: - description: The price list's name - type: string - example: VIP Prices - description: - description: The price list's description - type: string - example: Prices for VIP customers - type: - description: The type of Price List. This can be one of either `sale` or `override`. - type: string - enum: - - sale - - override - default: sale - status: - description: The status of the Price List - type: string - enum: - - active - - draft - default: draft - starts_at: - description: The date with timezone that the Price List starts being valid. - nullable: true - type: string - format: date-time - ends_at: - description: The date with timezone that the Price List stops being valid. - nullable: true - type: string - format: date-time - customer_groups: - description: The details of the customer groups that the Price List can apply to. - type: array - x-expandable: customer_groups - items: - $ref: ./CustomerGroup.yaml - prices: - description: The prices that belong to the price list, represented as a Money Amount. - type: array - x-expandable: prices - items: - $ref: ./MoneyAmount.yaml - includes_tax: - description: Whether the price list prices include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/PricedProduct.yaml b/www/apps/api-reference/specs/store/components/schemas/PricedProduct.yaml deleted file mode 100644 index aa57632b38..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/PricedProduct.yaml +++ /dev/null @@ -1,11 +0,0 @@ -title: Priced Product -type: object -allOf: - - $ref: ./Product.yaml - - type: object - properties: - variants: - description: The product variants and their prices. - type: array - items: - $ref: ./PricedVariant.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/PricedShippingOption.yaml b/www/apps/api-reference/specs/store/components/schemas/PricedShippingOption.yaml deleted file mode 100644 index a5f479328b..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/PricedShippingOption.yaml +++ /dev/null @@ -1,27 +0,0 @@ -title: Priced Shipping Option -type: object -allOf: - - $ref: ./ShippingOption.yaml - - type: object - properties: - price_incl_tax: - type: number - description: Price including taxes - tax_rates: - type: array - description: An array of applied tax rates - items: - type: object - properties: - rate: - type: number - description: The tax rate value - name: - type: string - description: The name of the tax rate - code: - type: string - description: The code of the tax rate - tax_amount: - type: number - description: The taxes applied. diff --git a/www/apps/api-reference/specs/store/components/schemas/PricedVariant.yaml b/www/apps/api-reference/specs/store/components/schemas/PricedVariant.yaml deleted file mode 100644 index 4b74691549..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/PricedVariant.yaml +++ /dev/null @@ -1,41 +0,0 @@ -title: Priced Product Variant -type: object -allOf: - - $ref: ./ProductVariant.yaml - - type: object - properties: - original_price: - type: number - description: >- - The original price of the variant without any discounted prices - applied. - calculated_price: - type: number - description: The calculated price of the variant. Can be a discounted price. - original_price_incl_tax: - type: number - description: The original price of the variant including taxes. - calculated_price_incl_tax: - type: number - description: The calculated price of the variant including taxes. - original_tax: - type: number - description: The taxes applied on the original price. - calculated_tax: - type: number - description: The taxes applied on the calculated price. - tax_rates: - type: array - description: An array of applied tax rates - items: - type: object - properties: - rate: - type: number - description: The tax rate value - name: - type: string - description: The name of the tax rate - code: - type: string - description: The code of the tax rate diff --git a/www/apps/api-reference/specs/store/components/schemas/Product.yaml b/www/apps/api-reference/specs/store/components/schemas/Product.yaml deleted file mode 100644 index d0f98a63f1..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Product.yaml +++ /dev/null @@ -1,253 +0,0 @@ -title: Product -description: >- - A product is a saleable item that holds general information such as name or - description. It must include at least one Product Variant, where each product - variant defines different options to purchase the product with (for example, - different sizes or colors). The prices and inventory of the product are - defined on the variant level. -type: object -required: - - collection_id - - created_at - - deleted_at - - description - - discountable - - external_id - - handle - - height - - hs_code - - id - - is_giftcard - - length - - material - - metadata - - mid_code - - origin_country - - profile_id - - status - - subtitle - - type_id - - thumbnail - - title - - updated_at - - weight - - width -properties: - id: - description: The product's ID - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - title: - description: A title that can be displayed for easy identification of the Product. - type: string - example: Medusa Coffee Mug - subtitle: - description: An optional subtitle that can be used to further specify the Product. - nullable: true - type: string - description: - description: A short description of the Product. - nullable: true - type: string - example: Every programmer's best friend. - handle: - description: A unique identifier for the Product (e.g. for slug structure). - nullable: true - type: string - example: coffee-mug - is_giftcard: - description: >- - Whether the Product represents a Gift Card. Products that represent Gift - Cards will automatically generate a redeemable Gift Card code once they - are purchased. - type: boolean - default: false - status: - description: The status of the product - type: string - enum: - - draft - - proposed - - published - - rejected - default: draft - images: - description: The details of the product's images. - type: array - x-expandable: images - items: - $ref: ./Image.yaml - thumbnail: - description: A URL to an image file that can be used to identify the Product. - nullable: true - type: string - format: uri - options: - description: >- - The details of the Product Options that are defined for the Product. The - product's variants will have a unique combination of values of the - product's options. - type: array - x-expandable: options - items: - $ref: ./ProductOption.yaml - variants: - description: >- - The details of the Product Variants that belong to the Product. Each will - have a unique combination of values of the product's options. - type: array - x-expandable: variants - items: - $ref: ./ProductVariant.yaml - categories: - description: The details of the product categories that this product belongs to. - type: array - x-expandable: categories - x-featureFlag: product_categories - items: - $ref: ./ProductCategory.yaml - profile_id: - description: >- - The ID of the shipping profile that the product belongs to. The shipping - profile has a set of defined shipping options that can be used to fulfill - the product. - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - profile: - description: >- - The details of the shipping profile that the product belongs to. The - shipping profile has a set of defined shipping options that can be used to - fulfill the product. - x-expandable: profile - nullable: true - $ref: ./ShippingProfile.yaml - profiles: - description: Available if the relation `profiles` is expanded. - nullable: true - type: array - items: - $ref: ./ShippingProfile.yaml - weight: - description: >- - The weight of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - length: - description: >- - The length of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - hs_code: - description: >- - The Harmonized System code of the Product Variant. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - origin_country: - description: >- - The country in which the Product Variant was produced. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - mid_code: - description: >- - The Manufacturers Identification code that identifies the manufacturer of - the Product Variant. May be used by Fulfillment Providers to pass customs - information to shipping carriers. - nullable: true - type: string - example: null - material: - description: >- - The material and composition that the Product Variant is made of, May be - used by Fulfillment Providers to pass customs information to shipping - carriers. - nullable: true - type: string - example: null - collection_id: - description: The ID of the product collection that the product belongs to. - nullable: true - type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - collection: - description: The details of the product collection that the product belongs to. - x-expandable: collection - nullable: true - $ref: ./ProductCollection.yaml - type_id: - description: The ID of the product type that the product belongs to. - nullable: true - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - type: - description: The details of the product type that the product belongs to. - x-expandable: type - nullable: true - $ref: ./ProductType.yaml - tags: - description: The details of the product tags used in this product. - type: array - x-expandable: type - items: - $ref: ./ProductTag.yaml - discountable: - description: >- - Whether the Product can be discounted. Discounts will not apply to Line - Items of this Product when this flag is set to `false`. - type: boolean - default: true - external_id: - description: The external ID of the product - nullable: true - type: string - example: null - sales_channels: - description: The details of the sales channels this product is available in. - type: array - x-expandable: sales_channels - items: - $ref: ./SalesChannel.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ProductCategory.yaml b/www/apps/api-reference/specs/store/components/schemas/ProductCategory.yaml deleted file mode 100644 index 2a9d4d63a0..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ProductCategory.yaml +++ /dev/null @@ -1,97 +0,0 @@ -title: Product Category -description: >- - A product category can be used to categorize products into a hierarchy of - categories. -x-resourceId: ProductCategory -x-featureFlag: product_categories -type: object -required: - - category_children - - created_at - - handle - - id - - is_active - - is_internal - - metadata - - mpath - - name - - parent_category_id - - updated_at -properties: - id: - description: The product category's ID - type: string - example: pcat_01G2SG30J8C85S4A5CHM2S1NS2 - name: - description: The product category's name - type: string - example: Regular Fit - description: - description: The product category's description. - type: string - default: '' - handle: - description: >- - A unique string that identifies the Product Category - can for example be - used in slug structures. - type: string - example: regular-fit - mpath: - description: >- - A string for Materialized Paths - used for finding ancestors and - descendents - nullable: true - type: string - example: pcat_id1.pcat_id2.pcat_id3 - is_internal: - type: boolean - description: A flag to make product category an internal category for admins - default: false - is_active: - type: boolean - description: A flag to make product category visible/hidden in the store front - default: false - rank: - type: integer - description: An integer that depicts the rank of category in a tree node - default: 0 - category_children: - description: The details of the category's children. - type: array - x-expandable: category_children - items: - type: object - parent_category_id: - description: The ID of the parent category. - nullable: true - type: string - default: null - parent_category: - description: The details of the parent of this category. - x-expandable: parent_category - nullable: true - type: object - products: - description: The details of the products that belong to this category. - type: array - x-expandable: products - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ProductCollection.yaml b/www/apps/api-reference/specs/store/components/schemas/ProductCollection.yaml deleted file mode 100644 index 82b6fbcca8..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ProductCollection.yaml +++ /dev/null @@ -1,59 +0,0 @@ -title: Product Collection -description: >- - A Product Collection allows grouping together products for promotional - purposes. For example, an admin can create a Summer collection, add products - to it, and showcase it on the storefront. -type: object -required: - - created_at - - deleted_at - - handle - - id - - metadata - - title - - updated_at -properties: - id: - description: The product collection's ID - type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - title: - description: The title that the Product Collection is identified by. - type: string - example: Summer Collection - handle: - description: >- - A unique string that identifies the Product Collection - can for example - be used in slug structures. - nullable: true - type: string - example: summer-collection - products: - description: The details of the products that belong to this product collection. - type: array - x-expandable: products - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ProductOption.yaml b/www/apps/api-reference/specs/store/components/schemas/ProductOption.yaml deleted file mode 100644 index 6e2d829a9e..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ProductOption.yaml +++ /dev/null @@ -1,61 +0,0 @@ -title: Product Option -description: >- - A Product Option defines properties that may vary between different variants - of a Product. Common Product Options are "Size" and "Color". Admins are free - to create any product options. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - product_id - - title - - updated_at -properties: - id: - description: The product option's ID - type: string - example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 - title: - description: The title that the Product Option is defined by (e.g. `Size`). - type: string - example: Size - values: - description: The details of the values of the product option. - type: array - x-expandable: values - items: - $ref: ./ProductOptionValue.yaml - product_id: - description: The ID of the product that this product option belongs to. - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product that this product option belongs to. - x-expandable: product - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ProductOptionValue.yaml b/www/apps/api-reference/specs/store/components/schemas/ProductOptionValue.yaml deleted file mode 100644 index af9257805c..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ProductOptionValue.yaml +++ /dev/null @@ -1,69 +0,0 @@ -title: Product Option Value -description: >- - An option value is one of the possible values of a Product Option. Product - Variants specify a unique combination of product option values. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - option_id - - updated_at - - value - - variant_id -properties: - id: - description: The product option value's ID - type: string - example: optval_01F0YESHR7S6ECD03RF6W12DSJ - value: - description: >- - The value that the Product Variant has defined for the specific Product - Option (e.g. if the Product Option is "Size" this value could be `Small`, - `Medium` or `Large`). - type: string - example: large - option_id: - description: The ID of the Product Option that the Product Option Value belongs to. - type: string - example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 - option: - description: >- - The details of the product option that the Product Option Value belongs - to. - x-expandable: option - nullable: true - type: object - variant_id: - description: The ID of the product variant that uses this product option value. - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that uses this product option value. - x-expandable: variant - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ProductTag.yaml b/www/apps/api-reference/specs/store/components/schemas/ProductTag.yaml deleted file mode 100644 index 829162f285..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ProductTag.yaml +++ /dev/null @@ -1,42 +0,0 @@ -title: Product Tag -description: A Product Tag can be added to Products for easy filtering and grouping. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value -properties: - id: - description: The product tag's ID - type: string - example: ptag_01G8K2MTMG9168F2B70S1TAVK3 - value: - description: The value that the Product Tag represents - type: string - example: Pants - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ProductTaxRate.yaml b/www/apps/api-reference/specs/store/components/schemas/ProductTaxRate.yaml deleted file mode 100644 index 55292d8e33..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ProductTaxRate.yaml +++ /dev/null @@ -1,48 +0,0 @@ -title: Product Tax Rate -description: >- - This represents the association between a tax rate and a product to indicate - that the product is taxed in a way different than the default. -type: object -required: - - created_at - - metadata - - product_id - - rate_id - - updated_at -properties: - product_id: - description: The ID of the Product - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product. - x-expandable: product - nullable: true - $ref: ./Product.yaml - rate_id: - description: The ID of the Tax Rate - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the tax rate. - x-expandable: tax_rate - nullable: true - $ref: ./TaxRate.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ProductType.yaml b/www/apps/api-reference/specs/store/components/schemas/ProductType.yaml deleted file mode 100644 index dbdc684090..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ProductType.yaml +++ /dev/null @@ -1,42 +0,0 @@ -title: Product Type -description: A Product Type can be added to Products for filtering and reporting purposes. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value -properties: - id: - description: The product type's ID - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - value: - description: The value that the Product Type represents. - type: string - example: Clothing - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ProductTypeTaxRate.yaml b/www/apps/api-reference/specs/store/components/schemas/ProductTypeTaxRate.yaml deleted file mode 100644 index 3c641ab1fe..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ProductTypeTaxRate.yaml +++ /dev/null @@ -1,48 +0,0 @@ -title: Product Type Tax Rate -description: >- - This represents the association between a tax rate and a product type to - indicate that the product type is taxed in a different way than the default. -type: object -required: - - created_at - - metadata - - product_type_id - - rate_id - - updated_at -properties: - product_type_id: - description: The ID of the Product type - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - product_type: - description: The details of the product type. - x-expandable: product_type - nullable: true - $ref: ./ProductType.yaml - rate_id: - description: The id of the Tax Rate - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the tax rate. - x-expandable: tax_rate - nullable: true - $ref: ./TaxRate.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ProductVariant.yaml b/www/apps/api-reference/specs/store/components/schemas/ProductVariant.yaml deleted file mode 100644 index ad7ee83ce8..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ProductVariant.yaml +++ /dev/null @@ -1,208 +0,0 @@ -title: Product Variant -description: >- - A Product Variant represents a Product with a specific set of Product Option - configurations. The maximum number of Product Variants that a Product can have - is given by the number of available Product Option combinations. A product - must at least have one product variant. -type: object -required: - - allow_backorder - - barcode - - created_at - - deleted_at - - ean - - height - - hs_code - - id - - inventory_quantity - - length - - manage_inventory - - material - - metadata - - mid_code - - origin_country - - product_id - - sku - - title - - upc - - updated_at - - weight - - width -properties: - id: - description: The product variant's ID - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - title: - description: >- - A title that can be displayed for easy identification of the Product - Variant. - type: string - example: Small - product_id: - description: The ID of the product that the product variant belongs to. - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product that the product variant belongs to. - x-expandable: product - nullable: true - type: object - prices: - description: >- - The details of the prices of the Product Variant, each represented as a - Money Amount. Each Money Amount represents a price in a given currency or - a specific Region. - type: array - x-expandable: prices - items: - $ref: ./MoneyAmount.yaml - sku: - description: >- - The unique stock keeping unit used to identify the Product Variant. This - will usually be a unique identifer for the item that is to be shipped, and - can be referenced across multiple systems. - nullable: true - type: string - example: shirt-123 - barcode: - description: >- - A generic field for a GTIN number that can be used to identify the Product - Variant. - nullable: true - type: string - example: null - ean: - description: An EAN barcode number that can be used to identify the Product Variant. - nullable: true - type: string - example: null - upc: - description: A UPC barcode number that can be used to identify the Product Variant. - nullable: true - type: string - example: null - variant_rank: - description: The ranking of this variant - nullable: true - type: number - default: 0 - inventory_quantity: - description: The current quantity of the item that is stocked. - type: integer - example: 100 - allow_backorder: - description: >- - Whether the Product Variant should be purchasable when - `inventory_quantity` is 0. - type: boolean - default: false - manage_inventory: - description: Whether Medusa should manage inventory for the Product Variant. - type: boolean - default: true - hs_code: - description: >- - The Harmonized System code of the Product Variant. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - origin_country: - description: >- - The country in which the Product Variant was produced. May be used by - Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - mid_code: - description: >- - The Manufacturers Identification code that identifies the manufacturer of - the Product Variant. May be used by Fulfillment Providers to pass customs - information to shipping carriers. - nullable: true - type: string - example: null - material: - description: >- - The material and composition that the Product Variant is made of, May be - used by Fulfillment Providers to pass customs information to shipping - carriers. - nullable: true - type: string - example: null - weight: - description: >- - The weight of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - length: - description: >- - The length of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. - nullable: true - type: number - example: null - options: - description: >- - The details of the product options that this product variant defines - values for. - type: array - x-expandable: options - items: - $ref: ./ProductOptionValue.yaml - inventory_items: - description: The details inventory items of the product variant. - type: array - x-expandable: inventory_items - items: - $ref: ./ProductVariantInventoryItem.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - purchasable: - description: | - Only used with the inventory modules. - A boolean value indicating whether the Product Variant is purchasable. - A variant is purchasable if: - - inventory is not managed - - it has no inventory items - - it is in stock - - it is backorderable. - type: boolean diff --git a/www/apps/api-reference/specs/store/components/schemas/ProductVariantInventoryItem.yaml b/www/apps/api-reference/specs/store/components/schemas/ProductVariantInventoryItem.yaml deleted file mode 100644 index 2da5bc3821..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ProductVariantInventoryItem.yaml +++ /dev/null @@ -1,46 +0,0 @@ -title: Product Variant Inventory Item -description: >- - A Product Variant Inventory Item links variants with inventory items and - denotes the required quantity of the variant. -type: object -required: - - created_at - - deleted_at - - id - - inventory_item_id - - required_quantity - - updated_at - - variant_id -properties: - id: - description: The product variant inventory item's ID - type: string - example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A - inventory_item_id: - description: The id of the inventory item - type: string - variant_id: - description: The id of the variant. - type: string - variant: - description: The details of the product variant. - x-expandable: variant - nullable: true - type: object - required_quantity: - description: The quantity of an inventory item required for the variant. - type: integer - default: 1 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/Promotion.yaml b/www/apps/api-reference/specs/store/components/schemas/Promotion.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/Promotion.yaml rename to www/apps/api-reference/specs/store/components/schemas/Promotion.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/PromotionRule.yaml b/www/apps/api-reference/specs/store/components/schemas/PromotionRule.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/PromotionRule.yaml rename to www/apps/api-reference/specs/store/components/schemas/PromotionRule.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/PublishableApiKey.yaml b/www/apps/api-reference/specs/store/components/schemas/PublishableApiKey.yaml deleted file mode 100644 index d94df58632..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/PublishableApiKey.yaml +++ /dev/null @@ -1,49 +0,0 @@ -title: Publishable API key -description: >- - A Publishable API key defines scopes that resources are available in. Then, it - can be used in request to infer the resources without having to directly pass - them. For example, a publishable API key can be associated with one or more - sales channels. Then, when the publishable API key is passed in the header of - a request, it is inferred what sales channel is being used without having to - pass the sales channel as a query or body parameter of the request. - Publishable API keys can only be used with sales channels, at the moment. -type: object -required: - - created_at - - created_by - - id - - revoked_by - - revoked_at - - title - - updated_at -properties: - id: - description: The key's ID - type: string - example: pk_01G1G5V27GYX4QXNARRQCW1N8T - created_by: - description: The unique identifier of the user that created the key. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_by: - description: The unique identifier of the user that revoked the key. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_at: - description: The date with timezone at which the key was revoked. - nullable: true - type: string - format: date-time - title: - description: The key's title. - type: string - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/PublishableApiKeySalesChannel.yaml b/www/apps/api-reference/specs/store/components/schemas/PublishableApiKeySalesChannel.yaml deleted file mode 100644 index fc7419a6d8..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/PublishableApiKeySalesChannel.yaml +++ /dev/null @@ -1,37 +0,0 @@ -title: Publishable API Key Sales Channel -description: >- - This represents the association between the Publishable API keys and Sales - Channels -type: object -required: - - publishable_key_id - - sales_channel_id - - created_at - - updated_at - - deleted_at -properties: - id: - description: The relation's ID - type: string - example: pksc_01G8X9A7ESKAJXG2H0E6F1MW7A - sales_channel_id: - description: The sales channel's ID - type: string - example: sc_01G1G5V21KADXNGH29BJMAJ4B4 - publishable_key_id: - description: The publishable API key's ID - type: string - example: pak_01G1G5V21KADXNGH29BJMAJ4B4 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/Refund.yaml b/www/apps/api-reference/specs/store/components/schemas/Refund.yaml deleted file mode 100644 index 0438bfe295..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Refund.yaml +++ /dev/null @@ -1,90 +0,0 @@ -title: Refund -description: >- - A refund represents an amount of money transfered back to the customer for a - given reason. Refunds may occur in relation to Returns, Swaps and Claims, but - can also be initiated by an admin for an order. -type: object -required: - - amount - - created_at - - id - - idempotency_key - - metadata - - note - - order_id - - payment_id - - reason - - updated_at -properties: - id: - description: The refund's ID - type: string - example: ref_01G1G5V27GYX4QXNARRQCW1N8T - order_id: - description: The ID of the order this refund was created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order this refund was created for. - x-expandable: order - nullable: true - type: object - payment_id: - description: The payment's ID, if available. - nullable: true - type: string - example: pay_01G8ZCC5W42ZNY842124G7P5R9 - payment: - description: The details of the payment associated with the refund. - x-expandable: payment - nullable: true - type: object - amount: - description: The amount that has be refunded to the Customer. - type: integer - example: 1000 - note: - description: An optional note explaining why the amount was refunded. - nullable: true - type: string - example: I didn't like it - reason: - description: >- - The reason given for the Refund, will automatically be set when processed - as part of a Swap, Claim or Return. - type: string - enum: - - discount - - return - - swap - - claim - - other - example: return - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the refund in - case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/Region.yaml b/www/apps/api-reference/specs/store/components/schemas/Region.yaml deleted file mode 100644 index b9f3b0c9e3..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Region.yaml +++ /dev/null @@ -1,130 +0,0 @@ -title: Region -description: >- - A region holds settings specific to a geographical location, including the - currency, tax rates, and fulfillment and payment providers. A Region can - consist of multiple countries to accomodate common shopping settings across - countries. -type: object -required: - - automatic_taxes - - created_at - - currency_code - - deleted_at - - gift_cards_taxable - - id - - metadata - - name - - tax_code - - tax_provider_id - - tax_rate - - updated_at -properties: - id: - description: The region's ID - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - name: - description: >- - The name of the region as displayed to the customer. If the Region only - has one country it is recommended to write the country name. - type: string - example: EU - currency_code: - description: The three character currency code used in the region. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency used in the region. - x-expandable: currency - nullable: true - $ref: ./Currency.yaml - tax_rate: - description: The tax rate that should be charged on purchases in the Region. - type: number - example: 0 - tax_rates: - description: >- - The details of the tax rates used in the region, aside from the default - rate. - type: array - x-expandable: tax_rates - items: - $ref: ./TaxRate.yaml - tax_code: - description: >- - The tax code used on purchases in the Region. This may be used by other - systems for accounting purposes. - nullable: true - type: string - example: null - gift_cards_taxable: - description: Whether the gift cards are taxable or not in this region. - type: boolean - default: true - automatic_taxes: - description: Whether taxes should be automated in this region. - type: boolean - default: true - countries: - description: The details of the countries included in this region. - type: array - x-expandable: countries - items: - $ref: ./Country.yaml - tax_provider_id: - description: The ID of the tax provider used in this region - nullable: true - type: string - example: null - tax_provider: - description: The details of the tax provider used in the region. - x-expandable: tax_provider - nullable: true - $ref: ./TaxProvider.yaml - payment_providers: - description: >- - The details of the payment providers that can be used to process payments - in the region. - type: array - x-expandable: payment_providers - items: - $ref: ./PaymentProvider.yaml - fulfillment_providers: - description: >- - The details of the fulfillment providers that can be used to fulfill items - of orders and similar resources in the region. - type: array - x-expandable: fulfillment_providers - items: - $ref: ./FulfillmentProvider.yaml - includes_tax: - description: Whether the prices for the region include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ReservationItemDTO.yaml b/www/apps/api-reference/specs/store/components/schemas/ReservationItemDTO.yaml deleted file mode 100644 index 5e4f31bfec..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ReservationItemDTO.yaml +++ /dev/null @@ -1,44 +0,0 @@ -title: Reservation item -description: Represents a reservation of an inventory item at a stock location -type: object -required: - - id - - location_id - - inventory_item_id - - quantity -properties: - id: - description: The id of the reservation item - type: string - location_id: - description: The id of the location of the reservation - type: string - inventory_item_id: - description: The id of the inventory item the reservation relates to - type: string - description: - description: Description of the reservation item - type: string - created_by: - description: UserId of user who created the reservation item - type: string - quantity: - description: The id of the reservation item - type: number - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/Return.yaml b/www/apps/api-reference/specs/store/components/schemas/Return.yaml deleted file mode 100644 index d7145a0dff..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Return.yaml +++ /dev/null @@ -1,132 +0,0 @@ -title: Return -description: >- - A Return holds information about Line Items that a Customer wishes to send - back, along with how the items will be returned. Returns can also be used as - part of a Swap or a Claim. -type: object -required: - - claim_order_id - - created_at - - id - - idempotency_key - - location_id - - metadata - - no_notification - - order_id - - received_at - - refund_amount - - shipping_data - - status - - swap_id - - updated_at -properties: - id: - description: The return's ID - type: string - example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - status: - description: Status of the Return. - type: string - enum: - - requested - - received - - requires_action - - canceled - default: requested - items: - description: The details of the items that the customer is returning. - type: array - x-expandable: items - items: - $ref: ./ReturnItem.yaml - swap_id: - description: The ID of the swap that the return may belong to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the return may belong to. - x-expandable: swap - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the return may belong to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the return may belong to. - x-expandable: claim_order - nullable: true - type: object - order_id: - description: The ID of the order that the return was created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the return was created for. - x-expandable: order - nullable: true - type: object - shipping_method: - description: >- - The details of the Shipping Method that will be used to send the Return - back. Can be null if the Customer will handle the return shipment - themselves. - x-expandable: shipping_method - nullable: true - $ref: ./ShippingMethod.yaml - shipping_data: - description: >- - Data about the return shipment as provided by the Fulfilment Provider that - handles the return shipment. - nullable: true - type: object - example: {} - location_id: - description: The ID of the stock location the return will be added back. - nullable: true - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK - refund_amount: - description: The amount that should be refunded as a result of the return. - type: integer - example: 1000 - no_notification: - description: When set to true, no notification will be sent related to this return. - nullable: true - type: boolean - example: false - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the return in - case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - received_at: - description: The date with timezone at which the return was received. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ReturnItem.yaml b/www/apps/api-reference/specs/store/components/schemas/ReturnItem.yaml deleted file mode 100644 index cbdf122007..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ReturnItem.yaml +++ /dev/null @@ -1,79 +0,0 @@ -title: Return Item -description: >- - A return item represents a line item in an order that is to be returned. It - includes details related to the return and the reason behind it. -type: object -required: - - is_requested - - item_id - - metadata - - note - - quantity - - reason_id - - received_quantity - - requested_quantity - - return_id -properties: - return_id: - description: The ID of the Return that the Return Item belongs to. - type: string - example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - item_id: - description: The ID of the Line Item that the Return Item references. - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - return_order: - description: Details of the Return that the Return Item belongs to. - x-expandable: return_order - nullable: true - type: object - item: - description: The details of the line item in the original order to be returned. - x-expandable: item - nullable: true - $ref: ./LineItem.yaml - quantity: - description: The quantity of the Line Item to be returned. - type: integer - example: 1 - is_requested: - description: >- - Whether the Return Item was requested initially or received unexpectedly - in the warehouse. - type: boolean - default: true - requested_quantity: - description: The quantity that was originally requested to be returned. - nullable: true - type: integer - example: 1 - received_quantity: - description: The quantity that was received in the warehouse. - nullable: true - type: integer - example: 1 - reason_id: - description: The ID of the reason for returning the item. - nullable: true - type: string - example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - reason: - description: The details of the reason for returning the item. - x-expandable: reason - nullable: true - $ref: ./ReturnReason.yaml - note: - description: An optional note with additional details about the Return. - nullable: true - type: string - example: I didn't like it. - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ReturnReason.yaml b/www/apps/api-reference/specs/store/components/schemas/ReturnReason.yaml deleted file mode 100644 index 28f6b23324..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ReturnReason.yaml +++ /dev/null @@ -1,70 +0,0 @@ -title: Return Reason -description: >- - A Return Reason is a value defined by an admin. It can be used on Return Items - in order to indicate why a Line Item was returned. -type: object -required: - - created_at - - deleted_at - - description - - id - - label - - metadata - - parent_return_reason_id - - updated_at - - value -properties: - id: - description: The return reason's ID - type: string - example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - value: - description: The value to identify the reason by. - type: string - example: damaged - label: - description: A text that can be displayed to the Customer as a reason. - type: string - example: Damaged goods - description: - description: A description of the Reason. - nullable: true - type: string - example: Items that are damaged - parent_return_reason_id: - description: The ID of the parent reason. - nullable: true - type: string - example: null - parent_return_reason: - description: The details of the parent reason. - x-expandable: parent_return_reason - nullable: true - type: object - return_reason_children: - description: The details of the child reasons. - x-expandable: return_reason_children - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/SalesChannel.yaml b/www/apps/api-reference/specs/store/components/schemas/SalesChannel.yaml deleted file mode 100644 index 1dc2968f5c..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/SalesChannel.yaml +++ /dev/null @@ -1,84 +0,0 @@ -title: Sales Channel -description: >- - A Sales Channel is a method a business offers its products for purchase for - the customers. For example, a Webshop can be a sales channel, and a mobile app - can be another. -type: object -required: - - created_at - - deleted_at - - description - - id - - is_disabled - - name - - updated_at -properties: - id: - description: The sales channel's ID - type: string - example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A - name: - description: The name of the sales channel. - type: string - example: Market - description: - description: The description of the sales channel. - nullable: true - type: string - example: Multi-vendor market - is_disabled: - description: Specify if the sales channel is enabled or disabled. - type: boolean - default: false - locations: - description: The details of the stock locations related to the sales channel. - type: array - x-expandable: locations - items: - $ref: ./SalesChannelLocation.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute - carts: - description: The associated carts. - type: array - nullable: true - x-expandable: carts - x-featureFlag: medusa_v2 - items: - type: object - orders: - description: The associated orders. - type: array - nullable: true - x-expandable: orders - x-featureFlag: medusa_v2 - items: - type: object - publishableKeys: - description: The associated publishable API keys. - type: array - nullable: true - x-expandable: publishableKeys - items: - type: object diff --git a/www/apps/api-reference/specs/store/components/schemas/SalesChannelLocation.yaml b/www/apps/api-reference/specs/store/components/schemas/SalesChannelLocation.yaml deleted file mode 100644 index 4936e19986..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/SalesChannelLocation.yaml +++ /dev/null @@ -1,40 +0,0 @@ -title: Sales Channel Stock Location -description: This represents the association between a sales channel and a stock locations. -type: object -required: - - created_at - - deleted_at - - id - - location_id - - sales_channel_id - - updated_at -properties: - id: - description: The Sales Channel Stock Location's ID - type: string - example: scloc_01G8X9A7ESKAJXG2H0E6F1MW7A - sales_channel_id: - description: The ID of the Sales Channel - type: string - example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A - location_id: - description: The ID of the Location Stock. - type: string - sales_channel: - description: The details of the sales channel the location is associated with. - x-expandable: sales_channel - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/ShippingMethod.yaml b/www/apps/api-reference/specs/store/components/schemas/ShippingMethod.yaml deleted file mode 100644 index 730bf052cd..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ShippingMethod.yaml +++ /dev/null @@ -1,119 +0,0 @@ -title: Shipping Method -description: >- - A Shipping Method represents a way in which an Order or Return can be shipped. - Shipping Methods are created from a Shipping Option, but may contain - additional details that can be necessary for the Fulfillment Provider to - handle the shipment. If the shipping method is created for a return, it may be - associated with a claim or a swap that the return is part of. -type: object -required: - - cart_id - - claim_order_id - - data - - id - - order_id - - price - - return_id - - shipping_option_id - - swap_id -properties: - id: - description: The shipping method's ID - type: string - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_option_id: - description: The ID of the Shipping Option that the Shipping Method is built from. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - order_id: - description: The ID of the order that the shipping method is used in. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the shipping method is used in. - x-expandable: order - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the shipping method is used in. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the shipping method is used in. - x-expandable: claim_order - nullable: true - type: object - cart_id: - description: The ID of the cart that the shipping method is used in. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the shipping method is used in. - x-expandable: cart - nullable: true - type: object - swap_id: - description: The ID of the swap that the shipping method is used in. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the shipping method is used in. - x-expandable: swap - nullable: true - type: object - return_id: - description: The ID of the return that the shipping method is used in. - nullable: true - type: string - example: null - return_order: - description: The details of the return that the shipping method is used in. - x-expandable: return_order - nullable: true - type: object - shipping_option: - description: The details of the shipping option the method was created from. - x-expandable: shipping_option - nullable: true - $ref: ./ShippingOption.yaml - tax_lines: - description: The details of the tax lines applied on the shipping method. - type: array - x-expandable: tax_lines - items: - $ref: ./ShippingMethodTaxLine.yaml - price: - description: >- - The amount to charge for the Shipping Method. The currency of the price is - defined by the Region that the Order that the Shipping Method belongs to - is a part of. - type: integer - example: 200 - data: - description: >- - Additional data that the Fulfillment Provider needs to fulfill the - shipment. This is used in combination with the Shipping Options data, and - may contain information such as a drop point id. - type: object - example: {} - includes_tax: - description: Whether the shipping method price include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - subtotal: - description: The subtotal of the shipping - type: integer - example: 8000 - total: - description: The total amount of the shipping - type: integer - example: 8200 - tax_total: - description: The total of tax - type: integer - example: 0 diff --git a/www/apps/api-reference/specs/store/components/schemas/ShippingMethodTaxLine.yaml b/www/apps/api-reference/specs/store/components/schemas/ShippingMethodTaxLine.yaml deleted file mode 100644 index 892b8c06e0..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ShippingMethodTaxLine.yaml +++ /dev/null @@ -1,59 +0,0 @@ -title: Shipping Method Tax Line -description: >- - A Shipping Method Tax Line represents the taxes applied on a shipping method - in a cart. -type: object -required: - - code - - created_at - - id - - shipping_method_id - - metadata - - name - - rate - - updated_at -properties: - id: - description: The line item tax line's ID - type: string - example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - shipping_method_id: - description: The ID of the line item - type: string - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_method: - description: The details of the associated shipping method. - x-expandable: shipping_method - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ShippingOption.yaml b/www/apps/api-reference/specs/store/components/schemas/ShippingOption.yaml deleted file mode 100644 index fbc4d8ed41..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ShippingOption.yaml +++ /dev/null @@ -1,137 +0,0 @@ -title: Shipping Option -description: >- - A Shipping Option represents a way in which an Order or Return can be shipped. - Shipping Options have an associated Fulfillment Provider that will be used - when the fulfillment of an Order is initiated. Shipping Options themselves - cannot be added to Carts, but serve as a template for Shipping Methods. This - distinction makes it possible to customize individual Shipping Methods with - additional information. -type: object -required: - - admin_only - - amount - - created_at - - data - - deleted_at - - id - - is_return - - metadata - - name - - price_type - - profile_id - - provider_id - - region_id - - updated_at -properties: - id: - description: The shipping option's ID - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - name: - description: >- - The name given to the Shipping Option - this may be displayed to the - Customer. - type: string - example: PostFake Standard - region_id: - description: The ID of the region this shipping option can be used in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this shipping option can be used in. - x-expandable: region - nullable: true - type: object - profile_id: - description: The ID of the Shipping Profile that the shipping option belongs to. - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - profile: - description: The details of the shipping profile that the shipping option belongs to. - x-expandable: profile - nullable: true - $ref: ./ShippingProfile.yaml - provider_id: - description: >- - The ID of the fulfillment provider that will be used to later to process - the shipping method created from this shipping option and its - fulfillments. - type: string - example: manual - provider: - description: >- - The details of the fulfillment provider that will be used to later to - process the shipping method created from this shipping option and its - fulfillments. - x-expandable: provider - nullable: true - $ref: ./FulfillmentProvider.yaml - price_type: - description: >- - The type of pricing calculation that is used when creatin Shipping Methods - from the Shipping Option. Can be `flat_rate` for fixed prices or - `calculated` if the Fulfillment Provider can provide price calulations. - type: string - enum: - - flat_rate - - calculated - example: flat_rate - amount: - description: >- - The amount to charge for shipping when the Shipping Option price type is - `flat_rate`. - nullable: true - type: integer - example: 200 - is_return: - description: Flag to indicate if the Shipping Option can be used for Return shipments. - type: boolean - default: false - admin_only: - description: >- - Flag to indicate if the Shipping Option usage is restricted to admin - users. - type: boolean - default: false - requirements: - description: >- - The details of the requirements that must be satisfied for the Shipping - Option to be available for usage in a Cart. - type: array - x-expandable: requirements - items: - $ref: ./ShippingOptionRequirement.yaml - data: - description: >- - The data needed for the Fulfillment Provider to identify the Shipping - Option. - type: object - example: {} - includes_tax: - description: Whether the shipping option price include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ShippingOptionRequirement.yaml b/www/apps/api-reference/specs/store/components/schemas/ShippingOptionRequirement.yaml deleted file mode 100644 index 26764f96d0..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ShippingOptionRequirement.yaml +++ /dev/null @@ -1,46 +0,0 @@ -title: Shipping Option Requirement -description: >- - A shipping option requirement defines conditions that a Cart must satisfy for - the Shipping Option to be available for usage in the Cart. -type: object -required: - - amount - - deleted_at - - id - - shipping_option_id - - type -properties: - id: - description: The shipping option requirement's ID - type: string - example: sor_01G1G5V29AB4CTNDRFSRWSRKWD - shipping_option_id: - description: The ID of the shipping option that the requirements belong to. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the shipping option that the requirements belong to. - x-expandable: shipping_option - nullable: true - type: object - type: - description: >- - The type of the requirement, this defines how the value will be compared - to the Cart's total. `min_subtotal` requirements define the minimum - subtotal that is needed for the Shipping Option to be available, while the - `max_subtotal` defines the maximum subtotal that the Cart can have for the - Shipping Option to be available. - type: string - enum: - - min_subtotal - - max_subtotal - example: min_subtotal - amount: - description: The amount to compare the Cart subtotal to. - type: integer - example: 100 - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/ShippingProfile.yaml b/www/apps/api-reference/specs/store/components/schemas/ShippingProfile.yaml deleted file mode 100644 index 58c9ef4558..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ShippingProfile.yaml +++ /dev/null @@ -1,76 +0,0 @@ -title: Shipping Profile -description: >- - A Shipping Profile has a set of defined Shipping Options that can be used to - fulfill a given set of Products. For example, gift cards are shipped - differently than physical products, so a shipping profile with the type - `gift_card` groups together the shipping options that can only be used for - gift cards. -type: object -required: - - created_at - - deleted_at - - id - - metadata - - name - - type - - updated_at -properties: - id: - description: The shipping profile's ID - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - name: - description: >- - The name given to the Shipping profile - this may be displayed to the - Customer. - type: string - example: Default Shipping Profile - type: - description: >- - The type of the Shipping Profile, may be `default`, `gift_card` or - `custom`. - type: string - enum: - - default - - gift_card - - custom - example: default - products: - description: >- - The details of the products that the Shipping Profile defines Shipping - Options for. Available if the relation `products` is expanded. - type: array - x-expandable: products - items: - type: object - shipping_options: - description: >- - The details of the shipping options that can be used to create shipping - methods for the Products in the Shipping Profile. - type: array - x-expandable: shipping_options - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/ShippingTaxRate.yaml b/www/apps/api-reference/specs/store/components/schemas/ShippingTaxRate.yaml deleted file mode 100644 index c7b36795be..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/ShippingTaxRate.yaml +++ /dev/null @@ -1,46 +0,0 @@ -title: Shipping Tax Rate -description: This represents the tax rates applied on a shipping option. -type: object -required: - - created_at - - metadata - - rate_id - - shipping_option_id - - updated_at -properties: - shipping_option_id: - description: The ID of the shipping option. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the shipping option. - x-expandable: shipping_option - nullable: true - $ref: ./ShippingOption.yaml - rate_id: - description: The ID of the associated tax rate. - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the associated tax rate. - x-expandable: tax_rate - nullable: true - $ref: ./TaxRate.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/StagedJob.yaml b/www/apps/api-reference/specs/store/components/schemas/StagedJob.yaml deleted file mode 100644 index adc7c6beab..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StagedJob.yaml +++ /dev/null @@ -1,25 +0,0 @@ -title: Staged Job -description: A staged job resource -type: object -required: - - data - - event_name - - id - - options -properties: - id: - description: The staged job's ID - type: string - example: job_01F0YET7BZTARY9MKN1SJ7AAXF - event_name: - description: The name of the event - type: string - example: order.placed - data: - description: Data necessary for the job - type: object - example: {} - option: - description: The staged job's option - type: object - example: {} diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/StockLocationAddress.yaml b/www/apps/api-reference/specs/store/components/schemas/StockLocationAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/StockLocationAddress.yaml rename to www/apps/api-reference/specs/store/components/schemas/StockLocationAddress.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StockLocationAddressDTO.yaml b/www/apps/api-reference/specs/store/components/schemas/StockLocationAddressDTO.yaml deleted file mode 100644 index fa00e2353d..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StockLocationAddressDTO.yaml +++ /dev/null @@ -1,62 +0,0 @@ -title: Stock Location Address -description: Represents a Stock Location Address -type: object -required: - - address_1 - - country_code - - created_at - - updated_at -properties: - id: - type: string - description: The stock location address' ID - example: laddr_51G4ZW853Y6TFXWPG5ENJ81X42 - address_1: - type: string - description: Stock location address - example: 35, Jhon Doe Ave - address_2: - type: string - description: Stock location address' complement - example: apartment 4432 - company: - type: string - description: Stock location company' name - example: Medusa - city: - type: string - description: Stock location address' city - example: Mexico city - country_code: - type: string - description: Stock location address' country - example: MX - phone: - type: string - description: Stock location address' phone number - example: +1 555 61646 - postal_code: - type: string - description: Stock location address' postal code - example: HD3-1G8 - province: - type: string - description: Stock location address' province - example: Sinaloa - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/www/apps/api-reference/specs/store/components/schemas/StockLocationAddressInput.yaml b/www/apps/api-reference/specs/store/components/schemas/StockLocationAddressInput.yaml deleted file mode 100644 index 700d86deb8..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StockLocationAddressInput.yaml +++ /dev/null @@ -1,40 +0,0 @@ -title: Stock Location Address Input -description: Represents a Stock Location Address Input -type: object -required: - - address_1 - - country_code -properties: - address_1: - type: string - description: Stock location address - example: 35, Jhon Doe Ave - address_2: - type: string - description: Stock location address' complement - example: apartment 4432 - city: - type: string - description: Stock location address' city - example: Mexico city - country_code: - type: string - description: Stock location address' country - example: MX - phone: - type: string - description: Stock location address' phone number - example: +1 555 61646 - postal_code: - type: string - description: Stock location address' postal code - example: HD3-1G8 - province: - type: string - description: Stock location address' province - example: Sinaloa - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/www/apps/api-reference/specs/store/components/schemas/StockLocationDTO.yaml b/www/apps/api-reference/specs/store/components/schemas/StockLocationDTO.yaml deleted file mode 100644 index e4233fd30d..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StockLocationDTO.yaml +++ /dev/null @@ -1,44 +0,0 @@ -title: Stock Location -description: Represents a Stock Location -type: object -required: - - id - - name - - address_id - - created_at - - updated_at -properties: - id: - type: string - description: The stock location's ID - example: sloc_51G4ZW853Y6TFXWPG5ENJ81X42 - address_id: - type: string - description: Stock location address' ID - example: laddr_05B2ZE853Y6FTXWPW85NJ81A44 - name: - type: string - description: The name of the stock location - example: Main Warehouse - address: - description: The Address of the Stock Location - allOf: - - $ref: ./StockLocationAddressDTO.yaml - - type: object - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/StockLocationExpandedDTO.yaml b/www/apps/api-reference/specs/store/components/schemas/StockLocationExpandedDTO.yaml deleted file mode 100644 index 993fad1ca8..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StockLocationExpandedDTO.yaml +++ /dev/null @@ -1,7 +0,0 @@ -allOf: - - $ref: ./StockLocationDTO.yaml - - type: object - properties: - sales_channels: - description: The associated sales channels. - $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/Store.yaml b/www/apps/api-reference/specs/store/components/schemas/Store.yaml deleted file mode 100644 index e1331293bc..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Store.yaml +++ /dev/null @@ -1,98 +0,0 @@ -title: Store -description: >- - A store holds the main settings of the commerce shop. By default, only one - store is created and used within the Medusa backend. It holds settings related - to the name of the store, available currencies, and more. -type: object -required: - - created_at - - default_currency_code - - default_location_id - - id - - invite_link_template - - metadata - - name - - payment_link_template - - swap_link_template - - updated_at -properties: - id: - description: The store's ID - type: string - example: store_01G1G5V21KADXNGH29BJMAJ4B4 - name: - description: The name of the Store - this may be displayed to the Customer. - type: string - example: Medusa Store - default: Medusa Store - default_currency_code: - description: The three character currency code that is the default of the store. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - default_currency: - description: The details of the store's default currency. - x-expandable: default_currency - default: usd - nullable: true - $ref: ./Currency.yaml - currencies: - description: The details of the enabled currencies in the store. - type: array - x-expandable: currencies - items: - $ref: ./Currency.yaml - swap_link_template: - description: >- - A template to generate Swap links from. Use {{cart_id}} to include the - Swap's `cart_id` in the link. - nullable: true - type: string - example: null - payment_link_template: - description: >- - A template to generate Payment links from. Use {{cart_id}} to include the - payment's `cart_id` in the link. - nullable: true - type: string - example: null - invite_link_template: - description: A template to generate Invite links from - nullable: true - type: string - example: null - default_location_id: - description: The location ID the store is associated with. - nullable: true - type: string - example: null - default_sales_channel_id: - description: The ID of the store's default sales channel. - nullable: true - type: string - example: null - default_sales_channel: - description: The details of the store's default sales channel. - x-expandable: default_sales_channel - nullable: true - $ref: ./SalesChannel.yaml - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreAuthRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreAuthRes.yaml deleted file mode 100644 index a07910fbbc..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreAuthRes.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -description: The customer's details. -x-expanded-relations: - field: customer - relations: - - orders - - orders.items - - shipping_addresses -required: - - customer -properties: - customer: - description: Customer's details. - $ref: ./Customer.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreBearerAuthRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreBearerAuthRes.yaml deleted file mode 100644 index f234f6150f..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreBearerAuthRes.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: object -description: The access token details. -properties: - access_token: - description: Access token that can be used to send authenticated requests. - type: string diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCartShippingOptionsListRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCartShippingOptionsListRes.yaml deleted file mode 100644 index 3e5c1e0aa4..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreCartShippingOptionsListRes.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -x-expanded-relations: - field: shipping_options - implicit: - - profile - - requirements -required: - - shipping_options -properties: - shipping_options: - type: array - description: An array of shipping options details. - items: - $ref: ./PricedShippingOption.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCartsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCartsRes.yaml deleted file mode 100644 index e81dfd2e6e..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreCartsRes.yaml +++ /dev/null @@ -1,64 +0,0 @@ -type: object -description: The cart's details. -x-expanded-relations: - field: cart - relations: - - billing_address - - discounts - - discounts.rule - - gift_cards - - items - - items.adjustments - - items.variant - - payment - - payment_sessions - - region - - region.countries - - region.payment_providers - - shipping_address - - shipping_methods - eager: - - region.fulfillment_providers - - region.payment_providers - - shipping_methods.shipping_option - implicit: - - items - - items.variant - - items.variant.product - - items.variant.product.profiles - - items.tax_lines - - items.adjustments - - gift_cards - - discounts - - discounts.rule - - shipping_methods - - shipping_methods.tax_lines - - shipping_address - - region - - region.tax_rates - totals: - - discount_total - - gift_card_tax_total - - gift_card_total - - item_tax_total - - refundable_amount - - refunded_total - - shipping_tax_total - - shipping_total - - subtotal - - tax_total - - total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total -required: - - cart -properties: - cart: - description: Cart details. - $ref: ./Cart.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCollectionsListRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCollectionsListRes.yaml deleted file mode 100644 index 6368865422..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreCollectionsListRes.yaml +++ /dev/null @@ -1,24 +0,0 @@ -type: object -description: The list of product collections with pagination fields. -required: - - collections - - count - - offset - - limit -properties: - collections: - type: array - description: An array of product collections details - items: - $ref: ./ProductCollection.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: >- - The number of product collections skipped when retrieving the product - collections. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCollectionsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCollectionsRes.yaml deleted file mode 100644 index 484b75525d..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreCollectionsRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The details of the product collection. -required: - - collection -properties: - collection: - description: Product collection details. - $ref: ./ProductCollection.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCompleteCartRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCompleteCartRes.yaml deleted file mode 100644 index 6071a8d0e0..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreCompleteCartRes.yaml +++ /dev/null @@ -1,40 +0,0 @@ -type: object -description: >- - If the cart is completed successfully, this will have the created order or the - swap's details, based on the cart's type. Otherwise, it'll be the cart's - details. -required: - - type - - data -properties: - type: - type: string - description: >- - The type of the data property. If the cart completion fails, type will be - `cart` and the data object will be the cart's details. If the cart - completion is successful and the cart is used for checkout, type will be - `order` and the data object will be the order's details. If the cart - completion is successful and the cart is used for swap creation, type will - be `swap` and the data object will be the swap's details. - enum: - - order - - cart - - swap - data: - type: object - description: The data of the result object. Its type depends on the type field. - oneOf: - - type: object - allOf: - - description: >- - Cart was successfully authorized and order was placed - successfully. - - $ref: ./Order.yaml - - type: object - allOf: - - description: Cart was successfully authorized but requires further actions. - - $ref: ./Cart.yaml - - type: object - allOf: - - description: Cart was used for a swap and it has been completed successfully. - - $ref: ./Swap.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCustomersListOrdersRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCustomersListOrdersRes.yaml deleted file mode 100644 index 3bc36a35c4..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreCustomersListOrdersRes.yaml +++ /dev/null @@ -1,104 +0,0 @@ -type: object -description: The list of the customer's orders with pagination fields. -x-expanded-relations: - field: orders - relations: - - customer - - discounts - - discounts.rule - - fulfillments - - fulfillments.tracking_links - - items - - items.variant - - payments - - region - - shipping_address - - shipping_methods - eager: - - region.fulfillment_providers - - region.payment_providers - - shipping_methods.shipping_option - implicit: - - claims - - claims.additional_items - - claims.additional_items.adjustments - - claims.additional_items.refundable - - claims.additional_items.tax_lines - - customer - - discounts - - discounts.rule - - gift_card_transactions - - gift_card_transactions.gift_card - - gift_cards - - items - - items.adjustments - - items.refundable - - items.tax_lines - - items.variant - - items.variant.product - - items.variant.product.profiles - - refunds - - region - - shipping_address - - shipping_methods - - shipping_methods.tax_lines - - swaps - - swaps.additional_items - - swaps.additional_items.adjustments - - swaps.additional_items.refundable - - swaps.additional_items.tax_lines - totals: - - discount_total - - gift_card_tax_total - - gift_card_total - - paid_total - - refundable_amount - - refunded_total - - shipping_total - - subtotal - - tax_total - - total - - claims.additional_items.discount_total - - claims.additional_items.gift_card_total - - claims.additional_items.original_tax_total - - claims.additional_items.original_total - - claims.additional_items.refundable - - claims.additional_items.subtotal - - claims.additional_items.tax_total - - claims.additional_items.total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - - swaps.additional_items.discount_total - - swaps.additional_items.gift_card_total - - swaps.additional_items.original_tax_total - - swaps.additional_items.original_total - - swaps.additional_items.refundable - - swaps.additional_items.subtotal - - swaps.additional_items.tax_total - - swaps.additional_items.total -required: - - orders - - count - - offset - - limit -properties: - orders: - type: array - description: An array of orders details. - items: - $ref: ./Order.yaml - count: - description: The total number of items available - type: integer - offset: - description: The number of orders skipped when retrieving the orders. - type: integer - limit: - description: The number of items per page - type: integer diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCustomersListPaymentMethodsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCustomersListPaymentMethodsRes.yaml deleted file mode 100644 index 18dde4fd55..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreCustomersListPaymentMethodsRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The payment method's details. -required: - - payment_methods -properties: - payment_methods: - type: array - description: The details of the saved payment methods. - items: - type: object - required: - - provider_id - - data - properties: - provider_id: - description: The ID of the Payment Provider where the payment method is saved. - type: string - data: - description: >- - The data needed for the Payment Provider to use the saved payment - method. - type: object diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCustomersRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCustomersRes.yaml deleted file mode 100644 index 8c488986d3..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreCustomersRes.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -description: The customer's details. -x-expanded-relations: - field: customer - relations: - - billing_address - - shipping_addresses -required: - - customer -properties: - customer: - description: Customer details. - $ref: ./Customer.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCustomersResetPasswordRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCustomersResetPasswordRes.yaml deleted file mode 100644 index f732f2eea4..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreCustomersResetPasswordRes.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: object -required: - - customer -properties: - customer: - description: Customer details. - $ref: ./Customer.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreGetAuthEmailRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreGetAuthEmailRes.yaml deleted file mode 100644 index 5284fceda8..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreGetAuthEmailRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: Details on whether the email exists. -required: - - exists -properties: - exists: - description: Whether email exists or not. - type: boolean diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreGetProductCategoriesCategoryRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreGetProductCategoriesCategoryRes.yaml deleted file mode 100644 index 65073b08a6..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreGetProductCategoriesCategoryRes.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -description: The product category's details. -x-expanded-relations: - field: product_category - relations: - - category_children - - parent_category -required: - - product_category -properties: - product_category: - description: Product category details. - $ref: ./ProductCategory.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreGetProductCategoriesRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreGetProductCategoriesRes.yaml deleted file mode 100644 index d48f936a44..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreGetProductCategoriesRes.yaml +++ /dev/null @@ -1,29 +0,0 @@ -type: object -description: The list of product categories with pagination fields. -x-expanded-relations: - field: product_categories - relations: - - category_children - - parent_category -required: - - product_categories - - count - - offset - - limit -properties: - product_categories: - type: array - description: An array of product categories details. - items: - $ref: ./ProductCategory.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: >- - The number of product categories skipped when retrieving the product - categories. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreGiftCardsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreGiftCardsRes.yaml deleted file mode 100644 index e6b9ca7155..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreGiftCardsRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -description: The gift card's details. -type: object -required: - - gift_card -properties: - gift_card: - description: Gift card details. - $ref: ./GiftCard.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreOrderEditsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreOrderEditsRes.yaml deleted file mode 100644 index f979dc1cc6..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreOrderEditsRes.yaml +++ /dev/null @@ -1,43 +0,0 @@ -type: object -description: The order edit's details. -x-expanded-relations: - field: order_edit - relations: - - changes - - changes.line_item - - changes.line_item.variant - - changes.original_line_item - - changes.original_line_item.variant - - items - - items.adjustments - - items.tax_lines - - items.variant - - payment_collection - implicit: - - items - - items.tax_lines - - items.adjustments - - items.variant - totals: - - difference_due - - discount_total - - gift_card_tax_total - - gift_card_total - - shipping_total - - subtotal - - tax_total - - total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total -required: - - order_edit -properties: - order_edit: - description: Order edit details. - $ref: ./OrderEdit.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreOrdersRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreOrdersRes.yaml deleted file mode 100644 index df86572f62..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreOrdersRes.yaml +++ /dev/null @@ -1,89 +0,0 @@ -type: object -description: The order's details. -required: - - order -x-expanded-relations: - field: order - relations: - - customer - - discounts - - discounts.rule - - fulfillments - - fulfillments.tracking_links - - items - - items.variant - - payments - - region - - shipping_address - - shipping_methods - eager: - - fulfillments.items - - region.fulfillment_providers - - region.payment_providers - - shipping_methods.shipping_option - implicit: - - claims - - claims.additional_items - - claims.additional_items.adjustments - - claims.additional_items.refundable - - claims.additional_items.tax_lines - - discounts - - discounts.rule - - gift_card_transactions - - gift_card_transactions.gift_card - - gift_cards - - items - - items.adjustments - - items.refundable - - items.tax_lines - - items.variant - - items.variant.product - - items.variant.product.profiles - - refunds - - region - - shipping_methods - - shipping_methods.tax_lines - - swaps - - swaps.additional_items - - swaps.additional_items.adjustments - - swaps.additional_items.refundable - - swaps.additional_items.tax_lines - totals: - - discount_total - - gift_card_tax_total - - gift_card_total - - paid_total - - refundable_amount - - refunded_total - - shipping_total - - subtotal - - tax_total - - total - - claims.additional_items.discount_total - - claims.additional_items.gift_card_total - - claims.additional_items.original_tax_total - - claims.additional_items.original_total - - claims.additional_items.refundable - - claims.additional_items.subtotal - - claims.additional_items.tax_total - - claims.additional_items.total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - - swaps.additional_items.discount_total - - swaps.additional_items.gift_card_total - - swaps.additional_items.original_tax_total - - swaps.additional_items.original_total - - swaps.additional_items.refundable - - swaps.additional_items.subtotal - - swaps.additional_items.tax_total - - swaps.additional_items.total -properties: - order: - description: Order details. - $ref: ./Order.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePaymentCollectionSessionsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePaymentCollectionSessionsReq.yaml deleted file mode 100644 index 6355462bdf..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePaymentCollectionSessionsReq.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The details of the payment session to manage. -required: - - provider_id -properties: - provider_id: - type: string - description: The ID of the Payment Provider. diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePaymentCollectionsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePaymentCollectionsRes.yaml deleted file mode 100644 index d8184c614c..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePaymentCollectionsRes.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The payment collection's details. -x-expanded-relations: - field: payment_collection - relations: - - payment_sessions - - region - eager: - - region.fulfillment_providers - - region.payment_providers -required: - - payment_collection -properties: - payment_collection: - description: Payment collection's details. - $ref: ./PaymentCollection.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePaymentCollectionsSessionRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePaymentCollectionsSessionRes.yaml deleted file mode 100644 index 9eef53e303..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePaymentCollectionsSessionRes.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The details of the payment session. -required: - - payment_session -properties: - payment_session: - description: Payment session's details. - $ref: ./PaymentSession.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostAuthReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostAuthReq.yaml deleted file mode 100644 index 6c547a53ba..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostAuthReq.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: object -required: - - email - - password -properties: - email: - type: string - description: The Customer's email. - password: - type: string - description: The Customer's password. diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCartReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCartReq.yaml deleted file mode 100644 index d362a3c156..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCartReq.yaml +++ /dev/null @@ -1,57 +0,0 @@ -type: object -description: The details of the cart to be created. -properties: - region_id: - type: string - description: >- - The ID of the Region to create the Cart in. Setting the cart's region can - affect the pricing of the items in the cart as well as the used currency. - If this parameter is not provided, the first region in the store is used - by default. - sales_channel_id: - type: string - description: >- - The ID of the Sales channel to create the Cart in. The cart's sales - channel affects which products can be added to the cart. If a product does - not exist in the cart's sales channel, it cannot be added to the cart. If - you add a publishable API key in the header of this request and specify a - sales channel ID, the specified sales channel must be within the scope of - the publishable API key's resources. If you add a publishable API key in - the header of this request, you don't specify a sales channel ID, and the - publishable API key is associated with one sales channel, that sales - channel will be attached to the cart. If no sales channel is passed and no - publishable API key header is passed or the publishable API key isn't - associated with any sales channel, the cart will not be associated with - any sales channel. - country_code: - type: string - description: >- - The two character ISO country code to create the Cart in. Setting this - parameter will set the country code of the shipping address. - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - items: - description: An array of product variants to generate line items from. - type: array - items: - type: object - required: - - variant_id - - quantity - properties: - variant_id: - description: The ID of the Product Variant. - type: string - quantity: - description: The quantity to add into the cart. - type: integer - context: - description: >- - An object to provide context to the Cart. The `context` field is - automatically populated with `ip` and `user_agent` - type: object - example: - ip: '::1' - user_agent: Chrome diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartLineItemsItemReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartLineItemsItemReq.yaml deleted file mode 100644 index 811b1f8f10..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartLineItemsItemReq.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: The details to update of the line item. -required: - - quantity -properties: - quantity: - type: number - description: The quantity of the line item in the cart. - metadata: - type: object - description: >- - An optional key-value map with additional details about the Line Item. If - omitted, the metadata will remain unchanged." - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartLineItemsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartLineItemsReq.yaml deleted file mode 100644 index 4cb9dc35e8..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartLineItemsReq.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: object -description: The details of the line item to create. -required: - - variant_id - - quantity -properties: - variant_id: - type: string - description: The id of the Product Variant to generate the Line Item from. - quantity: - type: number - description: The quantity of the Product Variant to add to the Line Item. - metadata: - type: object - description: An optional key-value map with additional details about the Line Item. - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartPaymentSessionReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartPaymentSessionReq.yaml deleted file mode 100644 index d8874ca7d0..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartPaymentSessionReq.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: The details of the payment session to set. -required: - - provider_id -properties: - provider_id: - type: string - description: The ID of the Payment Provider. diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartPaymentSessionUpdateReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartPaymentSessionUpdateReq.yaml deleted file mode 100644 index bd4d70742b..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartPaymentSessionUpdateReq.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: object -required: - - data -properties: - data: - type: object - description: The data to update the payment session with. diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartReq.yaml deleted file mode 100644 index 316c1a1aaf..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartReq.yaml +++ /dev/null @@ -1,77 +0,0 @@ -type: object -description: The details to update of the cart. -properties: - region_id: - type: string - description: >- - The ID of the Region to create the Cart in. Setting the cart's region can - affect the pricing of the items in the cart as well as the used currency. - country_code: - type: string - description: >- - The 2 character ISO country code to create the Cart in. Setting this - parameter will set the country code of the shipping address. - externalDocs: - url: >- - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - email: - type: string - description: An email to be used on the Cart. - format: email - sales_channel_id: - type: string - description: >- - The ID of the Sales channel to create the Cart in. The cart's sales - channel affects which products can be added to the cart. If a product does - not exist in the cart's sales channel, it cannot be added to the cart. If - you add a publishable API key in the header of this request and specify a - sales channel ID, the specified sales channel must be within the scope of - the publishable API key's resources. - billing_address: - description: The Address to be used for billing purposes. - anyOf: - - $ref: ./AddressPayload.yaml - description: A full billing address object. - - type: string - description: The billing address ID - shipping_address: - description: The Address to be used for shipping purposes. - anyOf: - - $ref: ./AddressPayload.yaml - description: A full shipping address object. - - type: string - description: The shipping address ID - gift_cards: - description: An array of Gift Card codes to add to the Cart. - type: array - items: - type: object - required: - - code - properties: - code: - description: The code of a gift card. - type: string - discounts: - description: An array of Discount codes to add to the Cart. - type: array - items: - type: object - required: - - code - properties: - code: - description: The code of the discount. - type: string - customer_id: - description: The ID of the Customer to associate the Cart with. - type: string - context: - description: >- - An object to provide context to the Cart. The `context` field is - automatically populated with `ip` and `user_agent` - type: object - example: - ip: '::1' - user_agent: Chrome diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartShippingMethodReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartShippingMethodReq.yaml deleted file mode 100644 index 7d9a0fe839..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartShippingMethodReq.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -description: The details of the shipping method to add to the cart. -required: - - option_id -properties: - option_id: - type: string - description: ID of the shipping option to create the method from. - data: - type: object - description: >- - Used to hold any data that the shipping method may need to process the - fulfillment of the order. This depends on the fulfillment provider you're - using. diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/StorePostCartsCartTaxesReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartTaxesReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/StorePostCartsCartTaxesReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/StorePostCartsCartTaxesReq.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerAcceptClaimReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerAcceptClaimReq.yaml deleted file mode 100644 index 8e4c9cd432..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerAcceptClaimReq.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The details necessary to grant order access. -required: - - token -properties: - token: - description: >- - The claim token generated by previous request to the Claim Order API - Route. - type: string diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerAddressesAddressReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerAddressesAddressReq.yaml deleted file mode 100644 index 2974d52c0a..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerAddressesAddressReq.yaml +++ /dev/null @@ -1,2 +0,0 @@ -anyOf: - - $ref: ./AddressPayload.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerAddressesReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerAddressesReq.yaml deleted file mode 100644 index 5e31c8f41c..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerAddressesReq.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: object -required: - - address -properties: - address: - description: The Address to add to the Customer's saved addresses. - $ref: ./AddressCreatePayload.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerOrderClaimReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerOrderClaimReq.yaml deleted file mode 100644 index e614f770e2..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerOrderClaimReq.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The details of the orders to claim. -required: - - order_ids -properties: - order_ids: - description: The ID of the orders to claim - type: array - items: - type: string diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerPasswordTokenReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerPasswordTokenReq.yaml deleted file mode 100644 index da738333c3..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerPasswordTokenReq.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -required: - - email -properties: - email: - description: The customer's email. - type: string - format: email diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerReq.yaml deleted file mode 100644 index 5e17043272..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersCustomerReq.yaml +++ /dev/null @@ -1,32 +0,0 @@ -type: object -description: The details to update of the customer. -properties: - first_name: - description: The customer's first name. - type: string - last_name: - description: The customer's last name. - type: string - billing_address: - description: The address to be used for billing purposes. - anyOf: - - $ref: ./AddressPayload.yaml - description: The full billing address object - - type: string - description: The ID of an existing billing address - password: - description: The customer's password. - type: string - phone: - description: The customer's phone number. - type: string - email: - description: The customer's email. - type: string - metadata: - description: Additional custom data about the customer. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersReq.yaml deleted file mode 100644 index 2ecd1312aa..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersReq.yaml +++ /dev/null @@ -1,25 +0,0 @@ -type: object -description: The details of the customer to create. -required: - - first_name - - last_name - - email - - password -properties: - first_name: - description: The customer's first name. - type: string - last_name: - description: The customer's last name. - type: string - email: - description: The customer's email. - type: string - format: email - password: - description: The customer's password. - type: string - format: password - phone: - description: The customer's phone number. - type: string diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersResetPasswordReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersResetPasswordReq.yaml deleted file mode 100644 index 36c3084296..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostCustomersResetPasswordReq.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - email - - password - - token -properties: - email: - description: The customer's email. - type: string - format: email - password: - description: The customer's password. - type: string - format: password - token: - description: The reset password token - type: string diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostOrderEditsOrderEditDecline.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostOrderEditsOrderEditDecline.yaml deleted file mode 100644 index 1ffe6e5eaf..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostOrderEditsOrderEditDecline.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: object -description: The details of the order edit's decline. -properties: - declined_reason: - type: string - description: The reason for declining the Order Edit. diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostPaymentCollectionsBatchSessionsAuthorizeReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostPaymentCollectionsBatchSessionsAuthorizeReq.yaml deleted file mode 100644 index 1b8dcea0f5..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostPaymentCollectionsBatchSessionsAuthorizeReq.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: The details of the payment sessions to authorize. -required: - - session_ids -properties: - session_ids: - description: List of Payment Session IDs to authorize. - type: array - items: - type: string diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostPaymentCollectionsBatchSessionsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostPaymentCollectionsBatchSessionsReq.yaml deleted file mode 100644 index 7737b9721c..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostPaymentCollectionsBatchSessionsReq.yaml +++ /dev/null @@ -1,27 +0,0 @@ -type: object -description: The details of the payment sessions to manage. -required: - - sessions -properties: - sessions: - description: >- - Payment sessions related to the Payment Collection. Existing sessions that - are not added in this array will be deleted. - type: array - items: - type: object - required: - - provider_id - - amount - properties: - provider_id: - type: string - description: The ID of the Payment Provider. - amount: - type: integer - description: The payment amount - session_id: - type: string - description: >- - The ID of the Payment Session to be updated. If no ID is provided, a - new payment session is created. diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/StorePostPaymentCollectionsPaymentSessionReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostPaymentCollectionsPaymentSessionReq.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/StorePostPaymentCollectionsPaymentSessionReq.yaml rename to www/apps/api-reference/specs/store/components/schemas/StorePostPaymentCollectionsPaymentSessionReq.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostReturnsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostReturnsReq.yaml deleted file mode 100644 index 9a52840e99..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostReturnsReq.yaml +++ /dev/null @@ -1,43 +0,0 @@ -type: object -description: The details of the return to create. -required: - - order_id - - items -properties: - order_id: - type: string - description: The ID of the Order to create the return for. - items: - description: The items to include in the return. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the line item to return. - type: string - quantity: - description: The quantity to return. - type: integer - reason_id: - description: >- - The ID of the return reason. Return reasons can be retrieved from - the List Return Reasons API Route. - type: string - note: - description: A note to add to the item returned. - type: string - return_shipping: - description: >- - The return shipping method used to return the items. If provided, a - fulfillment is automatically created for the return. - type: object - required: - - option_id - properties: - option_id: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostSearchReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostSearchReq.yaml deleted file mode 100644 index 77c49f5e3a..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostSearchReq.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -properties: - q: - type: string - description: The search query. - offset: - type: number - description: The number of products to skip when retrieving the products. - limit: - type: number - description: Limit the number of products returned. - filter: - description: Pass filters based on the search service. diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostSearchRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostSearchRes.yaml deleted file mode 100644 index f689e858cd..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostSearchRes.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: The list of search results. -allOf: - - type: object - required: - - hits - properties: - hits: - description: >- - Array of search results. The format of the items depends on the search - engine installed on the Medusa backend. - type: array - - type: object diff --git a/www/apps/api-reference/specs/store/components/schemas/StorePostSwapsReq.yaml b/www/apps/api-reference/specs/store/components/schemas/StorePostSwapsReq.yaml deleted file mode 100644 index 202bd36bdd..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StorePostSwapsReq.yaml +++ /dev/null @@ -1,51 +0,0 @@ -type: object -description: The details of the swap to create. -required: - - order_id - - return_items - - additional_items -properties: - order_id: - type: string - description: The ID of the Order to create the Swap for. - return_items: - description: The items to include in the Return. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the order's line item to return. - type: string - quantity: - description: The quantity to return. - type: integer - reason_id: - description: >- - The ID of the reason of this return. Return reasons can be retrieved - from the List Return Reasons API Route. - type: string - note: - description: The note to add to the item being swapped. - type: string - return_shipping_option: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. - additional_items: - description: The items to exchange the returned items with. - type: array - items: - type: object - required: - - variant_id - - quantity - properties: - variant_id: - description: The ID of the Product Variant. - type: string - quantity: - description: The quantity of the variant. - type: integer diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreProductTagsListRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreProductTagsListRes.yaml deleted file mode 100644 index 1c6c262968..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreProductTagsListRes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: The list of product tags with pagination fields. -required: - - product_tags - - count - - offset - - limit -properties: - product_tags: - type: array - description: An array of product tags details. - items: - $ref: ./ProductTag.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product tags skipped when retrieving the product tags. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreProductTypesListRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreProductTypesListRes.yaml deleted file mode 100644 index 643254d68d..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreProductTypesListRes.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -required: - - product_types - - count - - offset - - limit -properties: - product_types: - type: array - description: An array of product types details. - items: - $ref: ./ProductType.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product types skipped when retrieving the product types. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreProductsListRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreProductsListRes.yaml deleted file mode 100644 index 8acc42fbd4..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreProductsListRes.yaml +++ /dev/null @@ -1,36 +0,0 @@ -type: object -description: The list of products with pagination fields. -x-expanded-relations: - field: products - relations: - - collection - - images - - options - - options.values - - tags - - type - - variants - - variants.options - - variants.prices - totals: - - variants.purchasable -required: - - products - - count - - offset - - limit -properties: - products: - type: array - description: An array of products details. - items: - $ref: ./PricedProduct.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of products skipped when retrieving the products. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreProductsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreProductsRes.yaml deleted file mode 100644 index b911e26d37..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreProductsRes.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -x-expanded-relations: - field: product - relations: - - collection - - images - - options - - options.values - - tags - - type - - variants - - variants.options - - variants.prices - totals: - - variants.purchasable -required: - - product -properties: - product: - description: Product details. - $ref: ./PricedProduct.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreRegionsListRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreRegionsListRes.yaml deleted file mode 100644 index 8c19a9ffc8..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreRegionsListRes.yaml +++ /dev/null @@ -1,28 +0,0 @@ -type: object -description: The list of regions with pagination fields. -x-expanded-relations: - field: regions - relations: - - countries - - payment_providers - - fulfillment_providers - eager: - - payment_providers - - fulfillment_providers -required: - - regions -properties: - regions: - type: array - description: An array of regions details. - items: - $ref: ./Region.yaml - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of regions skipped when retrieving the regions. - limit: - type: integer - description: The number of items per page diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreRegionsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreRegionsRes.yaml deleted file mode 100644 index 5d89f837ee..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreRegionsRes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: The region's details. -x-expanded-relations: - field: region - relations: - - countries - - payment_providers - - fulfillment_providers - eager: - - payment_providers - - fulfillment_providers -required: - - region -properties: - region: - description: Region details. - $ref: ./Region.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreReturnReasonsListRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreReturnReasonsListRes.yaml deleted file mode 100644 index a40b7de4ef..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreReturnReasonsListRes.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: The list of return reasons. -x-expanded-relations: - field: return_reasons - relations: - - parent_return_reason - - return_reason_children -required: - - return_reasons -properties: - return_reasons: - type: array - description: An array of return reasons details. - items: - $ref: ./ReturnReason.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreReturnReasonsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreReturnReasonsRes.yaml deleted file mode 100644 index 74ce5c5d7d..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreReturnReasonsRes.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -description: The return reason's details. -x-expanded-relations: - field: return_reason - relations: - - parent_return_reason - - return_reason_children -required: - - return_reason -properties: - return_reason: - description: Return reason details. - $ref: ./ReturnReason.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreReturnsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreReturnsRes.yaml deleted file mode 100644 index 831aa95d7c..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreReturnsRes.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: The return's details. -x-expanded-relations: - field: return - relations: - - items - - items.reason - eager: - - items -required: - - return -properties: - return: - description: Return details. - $ref: ./Return.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreShippingOptionsListRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreShippingOptionsListRes.yaml deleted file mode 100644 index 3e9f8e6139..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreShippingOptionsListRes.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -description: The list of shipping options. -x-expanded-relations: - field: shipping_options - relations: - - requirements -required: - - shipping_options -properties: - shipping_options: - type: array - description: An array of shipping options details. - items: - $ref: ./PricedShippingOption.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreSwapsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreSwapsRes.yaml deleted file mode 100644 index 2557a02fb8..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreSwapsRes.yaml +++ /dev/null @@ -1,23 +0,0 @@ -type: object -description: The swap's details. -x-expanded-relations: - field: swap - relations: - - additional_items - - additional_items.variant - - cart - - fulfillments - - order - - payment - - return_order - - return_order.shipping_method - - shipping_address - - shipping_methods - eager: - - fulfillments.items -required: - - swap -properties: - swap: - description: Swap details. - $ref: ./Swap.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreVariantsListRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreVariantsListRes.yaml deleted file mode 100644 index 92c48a7d66..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreVariantsListRes.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -description: The list of product variants. -x-expanded-relations: - field: variants - relations: - - prices - - options - - product - totals: - - purchasable -required: - - variants -properties: - variants: - type: array - description: An array of product variant descriptions. - items: - $ref: ./PricedVariant.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreVariantsRes.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreVariantsRes.yaml deleted file mode 100644 index 0263244edd..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/StoreVariantsRes.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: The product variant's details. -x-expanded-relations: - field: variant - relations: - - prices - - options - - product - totals: - - purchasable -required: - - variant -properties: - variant: - description: Product variant description. - $ref: ./PricedVariant.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/Swap.yaml b/www/apps/api-reference/specs/store/components/schemas/Swap.yaml deleted file mode 100644 index 7e00bf1687..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/Swap.yaml +++ /dev/null @@ -1,186 +0,0 @@ -title: Swap -description: >- - A swap can be created when a Customer wishes to exchange Products that they - have purchased with different Products. It consists of a Return of previously - purchased Products and a Fulfillment of new Products. It also includes - information on any additional payment or refund required based on the - difference between the exchanged products. -type: object -required: - - allow_backorder - - canceled_at - - cart_id - - confirmed_at - - created_at - - deleted_at - - difference_due - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - order_id - - payment_status - - shipping_address_id - - updated_at -properties: - id: - description: The swap's ID - type: string - example: swap_01F0YET86Y9G92D3YDR9Y6V676 - fulfillment_status: - description: The status of the Fulfillment of the Swap. - type: string - enum: - - not_fulfilled - - fulfilled - - shipped - - partially_shipped - - canceled - - requires_action - example: not_fulfilled - payment_status: - description: >- - The status of the Payment of the Swap. The payment may either refer to the - refund of an amount or the authorization of a new amount. - type: string - enum: - - not_paid - - awaiting - - captured - - confirmed - - canceled - - difference_refunded - - partially_refunded - - refunded - - requires_action - example: not_paid - order_id: - description: The ID of the order that the swap belongs to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the swap belongs to. - x-expandable: order - nullable: true - type: object - additional_items: - description: >- - The details of the new products to send to the customer, represented as - line items. - type: array - x-expandable: additional_items - items: - $ref: ./LineItem.yaml - return_order: - description: >- - The details of the return that belongs to the swap, which holds the - details on the items being returned. - x-expandable: return_order - nullable: true - type: object - fulfillments: - description: >- - The details of the fulfillments that are used to send the new items to the - customer. - x-expandable: fulfillments - type: array - items: - type: object - payment: - description: >- - The details of the additional payment authorized by the customer when - `difference_due` is positive. - x-expandable: payment - nullable: true - type: object - difference_due: - description: >- - The difference amount between the order’s original total and the new total - imposed by the swap. If its value is negative, a refund must be issues to - the customer. If it's positive, additional payment must be authorized by - the customer. Otherwise, no payment processing is required. - nullable: true - type: integer - example: 0 - shipping_address_id: - description: >- - The Address to send the new Line Items to - in most cases this will be the - same as the shipping address on the Order. - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address that the new items should be sent to. - x-expandable: shipping_address - nullable: true - $ref: ./Address.yaml - shipping_methods: - description: >- - The details of the shipping methods used to fulfill the additional items - purchased. - type: array - x-expandable: shipping_methods - items: - $ref: ./ShippingMethod.yaml - cart_id: - description: The ID of the cart that the customer uses to complete the swap. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the customer uses to complete the swap. - x-expandable: cart - nullable: true - type: object - confirmed_at: - description: The date with timezone at which the Swap was confirmed by the Customer. - nullable: true - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Swap was canceled. - nullable: true - type: string - format: date-time - no_notification: - description: If set to true, no notification will be sent related to this swap - nullable: true - type: boolean - example: false - allow_backorder: - description: If true, swaps can be completed with items out of stock - type: boolean - default: false - idempotency_key: - description: >- - Randomly generated key used to continue the completion of the swap in case - of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/TaxLine.yaml b/www/apps/api-reference/specs/store/components/schemas/TaxLine.yaml deleted file mode 100644 index cbdb672a17..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/TaxLine.yaml +++ /dev/null @@ -1,47 +0,0 @@ -title: Tax Line -description: A tax line represents the taxes amount applied to a line item. -type: object -required: - - code - - created_at - - id - - metadata - - name - - rate - - updated_at -properties: - id: - description: The tax line's ID - type: string - example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/TaxProvider.yaml b/www/apps/api-reference/specs/store/components/schemas/TaxProvider.yaml deleted file mode 100644 index 0abb0ed394..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/TaxProvider.yaml +++ /dev/null @@ -1,21 +0,0 @@ -title: Tax Provider -description: >- - A tax provider represents a tax service installed in the Medusa backend, - either through a plugin or backend customizations. It holds the tax service's - installation status. -type: object -required: - - id - - is_installed -properties: - id: - description: The ID of the tax provider as given by the tax service. - type: string - example: manual - is_installed: - description: >- - Whether the tax service is installed in the current version. If a tax - service is no longer installed, the `is_installed` attribute is set to - `false`. - type: boolean - default: true diff --git a/www/apps/api-reference/specs/store/components/schemas/TaxRate.yaml b/www/apps/api-reference/specs/store/components/schemas/TaxRate.yaml deleted file mode 100644 index aaf91c7e76..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/TaxRate.yaml +++ /dev/null @@ -1,90 +0,0 @@ -title: Tax Rate -description: >- - A Tax Rate can be used to define a custom rate to charge on specified - products, product types, and shipping options within a given region. -type: object -required: - - code - - created_at - - id - - metadata - - name - - rate - - region_id - - updated_at -properties: - id: - description: The tax rate's ID - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - rate: - description: The numeric rate to charge - nullable: true - type: number - example: 10 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - region_id: - description: The ID of the region that the rate belongs to. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region that the rate belongs to. - x-expandable: region - nullable: true - type: object - products: - description: The details of the products that belong to this tax rate. - type: array - x-expandable: products - items: - $ref: ./Product.yaml - product_types: - description: The details of the product types that belong to this tax rate. - type: array - x-expandable: product_types - items: - $ref: ./ProductType.yaml - shipping_options: - description: The details of the shipping options that belong to this tax rate. - type: array - x-expandable: shipping_options - items: - $ref: ./ShippingOption.yaml - product_count: - description: The count of products - type: integer - example: 10 - product_type_count: - description: The count of product types - type: integer - example: 2 - shipping_option_count: - description: The count of shipping options - type: integer - example: 1 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/components/schemas/TrackingLink.yaml b/www/apps/api-reference/specs/store/components/schemas/TrackingLink.yaml deleted file mode 100644 index 2da6690dae..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/TrackingLink.yaml +++ /dev/null @@ -1,72 +0,0 @@ -title: Tracking Link -description: >- - A tracking link holds information about tracking numbers for a Fulfillment. - Tracking Links can optionally contain a URL that can be visited to see the - status of the shipment. Typically, the tracking link is provided from the - third-party service integrated through the used fulfillment provider. -type: object -required: - - created_at - - deleted_at - - fulfillment_id - - id - - idempotency_key - - metadata - - tracking_number - - updated_at - - url -properties: - id: - description: The tracking link's ID - type: string - example: tlink_01G8ZH853Y6TFXWPG5EYE81X63 - url: - description: The URL at which the status of the shipment can be tracked. - nullable: true - type: string - format: uri - tracking_number: - description: The tracking number given by the shipping carrier. - type: string - format: RH370168054CN - fulfillment_id: - description: The ID of the fulfillment that the tracking link belongs to. - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - fulfillment: - description: The details of the fulfillment that the tracking link belongs to. - x-expandable: fulfillment - nullable: true - type: object - idempotency_key: - description: >- - Randomly generated key used to continue the completion of a process in - case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/UpdateAddress.yaml b/www/apps/api-reference/specs/store/components/schemas/UpdateAddress.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/UpdateAddress.yaml rename to www/apps/api-reference/specs/store/components/schemas/UpdateAddress.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/UpdateApiKey.yaml b/www/apps/api-reference/specs/store/components/schemas/UpdateApiKey.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/UpdateApiKey.yaml rename to www/apps/api-reference/specs/store/components/schemas/UpdateApiKey.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/UpdateCartData.yaml b/www/apps/api-reference/specs/store/components/schemas/UpdateCartData.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/UpdateCartData.yaml rename to www/apps/api-reference/specs/store/components/schemas/UpdateCartData.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/UpdateProduct.yaml b/www/apps/api-reference/specs/store/components/schemas/UpdateProduct.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/UpdateProduct.yaml rename to www/apps/api-reference/specs/store/components/schemas/UpdateProduct.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/UpdateProductCollection.yaml b/www/apps/api-reference/specs/store/components/schemas/UpdateProductCollection.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/UpdateProductCollection.yaml rename to www/apps/api-reference/specs/store/components/schemas/UpdateProductCollection.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/UpdateProductOption.yaml b/www/apps/api-reference/specs/store/components/schemas/UpdateProductOption.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/UpdateProductOption.yaml rename to www/apps/api-reference/specs/store/components/schemas/UpdateProductOption.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/UpdateProductVariant.yaml b/www/apps/api-reference/specs/store/components/schemas/UpdateProductVariant.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/UpdateProductVariant.yaml rename to www/apps/api-reference/specs/store/components/schemas/UpdateProductVariant.yaml diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/UpdateRegion.yaml b/www/apps/api-reference/specs/store/components/schemas/UpdateRegion.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/UpdateRegion.yaml rename to www/apps/api-reference/specs/store/components/schemas/UpdateRegion.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/UpdateStockLocationInput.yaml b/www/apps/api-reference/specs/store/components/schemas/UpdateStockLocationInput.yaml deleted file mode 100644 index 6b14b20a0e..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/UpdateStockLocationInput.yaml +++ /dev/null @@ -1,20 +0,0 @@ -title: Update Stock Location Input -description: Represents the Input to update a Stock Location -type: object -properties: - name: - type: string - description: The stock location name - address_id: - type: string - description: The Stock location address ID - address: - description: Stock location address object - allOf: - - $ref: ./StockLocationAddressInput.yaml - - type: object - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/www/apps/api-reference/specs-v2/store/components/schemas/UpsertProductVariant.yaml b/www/apps/api-reference/specs/store/components/schemas/UpsertProductVariant.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/components/schemas/UpsertProductVariant.yaml rename to www/apps/api-reference/specs/store/components/schemas/UpsertProductVariant.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/User.yaml b/www/apps/api-reference/specs/store/components/schemas/User.yaml deleted file mode 100644 index 33f313d896..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/User.yaml +++ /dev/null @@ -1,69 +0,0 @@ -title: User -description: A User is an administrator who can manage store settings and data. -type: object -required: - - api_token - - created_at - - deleted_at - - email - - first_name - - id - - last_name - - metadata - - role - - updated_at -properties: - id: - description: The user's ID - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - role: - description: The user's role. These roles don't provide any different privileges. - type: string - enum: - - admin - - member - - developer - default: member - email: - description: The email of the User - type: string - format: email - first_name: - description: The first name of the User - nullable: true - type: string - example: Levi - last_name: - description: The last name of the User - nullable: true - type: string - example: Bogan - api_token: - description: An API token associated with the user. - nullable: true - type: string - example: null - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: >- - https://docs.medusajs.com/development/entities/overview#metadata-attribute diff --git a/www/apps/api-reference/specs/store/openapi.full.yaml b/www/apps/api-reference/specs/store/openapi.full.yaml index 80315b72cf..fe076c90a1 100644 --- a/www/apps/api-reference/specs/store/openapi.full.yaml +++ b/www/apps/api-reference/specs/store/openapi.full.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: 1.0.0 + version: 2.0.0 title: Medusa Storefront API license: name: MIT @@ -9,13 +9,6 @@ servers: - url: http://localhost:9000 - url: https://api.medusa-commerce.com tags: - - name: Auth - description: | - Authentication API Routes allow you to manage a customer's session, such as login or log out. - You can send authenticated requests for a customer either using the Cookie header or using the JWT Token. - externalDocs: - description: How to implement customer profiles in your storefront - url: https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles - name: Carts description: | A cart is a virtual shopping bag that customers can use to add items they want to purchase. @@ -23,65 +16,16 @@ tags: externalDocs: description: How to implement cart functionality in your storefront url: https://docs.medusajs.com/modules/carts-and-checkout/storefront/implement-cart + - name: Currencies - name: Customers description: | A customer can register and manage their information such as addresses, orders, payment methods, and more. externalDocs: description: How to implement customer profiles in your storefront url: https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles - - name: Gift Cards - description: | - Customers can use gift cards during checkout to deduct the gift card's balance from the checkout total. - The Gift Card API Routes allow retrieving a gift card's details by its code. A gift card can be applied to a cart using the Carts API Routes. - externalDocs: - description: How to use gift cards in a storefront - url: https://docs.medusajs.com/modules/gift-cards/storefront/use-gift-cards - - name: Orders - description: | - Orders are purchases made by customers, typically through a storefront. - Orders are placed and created using the Carts API Routes. The Orders API Routes allow retrieving and claiming orders. - externalDocs: - description: How to retrieve order details in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/retrieve-order-details - - name: Order Edits - description: | - Order edits are changes made to items in an order such as adding, updating their quantity, or deleting them. Order edits are created by the admin. - A customer can review order edit requests created by an admin and confirm or decline them. - externalDocs: - description: How to handle order edits in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/handle-order-edits - name: Payment Collections description: | A payment collection is useful for managing additional payments, such as for Order Edits, or installment payments. - - name: Products - description: | - Products are saleable items in a store. This also includes [saleable gift cards](https://docs.medusajs.com/modules/gift-cards/storefront/use-gift-cards) in a store. - Using these API Routes, you can filter products by categories, collections, sales channels, and more. - externalDocs: - description: How to show products in a storefront - url: https://docs.medusajs.com/modules/products/storefront/show-products - - name: Product Variants - description: | - Product variants are the actual salable item in your store. Each variant is a combination of the different option values available on the product. - - name: Product Categories - description: | - Products can be categoriezed into categories. A product can be associated more than one category. - Using these API Routes, you can list or retrieve a category's details and products. - externalDocs: - description: How to use product categories in a storefront - url: https://docs.medusajs.com/modules/products/storefront/use-categories - - name: Product Collections - description: | - A product collection is used to organize products for different purposes such as marketing or discount purposes. For example, you can create a Summer Collection. - Using these API Routes, you can list or retrieve a collection's details and products. - - name: Product Tags - description: | - Product tags are string values that can be used to filter products by. - Products can have more than one tag, and products can share tags. - - name: Product Types - description: | - Product types are string values that can be used to filter products by. - Products can have more than one tag, and products can share types. - name: Regions description: | Regions are different countries or geographical regions that the commerce store serves customers in. @@ -89,343 +33,31 @@ tags: externalDocs: description: How to use regions in a storefront url: https://docs.medusajs.com/modules/regions-and-currencies/storefront/use-regions - - name: Returns - description: | - A return can be created by a customer to return items in an order. - externalDocs: - description: How to create a return in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/create-return - - name: Return Reasons - description: | - Return reasons are key-value pairs that are used to specify why an order return is being created. - name: Shipping Options description: | A shipping option is used to define the available shipping methods during checkout or when creating a return. externalDocs: description: Shipping Option architecture url: https://docs.medusajs.com/modules/carts-and-checkout/shipping#shipping-option - - name: Swaps - description: | - A swap is created by a customer or an admin to exchange an item with a new one. - Creating a swap implicitely includes creating a return for the item being exchanged. - externalDocs: - description: How to create a swap in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/create-swap paths: - /store/auth: - get: - operationId: GetAuth - summary: Get Current Customer - description: Retrieve the currently logged in Customer's details. - x-authenticated: true - x-codegen: - method: getSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged - medusa.auth.getSession() - .then(({ customer }) => { - console.log(customer.id); - }) - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/auth' \ - -H 'Authorization: Bearer {access_token}' - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreAuthRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - post: - operationId: PostAuth - summary: Customer Login - description: Log a customer in and includes the Cookie session in the response header. The cookie session can be used in subsequent requests to authenticate the customer. When using Medusa's JS or Medusa React clients, the cookie is automatically attached to subsequent requests. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostAuthReq' - x-codegen: - method: authenticate - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.auth.authenticate({ - email: "user@example.com", - password: "user@example.com" - }) - .then(({ customer }) => { - console.log(customer.id); - }) - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/auth' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com", - "password": "supersecret" - }' - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreAuthRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/incorrect_credentials' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - delete: - operationId: DeleteAuth - summary: Customer Log out - description: Delete the current session for the logged in customer. - x-authenticated: true - x-codegen: - method: deleteSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.auth.deleteSession() - .then(() => { - // customer logged out successfully - }) - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/store/auth' \ - -H 'Authorization: Bearer {access_token}' - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Auth - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/auth/token: - post: - operationId: PostToken - summary: Customer Login (JWT) - x-authenticated: false - description: After a successful login, a JWT token is returned, which can be used to send authenticated requests. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostAuthReq' - x-codegen: - method: getToken - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.auth.getToken({ - email: 'user@example.com', - password: 'supersecret' - }) - .then(({ access_token }) => { - console.log(access_token); - }) - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/auth/token' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com", - "password": "supersecret" - }' - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreBearerAuthRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/incorrect_credentials' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/auth/{email}: - get: - operationId: GetAuthEmail - summary: Check if Email Exists - description: Check if there's a customer already registered with the provided email. - parameters: - - in: path - name: email - schema: - type: string - format: email - required: true - description: The email to check. - x-codegen: - method: exists - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.auth.exists("user@example.com") - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/auth/user@example.com' - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreGetAuthEmailRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' /store/carts: post: - operationId: PostCart - summary: Create a Cart - description: | - Create a Cart. Although optional, specifying the cart's region and sales channel can affect the cart's pricing and - the products that can be added to the cart respectively. So, make sure to set those early on and change them if necessary, such as when the customer changes their region. - - If a customer is logged in, make sure to pass its ID or email within the cart's details so that the cart is attached to the customer. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostCartReq' - x-codegen: - method: create + operationId: PostCarts + summary: Create Cart + description: Create a cart. + x-authenticated: false + parameters: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.create() - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCreateCart } from "medusa-react" - - type Props = { - regionId: string - } - - const Cart = ({ regionId }: Props) => { - const createCart = useCreateCart() - - const handleCreate = () => { - createCart.mutate({ - region_id: regionId - // creates an empty cart - }, { - onSuccess: ({ cart }) => { - console.log(cart.items) - } - }) - } - - // ... - } - - export default Cart - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/store/carts' + source: curl -X POST '{backend_url}/store/carts' tags: - Carts responses: - '200': - description: Successfully created a new Cart - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -434,76 +66,34 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /store/carts/{id}: get: - operationId: GetCartsCart + operationId: GetCartsId summary: Get a Cart - description: Retrieve a Cart's details. This includes recalculating its totals. + description: Retrieve a cart by its ID. You can expand the cart's relations or select the fields that should be returned. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The ID of the Cart. schema: type: string - x-codegen: - method: retrieve x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.retrieve(cartId) - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useGetCart } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const { cart, isLoading } = useGetCart(cartId) - - return ( -
- {isLoading && Loading...} - {cart && cart.items.length === 0 && ( - Cart is empty - )} - {cart && cart.items.length > 0 && ( -
    - {cart.items.map((item) => ( -
  • {item.title}
  • - ))} -
- )} -
- ) - } - - export default Cart - lang: Shell label: cURL - source: | - curl '{backend_url}/store/carts/{id}' + source: curl '{backend_url}/store/carts/{id}' tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -512,218 +102,33 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostCartsCart - summary: Update a Cart - description: Update a Cart's details. If the cart has payment sessions and the region was not changed, the payment sessions are updated. The cart's totals are also recalculated. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/StorePostCartsCartReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.update(cartId, { - email: "user@example.com" - }) - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useUpdateCart } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const updateCart = useUpdateCart(cartId) - - const handleUpdate = ( - email: string - ) => { - updateCart.mutate({ - email - }, { - onSuccess: ({ cart }) => { - console.log(cart.email) - } - }) - } - - // ... - } - - export default Cart - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/carts/{id}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com" - }' - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/carts/{id}/complete: + schema: {} post: - summary: Complete a Cart - operationId: PostCartsCartComplete - description: | - Complete a cart and place an order or create a swap, based on the cart's type. This includes attempting to authorize the cart's payment. - If authorizing the payment requires more action, the cart will not be completed and the order will not be placed or the swap will not be created. - - An idempotency key will be generated if none is provided in the header `Idempotency-Key` and added to - the response. If an error occurs during cart completion or the request is interrupted for any reason, the cart completion can be retried by passing the idempotency - key in the `Idempotency-Key` header. - externalDocs: - description: Cart completion overview - url: https://docs.medusajs.com/modules/carts-and-checkout/cart#cart-completion + operationId: PostCartsId + summary: Update a Cart + description: Update a cart's details. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The Cart ID. schema: type: string - x-codegen: - method: complete x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.complete(cartId) - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCompleteCart } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const completeCart = useCompleteCart(cartId) - - const handleComplete = () => { - completeCart.mutate(void 0, { - onSuccess: ({ data, type }) => { - console.log(data.id, type) - } - }) - } - - // ... - } - - export default Cart - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/store/carts/{id}/complete' + source: curl -X POST '{backend_url}/store/carts/{id}' tags: - Carts responses: - '200': - description: If the payment of the cart was successfully authorized, but requires further action from the customer, the response body will contain the cart with an updated payment session. Otherwise, if the payment was authorized and the cart was successfully completed, the response body will contain either the newly created order or swap, depending on what the cart was created for. - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCompleteCartRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/carts/{id}/discounts/{code}: - delete: - operationId: DeleteCartsCartDiscountsDiscount - summary: Remove Discount - description: Remove a Discount from a Cart. This only removes the application of the discount, and not completely deletes it. The totals will be re-calculated and the payment sessions will be refreshed after the removal. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string - - in: path - name: code - required: true - description: The unique discount code. - schema: - type: string - x-codegen: - method: deleteDiscount - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.deleteDiscount(cartId, code) - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: Shell - label: cURL - source: | - curl -X DELETE '{backend_url}/store/carts/{id}/discounts/{code}' - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -732,89 +137,34 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /store/carts/{id}/line-items: post: - operationId: PostCartsCartLineItems - summary: Add a Line Item - description: Generates a Line Item with a given Product Variant and adds it to the Cart + operationId: PostCartsIdLineItems + summary: Add Line Items to Cart + description: Add a list of line items to a cart. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The id of the Cart to add the Line Item to. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostCartsCartLineItemsReq' - x-codegen: - method: createLineItem x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.lineItems.create(cart_id, { - variant_id, - quantity: 1 - }) - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCreateLineItem } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const createLineItem = useCreateLineItem(cartId) - - const handleAddItem = ( - variantId: string, - quantity: number - ) => { - createLineItem.mutate({ - variant_id: variantId, - quantity, - }, { - onSuccess: ({ cart }) => { - console.log(cart.items) - } - }) - } - - // ... - } - - export default Cart - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/store/carts/{id}/line-items' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "variant_id": "{variant_id}", - "quantity": 1 - }' + source: curl -X POST '{backend_url}/store/carts/{id}/line-items' tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -823,93 +173,40 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /store/carts/{id}/line-items/{line_id}: post: - operationId: PostCartsCartLineItemsItem - summary: Update a Line Item - description: Update a line item's quantity. + operationId: PostCartsIdLineItemsLine_id + summary: Add Line Items to Cart + description: Add a list of line items to a cart. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The ID of the Cart. schema: type: string - - in: path - name: line_id + - name: line_id + in: path + description: The cart's line id. required: true - description: The ID of the Line Item. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostCartsCartLineItemsItemReq' - x-codegen: - method: updateLineItem x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.lineItems.update(cartId, lineId, { - quantity: 1 - }) - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useUpdateLineItem } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const updateLineItem = useUpdateLineItem(cartId) - - const handleUpdateItem = ( - lineItemId: string, - quantity: number - ) => { - updateLineItem.mutate({ - lineId: lineItemId, - quantity, - }, { - onSuccess: ({ cart }) => { - console.log(cart.items) - } - }) - } - - // ... - } - - export default Cart - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/store/carts/{id}/line-items/{line_id}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "quantity": 1 - }' + source: curl -X POST '{backend_url}/store/carts/{id}/line-items/{line_id}' tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -918,79 +215,39 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteCartsCartLineItemsItem - summary: Delete a Line Item - description: Delete a Line Item from a Cart. The payment sessions will be updated and the totals will be recalculated. + operationId: DeleteCartsIdLineItemsLine_id + summary: Remove Line Items from Cart + description: Remove a list of line items from a cart. This doesn't delete the Line Item, only the association between the Line Item and the cart. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The ID of the Cart. schema: type: string - - in: path - name: line_id + - name: line_id + in: path + description: The cart's line id. required: true - description: The ID of the Line Item. schema: type: string - x-codegen: - method: deleteLineItem x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.lineItems.delete(cartId, lineId) - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useDeleteLineItem } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const deleteLineItem = useDeleteLineItem(cartId) - - const handleDeleteItem = ( - lineItemId: string - ) => { - deleteLineItem.mutate({ - lineId: lineItemId, - }, { - onSuccess: ({ cart }) => { - console.log(cart.items) - } - }) - } - - // ... - } - - export default Cart - lang: Shell label: cURL - source: | - curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}' + source: curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}' tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -999,85 +256,34 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /store/carts/{id}/payment-session: - post: - operationId: PostCartsCartPaymentSession - summary: Select a Payment Session - description: Select the Payment Session that will be used to complete the cart. This is typically used when the customer chooses their preferred payment method during checkout. The totals of the cart will be recalculated. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/StorePostCartsCartPaymentSessionReq' - x-codegen: - method: setPaymentSession + schema: {} + /store/carts/{id}/payment-collections: + post: + operationId: PostCartsIdPaymentCollections + summary: Add Payment Collections to Cart + description: Add a list of payment collections to a cart. + x-authenticated: false + parameters: + - name: id + in: path + description: The cart's ID. + required: true + schema: + type: string x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.setPaymentSession(cartId, { - provider_id: "manual" - }) - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useSetPaymentSession } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const setPaymentSession = useSetPaymentSession(cartId) - - const handleSetPaymentSession = ( - providerId: string - ) => { - setPaymentSession.mutate({ - provider_id: providerId, - }, { - onSuccess: ({ cart }) => { - console.log(cart.payment_session) - } - }) - } - - // ... - } - - export default Cart - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/store/carts/{id}/payment-sessions' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "provider_id": "manual" - }' + source: curl -X POST '{backend_url}/store/carts/{id}/payment-collections' tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -1086,167 +292,34 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /store/carts/{id}/payment-sessions: - post: - operationId: PostCartsCartPaymentSessions - summary: Create Payment Sessions - description: Create Payment Sessions for each of the available Payment Providers in the Cart's Region. If there's only one payment session created, it will be selected by default. The creation of the payment session uses the payment provider and may require sending requests to third-party services. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string - x-codegen: - method: createPaymentSessions - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.createPaymentSessions(cartId) - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCreatePaymentSession } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const createPaymentSession = useCreatePaymentSession(cartId) - - const handleComplete = () => { - createPaymentSession.mutate(void 0, { - onSuccess: ({ cart }) => { - console.log(cart.payment_sessions) - } - }) - } - - // ... - } - - export default Cart - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/carts/{id}/payment-sessions' - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/carts/{id}/payment-sessions/{provider_id}: - post: - operationId: PostCartsCartPaymentSessionUpdate - summary: Update a Payment Session - description: Update a Payment Session with additional data. This can be useful depending on the payment provider used. All payment sessions are updated and cart totals are recalculated afterwards. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string - - in: path - name: provider_id - required: true - description: The ID of the payment provider. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/StorePostCartsCartPaymentSessionUpdateReq' - x-codegen: - method: updatePaymentSession + schema: {} + /store/carts/{id}/promotions: + post: + operationId: PostCartsIdPromotions + summary: Add Promotions to Cart + description: Add a list of promotions to a cart. + x-authenticated: false + parameters: + - name: id + in: path + description: The cart's ID. + required: true + schema: + type: string x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.updatePaymentSession(cartId, "manual", { - data: { - - } - }) - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useUpdatePaymentSession } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const updatePaymentSession = useUpdatePaymentSession(cartId) - - const handleUpdate = ( - providerId: string, - data: Record - ) => { - updatePaymentSession.mutate({ - provider_id: providerId, - data - }, { - onSuccess: ({ cart }) => { - console.log(cart.payment_session) - } - }) - } - - // ... - } - - export default Cart - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/store/carts/{id}/payment-sessions/manual' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "data": {} - }' + source: curl -X POST '{backend_url}/store/carts/{id}/promotions' tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -1255,79 +328,33 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteCartsCartPaymentSessionsSession - summary: Delete a Payment Session - description: Delete a Payment Session in a Cart. May be useful if a payment has failed. The totals will be recalculated. + operationId: DeleteCartsIdPromotions + summary: Remove Promotions from Cart + description: Remove a list of promotions from a cart. This doesn't delete the Promotion, only the association between the Promotion and the cart. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The ID of the Cart. schema: type: string - - in: path - name: provider_id - required: true - description: The ID of the Payment Provider used to create the Payment Session to be deleted. - schema: - type: string - x-codegen: - method: deletePaymentSession x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.deletePaymentSession(cartId, "manual") - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useDeletePaymentSession } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const deletePaymentSession = useDeletePaymentSession(cartId) - - const handleDeletePaymentSession = ( - providerId: string - ) => { - deletePaymentSession.mutate({ - provider_id: providerId, - }, { - onSuccess: ({ cart }) => { - console.log(cart.payment_sessions) - } - }) - } - - // ... - } - - export default Cart - lang: Shell label: cURL - source: | - curl -X DELETE '{backend_url}/store/carts/{id}/payment-sessions/{provider_id}' + source: curl -X DELETE '{backend_url}/store/carts/{id}/promotions' tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -1336,208 +363,39 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /store/carts/{id}/payment-sessions/{provider_id}/refresh: - post: - operationId: PostCartsCartPaymentSessionsSession - summary: Refresh a Payment Session - description: Refresh a Payment Session to ensure that it is in sync with the Cart. This is usually not necessary, but is provided for edge cases. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string - - in: path - name: provider_id - required: true - description: The ID of the Payment Provider that created the Payment Session to be refreshed. - schema: - type: string - x-codegen: - method: refreshPaymentSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.refreshPaymentSession(cartId, "manual") - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useRefreshPaymentSession } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const refreshPaymentSession = useRefreshPaymentSession(cartId) - - const handleRefresh = ( - providerId: string - ) => { - refreshPaymentSession.mutate({ - provider_id: providerId, - }, { - onSuccess: ({ cart }) => { - console.log(cart.payment_sessions) - } - }) - } - - // ... - } - - export default Cart - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/carts/{id}/payment-sessions/{provider_id}/refresh' - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/carts/{id}/shipping-methods: - post: - operationId: PostCartsCartShippingMethod - summary: Add Shipping Method - description: Add a Shipping Method to the Cart. The validation of the `data` field is handled by the fulfillment provider of the chosen shipping option. - parameters: - - in: path - name: id - required: true - description: The cart ID. - schema: - type: string requestBody: content: application/json: - schema: - $ref: '#/components/schemas/StorePostCartsCartShippingMethodReq' - x-codegen: - method: addShippingMethod - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.carts.addShippingMethod(cartId, { - option_id - }) - .then(({ cart }) => { - console.log(cart.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAddShippingMethodToCart } from "medusa-react" - - type Props = { - cartId: string - } - - const Cart = ({ cartId }: Props) => { - const addShippingMethod = useAddShippingMethodToCart(cartId) - - const handleAddShippingMethod = ( - optionId: string - ) => { - addShippingMethod.mutate({ - option_id: optionId, - }, { - onSuccess: ({ cart }) => { - console.log(cart.shipping_methods) - } - }) - } - - // ... - } - - export default Cart - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/carts/{id}/shipping-methods' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "option_id": "{option_id}", - }' - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} /store/carts/{id}/taxes: post: - operationId: PostCartsCartTaxes - summary: Calculate Cart Taxes - description: Calculate the taxes for a cart. This is useful if the `automatic_taxes` field of the cart's region is set to `false`. If the cart's region uses a tax provider other than Medusa's system provider, this may lead to sending requests to third-party services. - externalDocs: - description: How to calculate taxes manually during checkout - url: https://docs.medusajs.com/modules/taxes/storefront/manual-calculation + operationId: PostCartsIdTaxes + summary: Add Taxes to Cart + description: Add a list of taxes to a cart. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The Cart ID. schema: type: string - x-codegen: - method: calculateTaxes + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StorePostCartsCartTaxesReq' x-codeSamples: - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/store/carts/{id}/taxes' + source: curl -X POST '{backend_url}/store/carts/{id}/taxes' tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -1546,132 +404,24 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /store/collections: + /store/currencies: get: - operationId: GetCollections - summary: List Collections - description: Retrieve a list of product collections. The product collections can be filtered by fields such as `handle` or `created_at`. The product collections can also be paginated. - parameters: - - in: query - name: offset - description: The number of product collections to skip when retrieving the product collections. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of product collections returned. - schema: - type: integer - default: 10 - - in: query - name: handle - style: form - explode: false - description: Filter by handles - schema: - type: array - items: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: StoreGetCollectionsParams + operationId: GetCurrencies + summary: List Currencies + description: Retrieve a list of currencies. The currencies can be filtered by fields such as `id`. The currencies can also be sorted or paginated. + x-authenticated: false + parameters: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.collections.list() - .then(({ collections, limit, offset, count }) => { - console.log(collections.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCollections } from "medusa-react" - - const ProductCollections = () => { - const { collections, isLoading } = useCollections() - - return ( -
- {isLoading && Loading...} - {collections && collections.length === 0 && ( - No Product Collections - )} - {collections && collections.length > 0 && ( -
    - {collections.map((collection) => ( -
  • {collection.title}
  • - ))} -
- )} -
- ) - } - - export default ProductCollections - lang: Shell label: cURL - source: | - curl '{backend_url}/store/collections' + source: curl '{backend_url}/store/currencies' tags: - - Product Collections + - Currencies responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCollectionsListRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -1680,67 +430,34 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /store/collections/{id}: + requestBody: + content: + application/json: + schema: {} + /store/currencies/{code}: get: - operationId: GetCollectionsCollection - summary: Get a Collection - description: Retrieve a Product Collection's details. + operationId: GetCurrenciesCode + summary: Get a Currency + description: Retrieve a currency by its ID. You can expand the currency's relations or select the fields that should be returned. + x-authenticated: false parameters: - - in: path - name: id + - name: code + in: path + description: The currency's code. required: true - description: The id of the Product Collection schema: type: string - x-codegen: - method: retrieve x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.collections.retrieve(collectionId) - .then(({ collection }) => { - console.log(collection.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCollection } from "medusa-react" - - type Props = { - collectionId: string - } - - const ProductCollection = ({ collectionId }: Props) => { - const { collection, isLoading } = useCollection(collectionId) - - return ( -
- {isLoading && Loading...} - {collection && {collection.title}} -
- ) - } - - export default ProductCollection - lang: Shell label: cURL - source: | - curl '{backend_url}/store/collections/{id}' + source: curl '{backend_url}/store/currencies/{code}' tags: - - Product Collections + - Currencies responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCollectionsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -1749,167 +466,54 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /store/customers: post: operationId: PostCustomers - summary: Create a Customer - description: Register a new customer. This will also automatically authenticate the customer and set their login session in the response Cookie header. The cookie session can be used in subsequent requests to authenticate the customer. When using Medusa's JS or Medusa React clients, the cookie is automatically attached to subsequent requests. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostCustomersReq' - x-codegen: - method: create + summary: Create Customer + description: Create a customer. + x-authenticated: false + parameters: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.customers.create({ - first_name: "Alec", - last_name: "Reynolds", - email: "user@example.com", - password: "supersecret" - }) - .then(({ customer }) => { - console.log(customer.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCreateCustomer } from "medusa-react" - - const RegisterCustomer = () => { - const createCustomer = useCreateCustomer() - // ... - - const handleCreate = ( - customerData: { - first_name: string - last_name: string - email: string - password: string - } - ) => { - // ... - createCustomer.mutate(customerData, { - onSuccess: ({ customer }) => { - console.log(customer.id) - } - }) - } - - // ... - } - - export default RegisterCustomer - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/store/customers' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "first_name": "Alec", - "last_name": "Reynolds", - "email": "user@example.com", - "password": "supersecret" - }' + source: curl -X POST '{backend_url}/store/customers' tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCustomersRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': $ref: '#/components/responses/invalid_state_error' '422': - description: A customer with the same email exists - content: - application/json: - schema: - type: object - properties: - code: - type: string - description: The error code - type: - type: string - description: The type of error - message: - type: string - description: Human-readable message with details about the error - example: - code: invalid_request_error - type: duplicate_error - message: A customer with the given email already has an account. Log in instead + $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /store/customers/me: get: - operationId: GetCustomersCustomer - summary: Get a Customer - description: Retrieve the logged-in Customer's details. - x-authenticated: true - x-codegen: - method: retrieve + operationId: GetCustomersMe + summary: List Customers + description: Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated. + x-authenticated: false + parameters: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged - medusa.customers.retrieve() - .then(({ customer }) => { - console.log(customer.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useMeCustomer } from "medusa-react" - - const Customer = () => { - const { customer, isLoading } = useMeCustomer() - - return ( -
- {isLoading && Loading...} - {customer && ( - {customer.first_name} {customer.last_name} - )} -
- ) - } - - export default Customer - lang: Shell label: cURL - source: | - curl '{backend_url}/store/customers/me' \ - -H 'Authorization: Bearer {access_token}' - security: - - cookie_auth: [] - - jwt_token: [] + source: curl '{backend_url}/store/customers/me' tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCustomersRes' '400': $ref: '#/components/responses/400_error' '401': @@ -1922,160 +526,24 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - post: - operationId: PostCustomersCustomer - summary: Update Customer - description: Update the logged-in customer's details. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: '#/components/schemas/StorePostCustomersCustomerReq' - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged - medusa.customers.update({ - first_name: "Laury" - }) - .then(({ customer }) => { - console.log(customer.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useUpdateMe } from "medusa-react" - - type Props = { - customerId: string - } - - const Customer = ({ customerId }: Props) => { - const updateCustomer = useUpdateMe() - // ... - - const handleUpdate = ( - firstName: string - ) => { - // ... - updateCustomer.mutate({ - id: customerId, - first_name: firstName, - }, { - onSuccess: ({ customer }) => { - console.log(customer.first_name) - } - }) - } - - // ... - } - - export default Customer - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/customers/me' \ - -H 'Authorization: Bearer {access_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "first_name": "Laury" - }' - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Customers - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCustomersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} /store/customers/me/addresses: - post: - operationId: PostCustomersCustomerAddresses - summary: Add a Shipping Address - description: Add a Shipping Address to a Customer's saved addresses. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostCustomersCustomerAddressesReq' - x-codegen: - method: addAddress + get: + operationId: GetCustomersMeAddresses + summary: List Customers + description: Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated. + x-authenticated: false + parameters: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged - medusa.customers.addresses.addAddress({ - address: { - first_name: "Celia", - last_name: "Schumm", - address_1: "225 Bednar Curve", - city: "Danielville", - country_code: "US", - postal_code: "85137", - phone: "981-596-6748 x90188", - company: "Wyman LLC", - province: "Georgia", - } - }) - .then(({ customer }) => { - console.log(customer.id); - }) - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/store/customers/me/addresses' \ - -H 'Authorization: Bearer {access_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "address": { - "first_name": "Celia", - "last_name": "Schumm", - "address_1": "225 Bednar Curve", - "city": "Danielville", - "country_code": "US", - "postal_code": "85137" - } - }' - security: - - cookie_auth: [] - - jwt_token: [] + source: curl '{backend_url}/store/customers/me/addresses' tags: - Customers responses: - '200': - description: A successful response - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCustomersRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2088,60 +556,59 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + post: + operationId: PostCustomersMeAddresses + summary: Create Customer + description: Create a customer. + x-authenticated: false + parameters: [] + x-codeSamples: + - lang: Shell + label: cURL + source: curl -X POST '{backend_url}/store/customers/me/addresses' + tags: + - Customers + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /store/customers/me/addresses/{address_id}: - post: - operationId: PostCustomersCustomerAddressesAddress - summary: Update a Shipping Address - description: Update the logged-in customer's saved Shipping Address's details. - x-authenticated: true + get: + operationId: GetCustomersMeAddressesAddress_id + summary: List Addresses + description: Retrieve a list of addresses in a customer. The addresses can be filtered by fields like FILTER FIELDS. The addresses can also be paginated. + x-authenticated: false parameters: - - in: path - name: address_id + - name: address_id + in: path + description: The customer's address id. required: true - description: The ID of the Address. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostCustomersCustomerAddressesAddressReq' - x-codegen: - method: updateAddress x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged - medusa.customers.addresses.updateAddress(addressId, { - first_name: "Gina" - }) - .then(({ customer }) => { - console.log(customer.id); - }) - lang: Shell label: cURL - source: | - curl -X POST '{backend_url}/store/customers/me/addresses/{address_id}' \ - -H 'Authorization: Bearer {access_token}' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "first_name": "Gina" - }' - security: - - cookie_auth: [] - - jwt_token: [] + source: curl '{backend_url}/store/customers/me/addresses/{address_id}' tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCustomersRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2154,48 +621,64 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} + post: + operationId: PostCustomersMeAddressesAddress_id + summary: Add Addresses to Customer + description: Add a list of addresses to a customer. + x-authenticated: false + parameters: + - name: address_id + in: path + description: The customer's address id. + required: true + schema: + type: string + x-codeSamples: + - lang: Shell + label: cURL + source: curl -X POST '{backend_url}/store/customers/me/addresses/{address_id}' + tags: + - Customers + responses: + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteCustomersCustomerAddressesAddress - summary: Delete an Address - description: Delete an Address from the Customer's saved addresses. - x-authenticated: true + operationId: DeleteCustomersMeAddressesAddress_id + summary: Remove Addresses from Customer + description: Remove a list of addresses from a customer. This doesn't delete the Address, only the association between the Address and the customer. + x-authenticated: false parameters: - - in: path - name: address_id + - name: address_id + in: path + description: The customer's address id. required: true - description: The id of the Address to remove. schema: type: string - x-codegen: - method: deleteAddress x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged - medusa.customers.addresses.deleteAddress(addressId) - .then(({ customer }) => { - console.log(customer.id); - }) - lang: Shell label: cURL - source: | - curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}' \ - -H 'Authorization: Bearer {access_token}' - security: - - cookie_auth: [] - - jwt_token: [] + source: curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}' tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCustomersRes' '400': $ref: '#/components/responses/400_error' '401': @@ -2208,1266 +691,40 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /store/customers/me/orders: - get: - operationId: GetCustomersCustomerOrders - summary: List Orders - description: Retrieve a list of the logged-in Customer's Orders. The orders can be filtered by fields such as `status` or `fulfillment_status`. The orders can also be paginated. - x-authenticated: true - parameters: - - in: query - name: q - description: term to search orders' display ID, email, shipping address's first name, customer's first name, customer's last name, and customer's phone number. - schema: - type: string - - in: query - name: id - description: Filter by ID. - schema: - type: string - - in: query - name: status - style: form - explode: false - description: Filter by status. - schema: - type: array - items: - type: string - enum: - - pending - - completed - - archived - - canceled - - requires_action - - in: query - name: fulfillment_status - style: form - explode: false - description: Fulfillment status to search for. - schema: - type: array - items: - type: string - enum: - - not_fulfilled - - partially_fulfilled - - fulfilled - - partially_shipped - - shipped - - partially_returned - - returned - - canceled - - requires_action - - in: query - name: payment_status - style: form - explode: false - description: Payment status to search for. - schema: - type: array - items: - type: string - enum: - - not_paid - - awaiting - - captured - - partially_refunded - - refunded - - canceled - - requires_action - - in: query - name: display_id - description: Filter by display ID. - schema: - type: string - - in: query - name: cart_id - description: Filter by cart ID. - schema: - type: string - - in: query - name: email - description: Filter by email. - schema: - type: string - - in: query - name: region_id - description: Filter by region ID. - schema: - type: string - - in: query - name: currency_code - style: form - explode: false - description: Filter by the 3 character ISO currency code of the order. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - - in: query - name: tax_rate - description: Filter by tax rate. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: canceled_at - description: Filter by a cancelation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: limit - description: Limit the number of orders returned. - schema: - type: integer - default: 10 - - in: query - name: offset - description: The number of orders to skip when retrieving the orders. - schema: - type: integer - default: 0 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned orders. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned orders. - schema: - type: string - x-codegen: - method: listOrders - queryParams: StoreGetCustomersCustomerOrdersParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged - medusa.customers.listOrders() - .then(({ orders, limit, offset, count }) => { - console.log(orders); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCustomerOrders } from "medusa-react" - - const Orders = () => { - // refetch a function that can be used to - // re-retrieve orders after the customer logs in - const { orders, isLoading } = useCustomerOrders() - - return ( -
- {isLoading && Loading orders...} - {orders?.length && ( -
    - {orders.map((order) => ( -
  • {order.display_id}
  • - ))} -
- )} -
- ) - } - - export default Orders - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/customers/me/orders' \ - -H 'Authorization: Bearer {access_token}' - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Customers - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCustomersListOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/customers/me/payment-methods: - get: - operationId: GetCustomersCustomerPaymentMethods - summary: Get Saved Payment Methods - description: Retrieve the logged-in customer's saved payment methods. This API Route only works with payment providers created with the deprecated Payment Service interface. The payment methods are saved using the Payment Service's third-party service, and not on the Medusa backend. So, they're retrieved from the third-party service. - x-authenticated: true - deprecated: true - x-codegen: - method: listPaymentMethods - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged - medusa.customers.paymentMethods.list() - .then(({ payment_methods }) => { - console.log(payment_methods.length); - }) - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/customers/me/payment-methods' \ - -H 'Authorization: Bearer {access_token}' - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Customers - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCustomersListPaymentMethodsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/customers/password-reset: - post: - operationId: PostCustomersResetPassword - summary: Reset Password - description: Reset a Customer's password using a password token created by a previous request to the Request Password Reset API Route. If the password token expired, you must create a new one. - externalDocs: - description: How to reset password - url: https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles#reset-password requestBody: content: application/json: - schema: - $ref: '#/components/schemas/StorePostCustomersResetPasswordReq' - x-codegen: - method: resetPassword - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.customers.resetPassword({ - email: "user@example.com", - password: "supersecret", - token: "supersecrettoken" - }) - .then(({ customer }) => { - console.log(customer.id); - }) - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/customers/password-reset' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com", - "password": "supersecret", - "token": "supersecrettoken" - }' - tags: - - Customers - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCustomersResetPasswordRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/customers/password-token: + schema: {} + /store/payment-collections/{id}/payment-sessions: post: - operationId: PostCustomersCustomerPasswordToken - summary: Request Password Reset - description: Create a reset password token to be used in a subsequent Reset Password API Route. This emits the event `customer.password_reset`. If a notification provider is installed in the Medusa backend and is configured to handle this event, a notification to the customer, such as an email, may be sent with reset instructions. - externalDocs: - description: How to reset password - url: https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles#reset-password - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostCustomersCustomerPasswordTokenReq' - x-codegen: - method: generatePasswordToken - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.customers.generatePasswordToken({ - email: "user@example.com" - }) - .then(() => { - // successful - }) - .catch(() => { - // failed - }) - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/customers/password-token' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "email": "user@example.com" - }' - tags: - - Customers - responses: - '204': - description: OK - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/gift-cards/{code}: - get: - operationId: GetGiftCardsCode - summary: Get Gift Card by Code - description: Retrieve a Gift Card's details by its associated unique code. - parameters: - - in: path - name: code - required: true - description: The unique Gift Card code. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.giftCards.retrieve(code) - .then(({ gift_card }) => { - console.log(gift_card.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useGiftCard } from "medusa-react" - - type Props = { - giftCardCode: string - } - - const GiftCard = ({ giftCardCode }: Props) => { - const { gift_card, isLoading, isError } = useGiftCard( - giftCardCode - ) - - return ( -
- {isLoading && Loading...} - {gift_card && {gift_card.value}} - {isError && Gift Card does not exist} -
- ) - } - - export default GiftCard - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/gift-cards/{code}' - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreGiftCardsRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/order-edits/{id}: - get: - operationId: GetOrderEditsOrderEdit - summary: Retrieve an Order Edit - description: Retrieve an Order Edit's details. - parameters: - - in: path - name: id - required: true - description: The ID of the OrderEdit. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.orderEdits.retrieve(orderEditId) - .then(({ order_edit }) => { - console.log(order_edit.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useOrderEdit } from "medusa-react" - - type Props = { - orderEditId: string - } - - const OrderEdit = ({ orderEditId }: Props) => { - const { order_edit, isLoading } = useOrderEdit(orderEditId) - - return ( -
- {isLoading && Loading...} - {order_edit && ( -
    - {order_edit.changes.map((change) => ( -
  • {change.type}
  • - ))} -
- )} -
- ) - } - - export default OrderEdit - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/order-edits/{id}' - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/order-edits/{id}/complete: - post: - operationId: PostOrderEditsOrderEditComplete - summary: Complete an Order Edit - description: Complete an Order Edit and reflect its changes on the original order. Any additional payment required must be authorized first using the Payment Collection API Routes. - externalDocs: - description: How to handle order edits in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/handle-order-edits - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - x-codegen: - method: complete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.orderEdits.complete(orderEditId) - .then(({ order_edit }) => { - console.log(order_edit.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCompleteOrderEdit } from "medusa-react" - - type Props = { - orderEditId: string - } - - const OrderEdit = ({ orderEditId }: Props) => { - const completeOrderEdit = useCompleteOrderEdit( - orderEditId - ) - // ... - - const handleCompleteOrderEdit = () => { - completeOrderEdit.mutate(void 0, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.confirmed_at) - } - }) - } - - // ... - } - - export default OrderEdit - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/order-edits/{id}/complete' - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '500': - $ref: '#/components/responses/500_error' - /store/order-edits/{id}/decline: - post: - operationId: PostOrderEditsOrderEditDecline - summary: Decline an Order Edit - description: Decline an Order Edit. The changes are not reflected on the original order. - parameters: - - in: path - name: id - required: true - description: The ID of the OrderEdit. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostOrderEditsOrderEditDecline' - x-codegen: - method: decline - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.orderEdits.decline(orderEditId) - .then(({ order_edit }) => { - console.log(order_edit.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useDeclineOrderEdit } from "medusa-react" - - type Props = { - orderEditId: string - } - - const OrderEdit = ({ orderEditId }: Props) => { - const declineOrderEdit = useDeclineOrderEdit(orderEditId) - // ... - - const handleDeclineOrderEdit = ( - declinedReason: string - ) => { - declineOrderEdit.mutate({ - declined_reason: declinedReason, - }, { - onSuccess: ({ order_edit }) => { - console.log(order_edit.declined_at) - } - }) - } - - // ... - } - - export default OrderEdit - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/order-edits/{id}/decline' - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreOrderEditsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '500': - $ref: '#/components/responses/500_error' - /store/orders: - get: - operationId: GetOrders - summary: Look Up an Order - description: Look up an order using filters. If the filters don't narrow down the results to a single order, a 404 response is returned with no orders. - parameters: - - in: query - name: display_id - required: true - description: Filter by ID. - schema: - type: number - - in: query - name: fields - description: Comma-separated fields that should be expanded in the returned order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: email - style: form - explode: false - description: Filter by email. - required: true - schema: - type: string - format: email - - in: query - name: shipping_address - style: form - explode: false - description: Filter by the shipping address's postal code. - schema: - type: object - properties: - postal_code: - type: string - description: The postal code of the shipping address - x-codegen: - method: lookupOrder - queryParams: StoreGetOrdersParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.orders.lookupOrder({ - display_id: 1, - email: "user@example.com" - }) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useOrders } from "medusa-react" - - type Props = { - displayId: number - email: string - } - - const Order = ({ - displayId, - email - }: Props) => { - const { - order, - isLoading, - } = useOrders({ - display_id: displayId, - email, - }) - - return ( -
- {isLoading && Loading...} - {order && {order.display_id}} - -
- ) - } - - export default Order - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/orders?display_id=1&email=user@example.com' - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/orders/batch/customer/token: - post: - operationId: PostOrdersCustomerOrderClaim - summary: Claim Order - description: Allow the logged-in customer to claim ownership of one or more orders. This generates a token that can be used later on to verify the claim using the Verify Order Claim API Route. This also emits the event `order-update-token.created`. So, if you have a notification provider installed that handles this event and sends the customer a notification, such as an email, the customer should receive instructions on how to finalize their claim ownership. - externalDocs: - description: How to implement claim-order flow in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/implement-claim-order - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostCustomersCustomerOrderClaimReq' - x-codegen: - method: requestCustomerOrders - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.orders.requestCustomerOrders({ - order_ids, - }) - .then(() => { - // successful - }) - .catch(() => { - // an error occurred - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useRequestOrderAccess } from "medusa-react" - - const ClaimOrder = () => { - const claimOrder = useRequestOrderAccess() - - const handleClaimOrder = ( - orderIds: string[] - ) => { - claimOrder.mutate({ - order_ids: orderIds - }, { - onSuccess: () => { - // successful - }, - onError: () => { - // an error occurred. - } - }) - } - - // ... - } - - export default ClaimOrder - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/batch/customer/token' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "order_ids": ["id"], - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/orders/cart/{cart_id}: - get: - operationId: GetOrdersOrderCartId - summary: Get by Cart ID - description: Retrieve an Order's details by the ID of the Cart that was used to create the Order. - parameters: - - in: path - name: cart_id - required: true - description: The ID of Cart. - schema: - type: string - x-codegen: - method: retrieveByCartId - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.orders.retrieveByCartId(cartId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCartOrder } from "medusa-react" - - type Props = { - cartId: string - } - - const Order = ({ cartId }: Props) => { - const { - order, - isLoading, - } = useCartOrder(cartId) - - return ( -
- {isLoading && Loading...} - {order && {order.display_id}} - -
- ) - } - - export default Order - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/orders/cart/{cart_id}' - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/orders/customer/confirm: - post: - operationId: PostOrdersCustomerOrderClaimsCustomerOrderClaimAccept - summary: Verify Order Claim - description: Verify the claim order token provided to the customer when they request ownership of an order. - externalDocs: - description: How to implement claim-order flow in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/implement-claim-order - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostCustomersCustomerAcceptClaimReq' - x-codegen: - method: confirmRequest - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.orders.confirmRequest( - token, - ) - .then(() => { - // successful - }) - .catch(() => { - // an error occurred - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useGrantOrderAccess } from "medusa-react" - - const ClaimOrder = () => { - const confirmOrderRequest = useGrantOrderAccess() - - const handleOrderRequestConfirmation = ( - token: string - ) => { - confirmOrderRequest.mutate({ - token - }, { - onSuccess: () => { - // successful - }, - onError: () => { - // an error occurred. - } - }) - } - - // ... - } - - export default ClaimOrder - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/orders/customer/confirm' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "token": "{token}", - }' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/orders/{id}: - get: - operationId: GetOrdersOrder - summary: Get an Order - description: Retrieve an Order's details. - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be expanded in the returned order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be included in the returned order. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.orders.retrieve(orderId) - .then(({ order }) => { - console.log(order.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useOrder } from "medusa-react" - - type Props = { - orderId: string - } - - const Order = ({ orderId }: Props) => { - const { - order, - isLoading, - } = useOrder(orderId) - - return ( -
- {isLoading && Loading...} - {order && {order.display_id}} - -
- ) - } - - export default Order - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/orders/{id}' - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreOrdersRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/payment-collections/{id}: - get: - operationId: GetPaymentCollectionsPaymentCollection - summary: Get a PaymentCollection - description: Retrieve a Payment Collection's details. + operationId: PostPaymentCollectionsIdPaymentSessions + summary: Add Payment Sessions to Payment Collection + description: Add a list of payment sessions to a payment collection. x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The payment collection's ID. required: true - description: The ID of the PaymentCollection. schema: type: string - - in: query - name: fields - description: Comma-separated fields that should be expanded in the returned payment collection. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned payment collection. - schema: - type: string - x-codegen: - method: retrieve - queryParams: StoreGetPaymentCollectionsParams + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StorePostPaymentCollectionsPaymentSessionReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.paymentCollections.retrieve(paymentCollectionId) - .then(({ payment_collection }) => { - console.log(payment_collection.id) - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { usePaymentCollection } from "medusa-react" - - type Props = { - paymentCollectionId: string - } - - const PaymentCollection = ({ - paymentCollectionId - }: Props) => { - const { - payment_collection, - isLoading - } = usePaymentCollection( - paymentCollectionId - ) - - return ( -
- {isLoading && Loading...} - {payment_collection && ( - {payment_collection.status} - )} -
- ) - } - - export default PaymentCollection - lang: Shell label: cURL - source: | - curl '{backend_url}/store/payment-collections/{id}' - security: - - cookie_auth: [] - - jwt_token: [] + source: |- + curl -X POST '{backend_url}/store/payment-collections/{id}/payment-sessions' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "provider_id": "{value}" + }' tags: - Payment Collections responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StorePaymentCollectionsRes' '400': $ref: '#/components/responses/400_error' '401': @@ -3480,1626 +737,24 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /store/payment-collections/{id}/sessions: - post: - operationId: PostPaymentCollectionsSessions - summary: Create a Payment Session - description: Create a Payment Session for a payment provider in a Payment Collection. - x-authenticated: false - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePaymentCollectionSessionsReq' - x-codegen: - method: managePaymentSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.paymentCollections.managePaymentSession(payment_id, { provider_id: "stripe" }) - .then(({ payment_collection }) => { - console.log(payment_collection.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useManagePaymentSession } from "medusa-react" - - type Props = { - paymentCollectionId: string - } - - const PaymentCollection = ({ - paymentCollectionId - }: Props) => { - const managePaymentSession = useManagePaymentSession( - paymentCollectionId - ) - - const handleManagePaymentSession = ( - providerId: string - ) => { - managePaymentSession.mutate({ - provider_id: providerId - }, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.payment_sessions) - } - }) - } - - // ... - } - - export default PaymentCollection - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/payment-collections/{id}/sessions' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "provider_id": "stripe" - }' - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StorePaymentCollectionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/payment-collections/{id}/sessions/batch: - post: - operationId: PostPaymentCollectionsPaymentCollectionSessionsBatch - summary: Manage Payment Sessions - description: Create, update, or delete a list of payment sessions of a Payment Collections. If a payment session is not provided in the `sessions` array, it's deleted. - x-authenticated: false - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostPaymentCollectionsBatchSessionsReq' - x-codegen: - method: managePaymentSessionsBatch - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - - // Total amount = 10000 - - // Example 1: Adding two new sessions - medusa.paymentCollections.managePaymentSessionsBatch(paymentId, { - sessions: [ - { - provider_id: "stripe", - amount: 5000, - }, - { - provider_id: "manual", - amount: 5000, - }, - ] - }) - .then(({ payment_collection }) => { - console.log(payment_collection.id); - }) - - // Example 2: Updating one session and removing the other - medusa.paymentCollections.managePaymentSessionsBatch(paymentId, { - sessions: [ - { - provider_id: "stripe", - amount: 10000, - session_id: "ps_123456" - }, - ] - }) - .then(({ payment_collection }) => { - console.log(payment_collection.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useManageMultiplePaymentSessions } from "medusa-react" - - type Props = { - paymentCollectionId: string - } - - const PaymentCollection = ({ - paymentCollectionId - }: Props) => { - const managePaymentSessions = useManageMultiplePaymentSessions( - paymentCollectionId - ) - - const handleManagePaymentSessions = () => { - // Total amount = 10000 - - // Example 1: Adding two new sessions - managePaymentSessions.mutate({ - sessions: [ - { - provider_id: "stripe", - amount: 5000, - }, - { - provider_id: "manual", - amount: 5000, - }, - ] - }, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.payment_sessions) - } - }) - - // Example 2: Updating one session and removing the other - managePaymentSessions.mutate({ - sessions: [ - { - provider_id: "stripe", - amount: 10000, - session_id: "ps_123456" - }, - ] - }, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.payment_sessions) - } - }) - } - - // ... - } - - export default PaymentCollection - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/payment-collections/{id}/sessions/batch' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "sessions": [ - { - "provider_id": "stripe", - "amount": 5000 - }, - { - "provider_id": "manual", - "amount": 5000 - } - ] - }' - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StorePaymentCollectionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/payment-collections/{id}/sessions/batch/authorize: - post: - operationId: PostPaymentCollectionsSessionsBatchAuthorize - summary: Authorize Payment Sessions - description: Authorize the Payment Sessions of a Payment Collection. - x-authenticated: false - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collections. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostPaymentCollectionsBatchSessionsAuthorizeReq' - x-codegen: - method: authorizePaymentSessionsBatch - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.paymentCollections.authorize(paymentId) - .then(({ payment_collection }) => { - console.log(payment_collection.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAuthorizePaymentSessionsBatch } from "medusa-react" - - type Props = { - paymentCollectionId: string - } - - const PaymentCollection = ({ - paymentCollectionId - }: Props) => { - const authorizePaymentSessions = useAuthorizePaymentSessionsBatch( - paymentCollectionId - ) - // ... - - const handleAuthorizePayments = (paymentSessionIds: string[]) => { - authorizePaymentSessions.mutate({ - session_ids: paymentSessionIds - }, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.payment_sessions) - } - }) - } - - // ... - } - - export default PaymentCollection - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/payment-collections/{id}/sessions/batch/authorize' - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StorePaymentCollectionsRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/payment-collections/{id}/sessions/{session_id}: - post: - operationId: PostPaymentCollectionsPaymentCollectionPaymentSessionsSession - summary: Refresh a Payment Session - description: Refresh a Payment Session's data to ensure that it is in sync with the Payment Collection. - x-authenticated: false - parameters: - - in: path - name: id - required: true - description: The id of the PaymentCollection. - schema: - type: string - - in: path - name: session_id - required: true - description: The id of the Payment Session to be refreshed. - schema: - type: string - x-codegen: - method: refreshPaymentSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.paymentCollections.refreshPaymentSession(paymentCollectionId, sessionId) - .then(({ payment_session }) => { - console.log(payment_session.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { usePaymentCollectionRefreshPaymentSession } from "medusa-react" - - type Props = { - paymentCollectionId: string - } - - const PaymentCollection = ({ - paymentCollectionId - }: Props) => { - const refreshPaymentSession = usePaymentCollectionRefreshPaymentSession( - paymentCollectionId - ) - // ... - - const handleRefreshPaymentSession = (paymentSessionId: string) => { - refreshPaymentSession.mutate(paymentSessionId, { - onSuccess: ({ payment_session }) => { - console.log(payment_session.status) - } - }) - } - - // ... - } - - export default PaymentCollection - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/payment-collections/{id}/sessions/{session_id}' - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StorePaymentCollectionsSessionRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/payment-collections/{id}/sessions/{session_id}/authorize: - post: - operationId: PostPaymentCollectionsSessionsSessionAuthorize - summary: Authorize Payment Session - description: Authorize a Payment Session of a Payment Collection. - x-authenticated: false - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - - in: path - name: session_id - required: true - description: The ID of the Payment Session. - schema: - type: string - x-codegen: - method: authorizePaymentSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.paymentCollections.authorize(paymentId, sessionId) - .then(({ payment_collection }) => { - console.log(payment_collection.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useAuthorizePaymentSession } from "medusa-react" - - type Props = { - paymentCollectionId: string - } - - const PaymentCollection = ({ - paymentCollectionId - }: Props) => { - const authorizePaymentSession = useAuthorizePaymentSession( - paymentCollectionId - ) - // ... - - const handleAuthorizePayment = (paymentSessionId: string) => { - authorizePaymentSession.mutate(paymentSessionId, { - onSuccess: ({ payment_collection }) => { - console.log(payment_collection.payment_sessions) - } - }) - } - - // ... - } - - export default PaymentCollection - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/payment-collections/{id}/sessions/{session_id}/authorize' - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StorePaymentCollectionsSessionRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/product-categories: - get: - operationId: GetProductCategories - summary: List Product Categories - description: Retrieve a list of product categories. The product categories can be filtered by fields such as `handle` or `q`. The product categories can also be paginated. This API Route can also be used to retrieve a product category by its handle. - x-featureFlag: product_categories - externalDocs: - description: How to retrieve a product category by its handle - url: https://docs.medusajs.com/modules/products/storefront/use-categories#get-a-category-by-its-handle - parameters: - - in: query - name: q - description: term used to search product category's names and handles. - schema: - type: string - - in: query - name: handle - description: Filter by handle. - schema: - type: string - - in: query - name: parent_category_id - description: Filter by the ID of a parent category. Only children of the provided parent category are retrieved. - schema: - type: string - - in: query - name: include_descendants_tree - description: Whether all nested categories inside a category should be retrieved. - schema: - type: boolean - - in: query - name: offset - description: The number of product categories to skip when retrieving the product categories. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of product categories returned. - schema: - type: integer - default: 100 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned product categories. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned product categories. - schema: - type: string - x-codegen: - method: list - queryParams: StoreGetProductCategoriesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.productCategories.list() - .then(({ product_categories, limit, offset, count }) => { - console.log(product_categories.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useProductCategories } from "medusa-react" - - function Categories() { - const { - product_categories, - isLoading, - } = useProductCategories() - - return ( -
- {isLoading && Loading...} - {product_categories && !product_categories.length && ( - No Categories - )} - {product_categories && product_categories.length > 0 && ( -
    - {product_categories.map( - (category) => ( -
  • {category.name}
  • - ) - )} -
- )} -
- ) - } - - export default Categories - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/product-categories' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreGetProductCategoriesRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/product-categories/{id}: - get: - operationId: GetProductCategoriesCategory - summary: Get a Product Category - description: Retrieve a Product Category's details. - x-featureFlag: product_categories - parameters: - - in: path - name: id - required: true - description: The ID of the Product Category - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be expanded in the returned product category. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned product category. - schema: - type: string - x-codegen: - method: retrieve - queryParams: StoreGetProductCategoriesCategoryParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.productCategories.retrieve(productCategoryId) - .then(({ product_category }) => { - console.log(product_category.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useProductCategory } from "medusa-react" - - type Props = { - categoryId: string - } - - const Category = ({ categoryId }: Props) => { - const { product_category, isLoading } = useProductCategory( - categoryId - ) - - return ( -
- {isLoading && Loading...} - {product_category && {product_category.name}} -
- ) - } - - export default Category - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/product-categories/{id}' \ - -H 'x-medusa-access-token: {api_token}' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreGetProductCategoriesCategoryRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/product-tags: - get: - operationId: GetProductTags - summary: List Product Tags - description: Retrieve a list of product tags. The product tags can be filtered by fields such as `id` or `q`. The product tags can also be sorted or paginated. - x-authenticated: true - x-codegen: - method: list - queryParams: StoreGetProductTagsParams - parameters: - - in: query - name: limit - description: Limit the number of product tags returned. - schema: - type: integer - default: 20 - - in: query - name: offset - description: The number of product tags to skip when retrieving the product tags. - schema: - type: integer - default: 0 - - in: query - name: order - description: A product-tag field to sort-order the retrieved product tags by. - schema: - type: string - - in: query - name: discount_condition_id - description: Filter by the ID of a discount condition. When provided, only tags that the discount condition applies for will be retrieved. - schema: - type: string - - in: query - name: value - style: form - explode: false - description: Filter by tag values. - schema: - type: array - items: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by IDs. - schema: - type: array - items: - type: string - - in: query - name: q - description: term to search product tag's value. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.productTags.list() - .then(({ product_tags }) => { - console.log(product_tags.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useProductTags } from "medusa-react" - - function Tags() { - const { - product_tags, - isLoading, - } = useProductTags() - - return ( -
- {isLoading && Loading...} - {product_tags && !product_tags.length && ( - No Product Tags - )} - {product_tags && product_tags.length > 0 && ( -
    - {product_tags.map( - (tag) => ( -
  • {tag.value}
  • - ) - )} -
- )} -
- ) - } - - export default Tags - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/product-tags' - tags: - - Product Tags - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreProductTagsListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/product-types: - get: - operationId: GetProductTypes - summary: List Product Types - description: Retrieve a list of product types. The product types can be filtered by fields such as `value` or `q`. The product types can also be sorted or paginated. - x-authenticated: true - parameters: - - in: query - name: limit - description: Limit the number of product types returned. - schema: - type: integer - default: 20 - - in: query - name: offset - description: The number of product types to skip when retrieving the product types. - schema: - type: integer - default: 0 - - in: query - name: order - description: A product-type field to sort-order the retrieved product types by. - schema: - type: string - - in: query - name: discount_condition_id - description: Filter by the ID of a discount condition. When provided, only types that the discount condition applies for will be retrieved. - schema: - type: string - - in: query - name: value - style: form - explode: false - description: Filter by type values. - schema: - type: array - items: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by IDs. - schema: - type: array - items: - type: string - - in: query - name: q - description: term to search product type's value. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: StoreGetProductTypesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.productTypes.list() - .then(({ product_types }) => { - console.log(product_types.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useProductTypes } from "medusa-react" - - function Types() { - const { - product_types, - isLoading, - } = useProductTypes() - - return ( -
- {isLoading && Loading...} - {product_types && !product_types.length && ( - No Product Types - )} - {product_types && product_types.length > 0 && ( -
    - {product_types.map( - (type) => ( -
  • {type.value}
  • - ) - )} -
- )} -
- ) - } - - export default Types - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/product-types' - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Types - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreProductTypesListRes' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/products: - get: - operationId: GetProducts - summary: List Products - description: | - Retrieves a list of products. The products can be filtered by fields such as `id` or `q`. The products can also be sorted or paginated. - This API Route can also be used to retrieve a product by its handle. - - For accurate and correct pricing of the products based on the customer's context, it's highly recommended to pass fields such as - `region_id`, `currency_code`, and `cart_id` when available. - - Passing `sales_channel_id` ensures retrieving only products available in the specified sales channel. - You can alternatively use a publishable API key in the request header instead of passing a `sales_channel_id`. - externalDocs: - description: How to retrieve a product by its handle - url: https://docs.medusajs.com/modules/products/storefront/show-products#retrieve-product-by-handle - parameters: - - in: query - name: q - description: term used to search products' title, description, variant's title, variant's sku, and collection's title. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by IDs. - schema: - oneOf: - - type: string - - type: array - items: - type: string - - in: query - name: sales_channel_id - style: form - explode: false - description: Filter by sales channel IDs. When provided, only products available in the selected sales channels are retrieved. Alternatively, you can pass a publishable API key in the request header and this will have the same effect. - schema: - type: array - items: - type: string - - in: query - name: collection_id - style: form - explode: false - description: Filter by product collection IDs. When provided, only products that belong to the specified product collections are retrieved. - schema: - type: array - items: - type: string - - in: query - name: type_id - style: form - explode: false - description: Filter by product type IDs. When provided, only products that belong to the specified product types are retrieved. - schema: - type: array - items: - type: string - - in: query - name: tags - style: form - explode: false - description: Filter by product tag IDs. When provided, only products that belong to the specified product tags are retrieved. - schema: - type: array - items: - type: string - - in: query - name: title - description: Filter by title. - schema: - type: string - - in: query - name: description - description: Filter by description - schema: - type: string - - in: query - name: handle - description: Filter by handle. - schema: - type: string - - in: query - name: is_giftcard - description: Whether to retrieve regular products or gift-card products. - schema: - type: boolean - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: category_id - style: form - explode: false - description: Filter by product category IDs. When provided, only products that belong to the specified product categories are retrieved. - schema: - type: array - x-featureFlag: product_categories - items: - type: string - - in: query - name: include_category_children - style: form - explode: false - description: Whether to include child product categories when filtering using the `category_id` field. - schema: - type: boolean - x-featureFlag: product_categories - - in: query - name: offset - description: The number of products to skip when retrieving the products. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of products returned. - schema: - type: integer - default: 100 - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned products. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned products. - schema: - type: string - - in: query - name: order - description: A product field to sort-order the retrieved products by. - schema: - type: string - - in: query - name: cart_id - description: The ID of the cart. This is useful for accurate pricing based on the cart's context. - schema: - type: string - - in: query - name: region_id - description: The ID of the region. This is useful for accurate pricing based on the selected region. - schema: - type: string - - in: query - name: currency_code - style: form - explode: false - description: A 3 character ISO currency code. This is useful for accurate pricing based on the selected currency. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: list - queryParams: StoreGetProductsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.list() - .then(({ products, limit, offset, count }) => { - console.log(products.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useProducts } from "medusa-react" - - const Products = () => { - const { products, isLoading } = useProducts() - - return ( -
- {isLoading && Loading...} - {products && !products.length && No Products} - {products && products.length > 0 && ( -
    - {products.map((product) => ( -
  • {product.title}
  • - ))} -
- )} -
- ) - } - - export default Products - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/products' - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreProductsListRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/products/search: - post: - operationId: PostProductsSearch - summary: Search Products - description: Run a search query on products using the search service installed on the Medusa backend. The searching is handled through the search service, so the returned data's format depends on the search service you're using. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostSearchReq' - x-codegen: - method: search - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.search({ - q: "Shirt" - }) - .then(({ hits }) => { - console.log(hits.length); - }) - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/products/search' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "q": "Shirt" - }' - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StorePostSearchRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/products/{id}: - get: - operationId: GetProductsProduct - summary: Get a Product - description: | - Retrieve a Product's details. For accurate and correct pricing of the product based on the customer's context, it's highly recommended to pass fields such as - `region_id`, `currency_code`, and `cart_id` when available. - - Passing `sales_channel_id` ensures retrieving only products available in the current sales channel. - You can alternatively use a publishable API key in the request header instead of passing a `sales_channel_id`. - externalDocs: - description: How to pass product pricing parameters - url: https://docs.medusajs.com/modules/products/storefront/show-products#product-pricing-parameters - parameters: - - in: path - name: id - required: true - description: The ID of the Product. - schema: - type: string - - in: query - name: sales_channel_id - description: The ID of the sales channel the customer is viewing the product from. - schema: - type: string - - in: query - name: cart_id - description: The ID of the cart. This is useful for accurate pricing based on the cart's context. - schema: - type: string - - in: query - name: region_id - description: The ID of the region. This is useful for accurate pricing based on the selected region. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned product. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned product. - schema: - type: string - - in: query - name: currency_code - style: form - explode: false - description: A 3 character ISO currency code. This is useful for accurate pricing based on the selected currency. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: retrieve - queryParams: StoreGetProductsProductParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.products.retrieve(productId) - .then(({ product }) => { - console.log(product.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useProduct } from "medusa-react" - - type Props = { - productId: string - } - - const Product = ({ productId }: Props) => { - const { product, isLoading } = useProduct(productId) - - return ( -
- {isLoading && Loading...} - {product && {product.title}} -
- ) - } - - export default Product - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/products/{id}' - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreProductsRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' /store/regions: get: operationId: GetRegions summary: List Regions - description: Retrieve a list of regions. The regions can be filtered by fields such as `created_at`. The regions can also be paginated. This API Route is useful to show the customer all available regions to choose from. - externalDocs: - description: How to use regions in a storefront - url: https://docs.medusajs.com/modules/regions-and-currencies/storefront/use-regions - parameters: - - in: query - name: offset - description: The number of regions to skip when retrieving the regions. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of regions returned. - schema: - type: integer - default: 100 - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: StoreGetRegionsParams + description: Retrieve a list of regions. The regions can be filtered by fields such as `id`. The regions can also be sorted or paginated. + x-authenticated: false + parameters: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.regions.list() - .then(({ regions, count, limit, offset }) => { - console.log(regions.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useRegions } from "medusa-react" - - const Regions = () => { - const { regions, isLoading } = useRegions() - - return ( -
- {isLoading && Loading...} - {regions?.length && ( -
    - {regions.map((region) => ( -
  • - {region.name} -
  • - ))} -
- )} -
- ) - } - - export default Regions - lang: Shell label: cURL - source: | - curl '{backend_url}/store/regions' + source: curl '{backend_url}/store/regions' tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreRegionsListRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -5108,69 +763,34 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /store/regions/{id}: get: - operationId: GetRegionsRegion + operationId: GetRegionsId summary: Get a Region - description: Retrieve a Region's details. + description: Retrieve a region by its ID. You can expand the region's relations or select the fields that should be returned. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The region's ID. required: true - description: The ID of the Region. schema: type: string - x-codegen: - method: retrieve x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.regions.retrieve(regionId) - .then(({ region }) => { - console.log(region.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useRegion } from "medusa-react" - - type Props = { - regionId: string - } - - const Region = ({ regionId }: Props) => { - const { region, isLoading } = useRegion( - regionId - ) - - return ( -
- {isLoading && Loading...} - {region && {region.name}} -
- ) - } - - export default Region - lang: Shell label: cURL - source: | - curl '{backend_url}/store/regions/{id}' + source: curl '{backend_url}/store/regions/{id}' tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreRegionsRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -5179,333 +799,34 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /store/return-reasons: - get: - operationId: GetReturnReasons - summary: List Return Reasons - description: Retrieve a list of Return Reasons. This is useful when implementing a Create Return flow in the storefront. - x-codegen: - method: list - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.returnReasons.list() - .then(({ return_reasons }) => { - console.log(return_reasons.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useReturnReasons } from "medusa-react" - - const ReturnReasons = () => { - const { - return_reasons, - isLoading - } = useReturnReasons() - - return ( -
- {isLoading && Loading...} - {return_reasons?.length && ( -
    - {return_reasons.map((returnReason) => ( -
  • - {returnReason.label} -
  • - ))} -
- )} -
- ) - } - - export default ReturnReasons - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/return-reasons' - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreReturnReasonsListRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/return-reasons/{id}: - get: - operationId: GetReturnReasonsReason - summary: Get a Return Reason - description: Retrieve a Return Reason's details. - parameters: - - in: path - name: id - required: true - description: The id of the Return Reason. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.returnReasons.retrieve(reasonId) - .then(({ return_reason }) => { - console.log(return_reason.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useReturnReason } from "medusa-react" - - type Props = { - returnReasonId: string - } - - const ReturnReason = ({ returnReasonId }: Props) => { - const { - return_reason, - isLoading - } = useReturnReason( - returnReasonId - ) - - return ( -
- {isLoading && Loading...} - {return_reason && {return_reason.label}} -
- ) - } - - export default ReturnReason - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/return-reasons/{id}' - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreReturnReasonsRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/returns: - post: - operationId: PostReturns - summary: Create Return - description: Create a Return for an Order. If a return shipping method is specified, the return is automatically fulfilled. - externalDocs: - description: How to create a return in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/create-return requestBody: content: application/json: - schema: - $ref: '#/components/schemas/StorePostReturnsReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.returns.create({ - order_id, - items: [ - { - item_id, - quantity: 1 - } - ] - }) - .then((data) => { - console.log(data.return.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCreateReturn } from "medusa-react" - - type CreateReturnData = { - items: { - item_id: string, - quantity: number - }[] - return_shipping: { - option_id: string - } - } - - type Props = { - orderId: string - } - - const CreateReturn = ({ orderId }: Props) => { - const createReturn = useCreateReturn() - // ... - - const handleCreate = (data: CreateReturnData) => { - createReturn.mutate({ - ...data, - order_id: orderId - }, { - onSuccess: ({ return: returnData }) => { - console.log(returnData.id) - } - }) - } - - // ... - } - - export default CreateReturn - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/returns' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "order_id": "asfasf", - "items": [ - { - "item_id": "assfasf", - "quantity": 1 - } - ] - }' - tags: - - Returns - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreReturnsRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/shipping-options: + schema: {} + /store/regions/{id}/payment-providers: get: - operationId: GetShippingOptions - summary: Get Shipping Options - description: Retrieve a list of Shipping Options. + operationId: GetRegionsIdPaymentProviders + summary: List Payment Providers + description: Retrieve a list of payment providers in a region. The payment providers can be filtered by fields like FILTER FIELDS. The payment providers can also be paginated. + x-authenticated: false parameters: - - in: query - name: is_return - description: Whether return shipping options should be included. By default, all shipping options are returned. - schema: - type: boolean - - in: query - name: product_ids - description: '"Comma-separated list of Product IDs to filter Shipping Options by. If provided, only shipping options that can be used with the provided products are retrieved."' + - name: id + in: path + description: The region's ID. + required: true schema: type: string - - in: query - name: region_id - description: '"The ID of the region that the shipping options belong to. If not provided, all shipping options are retrieved."' - schema: - type: string - x-codegen: - method: list - queryParams: StoreGetShippingOptionsParams x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.shippingOptions.list() - .then(({ shipping_options }) => { - console.log(shipping_options.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useShippingOptions } from "medusa-react" - - const ShippingOptions = () => { - const { - shipping_options, - isLoading, - } = useShippingOptions() - - return ( -
- {isLoading && Loading...} - {shipping_options?.length && - shipping_options?.length > 0 && ( -
    - {shipping_options?.map((shipping_option) => ( -
  • - {shipping_option.id} -
  • - ))} -
- )} -
- ) - } - - export default ShippingOptions - lang: Shell label: cURL - source: | - curl '{backend_url}/store/shipping-options' + source: curl '{backend_url}/store/regions/{id}/payment-providers' tags: - - Shipping Options + - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreShippingOptionsListRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -5514,84 +835,34 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + requestBody: + content: + application/json: + schema: {} /store/shipping-options/{cart_id}: get: - operationId: GetShippingOptionsCartId - summary: List for Cart - description: Retrieve a list of Shipping Options available for a cart. - externalDocs: - description: How to implement shipping step in checkout - url: https://docs.medusajs.com/modules/carts-and-checkout/storefront/implement-checkout-flow#shipping-step + operationId: GetShippingOptionsCart_id + summary: Get a Shipping Option + description: Retrieve a shipping option by its ID. You can expand the shipping option's relations or select the fields that should be returned. + x-authenticated: false parameters: - - in: path - name: cart_id + - name: cart_id + in: path + description: The shipping option's cart id. required: true - description: The ID of the Cart. schema: type: string - x-codegen: - method: listCartOptions x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.shippingOptions.listCartOptions(cartId) - .then(({ shipping_options }) => { - console.log(shipping_options.length); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCartShippingOptions } from "medusa-react" - - type Props = { - cartId: string - } - - const ShippingOptions = ({ cartId }: Props) => { - const { shipping_options, isLoading } = - useCartShippingOptions(cartId) - - return ( -
- {isLoading && Loading...} - {shipping_options && !shipping_options.length && ( - No shipping options - )} - {shipping_options && ( -
    - {shipping_options.map( - (shipping_option) => ( -
  • - {shipping_option.name} -
  • - ) - )} -
- )} -
- ) - } - - export default ShippingOptions - lang: Shell label: cURL - source: | - curl '{backend_url}/store/shipping-options/{cart_id}' + source: curl '{backend_url}/store/shipping-options/{cart_id}' tags: - Shipping Options responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCartShippingOptionsListRes' '400': $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found_error' '409': @@ -5600,442 +871,10 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /store/swaps: - post: - operationId: PostSwaps - summary: Create a Swap - description: | - Create a Swap for an Order. This will also create a return and associate it with the swap. If a return shipping option is specified, the return will automatically be fulfilled. - To complete the swap, you must use the Complete Cart API Route passing it the ID of the swap's cart. - - An idempotency key will be generated if none is provided in the header `Idempotency-Key` and added to - the response. If an error occurs during swap creation or the request is interrupted for any reason, the swap creation can be retried by passing the idempotency - key in the `Idempotency-Key` header. - externalDocs: - description: How to create a swap - url: https://docs.medusajs.com/modules/orders/storefront/create-swap requestBody: content: application/json: - schema: - $ref: '#/components/schemas/StorePostSwapsReq' - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.swaps.create({ - order_id, - return_items: [ - { - item_id, - quantity: 1 - } - ], - additional_items: [ - { - variant_id, - quantity: 1 - } - ] - }) - .then(({ swap }) => { - console.log(swap.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCreateSwap } from "medusa-react" - - type Props = { - orderId: string - } - - type CreateData = { - return_items: { - item_id: string - quantity: number - }[] - additional_items: { - variant_id: string - quantity: number - }[] - return_shipping_option: string - } - - const CreateSwap = ({ - orderId - }: Props) => { - const createSwap = useCreateSwap() - // ... - - const handleCreate = ( - data: CreateData - ) => { - createSwap.mutate({ - ...data, - order_id: orderId - }, { - onSuccess: ({ swap }) => { - console.log(swap.id) - } - }) - } - - // ... - } - - export default CreateSwap - - lang: Shell - label: cURL - source: | - curl -X POST '{backend_url}/store/swaps' \ - -H 'Content-Type: application/json' \ - --data-raw '{ - "order_id": "{order_id}", - "return_items": [ - { - "item_id": "{item_id}", - "quantity": 1 - } - ], - "additional_items": [ - { - "variant_id": "{variant_id}", - "quantity": 1 - } - ] - }' - tags: - - Swaps - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreSwapsRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/swaps/{cart_id}: - get: - operationId: GetSwapsSwapCartId - summary: Get by Cart ID - description: Retrieve a Swap's details by the ID of its cart. - parameters: - - in: path - name: cart_id - required: true - description: The id of the Cart - schema: - type: string - x-codegen: - method: retrieveByCartId - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - medusa.swaps.retrieveByCartId(cartId) - .then(({ swap }) => { - console.log(swap.id); - }) - - lang: tsx - label: Medusa React - source: | - import React from "react" - import { useCartSwap } from "medusa-react" - type Props = { - cartId: string - } - - const Swap = ({ cartId }: Props) => { - const { - swap, - isLoading, - } = useCartSwap(cartId) - - return ( -
- {isLoading && Loading...} - {swap && {swap.id}} - -
- ) - } - - export default Swap - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/swaps/{cart_id}' - tags: - - Swaps - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreSwapsRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/variants: - get: - operationId: GetVariants - summary: Get Product Variants - description: | - Retrieves a list of product variants. The product variants can be filtered by fields such as `id` or `title`. The product variants can also be paginated. - - For accurate and correct pricing of the product variants based on the customer's context, it's highly recommended to pass fields such as - `region_id`, `currency_code`, and `cart_id` when available. - - Passing `sales_channel_id` ensures retrieving only variants of products available in the specified sales channel. - You can alternatively use a publishable API key in the request header instead of passing a `sales_channel_id`. - externalDocs: - description: How to pass product pricing parameters - url: https://docs.medusajs.com/modules/products/storefront/show-products#product-pricing-parameters - parameters: - - in: query - name: ids - description: Filter by a comma-separated list of IDs. If supplied, it overrides the `id` parameter. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by one or more IDs. If `ids` is supplied, it's overrides the value of this parameter. - schema: - oneOf: - - type: string - description: Filter by an ID. - - type: array - description: Filter by IDs. - items: - type: string - - in: query - name: sales_channel_id - description: '"Filter by sales channel IDs. When provided, only products available in the selected sales channels are retrieved. Alternatively, you can pass a publishable API key in the request header and this will have the same effect."' - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned product variants. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned product variants. - schema: - type: string - - in: query - name: offset - description: The number of products to skip when retrieving the product variants. - schema: - type: number - default: '0' - - in: query - name: limit - description: Limit the number of product variants returned. - schema: - type: number - default: '100' - - in: query - name: cart_id - description: The ID of the cart. This is useful for accurate pricing based on the cart's context. - schema: - type: string - - in: query - name: region_id - description: The ID of the region. This is useful for accurate pricing based on the selected region. - schema: - type: string - - in: query - name: currency_code - style: form - explode: false - description: A 3 character ISO currency code. This is useful for accurate pricing based on the selected currency. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - - in: query - name: title - style: form - explode: false - description: Filter by title - schema: - oneOf: - - type: string - description: a single title to filter by - - type: array - description: multiple titles to filter by - items: - type: string - - in: query - name: inventory_quantity - description: Filter by available inventory quantity - schema: - oneOf: - - type: number - description: A specific number to filter by. - - type: object - description: Filter using less and greater than comparisons. - properties: - lt: - type: number - description: Filter by inventory quantity less than this number - gt: - type: number - description: Filter by inventory quantity greater than this number - lte: - type: number - description: Filter by inventory quantity less than or equal to this number - gte: - type: number - description: Filter by inventory quantity greater than or equal to this number - x-codegen: - method: list - queryParams: StoreGetVariantsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.product.variants.list() - .then(({ variants }) => { - console.log(variants.length); - }) - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/variants' - tags: - - Product Variants - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreVariantsListRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - /store/variants/{id}: - get: - operationId: GetVariantsVariant - summary: Get a Product Variant - description: | - Retrieve a Product Variant's details. For accurate and correct pricing of the product variant based on the customer's context, it's highly recommended to pass fields such as - `region_id`, `currency_code`, and `cart_id` when available. - - Passing `sales_channel_id` ensures retrieving only variants of products available in the current sales channel. - You can alternatively use a publishable API key in the request header instead of passing a `sales_channel_id`. - externalDocs: - description: How to pass product pricing parameters - url: https://docs.medusajs.com/modules/products/storefront/show-products#product-pricing-parameters - parameters: - - in: path - name: id - required: true - description: The ID of the Product Variant. - schema: - type: string - - in: query - name: sales_channel_id - description: The ID of the sales channel the customer is viewing the product variant from. - schema: - type: string - - in: query - name: cart_id - description: The ID of the cart. This is useful for accurate pricing based on the cart's context. - schema: - type: string - - in: query - name: region_id - description: The ID of the region. This is useful for accurate pricing based on the selected region. - schema: - type: string - - in: query - name: currency_code - style: form - explode: false - description: A 3 character ISO currency code. This is useful for accurate pricing based on the selected currency. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: retrieve - queryParams: StoreGetVariantsVariantParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: | - import Medusa from "@medusajs/medusa-js" - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) - // must be previously logged in or use api token - medusa.product.variants.retrieve(productVariantId) - .then(({ variant }) => { - console.log(variant.id); - }) - - lang: Shell - label: cURL - source: | - curl '{backend_url}/store/variants/{id}' - tags: - - Product Variants - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreVariantsRes' - '400': - $ref: '#/components/responses/400_error' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' + schema: {} components: responses: default_error: @@ -6210,1888 +1049,1841 @@ components: Where `{sid}` is the value of `connect.sid` that you copied. schemas: - Address: - title: Address - description: An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity. + AdminDeletePricingRuleTypesRuleTypeReq: type: object - required: - - address_1 - - address_2 - - city - - company - - country_code - - created_at - - customer_id - - deleted_at - - first_name - - id - - last_name - - metadata - - phone - - postal_code - - province - - updated_at + description: SUMMARY + x-schemaName: AdminDeletePricingRuleTypesRuleTypeReq + properties: {} + AdminGetPricingRuleTypesParams: + type: object + description: SUMMARY + x-schemaName: AdminGetPricingRuleTypesParams properties: + rule_attribute: + type: array + description: The pricing's rule attribute. + items: + type: string + title: rule_attribute + description: The rule attribute's details. + expand: + type: string + title: expand + description: The pricing's expand. + fields: + type: string + title: fields + description: The pricing's fields. + offset: + type: number + title: offset + description: The pricing's offset. + limit: + type: number + title: limit + description: The pricing's limit. + order: + type: string + title: order + description: The pricing's order. + AdminGetPricingRuleTypesRuleTypeParams: + type: object + description: SUMMARY + x-schemaName: AdminGetPricingRuleTypesRuleTypeParams + properties: + expand: + type: string + title: expand + description: The pricing's expand. + fields: + type: string + title: fields + description: The pricing's fields. + AdminGetProductsParams: + type: object + description: SUMMARY + x-schemaName: AdminGetProductsParams + properties: + q: + type: string + title: q + description: The product's q. id: - type: string - description: ID of the address - example: addr_01G8ZC9VS1XVE149MGH2J7QSSH - customer_id: - description: ID of the customer this address belongs to - nullable: true - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: Available if the relation `customer` is expanded. - nullable: true - type: object - company: - description: Company name - nullable: true - type: string - example: Acme - first_name: - description: First name - nullable: true - type: string - example: Arno - last_name: - description: Last name - nullable: true - type: string - example: Willms - address_1: - description: Address line 1 - nullable: true - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - nullable: true - type: string - example: Suite 369 - city: - description: City - nullable: true - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - nullable: true - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - country: - description: A country object. - x-expandable: country - nullable: true - $ref: '#/components/schemas/Country' - province: - description: Province - nullable: true - type: string - example: Kentucky - postal_code: - description: Postal Code - nullable: true - type: string - example: 72093 - phone: - description: Phone Number - nullable: true - type: string - example: 16128234334802 - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - AddressCreatePayload: - type: object - description: Address fields used when creating an address. - required: - - first_name - - last_name - - address_1 - - city - - country_code - - postal_code - properties: - first_name: - description: First name - type: string - example: Arno - last_name: - description: Last name - type: string - example: Willms - phone: - type: string - description: Phone Number - example: 16128234334802 - company: - type: string - address_1: - description: Address line 1 - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - type: string - example: Suite 369 - city: - description: City - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - province: - description: Province - type: string - example: Kentucky - postal_code: - description: Postal Code - type: string - example: 72093 - metadata: - type: object - example: - car: white - description: An optional key-value map with additional details - AddressPayload: - type: object - description: Address fields used when creating/updating an address. - properties: - first_name: - description: First name - type: string - example: Arno - last_name: - description: Last name - type: string - example: Willms - phone: - type: string - description: Phone Number - example: 16128234334802 - company: - type: string - description: Company - address_1: - description: Address line 1 - type: string - example: 14433 Kemmer Court - address_2: - description: Address line 2 - type: string - example: Suite 369 - city: - description: City - type: string - example: South Geoffreyview - country_code: - description: The 2 character ISO code of the country in lower case - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - example: st - province: - description: Province - type: string - example: Kentucky - postal_code: - description: Postal Code - type: string - example: 72093 - metadata: - type: object - example: - car: white - description: An optional key-value map with additional details - BatchJob: - title: Batch Job - description: A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not. - type: object - required: - - canceled_at - - completed_at - - confirmed_at - - context - - created_at - - created_by - - deleted_at - - dry_run - - failed_at - - id - - pre_processed_at - - processing_at - - result - - status - - type - - updated_at - properties: - id: - description: The unique identifier for the batch job. - type: string - example: batch_01G8T782965PYFG0751G0Z38B4 - type: - description: The type of batch job. - type: string - enum: - - product-import - - product-export + oneOf: + - type: string + title: id + description: The product's ID. + - type: array + description: The product's ID. + items: + type: string + title: id + description: The id's ID. status: - description: The status of the batch job. + type: array + description: The product's status. + items: {} + title: type: string - enum: - - created - - pre_processed - - confirmed - - processing - - completed - - canceled - - failed - default: created - created_by: - description: The unique identifier of the user that created the batch job. - nullable: true + title: title + description: The product's title. + handle: type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - created_by_user: - description: The details of the user that created the batch job. - x-expandable: created_by_user - nullable: true - $ref: '#/components/schemas/User' - context: - description: The context of the batch job, the type of the batch job determines what the context should contain. - nullable: true - type: object - example: - shape: - prices: - - region: null - currency_code: eur - dynamicImageColumnCount: 4 - dynamicOptionColumnCount: 2 - list_config: - skip: 0 - take: 50 - order: - created_at: DESC - relations: - - variants - - variant.prices - - images - dry_run: - description: Specify if the job must apply the modifications or not. + title: handle + description: The product's handle. + is_giftcard: type: boolean - default: false - result: - description: The result of the batch job. - nullable: true - allOf: - - type: object - example: {} - - type: object - properties: - count: - type: number - advancement_count: - type: number - progress: - type: number - errors: - type: object - properties: - message: + title: is_giftcard + description: The product's is giftcard. + price_list_id: + type: array + description: The product's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The product's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The product's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The product's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The product's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The product's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The product's $and. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: + q: + type: string + title: q + description: The $and's q. + id: + oneOf: + - type: string + title: id + description: The $and's ID. + - type: array + description: The $and's ID. + items: type: string - code: + title: id + description: The id's ID. + status: + type: array + description: The $and's status. + items: {} + title: + type: string + title: title + description: The $and's title. + handle: + type: string + title: handle + description: The $and's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $and's is giftcard. + price_list_id: + type: array + description: The $and's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $and's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $and's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $and's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $and's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $and's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $and's details. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: + q: + type: string + title: q + description: The $and's q. + id: oneOf: - type: string - - type: number - err: + title: id + description: The $and's ID. + - type: array + description: The $and's ID. + items: + type: string + title: id + description: The id's ID. + status: type: array - stat_descriptors: + description: The $and's status. + items: {} + title: + type: string + title: title + description: The $and's title. + handle: + type: string + title: handle + description: The $and's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $and's is giftcard. + price_list_id: + type: array + description: The $and's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $and's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $and's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $and's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $and's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $and's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $and's details. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: {} + $or: + type: array + description: The $and's $or. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: {} + expand: + type: string + title: expand + description: The $and's expand. + fields: + type: string + title: fields + description: The $and's fields. + offset: + type: number + title: offset + description: The $and's offset. + limit: + type: number + title: limit + description: The $and's limit. + order: + type: string + title: order + description: The $and's order. + $or: + type: array + description: The $and's $or. + items: type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams properties: - key: + q: type: string - name: + title: q + description: The $or's q. + id: + oneOf: + - type: string + title: id + description: The $or's ID. + - type: array + description: The $or's ID. + items: + type: string + title: id + description: The id's ID. + status: + type: array + description: The $or's status. + items: {} + title: type: string - message: + title: title + description: The $or's title. + handle: type: string - file_key: + title: handle + description: The $or's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $or's is giftcard. + price_list_id: + type: array + description: The $or's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $or's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $or's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $or's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $or's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $or's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $or's $and. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: {} + $or: + type: array + description: The $or's details. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: {} + expand: + type: string + title: expand + description: The $or's expand. + fields: + type: string + title: fields + description: The $or's fields. + offset: + type: number + title: offset + description: The $or's offset. + limit: + type: number + title: limit + description: The $or's limit. + order: + type: string + title: order + description: The $or's order. + expand: + type: string + title: expand + description: The $and's expand. + fields: + type: string + title: fields + description: The $and's fields. + offset: + type: number + title: offset + description: The $and's offset. + limit: + type: number + title: limit + description: The $and's limit. + order: + type: string + title: order + description: The $and's order. + $or: + type: array + description: The product's $or. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: + q: + type: string + title: q + description: The $or's q. + id: + oneOf: + - type: string + title: id + description: The $or's ID. + - type: array + description: The $or's ID. + items: + type: string + title: id + description: The id's ID. + status: + type: array + description: The $or's status. + items: {} + title: + type: string + title: title + description: The $or's title. + handle: + type: string + title: handle + description: The $or's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $or's is giftcard. + price_list_id: + type: array + description: The $or's price list id. + items: type: string - file_size: - type: number - example: - errors: - - err: [] - code: unknown - message: Method not implemented. - stat_descriptors: - - key: product-export-count - name: Product count to export - message: There will be 8 products exported by this action - pre_processed_at: - description: The date from which the job has been pre-processed. - nullable: true + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $or's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $or's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $or's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $or's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $or's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $or's $and. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: + q: + type: string + title: q + description: The $and's q. + id: + oneOf: + - type: string + title: id + description: The $and's ID. + - type: array + description: The $and's ID. + items: + type: string + title: id + description: The id's ID. + status: + type: array + description: The $and's status. + items: {} + title: + type: string + title: title + description: The $and's title. + handle: + type: string + title: handle + description: The $and's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $and's is giftcard. + price_list_id: + type: array + description: The $and's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $and's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $and's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $and's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $and's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $and's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $and's details. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: {} + $or: + type: array + description: The $and's $or. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: {} + expand: + type: string + title: expand + description: The $and's expand. + fields: + type: string + title: fields + description: The $and's fields. + offset: + type: number + title: offset + description: The $and's offset. + limit: + type: number + title: limit + description: The $and's limit. + order: + type: string + title: order + description: The $and's order. + $or: + type: array + description: The $or's details. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: + q: + type: string + title: q + description: The $or's q. + id: + oneOf: + - type: string + title: id + description: The $or's ID. + - type: array + description: The $or's ID. + items: + type: string + title: id + description: The id's ID. + status: + type: array + description: The $or's status. + items: {} + title: + type: string + title: title + description: The $or's title. + handle: + type: string + title: handle + description: The $or's handle. + is_giftcard: + type: boolean + title: is_giftcard + description: The $or's is giftcard. + price_list_id: + type: array + description: The $or's price list id. + items: + type: string + title: price_list_id + description: The price list id's details. + sales_channel_id: + type: array + description: The $or's sales channel id. + items: + type: string + title: sales_channel_id + description: The sales channel id's details. + collection_id: + type: array + description: The $or's collection id. + items: + type: string + title: collection_id + description: The collection id's details. + tags: + type: array + description: The $or's tags. + items: + type: string + title: tags + description: The tag's tags. + type_id: + type: array + description: The $or's type id. + items: + type: string + title: type_id + description: The type id's details. + variants: + type: object + description: The $or's variants. + properties: {} + created_at: {} + updated_at: {} + deleted_at: {} + $and: + type: array + description: The $or's $and. + items: + type: object + description: The $and's details. + x-schemaName: AdminGetProductsParams + properties: {} + $or: + type: array + description: The $or's details. + items: + type: object + description: The $or's details. + x-schemaName: AdminGetProductsParams + properties: {} + expand: + type: string + title: expand + description: The $or's expand. + fields: + type: string + title: fields + description: The $or's fields. + offset: + type: number + title: offset + description: The $or's offset. + limit: + type: number + title: limit + description: The $or's limit. + order: + type: string + title: order + description: The $or's order. + expand: + type: string + title: expand + description: The $or's expand. + fields: + type: string + title: fields + description: The $or's fields. + offset: + type: number + title: offset + description: The $or's offset. + limit: + type: number + title: limit + description: The $or's limit. + order: + type: string + title: order + description: The $or's order. + expand: type: string - format: date-time - processing_at: - description: The date the job is processing at. - nullable: true + title: expand + description: The product's expand. + fields: type: string - format: date-time - confirmed_at: - description: The date when the confirmation has been done. - nullable: true - type: string - format: date-time - completed_at: - description: The date of the completion. - nullable: true - type: string - format: date-time - canceled_at: - description: The date of the concellation. - nullable: true - type: string - format: date-time - failed_at: - description: The date when the job failed. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was last updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - Cart: - title: Cart - description: A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim. - type: object - required: - - billing_address_id - - completed_at - - context - - created_at - - customer_id - - deleted_at - - email - - id - - idempotency_key - - metadata - - payment_authorized_at - - payment_id - - payment_session - - region_id - - shipping_address_id - - type - - updated_at - properties: - id: - description: The cart's ID - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - email: - description: The email associated with the cart - nullable: true - type: string - format: email - billing_address_id: - description: The billing address's ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the cart. - x-expandable: billing_address - nullable: true - $ref: '#/components/schemas/Address' - shipping_address_id: - description: The shipping address's ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address associated with the cart. - x-expandable: shipping_address - nullable: true - $ref: '#/components/schemas/Address' - items: - description: The line items added to the cart. - type: array - x-expandable: items - items: - $ref: '#/components/schemas/LineItem' - region_id: - description: The region's ID - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region associated with the cart. - x-expandable: region - nullable: true - $ref: '#/components/schemas/Region' - discounts: - description: An array of details of all discounts applied to the cart. - type: array - x-expandable: discounts - items: - $ref: '#/components/schemas/Discount' - gift_cards: - description: An array of details of all gift cards applied to the cart. - type: array - x-expandable: gift_cards - items: - $ref: '#/components/schemas/GiftCard' - customer_id: - description: The customer's ID - nullable: true - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer the cart belongs to. - x-expandable: customer - nullable: true - type: object - payment_session: - description: The details of the selected payment session in the cart. - x-expandable: payment_session - nullable: true - type: object - payment_sessions: - description: The details of all payment sessions created on the cart. - type: array - x-expandable: payment_sessions - items: - type: object - payment_id: - description: The payment's ID if available - nullable: true - type: string - example: pay_01G8ZCC5W42ZNY842124G7P5R9 - payment: - description: The details of the payment associated with the cart. - nullable: true - x-expandable: payment - type: object - shipping_methods: - description: The details of the shipping methods added to the cart. - type: array - x-expandable: shipping_methods - items: - $ref: '#/components/schemas/ShippingMethod' - type: - description: The cart's type. - type: string - enum: - - default - - swap - - draft_order - - payment_link - - claim - default: default - completed_at: - description: The date with timezone at which the cart was completed. - nullable: true - type: string - format: date-time - payment_authorized_at: - description: The date with timezone at which the payment was authorized. - nullable: true - type: string - format: date-time - idempotency_key: - description: Randomly generated key used to continue the completion of a cart in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - context: - description: The context of the cart which can include info like IP or user agent. - nullable: true - type: object - example: - ip: '::1' - user_agent: PostmanRuntime/7.29.2 - sales_channel_id: - description: The sales channel ID the cart is associated with. - nullable: true - type: string - example: null - sales_channel: - description: The details of the sales channel associated with the cart. - nullable: true - x-expandable: sales_channel - $ref: '#/components/schemas/SalesChannel' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - shipping_total: - description: The total of shipping - type: integer - example: 1000 - discount_total: - description: The total of discount rounded - type: integer - example: 800 - raw_discount_total: - description: The total of discount - type: integer - example: 800 - item_tax_total: - description: The total of items with taxes - type: integer - example: 8000 - shipping_tax_total: - description: The total of shipping with taxes - type: integer - example: 1000 - tax_total: - description: The total of tax - type: integer - example: 0 - refunded_total: - description: The total amount refunded if the order associated with this cart is returned. - type: integer - example: 0 - total: - description: The total amount of the cart - type: integer - example: 8200 - subtotal: - description: The subtotal of the cart - type: integer - example: 8000 - refundable_amount: - description: The amount that can be refunded - type: integer - example: 8200 - gift_card_total: - description: The total of gift cards - type: integer - example: 0 - gift_card_tax_total: - description: The total of gift cards with taxes - type: integer - example: 0 - sales_channels: - description: The associated sales channels. - type: array - nullable: true - x-expandable: sales_channels - items: - $ref: '#/components/schemas/SalesChannel' - ClaimImage: - title: Claim Image - description: The details of an image attached to a claim. - type: object - required: - - claim_item_id - - created_at - - deleted_at - - id - - metadata - - updated_at - - url - properties: - id: - description: The claim image's ID - type: string - example: cimg_01G8ZH853Y6TFXWPG5EYE81X63 - claim_item_id: - description: The ID of the claim item associated with the image - type: string - claim_item: - description: The details of the claim item this image is associated with. - nullable: true - x-expandable: claim_item - type: object - url: - description: The URL of the image - type: string - format: uri - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ClaimItem: - title: Claim Item - description: A claim item is an item created as part of a claim. It references an item in the order that should be exchanged or refunded. - type: object - required: - - claim_order_id - - created_at - - deleted_at - - id - - item_id - - metadata - - note - - quantity - - reason - - updated_at - - variant_id - properties: - id: - description: The claim item's ID - type: string - example: citm_01G8ZH853Y6TFXWPG5EYE81X63 - images: - description: The claim images that are attached to the claim item. - type: array - x-expandable: images - items: - $ref: '#/components/schemas/ClaimImage' - claim_order_id: - description: The ID of the claim this item is associated with. - type: string - claim_order: - description: The details of the claim this item belongs to. - x-expandable: claim_order - nullable: true - type: object - item_id: - description: The ID of the line item that the claim item refers to. - type: string - example: item_01G8ZM25TN49YV9EQBE2NC27KC - item: - description: The details of the line item in the original order that this claim item refers to. - x-expandable: item - nullable: true - $ref: '#/components/schemas/LineItem' - variant_id: - description: The ID of the product variant that is claimed. - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant to potentially replace the item in the original order. - x-expandable: variant - nullable: true - $ref: '#/components/schemas/ProductVariant' - reason: - description: The reason for the claim - type: string - enum: - - missing_item - - wrong_item - - production_failure - - other - note: - description: An optional note about the claim, for additional information - nullable: true - type: string - example: I don't like it. - quantity: - description: The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order. - type: integer - example: 1 - tags: - description: User defined tags for easy filtering and grouping. - type: array - x-expandable: tags - items: - $ref: '#/components/schemas/ClaimTag' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ClaimOrder: - title: Claim - description: A Claim represents a group of faulty or missing items. It consists of claim items that refer to items in the original order that should be replaced or refunded. It also includes details related to shipping and fulfillment. - type: object - required: - - canceled_at - - created_at - - deleted_at - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - order_id - - payment_status - - refund_amount - - shipping_address_id - - type - - updated_at - properties: - id: - description: The claim's ID - type: string - example: claim_01G8ZH853Y6TFXWPG5EYE81X63 - type: - description: The claim's type - type: string - enum: - - refund - - replace - payment_status: - description: The status of the claim's payment - type: string - enum: - - na - - not_refunded - - refunded - default: na - fulfillment_status: - description: The claim's fulfillment status - type: string - enum: - - not_fulfilled - - partially_fulfilled - - fulfilled - - partially_shipped - - shipped - - partially_returned - - returned - - canceled - - requires_action - default: not_fulfilled - claim_items: - description: The details of the items that should be replaced or refunded. - type: array - x-expandable: claim_items - items: - $ref: '#/components/schemas/ClaimItem' - additional_items: - description: The details of the new items to be shipped when the claim's type is `replace` - type: array - x-expandable: additional_items - items: - $ref: '#/components/schemas/LineItem' - order_id: - description: The ID of the order that the claim comes from. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + title: fields + description: The product's fields. + offset: + type: number + title: offset + description: The product's offset. + limit: + type: number + title: limit + description: The product's limit. order: - description: The details of the order that this claim was created for. - x-expandable: order - nullable: true - type: object - return_order: - description: The details of the return associated with the claim if the claim's type is `replace`. - x-expandable: return_order - nullable: true - type: object - shipping_address_id: - description: The ID of the address that the new items should be shipped to - nullable: true type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the address that new items should be shipped to. - x-expandable: shipping_address - nullable: true - $ref: '#/components/schemas/Address' - shipping_methods: - description: The details of the shipping methods that the claim order will be shipped with. + title: order + description: The product's order. + AdminGetPromotionsParams: + type: object + description: SUMMARY + x-schemaName: AdminGetPromotionsParams + properties: + code: + type: string + title: code + description: The promotion's code. + expand: + type: string + title: expand + description: The promotion's expand. + fields: + type: string + title: fields + description: The promotion's fields. + offset: + type: number + title: offset + description: The promotion's offset. + limit: + type: number + title: limit + description: The promotion's limit. + order: + type: string + title: order + description: The promotion's order. + AdminPostCampaignsReq: + type: object + description: The promotion's campaign. + x-schemaName: AdminPostCampaignsReq + required: + - name + properties: + name: + type: string + title: name + description: The campaign's name. + campaign_identifier: + type: string + title: campaign_identifier + description: The campaign's campaign identifier. + description: + type: string + title: description + description: The campaign's description. + currency: + type: string + title: currency + description: The campaign's currency. + budget: + $ref: '#/components/schemas/CampaignBudget' + starts_at: + type: string + title: starts_at + description: The campaign's starts at. + ends_at: + type: string + title: ends_at + description: The campaign's ends at. + promotions: type: array - x-expandable: shipping_methods - items: - $ref: '#/components/schemas/ShippingMethod' - fulfillments: - description: The fulfillments of the new items to be shipped - type: array - x-expandable: fulfillments + description: The campaign's promotions. items: type: object - refund_amount: - description: The amount that will be refunded in conjunction with the claim - nullable: true - type: integer - example: 1000 - canceled_at: - description: The date with timezone at which the claim was canceled. - nullable: true + description: The promotion's promotions. + x-schemaName: IdObject + required: + - id + properties: + id: + type: string + title: id + description: The promotion's ID. + AdminPostCustomerGroupsGroupCustomersBatchReq: + type: object + description: SUMMARY + x-schemaName: AdminPostCustomerGroupsGroupCustomersBatchReq + required: + - customer_ids + properties: + customer_ids: + type: array + description: The customer group's customer ids. + items: + type: object + description: The customer id's customer ids. + x-schemaName: CustomerGroupsBatchCustomer + required: + - id + properties: + id: + type: string + title: id + description: The customer id's ID. + AdminPostFulfillmentShippingOptionsRulesBatchAddReq: + type: object + description: SUMMARY + x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchAddReq + required: + - rules + properties: + rules: + type: array + description: The fulfillment's rules. + items: + type: object + description: The rule's rules. + x-schemaName: FulfillmentRuleCreate + required: + - operator + - attribute + - value + properties: + operator: {} + attribute: + type: string + title: attribute + description: The rule's attribute. + value: + oneOf: + - type: string + title: value + description: The rule's value. + - type: array + description: The rule's value. + items: + type: string + title: value + description: The value's details. + AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq: + type: object + description: SUMMARY + x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq + required: + - rule_ids + properties: + rule_ids: + type: array + description: The fulfillment's rule ids. + items: + type: string + title: rule_ids + description: The rule id's rule ids. + AdminPostInventoryItemsInventoryItemReq: + type: object + description: SUMMARY + x-schemaName: AdminPostInventoryItemsInventoryItemReq + properties: + sku: type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. + title: sku + description: The inventory item's sku. + origin_country: type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. + title: origin_country + description: The inventory item's origin country. + hs_code: type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true + title: hs_code + description: The inventory item's hs code. + mid_code: type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - no_notification: - description: Flag for describing whether or not notifications related to this should be send. - nullable: true + title: mid_code + description: The inventory item's mid code. + material: + type: string + title: material + description: The inventory item's material. + weight: + type: number + title: weight + description: The inventory item's weight. + height: + type: number + title: height + description: The inventory item's height. + length: + type: number + title: length + description: The inventory item's length. + width: + type: number + title: width + description: The inventory item's width. + title: + type: string + title: title + description: The inventory item's title. + description: + type: string + title: description + description: The inventory item's description. + thumbnail: + type: string + title: thumbnail + description: The inventory item's thumbnail. + requires_shipping: type: boolean - example: false - idempotency_key: - description: Randomly generated key used to continue the completion of the cart associated with the claim in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - ClaimTag: - title: Claim Tag - description: Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping. + title: requires_shipping + description: The inventory item's requires shipping. + AdminPostInventoryItemsItemLocationLevelsLevelReq: type: object - required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value + description: SUMMARY + x-schemaName: AdminPostInventoryItemsItemLocationLevelsLevelReq properties: - id: - description: The claim tag's ID + incoming_quantity: + type: number + title: incoming_quantity + description: The inventory item's incoming quantity. + stocked_quantity: + type: number + title: stocked_quantity + description: The inventory item's stocked quantity. + AdminPostInventoryItemsItemLocationLevelsReq: + type: object + description: SUMMARY + x-schemaName: AdminPostInventoryItemsItemLocationLevelsReq + required: + - location_id + - stocked_quantity + properties: + location_id: type: string - example: ctag_01G8ZCC5Y63B95V6B5SHBZ91S4 - value: - description: The value that the claim tag holds + title: location_id + description: The inventory item's location id. + stocked_quantity: + type: number + title: stocked_quantity + description: The inventory item's stocked quantity. + incoming_quantity: + type: number + title: incoming_quantity + description: The inventory item's incoming quantity. + AdminPostInventoryItemsReq: + type: object + description: SUMMARY + x-schemaName: AdminPostInventoryItemsReq + properties: + sku: type: string - example: Damaged - created_at: - description: The date with timezone at which the resource was created. + title: sku + description: The inventory item's sku. + hs_code: type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. + title: hs_code + description: The inventory item's hs code. + weight: + type: number + title: weight + description: The inventory item's weight. + length: + type: number + title: length + description: The inventory item's length. + height: + type: number + title: height + description: The inventory item's height. + width: + type: number + title: width + description: The inventory item's width. + origin_country: type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true + title: origin_country + description: The inventory item's origin country. + mid_code: type: string - format: date-time + title: mid_code + description: The inventory item's mid code. + material: + type: string + title: material + description: The inventory item's material. + title: + type: string + title: title + description: The inventory item's title. + description: + type: string + title: description + description: The inventory item's description. + thumbnail: + type: string + title: thumbnail + description: The inventory item's thumbnail. metadata: - description: An optional key-value map with additional details - nullable: true type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - Country: - title: Country - description: Country details + description: The inventory item's metadata. + properties: {} + AdminPostInvitesInviteAcceptReq: type: object + description: SUMMARY + x-schemaName: AdminPostInvitesInviteAcceptReq required: - - display_name - - id - - iso_2 - - iso_3 - - name - - num_code - - region_id + - first_name + - last_name properties: - id: - description: The country's ID + first_name: type: string - example: 109 - iso_2: - description: The 2 character ISO code of the country in lower case + title: first_name + description: The invite's first name. + last_name: type: string - example: it - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - iso_3: - description: The 2 character ISO code of the country in lower case - type: string - example: ita - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements - description: See a list of codes. - num_code: - description: The numerical ISO code for the country. - type: string - example: 380 - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_numeric#Officially_assigned_code_elements - description: See a list of codes. - name: - description: The normalized country name in upper case. - type: string - example: ITALY - display_name: - description: The country name appropriate for display. - type: string - example: Italy - region_id: - description: The region ID this country is associated with. - nullable: true - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region the country is associated with. - x-expandable: region - nullable: true - type: object - CreateStockLocationInput: - title: Create Stock Location Input - description: Represents the Input to create a Stock Location + title: last_name + description: The invite's last name. + AdminPostPaymentsCapturesReq: type: object + description: SUMMARY + x-schemaName: AdminPostPaymentsCapturesReq + properties: + amount: + type: number + title: amount + description: The payment's amount. + AdminPostPaymentsRefundsReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPaymentsRefundsReq + properties: + amount: + type: number + title: amount + description: The payment's amount. + AdminPostPriceListsPriceListPricesBatchAddReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPriceListsPriceListPricesBatchAddReq + required: + - prices + properties: + prices: + type: array + description: The price list's prices. + items: + type: object + description: The price's prices. + x-schemaName: AdminPriceListPricesCreateReq + required: + - currency_code + - amount + - variant_id + properties: + currency_code: + type: string + title: currency_code + description: The price's currency code. + amount: + type: number + title: amount + description: The price's amount. + variant_id: + type: string + title: variant_id + description: The price's variant id. + min_quantity: + type: number + title: min_quantity + description: The price's min quantity. + max_quantity: + type: number + title: max_quantity + description: The price's max quantity. + rules: + type: object + description: The price's rules. + properties: {} + AdminPostPriceListsPriceListPricesBatchRemoveReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPriceListsPriceListPricesBatchRemoveReq + required: + - ids + properties: + ids: + type: array + description: The price list's ids. + items: + type: string + title: ids + description: The id's ids. + AdminPostPriceListsPriceListReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPriceListsPriceListReq + required: + - prices + properties: + title: + type: string + title: title + description: The price list's title. + description: + type: string + title: description + description: The price list's description. + starts_at: + type: string + title: starts_at + description: The price list's starts at. + ends_at: + type: string + title: ends_at + description: The price list's ends at. + status: {} + type: {} + prices: + type: array + description: The price list's prices. + items: + type: object + description: The price's prices. + x-schemaName: AdminPriceListPricesCreateReq + required: + - currency_code + - amount + - variant_id + properties: + currency_code: + type: string + title: currency_code + description: The price's currency code. + amount: + type: number + title: amount + description: The price's amount. + variant_id: + type: string + title: variant_id + description: The price's variant id. + min_quantity: + type: number + title: min_quantity + description: The price's min quantity. + max_quantity: + type: number + title: max_quantity + description: The price's max quantity. + rules: + type: object + description: The price's rules. + properties: {} + rules: + type: object + description: The price list's rules. + properties: {} + AdminPostPriceListsReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPriceListsReq + required: + - title + - description + - type + - prices + properties: + title: + type: string + title: title + description: The price list's title. + description: + type: string + title: description + description: The price list's description. + starts_at: + type: string + title: starts_at + description: The price list's starts at. + ends_at: + type: string + title: ends_at + description: The price list's ends at. + status: {} + type: {} + prices: + type: array + description: The price list's prices. + items: + type: object + description: The price's prices. + x-schemaName: AdminPriceListPricesCreateReq + required: + - currency_code + - amount + - variant_id + properties: + currency_code: + type: string + title: currency_code + description: The price's currency code. + amount: + type: number + title: amount + description: The price's amount. + variant_id: + type: string + title: variant_id + description: The price's variant id. + min_quantity: + type: number + title: min_quantity + description: The price's min quantity. + max_quantity: + type: number + title: max_quantity + description: The price's max quantity. + rules: + type: object + description: The price's rules. + properties: {} + rules: + type: object + description: The price list's rules. + properties: {} + AdminPostPricingRuleTypesReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPricingRuleTypesReq + required: + - name + - rule_attribute + - default_priority + properties: + name: + type: string + title: name + description: The pricing's name. + rule_attribute: + type: string + title: rule_attribute + description: The pricing's rule attribute. + default_priority: + type: number + title: default_priority + description: The pricing's default priority. + AdminPostPricingRuleTypesRuleTypeReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPricingRuleTypesRuleTypeReq + properties: + name: + type: string + title: name + description: The pricing's name. + rule_attribute: + type: string + title: rule_attribute + description: The pricing's rule attribute. + default_priority: + type: number + title: default_priority + description: The pricing's default priority. + AdminPostPromotionsPromotionReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPromotionsPromotionReq + properties: + code: + type: string + title: code + description: The promotion's code. + is_automatic: + type: boolean + title: is_automatic + description: The promotion's is automatic. + type: {} + campaign_id: + type: string + title: campaign_id + description: The promotion's campaign id. + campaign: + $ref: '#/components/schemas/AdminPostCampaignsReq' + application_method: + $ref: '#/components/schemas/ApplicationMethodsMethodPostReq' + rules: + type: array + description: The promotion's rules. + items: + type: object + description: The rule's rules. + x-schemaName: PromotionRule + required: + - operator + - attribute + - values + properties: + operator: {} + description: + type: string + title: description + description: The rule's description. + attribute: + type: string + title: attribute + description: The rule's attribute. + values: + type: array + description: The rule's values. + items: + type: string + title: values + description: The value's values. + AdminPostPromotionsPromotionRulesBatchAddReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPromotionsPromotionRulesBatchAddReq + required: + - rules + properties: + rules: + type: array + description: The promotion's rules. + items: + type: object + description: The rule's rules. + x-schemaName: PromotionRule + required: + - operator + - attribute + - values + properties: + operator: {} + description: + type: string + title: description + description: The rule's description. + attribute: + type: string + title: attribute + description: The rule's attribute. + values: + type: array + description: The rule's values. + items: + type: string + title: values + description: The value's values. + AdminPostPromotionsPromotionRulesBatchRemoveReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPromotionsPromotionRulesBatchRemoveReq + required: + - rule_ids + properties: + rule_ids: + type: array + description: The promotion's rule ids. + items: + type: string + title: rule_ids + description: The rule id's rule ids. + AdminPostPromotionsPromotionRulesBatchUpdateReq: + type: object + description: SUMMARY + x-schemaName: AdminPostPromotionsPromotionRulesBatchUpdateReq + required: + - rules + properties: + rules: + type: array + description: The promotion's rules. + items: + type: object + description: The rule's rules. + x-schemaName: UpdatePromotionRule + required: + - id + - attribute + - values + properties: + id: + type: string + title: id + description: The rule's ID. + operator: {} + description: + type: string + title: description + description: The rule's description. + attribute: + type: string + title: attribute + description: The rule's attribute. + values: + type: array + description: The rule's values. + items: + type: string + title: values + description: The value's values. + AdminPostStockLocationsReq: + type: object + description: SUMMARY + x-schemaName: AdminPostStockLocationsReq required: - name properties: name: type: string - description: The stock location name + title: name + description: The stock location's name. + address: + $ref: '#/components/schemas/StockLocationAddress' address_id: type: string - description: The Stock location address ID - address: - description: Stock location address object - allOf: - - $ref: '#/components/schemas/StockLocationAddressInput' - - type: object + title: address_id + description: The stock location's address id. metadata: type: object - description: An optional key-value map with additional details - example: - car: white - Currency: - title: Currency - description: Currency + description: The stock location's metadata. + properties: {} + AdminPostTaxRatesReq: type: object + description: SUMMARY + x-schemaName: AdminPostTaxRatesReq required: - - code - name - - symbol - - symbol_native + - tax_region_id + properties: + rate: + type: number + title: rate + description: The tax rate's rate. + code: + type: string + title: code + description: The tax rate's code. + rules: + type: array + description: The tax rate's rules. + items: + type: object + description: The rule's rules. + x-schemaName: CreateTaxRateRule + required: + - reference + - reference_id + properties: + reference: + type: string + title: reference + description: The rule's reference. + reference_id: + type: string + title: reference_id + description: The rule's reference id. + name: + type: string + title: name + description: The tax rate's name. + is_default: + type: boolean + title: is_default + description: The tax rate's is default. + is_combinable: + type: boolean + title: is_combinable + description: The tax rate's is combinable. + tax_region_id: + type: string + title: tax_region_id + description: The tax rate's tax region id. + metadata: + type: object + description: The tax rate's metadata. + properties: {} + AdminPostTaxRatesTaxRateReq: + type: object + description: SUMMARY + x-schemaName: AdminPostTaxRatesTaxRateReq properties: code: - description: The 3 character ISO code for the currency. type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - symbol: - description: The symbol used to indicate the currency. - type: string - example: $ - symbol_native: - description: The native symbol used to indicate the currency. - type: string - example: $ + title: code + description: The tax rate's code. name: - description: The written name of the currency type: string - example: US Dollar - includes_tax: - description: Whether the currency prices include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - CustomShippingOption: - title: Custom Shipping Option - description: Custom Shipping Options are overridden Shipping Options. Admins can attach a Custom Shipping Option to a cart in order to set a custom price for a particular Shipping Option. - type: object - required: - - cart_id - - created_at - - deleted_at - - id - - metadata - - price - - shipping_option_id - - updated_at - properties: - id: - description: The custom shipping option's ID + title: name + description: The tax rate's name. + region_id: type: string - example: cso_01G8X99XNB77DMFBJFWX6DN9V9 - price: - description: The custom price set that will override the shipping option's original price - type: integer - example: 1000 - shipping_option_id: - description: The ID of the Shipping Option that the custom shipping option overrides - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the overridden shipping options. - x-expandable: shipping_option - nullable: true - $ref: '#/components/schemas/ShippingOption' - cart_id: - description: The ID of the Cart that the custom shipping option is attached to - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart this shipping option belongs to. - x-expandable: cart - nullable: true - $ref: '#/components/schemas/Cart' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - Customer: - title: Customer - description: A customer can make purchases in your store and manage their profile. - type: object - required: - - billing_address_id - - created_at - - deleted_at - - email - - first_name - - has_account - - id - - last_name - - metadata - - phone - - updated_at - properties: - id: - description: The customer's ID - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - email: - description: The customer's email - type: string - format: email - first_name: - description: The customer's first name - nullable: true - type: string - example: Arno - last_name: - description: The customer's last name - nullable: true - type: string - example: Willms - billing_address_id: - description: The customer's billing address ID - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the customer. - x-expandable: billing_address - nullable: true - $ref: '#/components/schemas/Address' - shipping_addresses: - description: The details of the shipping addresses associated with the customer. - type: array - x-expandable: shipping_addresses - items: - $ref: '#/components/schemas/Address' - phone: - description: The customer's phone number - nullable: true - type: string - example: 16128234334802 - has_account: - description: Whether the customer has an account or not - type: boolean - default: false - orders: - description: The details of the orders this customer placed. - type: array - x-expandable: orders - items: - type: object - groups: - description: The customer groups the customer belongs to. - type: array - x-expandable: groups - items: - $ref: '#/components/schemas/CustomerGroup' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - CustomerGroup: - title: Customer Group - description: A customer group that can be used to organize customers into groups of similar traits. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - name - - updated_at - properties: - id: - description: The customer group's ID - type: string - example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63 - name: - description: The name of the customer group - type: string - example: VIP - customers: - description: The details of the customers that belong to the customer group. - type: array - x-expandable: customers - items: - type: object - price_lists: - description: The price lists that are associated with the customer group. - type: array - x-expandable: price_lists - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - Discount: - title: Discount - description: A discount can be applied to a cart for promotional purposes. - type: object - required: - - code - - created_at - - deleted_at - - ends_at - - id - - is_disabled - - is_dynamic - - metadata - - parent_discount_id - - rule_id - - starts_at - - updated_at - - usage_count - - usage_limit - - valid_duration - properties: - id: - description: The discount's ID - type: string - example: disc_01F0YESMW10MGHWJKZSDDMN0VN - code: - description: A unique code for the discount - this will be used by the customer to apply the discount - type: string - example: 10DISC - is_dynamic: - description: A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts - type: boolean - example: false - rule_id: - description: The ID of the discount rule that defines how the discount will be applied to a cart. - nullable: true - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - rule: - description: The details of the discount rule that defines how the discount will be applied to a cart.. - x-expandable: rule - nullable: true - $ref: '#/components/schemas/DiscountRule' - is_disabled: - description: Whether the Discount has been disabled. Disabled discounts cannot be applied to carts - type: boolean - example: false - parent_discount_id: - description: The Discount that the discount was created from. This will always be a dynamic discount - nullable: true - type: string - example: disc_01G8ZH853YPY9B94857DY91YGW - parent_discount: - description: The details of the parent discount that this discount was created from. - x-expandable: parent_discount - nullable: true - type: object - starts_at: - description: The time at which the discount can be used. - type: string - format: date-time - ends_at: - description: The time at which the discount can no longer be used. - nullable: true - type: string - format: date-time - valid_duration: - description: Duration the discount runs between - nullable: true - type: string - example: P3Y6M4DT12H30M5S - regions: - description: The details of the regions in which the Discount can be used. - type: array - x-expandable: regions - items: - $ref: '#/components/schemas/Region' - usage_limit: - description: The maximum number of times that a discount can be used. - nullable: true - type: integer - example: 100 - usage_count: - description: The number of times a discount has been used. - type: integer - example: 50 - default: 0 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountCondition: - title: Discount Condition - description: Holds rule conditions for when a discount is applicable - type: object - required: - - created_at - - deleted_at - - discount_rule_id - - id - - metadata - - operator - - type - - updated_at - properties: - id: - description: The discount condition's ID - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - type: - description: The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty. - type: string - enum: - - products - - product_types - - product_collections - - product_tags - - customer_groups - operator: - description: The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not_in` indicates that discountable resources are everything but the specified resources. - type: string - enum: - - in - - not_in - discount_rule_id: - description: The ID of the discount rule associated with the condition - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - discount_rule: - description: The details of the discount rule associated with the condition. - x-expandable: discount_rule - nullable: true - $ref: '#/components/schemas/DiscountRule' + title: region_id + description: The tax rate's region id. + rate: + type: number + title: rate + description: The tax rate's rate. products: - description: products associated with this condition if `type` is `products`. type: array - x-expandable: products + description: The tax rate's products. items: - $ref: '#/components/schemas/Product' + type: string + title: products + description: The product's products. + shipping_options: + type: array + description: The tax rate's shipping options. + items: + type: string + title: shipping_options + description: The shipping option's shipping options. product_types: - description: Product types associated with this condition if `type` is `product_types`. type: array - x-expandable: product_types + description: The tax rate's product types. items: - $ref: '#/components/schemas/ProductType' - product_tags: - description: Product tags associated with this condition if `type` is `product_tags`. - type: array - x-expandable: product_tags - items: - $ref: '#/components/schemas/ProductTag' - product_collections: - description: Product collections associated with this condition if `type` is `product_collections`. - type: array - x-expandable: product_collections - items: - $ref: '#/components/schemas/ProductCollection' - customer_groups: - description: Customer groups associated with this condition if `type` is `customer_groups`. - type: array - x-expandable: customer_groups - items: - $ref: '#/components/schemas/CustomerGroup' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountConditionCustomerGroup: - title: Product Tag Discount Condition - description: Associates a discount condition with a customer group + type: string + title: product_types + description: The product type's product types. + AdminPostTaxRatesTaxRateRulesReq: type: object + description: SUMMARY + x-schemaName: AdminPostTaxRatesTaxRateRulesReq required: - - condition_id - - created_at - - customer_group_id - - metadata - - updated_at + - reference + - reference_id properties: - customer_group_id: - description: The ID of the Product Tag + reference: type: string - example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63 - condition_id: - description: The ID of the Discount Condition + title: reference + description: The tax rate's reference. + reference_id: type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - customer_group: - description: Available if the relation `customer_group` is expanded. - nullable: true - $ref: '#/components/schemas/CustomerGroup' - discount_condition: - description: Available if the relation `discount_condition` is expanded. - nullable: true - $ref: '#/components/schemas/DiscountCondition' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountConditionProduct: - title: Product Discount Condition - description: This represents the association between a discount condition and a product + title: reference_id + description: The tax rate's reference id. + AdminPostTaxRegionsReq: type: object + description: SUMMARY + x-schemaName: AdminPostTaxRegionsReq required: - - condition_id - - created_at - - metadata - - product_id - - updated_at + - country_code properties: - product_id: - description: The ID of the Product Tag + country_code: type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - condition_id: - description: The ID of the Discount Condition + title: country_code + description: The tax region's country code. + province_code: type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product: - description: The details of the product. - x-expandable: product - nullable: true - $ref: '#/components/schemas/Product' - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: '#/components/schemas/DiscountCondition' - created_at: - description: The date with timezone at which the resource was created. + title: province_code + description: The tax region's province code. + parent_id: type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time + title: parent_id + description: The tax region's parent id. + default_tax_rate: + $ref: '#/components/schemas/CreateDefaultTaxRate' metadata: - description: An optional key-value map with additional details - nullable: true type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountConditionProductCollection: - title: Product Collection Discount Condition - description: This represents the association between a discount condition and a product collection + description: The tax region's metadata. + properties: {} + AdminPostWorkflowsAsyncResponseReq: type: object + description: SUMMARY + x-schemaName: AdminPostWorkflowsAsyncResponseReq required: - - condition_id - - created_at - - metadata - - product_collection_id - - updated_at + - transaction_id + - step_id properties: - product_collection_id: - description: The ID of the Product Collection + transaction_id: type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - condition_id: - description: The ID of the Discount Condition + title: transaction_id + description: The workflows execution's transaction id. + step_id: type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_collection: - description: The details of the product collection. - x-expandable: product_collection - nullable: true - $ref: '#/components/schemas/ProductCollection' - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: '#/components/schemas/DiscountCondition' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountConditionProductTag: - title: Product Tag Discount Condition - description: This represents the association between a discount condition and a product tag + title: step_id + description: The workflows execution's step id. + response: {} + compensate_input: {} + action: {} + AdminPostWorkflowsRunReq: type: object - required: - - condition_id - - created_at - - metadata - - product_tag_id - - updated_at + description: SUMMARY + x-schemaName: AdminPostWorkflowsRunReq properties: - product_tag_id: - description: The ID of the Product Tag + input: {} + transaction_id: type: string - example: ptag_01F0YESHPZYY3H4SJ3A5918SBN - condition_id: - description: The ID of the Discount Condition - type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_tag: - description: The details of the product tag. - x-expandable: product_tag - nullable: true - $ref: '#/components/schemas/ProductTag' - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: '#/components/schemas/DiscountCondition' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountConditionProductType: - title: Product Type Discount Condition - description: This represents the association between a discount condition and a product type + title: transaction_id + description: The workflows execution's transaction id. + AdminUpdateUserRequest: type: object + description: SUMMARY + x-schemaName: AdminUpdateUserRequest required: - - condition_id - - created_at - - metadata - - product_type_id - - updated_at + - avatar_url properties: - product_type_id: - description: The ID of the Product Tag + first_name: type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - condition_id: - description: The ID of the Discount Condition + title: first_name + description: The user's first name. + last_name: type: string - example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A - product_type: - description: The details of the product type. - x-expandable: product_type - nullable: true - $ref: '#/components/schemas/ProductType' - discount_condition: - description: The details of the discount condition. - x-expandable: discount_condition - nullable: true - $ref: '#/components/schemas/DiscountCondition' - created_at: - description: The date with timezone at which the resource was created. + title: last_name + description: The user's last name. + avatar_url: type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DiscountRule: - title: Discount Rule - description: A discount rule defines how a Discount is calculated when applied to a Cart. + title: avatar_url + description: The user's avatar url. + ApplicationMethodsMethodPostReq: type: object - required: - - allocation - - created_at - - deleted_at - - description - - id - - metadata - - type - - updated_at - - value + description: The promotion's application method. + x-schemaName: ApplicationMethodsMethodPostReq properties: - id: - description: The discount rule's ID - type: string - example: dru_01F0YESMVK96HVX7N419E3CJ7C - type: - description: The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers. - type: string - enum: - - fixed - - percentage - - free_shipping - example: percentage description: - description: A short description of the discount - nullable: true type: string - example: 10 Percent + title: description + description: The application method's description. value: - description: The value that the discount represents; this will depend on the type of the discount - type: integer - example: 10 - allocation: - description: The scope that the discount should apply to. - nullable: true type: string - enum: - - total - - item - example: total - conditions: - description: The details of the discount conditions associated with the rule. They can be used to limit when the discount can be used. + title: value + description: The application method's value. + max_quantity: + type: number + title: max_quantity + description: The application method's max quantity. + type: {} + target_type: {} + allocation: {} + target_rules: type: array - x-expandable: conditions + description: The application method's target rules. items: type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - DraftOrder: - title: DraftOrder - description: A draft order is created by an admin without direct involvement of the customer. Once its payment is marked as captured, it is transformed into an order. + description: The target rule's target rules. + x-schemaName: PromotionRule + required: + - operator + - attribute + - values + properties: + operator: {} + description: + type: string + title: description + description: The target rule's description. + attribute: + type: string + title: attribute + description: The target rule's attribute. + values: + type: array + description: The target rule's values. + items: + type: string + title: values + description: The value's values. + buy_rules: + type: array + description: The application method's buy rules. + items: + type: object + description: The buy rule's buy rules. + x-schemaName: PromotionRule + required: + - operator + - attribute + - values + properties: + operator: {} + description: + type: string + title: description + description: The buy rule's description. + attribute: + type: string + title: attribute + description: The buy rule's attribute. + values: + type: array + description: The buy rule's values. + items: + type: string + title: values + description: The value's values. + apply_to_quantity: + type: number + title: apply_to_quantity + description: The application method's apply to quantity. + buy_rules_min_quantity: + type: number + title: buy_rules_min_quantity + description: The application method's buy rules min quantity. + CampaignBudget: type: object - required: - - canceled_at - - cart_id - - completed_at - - created_at - - display_id - - id - - idempotency_key - - metadata - - no_notification_order - - order_id - - status - - updated_at + description: The campaign's budget. + x-schemaName: CampaignBudget properties: - id: - description: The draft order's ID + type: {} + limit: + type: number + title: limit + description: The budget's limit. + CreateDefaultTaxRate: + type: object + description: The tax region's default tax rate. + x-schemaName: CreateDefaultTaxRate + required: + - name + properties: + rate: + type: number + title: rate + description: The default tax rate's rate. + code: type: string - example: dorder_01G8TJFKBG38YYFQ035MSVG03C - status: - description: The status of the draft order. It's changed to `completed` when it's transformed to an order. + title: code + description: The default tax rate's code. + name: type: string - enum: - - open - - completed - default: open - display_id: - description: The draft order's display ID - type: string - example: 2 - cart_id: - description: The ID of the cart associated with the draft order. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart associated with the draft order. - x-expandable: cart - nullable: true - type: object - order_id: - description: The ID of the order created from the draft order when its payment is captured. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order created from the draft order when its payment is captured. - x-expandable: order - nullable: true - type: object - canceled_at: - description: The date the draft order was canceled at. - nullable: true - type: string - format: date-time - completed_at: - description: The date the draft order was completed at. - nullable: true - type: string - format: date-time - no_notification_order: - description: Whether to send the customer notifications regarding order updates. - nullable: true - type: boolean - example: false - idempotency_key: - description: Randomly generated key used to continue the completion of the cart associated with the draft order in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time + title: name + description: The default tax rate's name. metadata: - description: An optional key-value map with additional details - nullable: true type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute + description: The default tax rate's metadata. + properties: {} Error: title: Response Error type: object @@ -8126,1078 +2918,6 @@ components: - unexpected_state - invalid_argument - unknown_error - ExtendedStoreDTO: - allOf: - - $ref: '#/components/schemas/Store' - - type: object - required: - - payment_providers - - fulfillment_providers - - feature_flags - - modules - properties: - payment_providers: - description: The store's payment providers. - $ref: '#/components/schemas/PaymentProvider' - fulfillment_providers: - description: The store's fulfillment providers. - $ref: '#/components/schemas/FulfillmentProvider' - feature_flags: - description: The feature flags enabled in the store's backend. - $ref: '#/components/schemas/FeatureFlagsResponse' - modules: - description: The modules installed in the store's backend. - $ref: '#/components/schemas/ModulesResponse' - FeatureFlagsResponse: - type: array - items: - type: object - required: - - key - - value - properties: - key: - description: The key of the feature flag. - type: string - value: - description: The value of the feature flag. - type: boolean - Fulfillment: - title: Fulfillment - description: A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns. - type: object - required: - - canceled_at - - claim_order_id - - created_at - - data - - id - - idempotency_key - - location_id - - metadata - - no_notification - - order_id - - provider_id - - shipped_at - - swap_id - - tracking_numbers - - updated_at - properties: - id: - description: The fulfillment's ID - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - claim_order_id: - description: The ID of the Claim that the Fulfillment belongs to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the fulfillment may belong to. - x-expandable: claim_order - nullable: true - type: object - swap_id: - description: The ID of the Swap that the Fulfillment belongs to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the fulfillment may belong to. - x-expandable: swap - nullable: true - type: object - order_id: - description: The ID of the Order that the Fulfillment belongs to. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the fulfillment may belong to. - x-expandable: order - nullable: true - type: object - provider_id: - description: The ID of the Fulfillment Provider responsible for handling the fulfillment. - type: string - example: manual - provider: - description: The details of the fulfillment provider responsible for handling the fulfillment. - x-expandable: provider - nullable: true - $ref: '#/components/schemas/FulfillmentProvider' - location_id: - description: The ID of the stock location the fulfillment will be shipped from - nullable: true - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK - items: - description: The Fulfillment Items in the Fulfillment. These hold information about how many of each Line Item has been fulfilled. - type: array - x-expandable: items - items: - $ref: '#/components/schemas/FulfillmentItem' - tracking_links: - description: The Tracking Links that can be used to track the status of the Fulfillment. These will usually be provided by the Fulfillment Provider. - type: array - x-expandable: tracking_links - items: - $ref: '#/components/schemas/TrackingLink' - tracking_numbers: - description: The tracking numbers that can be used to track the status of the fulfillment. - deprecated: true - type: array - items: - type: string - data: - description: This contains all the data necessary for the Fulfillment provider to handle the fulfillment. - type: object - example: {} - shipped_at: - description: The date with timezone at which the Fulfillment was shipped. - nullable: true - type: string - format: date-time - no_notification: - description: Flag for describing whether or not notifications related to this should be sent. - nullable: true - type: boolean - example: false - canceled_at: - description: The date with timezone at which the Fulfillment was canceled. - nullable: true - type: string - format: date-time - idempotency_key: - description: Randomly generated key used to continue the completion of the fulfillment in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - FulfillmentItem: - title: Fulfillment Item - description: This represents the association between a Line Item and a Fulfillment. - type: object - required: - - fulfillment_id - - item_id - - quantity - properties: - fulfillment_id: - description: The ID of the Fulfillment that the Fulfillment Item belongs to. - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - item_id: - description: The ID of the Line Item that the Fulfillment Item references. - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - fulfillment: - description: The details of the fulfillment. - x-expandable: fulfillment - nullable: true - type: object - item: - description: The details of the line item. - x-expandable: item - nullable: true - $ref: '#/components/schemas/LineItem' - quantity: - description: The quantity of the Line Item that is included in the Fulfillment. - type: integer - example: 1 - FulfillmentProvider: - title: Fulfillment Provider - description: A fulfillment provider represents a fulfillment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the fulfillment service's installation status. - type: object - required: - - id - - is_installed - properties: - id: - description: The ID of the fulfillment provider as given by the fulfillment service. - type: string - example: manual - is_installed: - description: Whether the fulfillment service is installed in the current version. If a fulfillment service is no longer installed, the `is_installed` attribute is set to `false`. - type: boolean - default: true - GiftCard: - title: Gift Card - description: Gift Cards are redeemable and represent a value that can be used towards the payment of an Order. - type: object - required: - - balance - - code - - created_at - - deleted_at - - ends_at - - id - - is_disabled - - metadata - - order_id - - region_id - - tax_rate - - updated_at - - value - properties: - id: - description: The gift card's ID - type: string - example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ - code: - description: The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card. - type: string - example: 3RFT-MH2C-Y4YZ-XMN4 - value: - description: The value that the Gift Card represents. - type: integer - example: 10 - balance: - description: The remaining value on the Gift Card. - type: integer - example: 10 - region_id: - description: The ID of the region this gift card is available in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this gift card is available in. - x-expandable: region - nullable: true - $ref: '#/components/schemas/Region' - order_id: - description: The ID of the order that the gift card was purchased in. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the gift card was purchased in. - x-expandable: region - nullable: true - type: object - is_disabled: - description: Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts. - type: boolean - default: false - ends_at: - description: The time at which the Gift Card can no longer be used. - nullable: true - type: string - format: date-time - tax_rate: - description: The gift card's tax rate that will be applied on calculating totals - nullable: true - type: number - example: 0 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - GiftCardTransaction: - title: Gift Card Transaction - description: Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order. - type: object - required: - - amount - - created_at - - gift_card_id - - id - - is_taxable - - order_id - - tax_rate - properties: - id: - description: The gift card transaction's ID - type: string - example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A - gift_card_id: - description: The ID of the Gift Card that was used in the transaction. - type: string - example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ - gift_card: - description: The details of the gift card associated used in this transaction. - x-expandable: gift_card - nullable: true - type: object - order_id: - description: The ID of the order that the gift card was used for payment. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the gift card was used for payment. - x-expandable: order - nullable: true - type: object - amount: - description: The amount that was used from the Gift Card. - type: integer - example: 10 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - is_taxable: - description: Whether the transaction is taxable or not. - nullable: true - type: boolean - example: false - tax_rate: - description: The tax rate of the transaction - nullable: true - type: number - example: 0 - IdempotencyKey: - title: Idempotency Key - description: Idempotency Key is used to continue a process in case of any failure that might occur. - type: object - required: - - created_at - - id - - idempotency_key - - locked_at - - recovery_point - - response_code - - response_body - - request_method - - request_params - - request_path - properties: - id: - description: The idempotency key's ID - type: string - example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A - idempotency_key: - description: The unique randomly generated key used to determine the state of a process. - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: Date which the idempotency key was locked. - type: string - format: date-time - locked_at: - description: Date which the idempotency key was locked. - nullable: true - type: string - format: date-time - request_method: - description: The method of the request - nullable: true - type: string - example: POST - request_params: - description: The parameters passed to the request - nullable: true - type: object - example: - id: cart_01G8ZH853Y6TFXWPG5EYE81X63 - request_path: - description: The request's path - nullable: true - type: string - example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete - response_code: - description: The response's code. - nullable: true - type: string - example: 200 - response_body: - description: The response's body - nullable: true - type: object - example: - id: cart_01G8ZH853Y6TFXWPG5EYE81X63 - recovery_point: - description: Where to continue from. - type: string - default: started - Image: - title: Image - description: An Image is used to store details about uploaded images. Images are uploaded by the File Service, and the URL is provided by the File Service. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - url - properties: - id: - type: string - description: The image's ID - example: img_01G749BFYR6T8JTVW6SGW3K3E6 - url: - description: The URL at which the image file can be found. - type: string - format: uri - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - InventoryItemDTO: - type: object - required: - - sku - properties: - id: - description: The inventory item's ID. - type: string - example: iitem_12334 - sku: - description: The Stock Keeping Unit (SKU) code of the Inventory Item. - type: string - hs_code: - description: The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers. - type: string - origin_country: - description: The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. - type: string - mid_code: - description: The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers. - type: string - title: - description: Title of the inventory item - type: string - description: - description: Description of the inventory item - type: string - thumbnail: - description: Thumbnail for the inventory item - type: string - material: - description: The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. - type: string - weight: - description: The weight of the Inventory Item. May be used in shipping rate calculations. - type: number - height: - description: The height of the Inventory Item. May be used in shipping rate calculations. - type: number - width: - description: The width of the Inventory Item. May be used in shipping rate calculations. - type: number - length: - description: The length of the Inventory Item. May be used in shipping rate calculations. - type: number - requires_shipping: - description: Whether the item requires shipping. - type: boolean - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - InventoryLevelDTO: - type: object - required: - - inventory_item_id - - location_id - - stocked_quantity - - reserved_quantity - - incoming_quantity - properties: - location_id: - description: the item location ID - type: string - stocked_quantity: - description: the total stock quantity of an inventory item at the given location ID - type: number - reserved_quantity: - description: the reserved stock quantity of an inventory item at the given location ID - type: number - incoming_quantity: - description: the incoming stock quantity of an inventory item at the given location ID - type: number - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - Invite: - title: Invite - description: An invite is created when an admin user invites a new user to join the store's team. Once the invite is accepted, it's deleted. - type: object - required: - - accepted - - created_at - - deleted_at - - expires_at - - id - - metadata - - role - - token - - updated_at - - user_email - properties: - id: - type: string - description: The invite's ID - example: invite_01G8TKE4XYCTHSCK2GDEP47RE1 - user_email: - description: The email of the user being invited. - type: string - format: email - role: - description: The user's role. These roles don't change the privileges of the user. - nullable: true - type: string - enum: - - admin - - member - - developer - default: member - accepted: - description: Whether the invite was accepted or not. - type: boolean - default: false - token: - description: The token used to accept the invite. - type: string - expires_at: - description: The date the invite expires at. - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - LineItem: - title: Line Item - description: Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits. - type: object - required: - - allow_discounts - - cart_id - - claim_order_id - - created_at - - description - - fulfilled_quantity - - has_shipping - - id - - is_giftcard - - is_return - - metadata - - order_edit_id - - order_id - - original_item_id - - quantity - - returned_quantity - - shipped_quantity - - should_merge - - swap_id - - thumbnail - - title - - unit_price - - updated_at - - variant_id - properties: - id: - description: The line item's ID - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - cart_id: - description: The ID of the cart that the line item may belongs to. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the line item may belongs to. - x-expandable: cart - nullable: true - type: object - order_id: - description: The ID of the order that the line item may belongs to. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the line item may belongs to. - x-expandable: order - nullable: true - type: object - swap_id: - description: The ID of the swap that the line item may belong to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the line item may belong to. - x-expandable: swap - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the line item may belong to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the line item may belong to. - x-expandable: claim_order - nullable: true - type: object - tax_lines: - description: The details of the item's tax lines. - x-expandable: tax_lines - type: array - items: - $ref: '#/components/schemas/LineItemTaxLine' - adjustments: - description: The details of the item's adjustments, which are available when a discount is applied on the item. - x-expandable: adjustments - type: array - items: - $ref: '#/components/schemas/LineItemAdjustment' - original_item_id: - description: The ID of the original line item. This is useful if the line item belongs to a resource that references an order, such as a return or an order edit. - nullable: true - type: string - order_edit_id: - description: The ID of the order edit that the item may belong to. - nullable: true - type: string - order_edit: - description: The details of the order edit. - x-expandable: order_edit - nullable: true - type: object - title: - description: The title of the Line Item. - type: string - example: Medusa Coffee Mug - description: - description: A more detailed description of the contents of the Line Item. - nullable: true - type: string - example: One Size - thumbnail: - description: A URL string to a small image of the contents of the Line Item. - nullable: true - type: string - format: uri - example: https://medusa-public-images.s3.eu-west-1.amazonaws.com/coffee-mug.png - is_return: - description: Is the item being returned - type: boolean - default: false - is_giftcard: - description: Flag to indicate if the Line Item is a Gift Card. - type: boolean - default: false - should_merge: - description: Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item. - type: boolean - default: true - allow_discounts: - description: Flag to indicate if the Line Item should be included when doing discount calculations. - type: boolean - default: true - has_shipping: - description: Flag to indicate if the Line Item has fulfillment associated with it. - nullable: true - type: boolean - example: false - unit_price: - description: The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to. - type: integer - example: 8000 - variant_id: - description: The id of the Product Variant contained in the Line Item. - nullable: true - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that this item was created from. - x-expandable: variant - nullable: true - $ref: '#/components/schemas/ProductVariant' - quantity: - description: The quantity of the content in the Line Item. - type: integer - example: 1 - fulfilled_quantity: - description: The quantity of the Line Item that has been fulfilled. - nullable: true - type: integer - example: 0 - returned_quantity: - description: The quantity of the Line Item that has been returned. - nullable: true - type: integer - example: 0 - shipped_quantity: - description: The quantity of the Line Item that has been shipped. - nullable: true - type: integer - example: 0 - refundable: - description: The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration. - type: integer - example: 0 - subtotal: - description: The subtotal of the line item - type: integer - example: 8000 - tax_total: - description: The total of tax of the line item - type: integer - example: 0 - total: - description: The total amount of the line item - type: integer - example: 8000 - original_total: - description: The original total amount of the line item - type: integer - example: 8000 - original_tax_total: - description: The original tax total amount of the line item - type: integer - example: 0 - discount_total: - description: The total of discount of the line item rounded - type: integer - example: 0 - raw_discount_total: - description: The total of discount of the line item - type: integer - example: 0 - gift_card_total: - description: The total of the gift card of the line item - type: integer - example: 0 - includes_tax: - description: Indicates if the line item unit_price include tax - x-featureFlag: tax_inclusive_pricing - type: boolean - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - LineItemAdjustment: - title: Line Item Adjustment - description: A Line Item Adjustment includes details on discounts applied on a line item. - type: object - required: - - amount - - description - - discount_id - - id - - item_id - - metadata - properties: - id: - description: The Line Item Adjustment's ID - type: string - example: lia_01G8TKE4XYCTHSCK2GDEP47RE1 - item_id: - description: The ID of the line item - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: The details of the line item. - x-expandable: item - nullable: true - type: object - description: - description: The line item's adjustment description - type: string - example: Adjusted item's price. - discount_id: - description: The ID of the discount associated with the adjustment - nullable: true - type: string - example: disc_01F0YESMW10MGHWJKZSDDMN0VN - discount: - description: The details of the discount associated with the adjustment. - x-expandable: discount - nullable: true - $ref: '#/components/schemas/Discount' - amount: - description: The adjustment amount - type: number - example: 1000 - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - LineItemTaxLine: - title: Line Item Tax Line - description: A Line Item Tax Line represents the taxes applied on a line item. - type: object - required: - - code - - created_at - - id - - item_id - - metadata - - name - - rate - - updated_at - properties: - id: - description: The line item tax line's ID - type: string - example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - item_id: - description: The ID of the line item - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: The details of the line item. - x-expandable: item - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ModulesResponse: - type: array - items: - type: object - required: - - module - - resolution - properties: - module: - description: The key of the module. - type: string - resolution: - description: The resolution path of the module or false if module is not installed. - type: string - MoneyAmount: - title: Money Amount - description: A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region. - type: object - required: - - amount - - created_at - - currency_code - - deleted_at - - id - - max_quantity - - min_quantity - - price_list_id - - region_id - - updated_at - - variant_id - properties: - id: - description: The money amount's ID - type: string - example: ma_01F0YESHRFQNH5S8Q0PK84YYZN - currency_code: - description: The 3 character currency code that the money amount may belong to. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency that the money amount may belong to. - x-expandable: currency - nullable: true - $ref: '#/components/schemas/Currency' - amount: - description: The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost. - type: integer - example: 100 - min_quantity: - description: The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. - nullable: true - type: integer - example: 1 - max_quantity: - description: The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. - nullable: true - type: integer - example: 1 - price_list_id: - description: The ID of the price list that the money amount may belong to. - nullable: true - type: string - example: pl_01G8X3CKJXCG5VXVZ87H9KC09W - price_list: - description: The details of the price list that the money amount may belong to. - x-expandable: price_list - nullable: true - type: object - variant_id: - description: The ID of the Product Variant contained in the Line Item. - nullable: true - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that the money amount may belong to. - x-expandable: variant - nullable: true - type: object - region_id: - description: The region's ID - nullable: true - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region that the money amount may belong to. - x-expandable: region - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time MultipleErrors: title: Multiple Errors type: object @@ -9210,5266 +2930,64 @@ components: message: type: string default: Provided request body contains errors. Please check the data and retry the request - Note: - title: Note - description: A Note is an element that can be used in association with different resources to allow admin users to describe additional information. For example, they can be used to add additional information about orders. - type: object - required: - - author_id - - created_at - - deleted_at - - id - - metadata - - resource_id - - resource_type - - updated_at - - value - properties: - id: - description: The note's ID - type: string - example: note_01G8TM8ENBMC7R90XRR1G6H26Q - resource_type: - description: The type of resource that the Note refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Note refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - value: - description: The contents of the note. - type: string - example: This order must be fulfilled on Monday - author_id: - description: The ID of the user that created the note. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - author: - description: The details of the user that created the note. - x-expandable: author - nullable: true - $ref: '#/components/schemas/User' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - Notification: - title: Notification - description: A notification is an alert sent, typically to customers, using the installed Notification Provider as a reaction to internal events such as `order.placed`. Notifications can be resent. - type: object - required: - - created_at - - customer_id - - data - - event_name - - id - - parent_id - - provider_id - - resource_type - - resource_id - - to - - updated_at - properties: - id: - description: The notification's ID - type: string - example: noti_01G53V9Y6CKMCGBM1P0X7C28RX - event_name: - description: The name of the event that the notification was sent for. - nullable: true - type: string - example: order.placed - resource_type: - description: The type of resource that the Notification refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Notification refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - customer_id: - description: The ID of the customer that this notification was sent to. - nullable: true - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer that this notification was sent to. - x-expandable: customer - nullable: true - $ref: '#/components/schemas/Customer' - to: - description: The address that the Notification was sent to. This will usually be an email address, but can represent other addresses such as a chat bot user ID. - type: string - example: user@example.com - data: - description: The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend. - type: object - example: {} - parent_id: - description: The notification's parent ID - nullable: true - type: string - example: noti_01G53V9Y6CKMCGBM1P0X7C28RX - parent_notification: - description: The details of the parent notification. - x-expandable: parent_notification - nullable: true - type: object - resends: - description: The details of all resends of the notification. - type: array - x-expandable: resends - items: - type: object - provider_id: - description: The ID of the notification provider used to send the notification. - nullable: true - type: string - example: sengrid - provider: - description: The notification provider used to send the notification. - x-expandable: provider - nullable: true - $ref: '#/components/schemas/NotificationProvider' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - NotificationProvider: - title: Notification Provider - description: A notification provider represents a notification service installed in the Medusa backend, either through a plugin or backend customizations. It holds the notification service's installation status. - type: object - required: - - id - - is_installed - properties: - id: - description: The ID of the notification provider as given by the notification service. - type: string - example: sendgrid - is_installed: - description: Whether the notification service is installed in the current version. If a notification service is no longer installed, the `is_installed` attribute is set to `false`. - type: boolean - default: true - OAuth: - title: OAuth - description: An Oauth app is typically created by a plugin to handle authentication to third-party services. - type: object - required: - - application_name - - data - - display_name - - id - - install_url - - uninstall_url - properties: - id: - description: The app's ID - type: string - example: example_app - display_name: - description: The app's display name - type: string - example: Example app - application_name: - description: The app's name - type: string - example: example - install_url: - description: The URL to install the app - nullable: true - type: string - format: uri - uninstall_url: - description: The URL to uninstall the app - nullable: true - type: string - format: uri - data: - description: Any data necessary to the app. - nullable: true - type: object - example: {} - Order: - title: Order - description: An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user. - type: object - required: - - billing_address_id - - canceled_at - - cart_id - - created_at - - currency_code - - customer_id - - draft_order_id - - display_id - - email - - external_id - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - object - - payment_status - - region_id - - shipping_address_id - - status - - tax_rate - - updated_at - properties: - id: - description: The order's ID - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - status: - description: The order's status - type: string - enum: - - pending - - completed - - archived - - canceled - - requires_action - default: pending - fulfillment_status: - description: The order's fulfillment status - type: string - enum: - - not_fulfilled - - partially_fulfilled - - fulfilled - - partially_shipped - - shipped - - partially_returned - - returned - - canceled - - requires_action - default: not_fulfilled - payment_status: - description: The order's payment status - type: string - enum: - - not_paid - - awaiting - - captured - - partially_refunded - - refunded - - canceled - - requires_action - default: not_paid - display_id: - description: The order's display ID - type: integer - example: 2 - cart_id: - description: The ID of the cart associated with the order - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart associated with the order. - x-expandable: cart - nullable: true - type: object - customer_id: - description: The ID of the customer associated with the order - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: The details of the customer associated with the order. - x-expandable: customer - nullable: true - type: object - email: - description: The email associated with the order - type: string - format: email - billing_address_id: - description: The ID of the billing address associated with the order - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - billing_address: - description: The details of the billing address associated with the order. - x-expandable: billing_address - nullable: true - $ref: '#/components/schemas/Address' - shipping_address_id: - description: The ID of the shipping address associated with the order - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address associated with the order. - x-expandable: shipping_address - nullable: true - $ref: '#/components/schemas/Address' - region_id: - description: The ID of the region this order was created in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this order was created in. - x-expandable: region - nullable: true - $ref: '#/components/schemas/Region' - currency_code: - description: The 3 character currency code that is used in the order - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency used in the order. - x-expandable: currency - nullable: true - $ref: '#/components/schemas/Currency' - tax_rate: - description: The order's tax rate - nullable: true - type: number - example: 0 - discounts: - description: The details of the discounts applied on the order. - type: array - x-expandable: discounts - items: - $ref: '#/components/schemas/Discount' - gift_cards: - description: The details of the gift card used in the order. - type: array - x-expandable: gift_cards - items: - $ref: '#/components/schemas/GiftCard' - shipping_methods: - description: The details of the shipping methods used in the order. - type: array - x-expandable: shipping_methods - items: - $ref: '#/components/schemas/ShippingMethod' - payments: - description: The details of the payments used in the order. - type: array - x-expandable: payments - items: - type: object - fulfillments: - description: The details of the fulfillments created for the order. - type: array - x-expandable: fulfillments - items: - type: object - returns: - description: The details of the returns created for the order. - type: array - x-expandable: returns - items: - type: object - claims: - description: The details of the claims created for the order. - type: array - x-expandable: claims - items: - type: object - refunds: - description: The details of the refunds created for the order. - type: array - x-expandable: refunds - items: - type: object - swaps: - description: The details of the swaps created for the order. - type: array - x-expandable: swaps - items: - type: object - draft_order_id: - description: The ID of the draft order this order was created from. - nullable: true - type: string - example: null - draft_order: - description: The details of the draft order this order was created from. - x-expandable: draft_order - nullable: true - type: object - items: - description: The details of the line items that belong to the order. - x-expandable: items - type: array - items: - $ref: '#/components/schemas/LineItem' - edits: - description: The details of the order edits done on the order. - type: array - x-expandable: edits - items: - type: object - gift_card_transactions: - description: The gift card transactions made in the order. - type: array - x-expandable: gift_card_transactions - items: - $ref: '#/components/schemas/GiftCardTransaction' - canceled_at: - description: The date the order was canceled on. - nullable: true - type: string - format: date-time - no_notification: - description: Flag for describing whether or not notifications related to this should be send. - nullable: true - type: boolean - example: false - idempotency_key: - description: Randomly generated key used to continue the processing of the order in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - external_id: - description: The ID of an external order. - nullable: true - type: string - example: null - sales_channel_id: - description: The ID of the sales channel this order belongs to. - nullable: true - type: string - example: null - sales_channel: - description: The details of the sales channel this order belongs to. - x-expandable: sales_channel - nullable: true - $ref: '#/components/schemas/SalesChannel' - shipping_total: - type: integer - description: The total of shipping - example: 1000 - nullable: true - shipping_tax_total: - type: integer - description: The tax total applied on shipping - example: 1000 - raw_discount_total: - description: The total of discount - type: integer - example: 800 - discount_total: - description: The total of discount rounded - type: integer - example: 800 - tax_total: - description: The total of tax - type: integer - example: 0 - item_tax_total: - description: The tax total applied on items - type: integer - example: 0 - nullable: true - refunded_total: - description: The total amount refunded if the order is returned. - type: integer - example: 0 - total: - description: The total amount of the order - type: integer - example: 8200 - subtotal: - description: The subtotal of the order - type: integer - example: 8000 - paid_total: - description: The total amount paid - type: integer - example: 8000 - refundable_amount: - description: The amount that can be refunded - type: integer - example: 8200 - gift_card_total: - description: The total of gift cards - type: integer - example: 0 - gift_card_tax_total: - description: The total of gift cards with taxes - type: integer - example: 0 - returnable_items: - description: The details of the line items that are returnable as part of the order, swaps, or claims - type: array - x-expandable: returnable_items - items: - $ref: '#/components/schemas/LineItem' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - sales_channels: - description: The associated sales channels. - type: array - nullable: true - x-expandable: sales_channels - x-featureFlag: medusa_v2 - items: - $ref: '#/components/schemas/SalesChannel' - OrderEdit: - title: Order Edit - description: Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order. - type: object - required: - - canceled_at - - canceled_by - - confirmed_by - - confirmed_at - - created_at - - created_by - - declined_at - - declined_by - - declined_reason - - id - - internal_note - - order_id - - payment_collection_id - - requested_at - - requested_by - - status - - updated_at - properties: - id: - description: The order edit's ID - type: string - example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK - order_id: - description: The ID of the order that is edited - type: string - example: order_01G2SG30J8C85S4A5CHM2S1NS2 - order: - description: The details of the order that this order edit was created for. - x-expandable: order - nullable: true - type: object - changes: - description: The details of all the changes on the original order's line items. - x-expandable: changes - type: array - items: - $ref: '#/components/schemas/OrderItemChange' - internal_note: - description: An optional note with additional details about the order edit. - nullable: true - type: string - example: Included two more items B to the order. - created_by: - description: The unique identifier of the user or customer who created the order edit. - type: string - requested_by: - description: The unique identifier of the user or customer who requested the order edit. - nullable: true - type: string - requested_at: - description: The date with timezone at which the edit was requested. - nullable: true - type: string - format: date-time - confirmed_by: - description: The unique identifier of the user or customer who confirmed the order edit. - nullable: true - type: string - confirmed_at: - description: The date with timezone at which the edit was confirmed. - nullable: true - type: string - format: date-time - declined_by: - description: The unique identifier of the user or customer who declined the order edit. - nullable: true - type: string - declined_at: - description: The date with timezone at which the edit was declined. - nullable: true - type: string - format: date-time - declined_reason: - description: An optional note why the order edit is declined. - nullable: true - type: string - canceled_by: - description: The unique identifier of the user or customer who cancelled the order edit. - nullable: true - type: string - canceled_at: - description: The date with timezone at which the edit was cancelled. - nullable: true - type: string - format: date-time - subtotal: - description: The total of subtotal - type: integer - example: 8000 - discount_total: - description: The total of discount - type: integer - example: 800 - shipping_total: - description: The total of the shipping amount - type: integer - example: 800 - gift_card_total: - description: The total of the gift card amount - type: integer - example: 800 - gift_card_tax_total: - description: The total of the gift card tax amount - type: integer - example: 800 - tax_total: - description: The total of tax - type: integer - example: 0 - total: - description: The total amount of the edited order. - type: integer - example: 8200 - difference_due: - description: The difference between the total amount of the order and total amount of edited order. - type: integer - example: 8200 - status: - description: The status of the order edit. - type: string - enum: - - confirmed - - declined - - requested - - created - - canceled - items: - description: The details of the cloned items from the original order with the new changes. Once the order edit is confirmed, these line items are associated with the original order. - type: array - x-expandable: items - items: - $ref: '#/components/schemas/LineItem' - payment_collection_id: - description: The ID of the payment collection - nullable: true - type: string - example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK - payment_collection: - description: The details of the payment collection used to authorize additional payment if necessary. - x-expandable: payment_collection - nullable: true - $ref: '#/components/schemas/PaymentCollection' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - OrderItemChange: - title: Order Item Change - description: An order item change is a change made within an order edit to an order's items. These changes are not reflected on the original order until the order edit is confirmed. - type: object - required: - - created_at - - deleted_at - - id - - line_item_id - - order_edit_id - - original_line_item_id - - type - - updated_at - properties: - id: - description: The order item change's ID - type: string - example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK - type: - description: The order item change's status - type: string - enum: - - item_add - - item_remove - - item_update - order_edit_id: - description: The ID of the order edit - type: string - example: oe_01G2SG30J8C85S4A5CHM2S1NS2 - order_edit: - description: The details of the order edit the item change is associated with. - x-expandable: order_edit - nullable: true - type: object - original_line_item_id: - description: The ID of the original line item in the order - nullable: true - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - original_line_item: - description: The details of the original line item this item change references. This is used if the item change updates or deletes the original item. - x-expandable: original_line_item - nullable: true - $ref: '#/components/schemas/LineItem' - line_item_id: - description: The ID of the cloned line item. - nullable: true - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - line_item: - description: The details of the resulting line item after the item change. This line item is then used in the original order once the order edit is confirmed. - x-expandable: line_item - nullable: true - $ref: '#/components/schemas/LineItem' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - Payment: - title: Payment - description: A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources. - type: object - required: - - amount - - amount_refunded - - canceled_at - - captured_at - - cart_id - - created_at - - currency_code - - data - - id - - idempotency_key - - metadata - - order_id - - provider_id - - swap_id - - updated_at - properties: - id: - description: The payment's ID - type: string - example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE - swap_id: - description: The ID of the swap that this payment was potentially created for. - nullable: true - type: string - example: null - swap: - description: The details of the swap that this payment was potentially created for. - x-expandable: swap - nullable: true - type: object - cart_id: - description: The ID of the cart that the payment session was potentially created for. - nullable: true - type: string - cart: - description: The details of the cart that the payment session was potentially created for. - x-expandable: cart - nullable: true - type: object - order_id: - description: The ID of the order that the payment session was potentially created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the payment session was potentially created for. - x-expandable: order - nullable: true - type: object - amount: - description: The amount that the Payment has been authorized for. - type: integer - example: 100 - currency_code: - description: The 3 character ISO currency code of the payment. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency of the payment. - x-expandable: currency - nullable: true - $ref: '#/components/schemas/Currency' - amount_refunded: - description: The amount of the original Payment amount that has been refunded back to the Customer. - type: integer - default: 0 - example: 0 - provider_id: - description: The id of the Payment Provider that is responsible for the Payment - type: string - example: manual - data: - description: The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state. - type: object - example: {} - captured_at: - description: The date with timezone at which the Payment was captured. - nullable: true - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Payment was canceled. - nullable: true - type: string - format: date-time - idempotency_key: - description: Randomly generated key used to continue the completion of a payment in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - PaymentCollection: - title: Payment Collection - description: A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments. - type: object - required: - - amount - - authorized_amount - - created_at - - created_by - - currency_code - - deleted_at - - description - - id - - metadata - - region_id - - status - - type - - updated_at - properties: - id: - description: The payment collection's ID - type: string - example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK - type: - description: The type of the payment collection - type: string - enum: - - order_edit - status: - description: The type of the payment collection - type: string - enum: - - not_paid - - awaiting - - authorized - - partially_authorized - - canceled - description: - description: Description of the payment collection - nullable: true - type: string - amount: - description: Amount of the payment collection. - type: integer - authorized_amount: - description: Authorized amount of the payment collection. - nullable: true - type: integer - region_id: - description: The ID of the region this payment collection is associated with. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this payment collection is associated with. - x-expandable: region - nullable: true - $ref: '#/components/schemas/Region' - currency_code: - description: The three character ISO code for the currency this payment collection is associated with. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency this payment collection is associated with. - x-expandable: currency - nullable: true - $ref: '#/components/schemas/Currency' - payment_sessions: - description: The details of the payment sessions created as part of the payment collection. - type: array - x-expandable: payment_sessions - items: - $ref: '#/components/schemas/PaymentSession' - payments: - description: The details of the payments created as part of the payment collection. - type: array - x-expandable: payments - items: - $ref: '#/components/schemas/Payment' - created_by: - description: The ID of the user that created the payment collection. - type: string - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - PaymentProvider: - title: Payment Provider - description: A payment provider represents a payment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the payment service's installation status. - type: object - required: - - id - - is_installed - properties: - id: - description: The ID of the payment provider as given by the payment service. - type: string - example: manual - is_installed: - description: Whether the payment service is installed in the current version. If a payment service is no longer installed, the `is_installed` attribute is set to `false`. - type: boolean - default: true - PaymentSession: - title: Payment Session - description: A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections. - type: object - required: - - amount - - cart_id - - created_at - - data - - id - - is_initiated - - is_selected - - idempotency_key - - payment_authorized_at - - provider_id - - status - - updated_at - properties: - id: - description: The payment session's ID - type: string - example: ps_01G901XNSRM2YS3ASN9H5KG3FZ - cart_id: - description: The ID of the cart that the payment session was created for. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the payment session was created for. - x-expandable: cart - nullable: true - $ref: '#/components/schemas/Cart' - provider_id: - description: The ID of the Payment Provider that is responsible for the Payment Session - type: string - example: manual - is_selected: - description: A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase. - nullable: true - type: boolean - example: true - is_initiated: - description: A flag to indicate if a communication with the third party provider has been initiated. - type: boolean - default: false - example: true - status: - description: Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer. - type: string - enum: - - authorized - - pending - - requires_more - - error - - canceled - example: pending - data: - description: The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state. - type: object - example: {} - idempotency_key: - description: Randomly generated key used to continue the completion of a cart in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - amount: - description: The amount that the Payment Session has been authorized for. - nullable: true - type: integer - example: 100 - payment_authorized_at: - description: The date with timezone at which the Payment Session was authorized. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - PriceList: - title: Price List - description: A Price List represents a set of prices that override the default price for one or more product variants. - type: object - required: - - created_at - - deleted_at - - description - - ends_at - - id - - name - - starts_at - - status - - type - - updated_at - properties: - id: - description: The price list's ID - type: string - example: pl_01G8X3CKJXCG5VXVZ87H9KC09W - name: - description: The price list's name - type: string - example: VIP Prices - description: - description: The price list's description - type: string - example: Prices for VIP customers - type: - description: The type of Price List. This can be one of either `sale` or `override`. - type: string - enum: - - sale - - override - default: sale - status: - description: The status of the Price List - type: string - enum: - - active - - draft - default: draft - starts_at: - description: The date with timezone that the Price List starts being valid. - nullable: true - type: string - format: date-time - ends_at: - description: The date with timezone that the Price List stops being valid. - nullable: true - type: string - format: date-time - customer_groups: - description: The details of the customer groups that the Price List can apply to. - type: array - x-expandable: customer_groups - items: - $ref: '#/components/schemas/CustomerGroup' - prices: - description: The prices that belong to the price list, represented as a Money Amount. - type: array - x-expandable: prices - items: - $ref: '#/components/schemas/MoneyAmount' - includes_tax: - description: Whether the price list prices include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - PricedProduct: - title: Priced Product - type: object - allOf: - - $ref: '#/components/schemas/Product' - - type: object - properties: - variants: - description: The product variants and their prices. - type: array - items: - $ref: '#/components/schemas/PricedVariant' - PricedShippingOption: - title: Priced Shipping Option - type: object - allOf: - - $ref: '#/components/schemas/ShippingOption' - - type: object - properties: - price_incl_tax: - type: number - description: Price including taxes - tax_rates: - type: array - description: An array of applied tax rates - items: - type: object - properties: - rate: - type: number - description: The tax rate value - name: - type: string - description: The name of the tax rate - code: - type: string - description: The code of the tax rate - tax_amount: - type: number - description: The taxes applied. - PricedVariant: - title: Priced Product Variant - type: object - allOf: - - $ref: '#/components/schemas/ProductVariant' - - type: object - properties: - original_price: - type: number - description: The original price of the variant without any discounted prices applied. - calculated_price: - type: number - description: The calculated price of the variant. Can be a discounted price. - original_price_incl_tax: - type: number - description: The original price of the variant including taxes. - calculated_price_incl_tax: - type: number - description: The calculated price of the variant including taxes. - original_tax: - type: number - description: The taxes applied on the original price. - calculated_tax: - type: number - description: The taxes applied on the calculated price. - tax_rates: - type: array - description: An array of applied tax rates - items: - type: object - properties: - rate: - type: number - description: The tax rate value - name: - type: string - description: The name of the tax rate - code: - type: string - description: The code of the tax rate - Product: - title: Product - description: A product is a saleable item that holds general information such as name or description. It must include at least one Product Variant, where each product variant defines different options to purchase the product with (for example, different sizes or colors). The prices and inventory of the product are defined on the variant level. - type: object - required: - - collection_id - - created_at - - deleted_at - - description - - discountable - - external_id - - handle - - height - - hs_code - - id - - is_giftcard - - length - - material - - metadata - - mid_code - - origin_country - - profile_id - - status - - subtitle - - type_id - - thumbnail - - title - - updated_at - - weight - - width - properties: - id: - description: The product's ID - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - title: - description: A title that can be displayed for easy identification of the Product. - type: string - example: Medusa Coffee Mug - subtitle: - description: An optional subtitle that can be used to further specify the Product. - nullable: true - type: string - description: - description: A short description of the Product. - nullable: true - type: string - example: Every programmer's best friend. - handle: - description: A unique identifier for the Product (e.g. for slug structure). - nullable: true - type: string - example: coffee-mug - is_giftcard: - description: Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased. - type: boolean - default: false - status: - description: The status of the product - type: string - enum: - - draft - - proposed - - published - - rejected - default: draft - images: - description: The details of the product's images. - type: array - x-expandable: images - items: - $ref: '#/components/schemas/Image' - thumbnail: - description: A URL to an image file that can be used to identify the Product. - nullable: true - type: string - format: uri - options: - description: The details of the Product Options that are defined for the Product. The product's variants will have a unique combination of values of the product's options. - type: array - x-expandable: options - items: - $ref: '#/components/schemas/ProductOption' - variants: - description: The details of the Product Variants that belong to the Product. Each will have a unique combination of values of the product's options. - type: array - x-expandable: variants - items: - $ref: '#/components/schemas/ProductVariant' - categories: - description: The details of the product categories that this product belongs to. - type: array - x-expandable: categories - x-featureFlag: product_categories - items: - $ref: '#/components/schemas/ProductCategory' - profile_id: - description: The ID of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product. - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - profile: - description: The details of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product. - x-expandable: profile - nullable: true - $ref: '#/components/schemas/ShippingProfile' - profiles: - description: Available if the relation `profiles` is expanded. - nullable: true - type: array - items: - $ref: '#/components/schemas/ShippingProfile' - weight: - description: The weight of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - length: - description: The length of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - height: - description: The height of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - width: - description: The width of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - hs_code: - description: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - origin_country: - description: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - mid_code: - description: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - material: - description: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - collection_id: - description: The ID of the product collection that the product belongs to. - nullable: true - type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - collection: - description: The details of the product collection that the product belongs to. - x-expandable: collection - nullable: true - $ref: '#/components/schemas/ProductCollection' - type_id: - description: The ID of the product type that the product belongs to. - nullable: true - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - type: - description: The details of the product type that the product belongs to. - x-expandable: type - nullable: true - $ref: '#/components/schemas/ProductType' - tags: - description: The details of the product tags used in this product. - type: array - x-expandable: type - items: - $ref: '#/components/schemas/ProductTag' - discountable: - description: Whether the Product can be discounted. Discounts will not apply to Line Items of this Product when this flag is set to `false`. - type: boolean - default: true - external_id: - description: The external ID of the product - nullable: true - type: string - example: null - sales_channels: - description: The details of the sales channels this product is available in. - type: array - x-expandable: sales_channels - items: - $ref: '#/components/schemas/SalesChannel' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductCategory: - title: Product Category - description: A product category can be used to categorize products into a hierarchy of categories. - x-resourceId: ProductCategory - x-featureFlag: product_categories - type: object - required: - - category_children - - created_at - - handle - - id - - is_active - - is_internal - - metadata - - mpath - - name - - parent_category_id - - updated_at - properties: - id: - description: The product category's ID - type: string - example: pcat_01G2SG30J8C85S4A5CHM2S1NS2 - name: - description: The product category's name - type: string - example: Regular Fit - description: - description: The product category's description. - type: string - default: '' - handle: - description: A unique string that identifies the Product Category - can for example be used in slug structures. - type: string - example: regular-fit - mpath: - description: A string for Materialized Paths - used for finding ancestors and descendents - nullable: true - type: string - example: pcat_id1.pcat_id2.pcat_id3 - is_internal: - type: boolean - description: A flag to make product category an internal category for admins - default: false - is_active: - type: boolean - description: A flag to make product category visible/hidden in the store front - default: false - rank: - type: integer - description: An integer that depicts the rank of category in a tree node - default: 0 - category_children: - description: The details of the category's children. - type: array - x-expandable: category_children - items: - type: object - parent_category_id: - description: The ID of the parent category. - nullable: true - type: string - default: null - parent_category: - description: The details of the parent of this category. - x-expandable: parent_category - nullable: true - type: object - products: - description: The details of the products that belong to this category. - type: array - x-expandable: products - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductCollection: - title: Product Collection - description: A Product Collection allows grouping together products for promotional purposes. For example, an admin can create a Summer collection, add products to it, and showcase it on the storefront. - type: object - required: - - created_at - - deleted_at - - handle - - id - - metadata - - title - - updated_at - properties: - id: - description: The product collection's ID - type: string - example: pcol_01F0YESBFAZ0DV6V831JXWH0BG - title: - description: The title that the Product Collection is identified by. - type: string - example: Summer Collection - handle: - description: A unique string that identifies the Product Collection - can for example be used in slug structures. - nullable: true - type: string - example: summer-collection - products: - description: The details of the products that belong to this product collection. - type: array - x-expandable: products - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductOption: - title: Product Option - description: A Product Option defines properties that may vary between different variants of a Product. Common Product Options are "Size" and "Color". Admins are free to create any product options. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - product_id - - title - - updated_at - properties: - id: - description: The product option's ID - type: string - example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 - title: - description: The title that the Product Option is defined by (e.g. `Size`). - type: string - example: Size - values: - description: The details of the values of the product option. - type: array - x-expandable: values - items: - $ref: '#/components/schemas/ProductOptionValue' - product_id: - description: The ID of the product that this product option belongs to. - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product that this product option belongs to. - x-expandable: product - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductOptionValue: - title: Product Option Value - description: An option value is one of the possible values of a Product Option. Product Variants specify a unique combination of product option values. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - option_id - - updated_at - - value - - variant_id - properties: - id: - description: The product option value's ID - type: string - example: optval_01F0YESHR7S6ECD03RF6W12DSJ - value: - description: The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is "Size" this value could be `Small`, `Medium` or `Large`). - type: string - example: large - option_id: - description: The ID of the Product Option that the Product Option Value belongs to. - type: string - example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 - option: - description: The details of the product option that the Product Option Value belongs to. - x-expandable: option - nullable: true - type: object - variant_id: - description: The ID of the product variant that uses this product option value. - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - variant: - description: The details of the product variant that uses this product option value. - x-expandable: variant - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductTag: - title: Product Tag - description: A Product Tag can be added to Products for easy filtering and grouping. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value - properties: - id: - description: The product tag's ID - type: string - example: ptag_01G8K2MTMG9168F2B70S1TAVK3 - value: - description: The value that the Product Tag represents - type: string - example: Pants - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductTaxRate: - title: Product Tax Rate - description: This represents the association between a tax rate and a product to indicate that the product is taxed in a way different than the default. - type: object - required: - - created_at - - metadata - - product_id - - rate_id - - updated_at - properties: - product_id: - description: The ID of the Product - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product. - x-expandable: product - nullable: true - $ref: '#/components/schemas/Product' - rate_id: - description: The ID of the Tax Rate - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the tax rate. - x-expandable: tax_rate - nullable: true - $ref: '#/components/schemas/TaxRate' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductType: - title: Product Type - description: A Product Type can be added to Products for filtering and reporting purposes. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - updated_at - - value - properties: - id: - description: The product type's ID - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - value: - description: The value that the Product Type represents. - type: string - example: Clothing - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductTypeTaxRate: - title: Product Type Tax Rate - description: This represents the association between a tax rate and a product type to indicate that the product type is taxed in a different way than the default. - type: object - required: - - created_at - - metadata - - product_type_id - - rate_id - - updated_at - properties: - product_type_id: - description: The ID of the Product type - type: string - example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A - product_type: - description: The details of the product type. - x-expandable: product_type - nullable: true - $ref: '#/components/schemas/ProductType' - rate_id: - description: The id of the Tax Rate - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the tax rate. - x-expandable: tax_rate - nullable: true - $ref: '#/components/schemas/TaxRate' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ProductVariant: - title: Product Variant - description: A Product Variant represents a Product with a specific set of Product Option configurations. The maximum number of Product Variants that a Product can have is given by the number of available Product Option combinations. A product must at least have one product variant. - type: object - required: - - allow_backorder - - barcode - - created_at - - deleted_at - - ean - - height - - hs_code - - id - - inventory_quantity - - length - - manage_inventory - - material - - metadata - - mid_code - - origin_country - - product_id - - sku - - title - - upc - - updated_at - - weight - - width - properties: - id: - description: The product variant's ID - type: string - example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 - title: - description: A title that can be displayed for easy identification of the Product Variant. - type: string - example: Small - product_id: - description: The ID of the product that the product variant belongs to. - type: string - example: prod_01G1G5V2MBA328390B5AXJ610F - product: - description: The details of the product that the product variant belongs to. - x-expandable: product - nullable: true - type: object - prices: - description: The details of the prices of the Product Variant, each represented as a Money Amount. Each Money Amount represents a price in a given currency or a specific Region. - type: array - x-expandable: prices - items: - $ref: '#/components/schemas/MoneyAmount' - sku: - description: The unique stock keeping unit used to identify the Product Variant. This will usually be a unique identifer for the item that is to be shipped, and can be referenced across multiple systems. - nullable: true - type: string - example: shirt-123 - barcode: - description: A generic field for a GTIN number that can be used to identify the Product Variant. - nullable: true - type: string - example: null - ean: - description: An EAN barcode number that can be used to identify the Product Variant. - nullable: true - type: string - example: null - upc: - description: A UPC barcode number that can be used to identify the Product Variant. - nullable: true - type: string - example: null - variant_rank: - description: The ranking of this variant - nullable: true - type: number - default: 0 - inventory_quantity: - description: The current quantity of the item that is stocked. - type: integer - example: 100 - allow_backorder: - description: Whether the Product Variant should be purchasable when `inventory_quantity` is 0. - type: boolean - default: false - manage_inventory: - description: Whether Medusa should manage inventory for the Product Variant. - type: boolean - default: true - hs_code: - description: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - origin_country: - description: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - mid_code: - description: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - material: - description: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. - nullable: true - type: string - example: null - weight: - description: The weight of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - length: - description: The length of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - height: - description: The height of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - width: - description: The width of the Product Variant. May be used in shipping rate calculations. - nullable: true - type: number - example: null - options: - description: The details of the product options that this product variant defines values for. - type: array - x-expandable: options - items: - $ref: '#/components/schemas/ProductOptionValue' - inventory_items: - description: The details inventory items of the product variant. - type: array - x-expandable: inventory_items - items: - $ref: '#/components/schemas/ProductVariantInventoryItem' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - purchasable: - description: | - Only used with the inventory modules. - A boolean value indicating whether the Product Variant is purchasable. - A variant is purchasable if: - - inventory is not managed - - it has no inventory items - - it is in stock - - it is backorderable. - type: boolean - ProductVariantInventoryItem: - title: Product Variant Inventory Item - description: A Product Variant Inventory Item links variants with inventory items and denotes the required quantity of the variant. - type: object - required: - - created_at - - deleted_at - - id - - inventory_item_id - - required_quantity - - updated_at - - variant_id - properties: - id: - description: The product variant inventory item's ID - type: string - example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A - inventory_item_id: - description: The id of the inventory item - type: string - variant_id: - description: The id of the variant. - type: string - variant: - description: The details of the product variant. - x-expandable: variant - nullable: true - type: object - required_quantity: - description: The quantity of an inventory item required for the variant. - type: integer - default: 1 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - PublishableApiKey: - title: Publishable API key - description: A Publishable API key defines scopes that resources are available in. Then, it can be used in request to infer the resources without having to directly pass them. For example, a publishable API key can be associated with one or more sales channels. Then, when the publishable API key is passed in the header of a request, it is inferred what sales channel is being used without having to pass the sales channel as a query or body parameter of the request. Publishable API keys can only be used with sales channels, at the moment. - type: object - required: - - created_at - - created_by - - id - - revoked_by - - revoked_at - - title - - updated_at - properties: - id: - description: The key's ID - type: string - example: pk_01G1G5V27GYX4QXNARRQCW1N8T - created_by: - description: The unique identifier of the user that created the key. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_by: - description: The unique identifier of the user that revoked the key. - nullable: true - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_at: - description: The date with timezone at which the key was revoked. - nullable: true - type: string - format: date-time - title: - description: The key's title. - type: string - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - PublishableApiKeySalesChannel: - title: Publishable API Key Sales Channel - description: This represents the association between the Publishable API keys and Sales Channels - type: object - required: - - publishable_key_id - - sales_channel_id - - created_at - - updated_at - - deleted_at - properties: - id: - description: The relation's ID - type: string - example: pksc_01G8X9A7ESKAJXG2H0E6F1MW7A - sales_channel_id: - description: The sales channel's ID - type: string - example: sc_01G1G5V21KADXNGH29BJMAJ4B4 - publishable_key_id: - description: The publishable API key's ID - type: string - example: pak_01G1G5V21KADXNGH29BJMAJ4B4 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - Refund: - title: Refund - description: A refund represents an amount of money transfered back to the customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by an admin for an order. - type: object - required: - - amount - - created_at - - id - - idempotency_key - - metadata - - note - - order_id - - payment_id - - reason - - updated_at - properties: - id: - description: The refund's ID - type: string - example: ref_01G1G5V27GYX4QXNARRQCW1N8T - order_id: - description: The ID of the order this refund was created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order this refund was created for. - x-expandable: order - nullable: true - type: object - payment_id: - description: The payment's ID, if available. - nullable: true - type: string - example: pay_01G8ZCC5W42ZNY842124G7P5R9 - payment: - description: The details of the payment associated with the refund. - x-expandable: payment - nullable: true - type: object - amount: - description: The amount that has be refunded to the Customer. - type: integer - example: 1000 - note: - description: An optional note explaining why the amount was refunded. - nullable: true - type: string - example: I didn't like it - reason: - description: The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return. - type: string - enum: - - discount - - return - - swap - - claim - - other - example: return - idempotency_key: - description: Randomly generated key used to continue the completion of the refund in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - Region: - title: Region - description: A region holds settings specific to a geographical location, including the currency, tax rates, and fulfillment and payment providers. A Region can consist of multiple countries to accomodate common shopping settings across countries. - type: object - required: - - automatic_taxes - - created_at - - currency_code - - deleted_at - - gift_cards_taxable - - id - - metadata - - name - - tax_code - - tax_provider_id - - tax_rate - - updated_at - properties: - id: - description: The region's ID - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - name: - description: The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name. - type: string - example: EU - currency_code: - description: The three character currency code used in the region. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - currency: - description: The details of the currency used in the region. - x-expandable: currency - nullable: true - $ref: '#/components/schemas/Currency' - tax_rate: - description: The tax rate that should be charged on purchases in the Region. - type: number - example: 0 - tax_rates: - description: The details of the tax rates used in the region, aside from the default rate. - type: array - x-expandable: tax_rates - items: - $ref: '#/components/schemas/TaxRate' - tax_code: - description: The tax code used on purchases in the Region. This may be used by other systems for accounting purposes. - nullable: true - type: string - example: null - gift_cards_taxable: - description: Whether the gift cards are taxable or not in this region. - type: boolean - default: true - automatic_taxes: - description: Whether taxes should be automated in this region. - type: boolean - default: true - countries: - description: The details of the countries included in this region. - type: array - x-expandable: countries - items: - $ref: '#/components/schemas/Country' - tax_provider_id: - description: The ID of the tax provider used in this region - nullable: true - type: string - example: null - tax_provider: - description: The details of the tax provider used in the region. - x-expandable: tax_provider - nullable: true - $ref: '#/components/schemas/TaxProvider' - payment_providers: - description: The details of the payment providers that can be used to process payments in the region. - type: array - x-expandable: payment_providers - items: - $ref: '#/components/schemas/PaymentProvider' - fulfillment_providers: - description: The details of the fulfillment providers that can be used to fulfill items of orders and similar resources in the region. - type: array - x-expandable: fulfillment_providers - items: - $ref: '#/components/schemas/FulfillmentProvider' - includes_tax: - description: Whether the prices for the region include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ReservationItemDTO: - title: Reservation item - description: Represents a reservation of an inventory item at a stock location - type: object - required: - - id - - location_id - - inventory_item_id - - quantity - properties: - id: - description: The id of the reservation item - type: string - location_id: - description: The id of the location of the reservation - type: string - inventory_item_id: - description: The id of the inventory item the reservation relates to - type: string - description: - description: Description of the reservation item - type: string - created_by: - description: UserId of user who created the reservation item - type: string - quantity: - description: The id of the reservation item - type: number - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - Return: - title: Return - description: A Return holds information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can also be used as part of a Swap or a Claim. - type: object - required: - - claim_order_id - - created_at - - id - - idempotency_key - - location_id - - metadata - - no_notification - - order_id - - received_at - - refund_amount - - shipping_data - - status - - swap_id - - updated_at - properties: - id: - description: The return's ID - type: string - example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - status: - description: Status of the Return. - type: string - enum: - - requested - - received - - requires_action - - canceled - default: requested - items: - description: The details of the items that the customer is returning. - type: array - x-expandable: items - items: - $ref: '#/components/schemas/ReturnItem' - swap_id: - description: The ID of the swap that the return may belong to. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the return may belong to. - x-expandable: swap - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the return may belong to. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the return may belong to. - x-expandable: claim_order - nullable: true - type: object - order_id: - description: The ID of the order that the return was created for. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the return was created for. - x-expandable: order - nullable: true - type: object - shipping_method: - description: The details of the Shipping Method that will be used to send the Return back. Can be null if the Customer will handle the return shipment themselves. - x-expandable: shipping_method - nullable: true - $ref: '#/components/schemas/ShippingMethod' - shipping_data: - description: Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment. - nullable: true - type: object - example: {} - location_id: - description: The ID of the stock location the return will be added back. - nullable: true - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK - refund_amount: - description: The amount that should be refunded as a result of the return. - type: integer - example: 1000 - no_notification: - description: When set to true, no notification will be sent related to this return. - nullable: true - type: boolean - example: false - idempotency_key: - description: Randomly generated key used to continue the completion of the return in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - received_at: - description: The date with timezone at which the return was received. - nullable: true - type: string - format: date-time - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ReturnItem: - title: Return Item - description: A return item represents a line item in an order that is to be returned. It includes details related to the return and the reason behind it. - type: object - required: - - is_requested - - item_id - - metadata - - note - - quantity - - reason_id - - received_quantity - - requested_quantity - - return_id - properties: - return_id: - description: The ID of the Return that the Return Item belongs to. - type: string - example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - item_id: - description: The ID of the Line Item that the Return Item references. - type: string - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - return_order: - description: Details of the Return that the Return Item belongs to. - x-expandable: return_order - nullable: true - type: object - item: - description: The details of the line item in the original order to be returned. - x-expandable: item - nullable: true - $ref: '#/components/schemas/LineItem' - quantity: - description: The quantity of the Line Item to be returned. - type: integer - example: 1 - is_requested: - description: Whether the Return Item was requested initially or received unexpectedly in the warehouse. - type: boolean - default: true - requested_quantity: - description: The quantity that was originally requested to be returned. - nullable: true - type: integer - example: 1 - received_quantity: - description: The quantity that was received in the warehouse. - nullable: true - type: integer - example: 1 - reason_id: - description: The ID of the reason for returning the item. - nullable: true - type: string - example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - reason: - description: The details of the reason for returning the item. - x-expandable: reason - nullable: true - $ref: '#/components/schemas/ReturnReason' - note: - description: An optional note with additional details about the Return. - nullable: true - type: string - example: I didn't like it. - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ReturnReason: - title: Return Reason - description: A Return Reason is a value defined by an admin. It can be used on Return Items in order to indicate why a Line Item was returned. - type: object - required: - - created_at - - deleted_at - - description - - id - - label - - metadata - - parent_return_reason_id - - updated_at - - value - properties: - id: - description: The return reason's ID - type: string - example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - value: - description: The value to identify the reason by. - type: string - example: damaged - label: - description: A text that can be displayed to the Customer as a reason. - type: string - example: Damaged goods - description: - description: A description of the Reason. - nullable: true - type: string - example: Items that are damaged - parent_return_reason_id: - description: The ID of the parent reason. - nullable: true - type: string - example: null - parent_return_reason: - description: The details of the parent reason. - x-expandable: parent_return_reason - nullable: true - type: object - return_reason_children: - description: The details of the child reasons. - x-expandable: return_reason_children - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - SalesChannel: - title: Sales Channel - description: A Sales Channel is a method a business offers its products for purchase for the customers. For example, a Webshop can be a sales channel, and a mobile app can be another. - type: object - required: - - created_at - - deleted_at - - description - - id - - is_disabled - - name - - updated_at - properties: - id: - description: The sales channel's ID - type: string - example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A - name: - description: The name of the sales channel. - type: string - example: Market - description: - description: The description of the sales channel. - nullable: true - type: string - example: Multi-vendor market - is_disabled: - description: Specify if the sales channel is enabled or disabled. - type: boolean - default: false - locations: - description: The details of the stock locations related to the sales channel. - type: array - x-expandable: locations - items: - $ref: '#/components/schemas/SalesChannelLocation' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - carts: - description: The associated carts. - type: array - nullable: true - x-expandable: carts - x-featureFlag: medusa_v2 - items: - type: object - orders: - description: The associated orders. - type: array - nullable: true - x-expandable: orders - x-featureFlag: medusa_v2 - items: - type: object - publishableKeys: - description: The associated publishable API keys. - type: array - nullable: true - x-expandable: publishableKeys - items: - type: object - SalesChannelLocation: - title: Sales Channel Stock Location - description: This represents the association between a sales channel and a stock locations. - type: object - required: - - created_at - - deleted_at - - id - - location_id - - sales_channel_id - - updated_at - properties: - id: - description: The Sales Channel Stock Location's ID - type: string - example: scloc_01G8X9A7ESKAJXG2H0E6F1MW7A - sales_channel_id: - description: The ID of the Sales Channel - type: string - example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A - location_id: - description: The ID of the Location Stock. - type: string - sales_channel: - description: The details of the sales channel the location is associated with. - x-expandable: sales_channel - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - ShippingMethod: - title: Shipping Method - description: A Shipping Method represents a way in which an Order or Return can be shipped. Shipping Methods are created from a Shipping Option, but may contain additional details that can be necessary for the Fulfillment Provider to handle the shipment. If the shipping method is created for a return, it may be associated with a claim or a swap that the return is part of. - type: object - required: - - cart_id - - claim_order_id - - data - - id - - order_id - - price - - return_id - - shipping_option_id - - swap_id - properties: - id: - description: The shipping method's ID - type: string - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_option_id: - description: The ID of the Shipping Option that the Shipping Method is built from. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - order_id: - description: The ID of the order that the shipping method is used in. - nullable: true - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the shipping method is used in. - x-expandable: order - nullable: true - type: object - claim_order_id: - description: The ID of the claim that the shipping method is used in. - nullable: true - type: string - example: null - claim_order: - description: The details of the claim that the shipping method is used in. - x-expandable: claim_order - nullable: true - type: object - cart_id: - description: The ID of the cart that the shipping method is used in. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the shipping method is used in. - x-expandable: cart - nullable: true - type: object - swap_id: - description: The ID of the swap that the shipping method is used in. - nullable: true - type: string - example: null - swap: - description: The details of the swap that the shipping method is used in. - x-expandable: swap - nullable: true - type: object - return_id: - description: The ID of the return that the shipping method is used in. - nullable: true - type: string - example: null - return_order: - description: The details of the return that the shipping method is used in. - x-expandable: return_order - nullable: true - type: object - shipping_option: - description: The details of the shipping option the method was created from. - x-expandable: shipping_option - nullable: true - $ref: '#/components/schemas/ShippingOption' - tax_lines: - description: The details of the tax lines applied on the shipping method. - type: array - x-expandable: tax_lines - items: - $ref: '#/components/schemas/ShippingMethodTaxLine' - price: - description: The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of. - type: integer - example: 200 - data: - description: Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id. - type: object - example: {} - includes_tax: - description: Whether the shipping method price include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - subtotal: - description: The subtotal of the shipping - type: integer - example: 8000 - total: - description: The total amount of the shipping - type: integer - example: 8200 - tax_total: - description: The total of tax - type: integer - example: 0 - ShippingMethodTaxLine: - title: Shipping Method Tax Line - description: A Shipping Method Tax Line represents the taxes applied on a shipping method in a cart. - type: object - required: - - code - - created_at - - id - - shipping_method_id - - metadata - - name - - rate - - updated_at - properties: - id: - description: The line item tax line's ID - type: string - example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - shipping_method_id: - description: The ID of the line item - type: string - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_method: - description: The details of the associated shipping method. - x-expandable: shipping_method - nullable: true - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ShippingOption: - title: Shipping Option - description: A Shipping Option represents a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information. - type: object - required: - - admin_only - - amount - - created_at - - data - - deleted_at - - id - - is_return - - metadata - - name - - price_type - - profile_id - - provider_id - - region_id - - updated_at - properties: - id: - description: The shipping option's ID - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - name: - description: The name given to the Shipping Option - this may be displayed to the Customer. - type: string - example: PostFake Standard - region_id: - description: The ID of the region this shipping option can be used in. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region this shipping option can be used in. - x-expandable: region - nullable: true - type: object - profile_id: - description: The ID of the Shipping Profile that the shipping option belongs to. - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - profile: - description: The details of the shipping profile that the shipping option belongs to. - x-expandable: profile - nullable: true - $ref: '#/components/schemas/ShippingProfile' - provider_id: - description: The ID of the fulfillment provider that will be used to later to process the shipping method created from this shipping option and its fulfillments. - type: string - example: manual - provider: - description: The details of the fulfillment provider that will be used to later to process the shipping method created from this shipping option and its fulfillments. - x-expandable: provider - nullable: true - $ref: '#/components/schemas/FulfillmentProvider' - price_type: - description: The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations. - type: string - enum: - - flat_rate - - calculated - example: flat_rate - amount: - description: The amount to charge for shipping when the Shipping Option price type is `flat_rate`. - nullable: true - type: integer - example: 200 - is_return: - description: Flag to indicate if the Shipping Option can be used for Return shipments. - type: boolean - default: false - admin_only: - description: Flag to indicate if the Shipping Option usage is restricted to admin users. - type: boolean - default: false - requirements: - description: The details of the requirements that must be satisfied for the Shipping Option to be available for usage in a Cart. - type: array - x-expandable: requirements - items: - $ref: '#/components/schemas/ShippingOptionRequirement' - data: - description: The data needed for the Fulfillment Provider to identify the Shipping Option. - type: object - example: {} - includes_tax: - description: Whether the shipping option price include tax - type: boolean - x-featureFlag: tax_inclusive_pricing - default: false - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ShippingOptionRequirement: - title: Shipping Option Requirement - description: A shipping option requirement defines conditions that a Cart must satisfy for the Shipping Option to be available for usage in the Cart. - type: object - required: - - amount - - deleted_at - - id - - shipping_option_id - - type - properties: - id: - description: The shipping option requirement's ID - type: string - example: sor_01G1G5V29AB4CTNDRFSRWSRKWD - shipping_option_id: - description: The ID of the shipping option that the requirements belong to. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the shipping option that the requirements belong to. - x-expandable: shipping_option - nullable: true - type: object - type: - description: The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available. - type: string - enum: - - min_subtotal - - max_subtotal - example: min_subtotal - amount: - description: The amount to compare the Cart subtotal to. - type: integer - example: 100 - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - ShippingProfile: - title: Shipping Profile - description: A Shipping Profile has a set of defined Shipping Options that can be used to fulfill a given set of Products. For example, gift cards are shipped differently than physical products, so a shipping profile with the type `gift_card` groups together the shipping options that can only be used for gift cards. - type: object - required: - - created_at - - deleted_at - - id - - metadata - - name - - type - - updated_at - properties: - id: - description: The shipping profile's ID - type: string - example: sp_01G1G5V239ENSZ5MV4JAR737BM - name: - description: The name given to the Shipping profile - this may be displayed to the Customer. - type: string - example: Default Shipping Profile - type: - description: The type of the Shipping Profile, may be `default`, `gift_card` or `custom`. - type: string - enum: - - default - - gift_card - - custom - example: default - products: - description: The details of the products that the Shipping Profile defines Shipping Options for. Available if the relation `products` is expanded. - type: array - x-expandable: products - items: - type: object - shipping_options: - description: The details of the shipping options that can be used to create shipping methods for the Products in the Shipping Profile. - type: array - x-expandable: shipping_options - items: - type: object - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - ShippingTaxRate: - title: Shipping Tax Rate - description: This represents the tax rates applied on a shipping option. - type: object - required: - - created_at - - metadata - - rate_id - - shipping_option_id - - updated_at - properties: - shipping_option_id: - description: The ID of the shipping option. - type: string - example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: The details of the shipping option. - x-expandable: shipping_option - nullable: true - $ref: '#/components/schemas/ShippingOption' - rate_id: - description: The ID of the associated tax rate. - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - tax_rate: - description: The details of the associated tax rate. - x-expandable: tax_rate - nullable: true - $ref: '#/components/schemas/TaxRate' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - StagedJob: - title: Staged Job - description: A staged job resource - type: object - required: - - data - - event_name - - id - - options - properties: - id: - description: The staged job's ID - type: string - example: job_01F0YET7BZTARY9MKN1SJ7AAXF - event_name: - description: The name of the event - type: string - example: order.placed - data: - description: Data necessary for the job - type: object - example: {} - option: - description: The staged job's option - type: object - example: {} - StockLocationAddressDTO: - title: Stock Location Address - description: Represents a Stock Location Address + StockLocationAddress: type: object + description: The stock location's address. + x-schemaName: StockLocationAddress required: - address_1 - country_code - - created_at - - updated_at properties: - id: - type: string - description: The stock location address' ID - example: laddr_51G4ZW853Y6TFXWPG5ENJ81X42 address_1: type: string - description: Stock location address - example: 35, Jhon Doe Ave + title: address_1 + description: The address's address 1. address_2: type: string - description: Stock location address' complement - example: apartment 4432 + title: address_2 + description: The address's address 2. company: type: string - description: Stock location company' name - example: Medusa + title: company + description: The address's company. city: type: string - description: Stock location address' city - example: Mexico city + title: city + description: The address's city. country_code: type: string - description: Stock location address' country - example: MX + title: country_code + description: The address's country code. phone: type: string - description: Stock location address' phone number - example: +1 555 61646 + title: phone + description: The address's phone. postal_code: type: string - description: Stock location address' postal code - example: HD3-1G8 + title: postal_code + description: The address's postal code. province: type: string - description: Stock location address' province - example: Sinaloa - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - StockLocationAddressInput: - title: Stock Location Address Input - description: Represents a Stock Location Address Input + title: province + description: The address's province. + StorePostCartsCartTaxesReq: type: object - required: - - address_1 - - country_code - properties: - address_1: - type: string - description: Stock location address - example: 35, Jhon Doe Ave - address_2: - type: string - description: Stock location address' complement - example: apartment 4432 - city: - type: string - description: Stock location address' city - example: Mexico city - country_code: - type: string - description: Stock location address' country - example: MX - phone: - type: string - description: Stock location address' phone number - example: +1 555 61646 - postal_code: - type: string - description: Stock location address' postal code - example: HD3-1G8 - province: - type: string - description: Stock location address' province - example: Sinaloa - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - StockLocationDTO: - title: Stock Location - description: Represents a Stock Location + description: SUMMARY + x-schemaName: StorePostCartsCartTaxesReq + properties: {} + StorePostPaymentCollectionsPaymentSessionReq: type: object - required: - - id - - name - - address_id - - created_at - - updated_at - properties: - id: - type: string - description: The stock location's ID - example: sloc_51G4ZW853Y6TFXWPG5ENJ81X42 - address_id: - type: string - description: Stock location address' ID - example: laddr_05B2ZE853Y6FTXWPW85NJ81A44 - name: - type: string - description: The name of the stock location - example: Main Warehouse - address: - description: The Address of the Stock Location - allOf: - - $ref: '#/components/schemas/StockLocationAddressDTO' - - type: object - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: - type: string - description: The date with timezone at which the resource was deleted. - format: date-time - StockLocationExpandedDTO: - allOf: - - $ref: '#/components/schemas/StockLocationDTO' - - type: object - properties: - sales_channels: - description: The associated sales channels. - $ref: '#/components/schemas/SalesChannel' - Store: - title: Store - description: A store holds the main settings of the commerce shop. By default, only one store is created and used within the Medusa backend. It holds settings related to the name of the store, available currencies, and more. - type: object - required: - - created_at - - default_currency_code - - default_location_id - - id - - invite_link_template - - metadata - - name - - payment_link_template - - swap_link_template - - updated_at - properties: - id: - description: The store's ID - type: string - example: store_01G1G5V21KADXNGH29BJMAJ4B4 - name: - description: The name of the Store - this may be displayed to the Customer. - type: string - example: Medusa Store - default: Medusa Store - default_currency_code: - description: The three character currency code that is the default of the store. - type: string - example: usd - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - default_currency: - description: The details of the store's default currency. - x-expandable: default_currency - default: usd - nullable: true - $ref: '#/components/schemas/Currency' - currencies: - description: The details of the enabled currencies in the store. - type: array - x-expandable: currencies - items: - $ref: '#/components/schemas/Currency' - swap_link_template: - description: A template to generate Swap links from. Use {{cart_id}} to include the Swap's `cart_id` in the link. - nullable: true - type: string - example: null - payment_link_template: - description: A template to generate Payment links from. Use {{cart_id}} to include the payment's `cart_id` in the link. - nullable: true - type: string - example: null - invite_link_template: - description: A template to generate Invite links from - nullable: true - type: string - example: null - default_location_id: - description: The location ID the store is associated with. - nullable: true - type: string - example: null - default_sales_channel_id: - description: The ID of the store's default sales channel. - nullable: true - type: string - example: null - default_sales_channel: - description: The details of the store's default sales channel. - x-expandable: default_sales_channel - nullable: true - $ref: '#/components/schemas/SalesChannel' - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - StoreAuthRes: - type: object - description: The customer's details. - x-expanded-relations: - field: customer - relations: - - orders - - orders.items - - shipping_addresses - required: - - customer - properties: - customer: - description: Customer's details. - $ref: '#/components/schemas/Customer' - StoreBearerAuthRes: - type: object - description: The access token details. - properties: - access_token: - description: Access token that can be used to send authenticated requests. - type: string - StoreCartShippingOptionsListRes: - type: object - x-expanded-relations: - field: shipping_options - implicit: - - profile - - requirements - required: - - shipping_options - properties: - shipping_options: - type: array - description: An array of shipping options details. - items: - $ref: '#/components/schemas/PricedShippingOption' - StoreCartsRes: - type: object - description: The cart's details. - x-expanded-relations: - field: cart - relations: - - billing_address - - discounts - - discounts.rule - - gift_cards - - items - - items.adjustments - - items.variant - - payment - - payment_sessions - - region - - region.countries - - region.payment_providers - - shipping_address - - shipping_methods - eager: - - region.fulfillment_providers - - region.payment_providers - - shipping_methods.shipping_option - implicit: - - items - - items.variant - - items.variant.product - - items.variant.product.profiles - - items.tax_lines - - items.adjustments - - gift_cards - - discounts - - discounts.rule - - shipping_methods - - shipping_methods.tax_lines - - shipping_address - - region - - region.tax_rates - totals: - - discount_total - - gift_card_tax_total - - gift_card_total - - item_tax_total - - refundable_amount - - refunded_total - - shipping_tax_total - - shipping_total - - subtotal - - tax_total - - total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - required: - - cart - properties: - cart: - description: Cart details. - $ref: '#/components/schemas/Cart' - StoreCollectionsListRes: - type: object - description: The list of product collections with pagination fields. - required: - - collections - - count - - offset - - limit - properties: - collections: - type: array - description: An array of product collections details - items: - $ref: '#/components/schemas/ProductCollection' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product collections skipped when retrieving the product collections. - limit: - type: integer - description: The number of items per page - StoreCollectionsRes: - type: object - description: The details of the product collection. - required: - - collection - properties: - collection: - description: Product collection details. - $ref: '#/components/schemas/ProductCollection' - StoreCompleteCartRes: - type: object - description: If the cart is completed successfully, this will have the created order or the swap's details, based on the cart's type. Otherwise, it'll be the cart's details. - required: - - type - - data - properties: - type: - type: string - description: The type of the data property. If the cart completion fails, type will be `cart` and the data object will be the cart's details. If the cart completion is successful and the cart is used for checkout, type will be `order` and the data object will be the order's details. If the cart completion is successful and the cart is used for swap creation, type will be `swap` and the data object will be the swap's details. - enum: - - order - - cart - - swap - data: - type: object - description: The data of the result object. Its type depends on the type field. - oneOf: - - type: object - allOf: - - description: Cart was successfully authorized and order was placed successfully. - - $ref: '#/components/schemas/Order' - - type: object - allOf: - - description: Cart was successfully authorized but requires further actions. - - $ref: '#/components/schemas/Cart' - - type: object - allOf: - - description: Cart was used for a swap and it has been completed successfully. - - $ref: '#/components/schemas/Swap' - StoreCustomersListOrdersRes: - type: object - description: The list of the customer's orders with pagination fields. - x-expanded-relations: - field: orders - relations: - - customer - - discounts - - discounts.rule - - fulfillments - - fulfillments.tracking_links - - items - - items.variant - - payments - - region - - shipping_address - - shipping_methods - eager: - - region.fulfillment_providers - - region.payment_providers - - shipping_methods.shipping_option - implicit: - - claims - - claims.additional_items - - claims.additional_items.adjustments - - claims.additional_items.refundable - - claims.additional_items.tax_lines - - customer - - discounts - - discounts.rule - - gift_card_transactions - - gift_card_transactions.gift_card - - gift_cards - - items - - items.adjustments - - items.refundable - - items.tax_lines - - items.variant - - items.variant.product - - items.variant.product.profiles - - refunds - - region - - shipping_address - - shipping_methods - - shipping_methods.tax_lines - - swaps - - swaps.additional_items - - swaps.additional_items.adjustments - - swaps.additional_items.refundable - - swaps.additional_items.tax_lines - totals: - - discount_total - - gift_card_tax_total - - gift_card_total - - paid_total - - refundable_amount - - refunded_total - - shipping_total - - subtotal - - tax_total - - total - - claims.additional_items.discount_total - - claims.additional_items.gift_card_total - - claims.additional_items.original_tax_total - - claims.additional_items.original_total - - claims.additional_items.refundable - - claims.additional_items.subtotal - - claims.additional_items.tax_total - - claims.additional_items.total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - - swaps.additional_items.discount_total - - swaps.additional_items.gift_card_total - - swaps.additional_items.original_tax_total - - swaps.additional_items.original_total - - swaps.additional_items.refundable - - swaps.additional_items.subtotal - - swaps.additional_items.tax_total - - swaps.additional_items.total - required: - - orders - - count - - offset - - limit - properties: - orders: - type: array - description: An array of orders details. - items: - $ref: '#/components/schemas/Order' - count: - description: The total number of items available - type: integer - offset: - description: The number of orders skipped when retrieving the orders. - type: integer - limit: - description: The number of items per page - type: integer - StoreCustomersListPaymentMethodsRes: - type: object - description: The payment method's details. - required: - - payment_methods - properties: - payment_methods: - type: array - description: The details of the saved payment methods. - items: - type: object - required: - - provider_id - - data - properties: - provider_id: - description: The ID of the Payment Provider where the payment method is saved. - type: string - data: - description: The data needed for the Payment Provider to use the saved payment method. - type: object - StoreCustomersRes: - type: object - description: The customer's details. - x-expanded-relations: - field: customer - relations: - - billing_address - - shipping_addresses - required: - - customer - properties: - customer: - description: Customer details. - $ref: '#/components/schemas/Customer' - StoreCustomersResetPasswordRes: - type: object - required: - - customer - properties: - customer: - description: Customer details. - $ref: '#/components/schemas/Customer' - StoreGetAuthEmailRes: - type: object - description: Details on whether the email exists. - required: - - exists - properties: - exists: - description: Whether email exists or not. - type: boolean - StoreGetProductCategoriesCategoryRes: - type: object - description: The product category's details. - x-expanded-relations: - field: product_category - relations: - - category_children - - parent_category - required: - - product_category - properties: - product_category: - description: Product category details. - $ref: '#/components/schemas/ProductCategory' - StoreGetProductCategoriesRes: - type: object - description: The list of product categories with pagination fields. - x-expanded-relations: - field: product_categories - relations: - - category_children - - parent_category - required: - - product_categories - - count - - offset - - limit - properties: - product_categories: - type: array - description: An array of product categories details. - items: - $ref: '#/components/schemas/ProductCategory' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product categories skipped when retrieving the product categories. - limit: - type: integer - description: The number of items per page - StoreGiftCardsRes: - description: The gift card's details. - type: object - required: - - gift_card - properties: - gift_card: - description: Gift card details. - $ref: '#/components/schemas/GiftCard' - StoreOrderEditsRes: - type: object - description: The order edit's details. - x-expanded-relations: - field: order_edit - relations: - - changes - - changes.line_item - - changes.line_item.variant - - changes.original_line_item - - changes.original_line_item.variant - - items - - items.adjustments - - items.tax_lines - - items.variant - - payment_collection - implicit: - - items - - items.tax_lines - - items.adjustments - - items.variant - totals: - - difference_due - - discount_total - - gift_card_tax_total - - gift_card_total - - shipping_total - - subtotal - - tax_total - - total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - required: - - order_edit - properties: - order_edit: - description: Order edit details. - $ref: '#/components/schemas/OrderEdit' - StoreOrdersRes: - type: object - description: The order's details. - required: - - order - x-expanded-relations: - field: order - relations: - - customer - - discounts - - discounts.rule - - fulfillments - - fulfillments.tracking_links - - items - - items.variant - - payments - - region - - shipping_address - - shipping_methods - eager: - - fulfillments.items - - region.fulfillment_providers - - region.payment_providers - - shipping_methods.shipping_option - implicit: - - claims - - claims.additional_items - - claims.additional_items.adjustments - - claims.additional_items.refundable - - claims.additional_items.tax_lines - - discounts - - discounts.rule - - gift_card_transactions - - gift_card_transactions.gift_card - - gift_cards - - items - - items.adjustments - - items.refundable - - items.tax_lines - - items.variant - - items.variant.product - - items.variant.product.profiles - - refunds - - region - - shipping_methods - - shipping_methods.tax_lines - - swaps - - swaps.additional_items - - swaps.additional_items.adjustments - - swaps.additional_items.refundable - - swaps.additional_items.tax_lines - totals: - - discount_total - - gift_card_tax_total - - gift_card_total - - paid_total - - refundable_amount - - refunded_total - - shipping_total - - subtotal - - tax_total - - total - - claims.additional_items.discount_total - - claims.additional_items.gift_card_total - - claims.additional_items.original_tax_total - - claims.additional_items.original_total - - claims.additional_items.refundable - - claims.additional_items.subtotal - - claims.additional_items.tax_total - - claims.additional_items.total - - items.discount_total - - items.gift_card_total - - items.original_tax_total - - items.original_total - - items.refundable - - items.subtotal - - items.tax_total - - items.total - - swaps.additional_items.discount_total - - swaps.additional_items.gift_card_total - - swaps.additional_items.original_tax_total - - swaps.additional_items.original_total - - swaps.additional_items.refundable - - swaps.additional_items.subtotal - - swaps.additional_items.tax_total - - swaps.additional_items.total - properties: - order: - description: Order details. - $ref: '#/components/schemas/Order' - StorePaymentCollectionSessionsReq: - type: object - description: The details of the payment session to manage. + description: SUMMARY + x-schemaName: StorePostPaymentCollectionsPaymentSessionReq required: - provider_id properties: provider_id: type: string - description: The ID of the Payment Provider. - StorePaymentCollectionsRes: - type: object - description: The payment collection's details. - x-expanded-relations: - field: payment_collection - relations: - - payment_sessions - - region - eager: - - region.fulfillment_providers - - region.payment_providers - required: - - payment_collection - properties: - payment_collection: - description: Payment collection's details. - $ref: '#/components/schemas/PaymentCollection' - StorePaymentCollectionsSessionRes: - type: object - description: The details of the payment session. - required: - - payment_session - properties: - payment_session: - description: Payment session's details. - $ref: '#/components/schemas/PaymentSession' - StorePostAuthReq: - type: object - required: - - email - - password - properties: - email: - type: string - description: The Customer's email. - password: - type: string - description: The Customer's password. - StorePostCartReq: - type: object - description: The details of the cart to be created. - properties: - region_id: - type: string - description: The ID of the Region to create the Cart in. Setting the cart's region can affect the pricing of the items in the cart as well as the used currency. If this parameter is not provided, the first region in the store is used by default. - sales_channel_id: - type: string - description: The ID of the Sales channel to create the Cart in. The cart's sales channel affects which products can be added to the cart. If a product does not exist in the cart's sales channel, it cannot be added to the cart. If you add a publishable API key in the header of this request and specify a sales channel ID, the specified sales channel must be within the scope of the publishable API key's resources. If you add a publishable API key in the header of this request, you don't specify a sales channel ID, and the publishable API key is associated with one sales channel, that sales channel will be attached to the cart. If no sales channel is passed and no publishable API key header is passed or the publishable API key isn't associated with any sales channel, the cart will not be associated with any sales channel. - country_code: - type: string - description: The two character ISO country code to create the Cart in. Setting this parameter will set the country code of the shipping address. - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - items: - description: An array of product variants to generate line items from. - type: array - items: - type: object - required: - - variant_id - - quantity - properties: - variant_id: - description: The ID of the Product Variant. - type: string - quantity: - description: The quantity to add into the cart. - type: integer - context: - description: An object to provide context to the Cart. The `context` field is automatically populated with `ip` and `user_agent` - type: object - example: - ip: '::1' - user_agent: Chrome - StorePostCartsCartLineItemsItemReq: - type: object - description: The details to update of the line item. - required: - - quantity - properties: - quantity: - type: number - description: The quantity of the line item in the cart. - metadata: - type: object - description: An optional key-value map with additional details about the Line Item. If omitted, the metadata will remain unchanged." - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - StorePostCartsCartLineItemsReq: - type: object - description: The details of the line item to create. - required: - - variant_id - - quantity - properties: - variant_id: - type: string - description: The id of the Product Variant to generate the Line Item from. - quantity: - type: number - description: The quantity of the Product Variant to add to the Line Item. - metadata: - type: object - description: An optional key-value map with additional details about the Line Item. - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - StorePostCartsCartPaymentSessionReq: - type: object - description: The details of the payment session to set. - required: - - provider_id - properties: - provider_id: - type: string - description: The ID of the Payment Provider. - StorePostCartsCartPaymentSessionUpdateReq: - type: object - required: - - data - properties: + title: provider_id + description: The payment collection's provider id. + context: {} data: type: object - description: The data to update the payment session with. - StorePostCartsCartReq: - type: object - description: The details to update of the cart. - properties: - region_id: - type: string - description: The ID of the Region to create the Cart in. Setting the cart's region can affect the pricing of the items in the cart as well as the used currency. - country_code: - type: string - description: The 2 character ISO country code to create the Cart in. Setting this parameter will set the country code of the shipping address. - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - description: See a list of codes. - email: - type: string - description: An email to be used on the Cart. - format: email - sales_channel_id: - type: string - description: The ID of the Sales channel to create the Cart in. The cart's sales channel affects which products can be added to the cart. If a product does not exist in the cart's sales channel, it cannot be added to the cart. If you add a publishable API key in the header of this request and specify a sales channel ID, the specified sales channel must be within the scope of the publishable API key's resources. - billing_address: - description: The Address to be used for billing purposes. - anyOf: - - $ref: '#/components/schemas/AddressPayload' - description: A full billing address object. - - type: string - description: The billing address ID - shipping_address: - description: The Address to be used for shipping purposes. - anyOf: - - $ref: '#/components/schemas/AddressPayload' - description: A full shipping address object. - - type: string - description: The shipping address ID - gift_cards: - description: An array of Gift Card codes to add to the Cart. - type: array - items: - type: object - required: - - code - properties: - code: - description: The code of a gift card. - type: string - discounts: - description: An array of Discount codes to add to the Cart. - type: array - items: - type: object - required: - - code - properties: - code: - description: The code of the discount. - type: string - customer_id: - description: The ID of the Customer to associate the Cart with. - type: string - context: - description: An object to provide context to the Cart. The `context` field is automatically populated with `ip` and `user_agent` - type: object - example: - ip: '::1' - user_agent: Chrome - StorePostCartsCartShippingMethodReq: - type: object - description: The details of the shipping method to add to the cart. - required: - - option_id - properties: - option_id: - type: string - description: ID of the shipping option to create the method from. - data: - type: object - description: Used to hold any data that the shipping method may need to process the fulfillment of the order. This depends on the fulfillment provider you're using. - StorePostCustomersCustomerAcceptClaimReq: - type: object - description: The details necessary to grant order access. - required: - - token - properties: - token: - description: The claim token generated by previous request to the Claim Order API Route. - type: string - StorePostCustomersCustomerAddressesAddressReq: - anyOf: - - $ref: '#/components/schemas/AddressPayload' - StorePostCustomersCustomerAddressesReq: - type: object - required: - - address - properties: - address: - description: The Address to add to the Customer's saved addresses. - $ref: '#/components/schemas/AddressCreatePayload' - StorePostCustomersCustomerOrderClaimReq: - type: object - description: The details of the orders to claim. - required: - - order_ids - properties: - order_ids: - description: The ID of the orders to claim - type: array - items: - type: string - StorePostCustomersCustomerPasswordTokenReq: - type: object - required: - - email - properties: - email: - description: The customer's email. - type: string - format: email - StorePostCustomersCustomerReq: - type: object - description: The details to update of the customer. - properties: - first_name: - description: The customer's first name. - type: string - last_name: - description: The customer's last name. - type: string - billing_address: - description: The address to be used for billing purposes. - anyOf: - - $ref: '#/components/schemas/AddressPayload' - description: The full billing address object - - type: string - description: The ID of an existing billing address - password: - description: The customer's password. - type: string - phone: - description: The customer's phone number. - type: string - email: - description: The customer's email. - type: string - metadata: - description: Additional custom data about the customer. - type: object - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - StorePostCustomersReq: - type: object - description: The details of the customer to create. - required: - - first_name - - last_name - - email - - password - properties: - first_name: - description: The customer's first name. - type: string - last_name: - description: The customer's last name. - type: string - email: - description: The customer's email. - type: string - format: email - password: - description: The customer's password. - type: string - format: password - phone: - description: The customer's phone number. - type: string - StorePostCustomersResetPasswordReq: - type: object - required: - - email - - password - - token - properties: - email: - description: The customer's email. - type: string - format: email - password: - description: The customer's password. - type: string - format: password - token: - description: The reset password token - type: string - StorePostOrderEditsOrderEditDecline: - type: object - description: The details of the order edit's decline. - properties: - declined_reason: - type: string - description: The reason for declining the Order Edit. - StorePostPaymentCollectionsBatchSessionsAuthorizeReq: - type: object - description: The details of the payment sessions to authorize. - required: - - session_ids - properties: - session_ids: - description: List of Payment Session IDs to authorize. - type: array - items: - type: string - StorePostPaymentCollectionsBatchSessionsReq: - type: object - description: The details of the payment sessions to manage. - required: - - sessions - properties: - sessions: - description: Payment sessions related to the Payment Collection. Existing sessions that are not added in this array will be deleted. - type: array - items: - type: object - required: - - provider_id - - amount - properties: - provider_id: - type: string - description: The ID of the Payment Provider. - amount: - type: integer - description: The payment amount - session_id: - type: string - description: The ID of the Payment Session to be updated. If no ID is provided, a new payment session is created. - StorePostReturnsReq: - type: object - description: The details of the return to create. - required: - - order_id - - items - properties: - order_id: - type: string - description: The ID of the Order to create the return for. - items: - description: The items to include in the return. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the line item to return. - type: string - quantity: - description: The quantity to return. - type: integer - reason_id: - description: The ID of the return reason. Return reasons can be retrieved from the List Return Reasons API Route. - type: string - note: - description: A note to add to the item returned. - type: string - return_shipping: - description: The return shipping method used to return the items. If provided, a fulfillment is automatically created for the return. - type: object - required: - - option_id - properties: - option_id: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. - StorePostSearchReq: - type: object - properties: - q: - type: string - description: The search query. - offset: - type: number - description: The number of products to skip when retrieving the products. - limit: - type: number - description: Limit the number of products returned. - filter: - description: Pass filters based on the search service. - StorePostSearchRes: - description: The list of search results. - allOf: - - type: object - required: - - hits - properties: - hits: - description: Array of search results. The format of the items depends on the search engine installed on the Medusa backend. - type: array - - type: object - StorePostSwapsReq: - type: object - description: The details of the swap to create. - required: - - order_id - - return_items - - additional_items - properties: - order_id: - type: string - description: The ID of the Order to create the Swap for. - return_items: - description: The items to include in the Return. - type: array - items: - type: object - required: - - item_id - - quantity - properties: - item_id: - description: The ID of the order's line item to return. - type: string - quantity: - description: The quantity to return. - type: integer - reason_id: - description: The ID of the reason of this return. Return reasons can be retrieved from the List Return Reasons API Route. - type: string - note: - description: The note to add to the item being swapped. - type: string - return_shipping_option: - type: string - description: The ID of the Shipping Option to create the Shipping Method from. - additional_items: - description: The items to exchange the returned items with. - type: array - items: - type: object - required: - - variant_id - - quantity - properties: - variant_id: - description: The ID of the Product Variant. - type: string - quantity: - description: The quantity of the variant. - type: integer - StoreProductTagsListRes: - type: object - description: The list of product tags with pagination fields. - required: - - product_tags - - count - - offset - - limit - properties: - product_tags: - type: array - description: An array of product tags details. - items: - $ref: '#/components/schemas/ProductTag' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product tags skipped when retrieving the product tags. - limit: - type: integer - description: The number of items per page - StoreProductTypesListRes: - type: object - required: - - product_types - - count - - offset - - limit - properties: - product_types: - type: array - description: An array of product types details. - items: - $ref: '#/components/schemas/ProductType' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of product types skipped when retrieving the product types. - limit: - type: integer - description: The number of items per page - StoreProductsListRes: - type: object - description: The list of products with pagination fields. - x-expanded-relations: - field: products - relations: - - collection - - images - - options - - options.values - - tags - - type - - variants - - variants.options - - variants.prices - totals: - - variants.purchasable - required: - - products - - count - - offset - - limit - properties: - products: - type: array - description: An array of products details. - items: - $ref: '#/components/schemas/PricedProduct' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of products skipped when retrieving the products. - limit: - type: integer - description: The number of items per page - StoreProductsRes: - type: object - x-expanded-relations: - field: product - relations: - - collection - - images - - options - - options.values - - tags - - type - - variants - - variants.options - - variants.prices - totals: - - variants.purchasable - required: - - product - properties: - product: - description: Product details. - $ref: '#/components/schemas/PricedProduct' - StoreRegionsListRes: - type: object - description: The list of regions with pagination fields. - x-expanded-relations: - field: regions - relations: - - countries - - payment_providers - - fulfillment_providers - eager: - - payment_providers - - fulfillment_providers - required: - - regions - properties: - regions: - type: array - description: An array of regions details. - items: - $ref: '#/components/schemas/Region' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of regions skipped when retrieving the regions. - limit: - type: integer - description: The number of items per page - StoreRegionsRes: - type: object - description: The region's details. - x-expanded-relations: - field: region - relations: - - countries - - payment_providers - - fulfillment_providers - eager: - - payment_providers - - fulfillment_providers - required: - - region - properties: - region: - description: Region details. - $ref: '#/components/schemas/Region' - StoreReturnReasonsListRes: - type: object - description: The list of return reasons. - x-expanded-relations: - field: return_reasons - relations: - - parent_return_reason - - return_reason_children - required: - - return_reasons - properties: - return_reasons: - type: array - description: An array of return reasons details. - items: - $ref: '#/components/schemas/ReturnReason' - StoreReturnReasonsRes: - type: object - description: The return reason's details. - x-expanded-relations: - field: return_reason - relations: - - parent_return_reason - - return_reason_children - required: - - return_reason - properties: - return_reason: - description: Return reason details. - $ref: '#/components/schemas/ReturnReason' - StoreReturnsRes: - type: object - description: The return's details. - x-expanded-relations: - field: return - relations: - - items - - items.reason - eager: - - items - required: - - return - properties: - return: - description: Return details. - $ref: '#/components/schemas/Return' - StoreShippingOptionsListRes: - type: object - description: The list of shipping options. - x-expanded-relations: - field: shipping_options - relations: - - requirements - required: - - shipping_options - properties: - shipping_options: - type: array - description: An array of shipping options details. - items: - $ref: '#/components/schemas/PricedShippingOption' - StoreSwapsRes: - type: object - description: The swap's details. - x-expanded-relations: - field: swap - relations: - - additional_items - - additional_items.variant - - cart - - fulfillments - - order - - payment - - return_order - - return_order.shipping_method - - shipping_address - - shipping_methods - eager: - - fulfillments.items - required: - - swap - properties: - swap: - description: Swap details. - $ref: '#/components/schemas/Swap' - StoreVariantsListRes: - type: object - description: The list of product variants. - x-expanded-relations: - field: variants - relations: - - prices - - options - - product - totals: - - purchasable - required: - - variants - properties: - variants: - type: array - description: An array of product variant descriptions. - items: - $ref: '#/components/schemas/PricedVariant' - StoreVariantsRes: - type: object - description: The product variant's details. - x-expanded-relations: - field: variant - relations: - - prices - - options - - product - totals: - - purchasable - required: - - variant - properties: - variant: - description: Product variant description. - $ref: '#/components/schemas/PricedVariant' - Swap: - title: Swap - description: A swap can be created when a Customer wishes to exchange Products that they have purchased with different Products. It consists of a Return of previously purchased Products and a Fulfillment of new Products. It also includes information on any additional payment or refund required based on the difference between the exchanged products. - type: object - required: - - allow_backorder - - canceled_at - - cart_id - - confirmed_at - - created_at - - deleted_at - - difference_due - - fulfillment_status - - id - - idempotency_key - - metadata - - no_notification - - order_id - - payment_status - - shipping_address_id - - updated_at - properties: - id: - description: The swap's ID - type: string - example: swap_01F0YET86Y9G92D3YDR9Y6V676 - fulfillment_status: - description: The status of the Fulfillment of the Swap. - type: string - enum: - - not_fulfilled - - fulfilled - - shipped - - partially_shipped - - canceled - - requires_action - example: not_fulfilled - payment_status: - description: The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount. - type: string - enum: - - not_paid - - awaiting - - captured - - confirmed - - canceled - - difference_refunded - - partially_refunded - - refunded - - requires_action - example: not_paid - order_id: - description: The ID of the order that the swap belongs to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: The details of the order that the swap belongs to. - x-expandable: order - nullable: true - type: object - additional_items: - description: The details of the new products to send to the customer, represented as line items. - type: array - x-expandable: additional_items - items: - $ref: '#/components/schemas/LineItem' - return_order: - description: The details of the return that belongs to the swap, which holds the details on the items being returned. - x-expandable: return_order - nullable: true - type: object - fulfillments: - description: The details of the fulfillments that are used to send the new items to the customer. - x-expandable: fulfillments - type: array - items: - type: object - payment: - description: The details of the additional payment authorized by the customer when `difference_due` is positive. - x-expandable: payment - nullable: true - type: object - difference_due: - description: The difference amount between the order’s original total and the new total imposed by the swap. If its value is negative, a refund must be issues to the customer. If it's positive, additional payment must be authorized by the customer. Otherwise, no payment processing is required. - nullable: true - type: integer - example: 0 - shipping_address_id: - description: The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order. - nullable: true - type: string - example: addr_01G8ZH853YPY9B94857DY91YGW - shipping_address: - description: The details of the shipping address that the new items should be sent to. - x-expandable: shipping_address - nullable: true - $ref: '#/components/schemas/Address' - shipping_methods: - description: The details of the shipping methods used to fulfill the additional items purchased. - type: array - x-expandable: shipping_methods - items: - $ref: '#/components/schemas/ShippingMethod' - cart_id: - description: The ID of the cart that the customer uses to complete the swap. - nullable: true - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: The details of the cart that the customer uses to complete the swap. - x-expandable: cart - nullable: true - type: object - confirmed_at: - description: The date with timezone at which the Swap was confirmed by the Customer. - nullable: true - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Swap was canceled. - nullable: true - type: string - format: date-time - no_notification: - description: If set to true, no notification will be sent related to this swap - nullable: true - type: boolean - example: false - allow_backorder: - description: If true, swaps can be completed with items out of stock - type: boolean - default: false - idempotency_key: - description: Randomly generated key used to continue the completion of the swap in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - TaxLine: - title: Tax Line - description: A tax line represents the taxes amount applied to a line item. - type: object - required: - - code - - created_at - - id - - metadata - - name - - rate - - updated_at - properties: - id: - description: The tax line's ID - type: string - example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - rate: - description: The numeric rate to charge tax by - type: number - example: 10 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - TaxProvider: - title: Tax Provider - description: A tax provider represents a tax service installed in the Medusa backend, either through a plugin or backend customizations. It holds the tax service's installation status. - type: object - required: - - id - - is_installed - properties: - id: - description: The ID of the tax provider as given by the tax service. - type: string - example: manual - is_installed: - description: Whether the tax service is installed in the current version. If a tax service is no longer installed, the `is_installed` attribute is set to `false`. - type: boolean - default: true - TaxRate: - title: Tax Rate - description: A Tax Rate can be used to define a custom rate to charge on specified products, product types, and shipping options within a given region. - type: object - required: - - code - - created_at - - id - - metadata - - name - - rate - - region_id - - updated_at - properties: - id: - description: The tax rate's ID - type: string - example: txr_01G8XDBAWKBHHJRKH0AV02KXBR - rate: - description: The numeric rate to charge - nullable: true - type: number - example: 10 - code: - description: A code to identify the tax type by - nullable: true - type: string - example: tax01 - name: - description: A human friendly name for the tax - type: string - example: Tax Example - region_id: - description: The ID of the region that the rate belongs to. - type: string - example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G - region: - description: The details of the region that the rate belongs to. - x-expandable: region - nullable: true - type: object - products: - description: The details of the products that belong to this tax rate. - type: array - x-expandable: products - items: - $ref: '#/components/schemas/Product' - product_types: - description: The details of the product types that belong to this tax rate. - type: array - x-expandable: product_types - items: - $ref: '#/components/schemas/ProductType' - shipping_options: - description: The details of the shipping options that belong to this tax rate. - type: array - x-expandable: shipping_options - items: - $ref: '#/components/schemas/ShippingOption' - product_count: - description: The count of products - type: integer - example: 10 - product_type_count: - description: The count of product types - type: integer - example: 2 - shipping_option_count: - description: The count of shipping options - type: integer - example: 1 - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - TrackingLink: - title: Tracking Link - description: A tracking link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment. Typically, the tracking link is provided from the third-party service integrated through the used fulfillment provider. - type: object - required: - - created_at - - deleted_at - - fulfillment_id - - id - - idempotency_key - - metadata - - tracking_number - - updated_at - - url - properties: - id: - description: The tracking link's ID - type: string - example: tlink_01G8ZH853Y6TFXWPG5EYE81X63 - url: - description: The URL at which the status of the shipment can be tracked. - nullable: true - type: string - format: uri - tracking_number: - description: The tracking number given by the shipping carrier. - type: string - format: RH370168054CN - fulfillment_id: - description: The ID of the fulfillment that the tracking link belongs to. - type: string - example: ful_01G8ZRTMQCA76TXNAT81KPJZRF - fulfillment: - description: The details of the fulfillment that the tracking link belongs to. - x-expandable: fulfillment - nullable: true - type: object - idempotency_key: - description: Randomly generated key used to continue the completion of a process in case of failure. - nullable: true - type: string - externalDocs: - url: https://docs.medusajs.com/development/idempotency-key/overview.md - description: Learn more how to use the idempotency key. - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute - UpdateStockLocationInput: - title: Update Stock Location Input - description: Represents the Input to update a Stock Location - type: object - properties: - name: - type: string - description: The stock location name - address_id: - type: string - description: The Stock location address ID - address: - description: Stock location address object - allOf: - - $ref: '#/components/schemas/StockLocationAddressInput' - - type: object - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white - User: - title: User - description: A User is an administrator who can manage store settings and data. - type: object - required: - - api_token - - created_at - - deleted_at - - email - - first_name - - id - - last_name - - metadata - - role - - updated_at - properties: - id: - description: The user's ID - type: string - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - role: - description: The user's role. These roles don't provide any different privileges. - type: string - enum: - - admin - - member - - developer - default: member - email: - description: The email of the User - type: string - format: email - first_name: - description: The first name of the User - nullable: true - type: string - example: Levi - last_name: - description: The last name of the User - nullable: true - type: string - example: Bogan - api_token: - description: An API token associated with the user. - nullable: true - type: string - example: null - created_at: - description: The date with timezone at which the resource was created. - type: string - format: date-time - updated_at: - description: The date with timezone at which the resource was updated. - type: string - format: date-time - deleted_at: - description: The date with timezone at which the resource was deleted. - nullable: true - type: string - format: date-time - metadata: - description: An optional key-value map with additional details - nullable: true - type: object - example: - car: white - externalDocs: - description: Learn about the metadata attribute, and how to delete and update it. - url: https://docs.medusajs.com/development/entities/overview#metadata-attribute + description: The payment collection's data. + properties: {} diff --git a/www/apps/api-reference/specs/store/openapi.yaml b/www/apps/api-reference/specs/store/openapi.yaml index 3811f07124..e7588daca6 100644 --- a/www/apps/api-reference/specs/store/openapi.yaml +++ b/www/apps/api-reference/specs/store/openapi.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: 1.0.0 + version: 2.0.0 title: Medusa Storefront API license: name: MIT @@ -9,17 +9,6 @@ servers: - url: http://localhost:9000 - url: https://api.medusa-commerce.com tags: - - name: Auth - description: > - Authentication API Routes allow you to manage a customer's session, such - as login or log out. - - You can send authenticated requests for a customer either using the Cookie - header or using the JWT Token. - externalDocs: - description: How to implement customer profiles in your storefront - url: >- - https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles - name: Carts description: > A cart is a virtual shopping bag that customers can use to add items they @@ -30,6 +19,7 @@ tags: description: How to implement cart functionality in your storefront url: >- https://docs.medusajs.com/modules/carts-and-checkout/storefront/implement-cart + - name: Currencies - name: Customers description: > A customer can register and manage their information such as addresses, @@ -38,81 +28,10 @@ tags: description: How to implement customer profiles in your storefront url: >- https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles - - name: Gift Cards - description: > - Customers can use gift cards during checkout to deduct the gift card's - balance from the checkout total. - - The Gift Card API Routes allow retrieving a gift card's details by its - code. A gift card can be applied to a cart using the Carts API Routes. - externalDocs: - description: How to use gift cards in a storefront - url: https://docs.medusajs.com/modules/gift-cards/storefront/use-gift-cards - - name: Orders - description: > - Orders are purchases made by customers, typically through a storefront. - - Orders are placed and created using the Carts API Routes. The Orders API - Routes allow retrieving and claiming orders. - externalDocs: - description: How to retrieve order details in a storefront - url: >- - https://docs.medusajs.com/modules/orders/storefront/retrieve-order-details - - name: Order Edits - description: > - Order edits are changes made to items in an order such as adding, updating - their quantity, or deleting them. Order edits are created by the admin. - - A customer can review order edit requests created by an admin and confirm - or decline them. - externalDocs: - description: How to handle order edits in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/handle-order-edits - name: Payment Collections description: > A payment collection is useful for managing additional payments, such as for Order Edits, or installment payments. - - name: Products - description: > - Products are saleable items in a store. This also includes [saleable gift - cards](https://docs.medusajs.com/modules/gift-cards/storefront/use-gift-cards) - in a store. - - Using these API Routes, you can filter products by categories, - collections, sales channels, and more. - externalDocs: - description: How to show products in a storefront - url: https://docs.medusajs.com/modules/products/storefront/show-products - - name: Product Variants - description: > - Product variants are the actual salable item in your store. Each variant - is a combination of the different option values available on the product. - - name: Product Categories - description: > - Products can be categoriezed into categories. A product can be associated - more than one category. - - Using these API Routes, you can list or retrieve a category's details and - products. - externalDocs: - description: How to use product categories in a storefront - url: https://docs.medusajs.com/modules/products/storefront/use-categories - - name: Product Collections - description: > - A product collection is used to organize products for different purposes - such as marketing or discount purposes. For example, you can create a - Summer Collection. - - Using these API Routes, you can list or retrieve a collection's details - and products. - - name: Product Tags - description: | - Product tags are string values that can be used to filter products by. - Products can have more than one tag, and products can share tags. - - name: Product Types - description: | - Product types are string values that can be used to filter products by. - Products can have more than one tag, and products can share types. - name: Regions description: > Regions are different countries or geographical regions that the commerce @@ -124,16 +43,6 @@ tags: description: How to use regions in a storefront url: >- https://docs.medusajs.com/modules/regions-and-currencies/storefront/use-regions - - name: Returns - description: | - A return can be created by a customer to return items in an order. - externalDocs: - description: How to create a return in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/create-return - - name: Return Reasons - description: > - Return reasons are key-value pairs that are used to specify why an order - return is being created. - name: Shipping Options description: > A shipping option is used to define the available shipping methods during @@ -142,51 +51,25 @@ tags: description: Shipping Option architecture url: >- https://docs.medusajs.com/modules/carts-and-checkout/shipping#shipping-option - - name: Swaps - description: > - A swap is created by a customer or an admin to exchange an item with a new - one. - - Creating a swap implicitely includes creating a return for the item being - exchanged. - externalDocs: - description: How to create a swap in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/create-swap paths: - /store/auth: - $ref: paths/store_auth.yaml - /store/auth/token: - $ref: paths/store_auth_token.yaml - /store/auth/{email}: - $ref: paths/store_auth_{email}.yaml /store/carts: $ref: paths/store_carts.yaml /store/carts/{id}: $ref: paths/store_carts_{id}.yaml - /store/carts/{id}/complete: - $ref: paths/store_carts_{id}_complete.yaml - /store/carts/{id}/discounts/{code}: - $ref: paths/store_carts_{id}_discounts_{code}.yaml /store/carts/{id}/line-items: $ref: paths/store_carts_{id}_line-items.yaml /store/carts/{id}/line-items/{line_id}: $ref: paths/store_carts_{id}_line-items_{line_id}.yaml - /store/carts/{id}/payment-session: - $ref: paths/store_carts_{id}_payment-session.yaml - /store/carts/{id}/payment-sessions: - $ref: paths/store_carts_{id}_payment-sessions.yaml - /store/carts/{id}/payment-sessions/{provider_id}: - $ref: paths/store_carts_{id}_payment-sessions_{provider_id}.yaml - /store/carts/{id}/payment-sessions/{provider_id}/refresh: - $ref: paths/store_carts_{id}_payment-sessions_{provider_id}_refresh.yaml - /store/carts/{id}/shipping-methods: - $ref: paths/store_carts_{id}_shipping-methods.yaml + /store/carts/{id}/payment-collections: + $ref: paths/store_carts_{id}_payment-collections.yaml + /store/carts/{id}/promotions: + $ref: paths/store_carts_{id}_promotions.yaml /store/carts/{id}/taxes: $ref: paths/store_carts_{id}_taxes.yaml - /store/collections: - $ref: paths/store_collections.yaml - /store/collections/{id}: - $ref: paths/store_collections_{id}.yaml + /store/currencies: + $ref: paths/store_currencies.yaml + /store/currencies/{code}: + $ref: paths/store_currencies_{code}.yaml /store/customers: $ref: paths/store_customers.yaml /store/customers/me: @@ -195,80 +78,16 @@ paths: $ref: paths/store_customers_me_addresses.yaml /store/customers/me/addresses/{address_id}: $ref: paths/store_customers_me_addresses_{address_id}.yaml - /store/customers/me/orders: - $ref: paths/store_customers_me_orders.yaml - /store/customers/me/payment-methods: - $ref: paths/store_customers_me_payment-methods.yaml - /store/customers/password-reset: - $ref: paths/store_customers_password-reset.yaml - /store/customers/password-token: - $ref: paths/store_customers_password-token.yaml - /store/gift-cards/{code}: - $ref: paths/store_gift-cards_{code}.yaml - /store/order-edits/{id}: - $ref: paths/store_order-edits_{id}.yaml - /store/order-edits/{id}/complete: - $ref: paths/store_order-edits_{id}_complete.yaml - /store/order-edits/{id}/decline: - $ref: paths/store_order-edits_{id}_decline.yaml - /store/orders: - $ref: paths/store_orders.yaml - /store/orders/batch/customer/token: - $ref: paths/store_orders_batch_customer_token.yaml - /store/orders/cart/{cart_id}: - $ref: paths/store_orders_cart_{cart_id}.yaml - /store/orders/customer/confirm: - $ref: paths/store_orders_customer_confirm.yaml - /store/orders/{id}: - $ref: paths/store_orders_{id}.yaml - /store/payment-collections/{id}: - $ref: paths/store_payment-collections_{id}.yaml - /store/payment-collections/{id}/sessions: - $ref: paths/store_payment-collections_{id}_sessions.yaml - /store/payment-collections/{id}/sessions/batch: - $ref: paths/store_payment-collections_{id}_sessions_batch.yaml - /store/payment-collections/{id}/sessions/batch/authorize: - $ref: paths/store_payment-collections_{id}_sessions_batch_authorize.yaml - /store/payment-collections/{id}/sessions/{session_id}: - $ref: paths/store_payment-collections_{id}_sessions_{session_id}.yaml - /store/payment-collections/{id}/sessions/{session_id}/authorize: - $ref: paths/store_payment-collections_{id}_sessions_{session_id}_authorize.yaml - /store/product-categories: - $ref: paths/store_product-categories.yaml - /store/product-categories/{id}: - $ref: paths/store_product-categories_{id}.yaml - /store/product-tags: - $ref: paths/store_product-tags.yaml - /store/product-types: - $ref: paths/store_product-types.yaml - /store/products: - $ref: paths/store_products.yaml - /store/products/search: - $ref: paths/store_products_search.yaml - /store/products/{id}: - $ref: paths/store_products_{id}.yaml + /store/payment-collections/{id}/payment-sessions: + $ref: paths/store_payment-collections_{id}_payment-sessions.yaml /store/regions: $ref: paths/store_regions.yaml /store/regions/{id}: $ref: paths/store_regions_{id}.yaml - /store/return-reasons: - $ref: paths/store_return-reasons.yaml - /store/return-reasons/{id}: - $ref: paths/store_return-reasons_{id}.yaml - /store/returns: - $ref: paths/store_returns.yaml - /store/shipping-options: - $ref: paths/store_shipping-options.yaml + /store/regions/{id}/payment-providers: + $ref: paths/store_regions_{id}_payment-providers.yaml /store/shipping-options/{cart_id}: $ref: paths/store_shipping-options_{cart_id}.yaml - /store/swaps: - $ref: paths/store_swaps.yaml - /store/swaps/{cart_id}: - $ref: paths/store_swaps_{cart_id}.yaml - /store/variants: - $ref: paths/store_variants.yaml - /store/variants/{id}: - $ref: paths/store_variants_{id}.yaml components: securitySchemes: jwt_token: diff --git a/www/apps/api-reference/specs/store/paths/store_auth.yaml b/www/apps/api-reference/specs/store/paths/store_auth.yaml deleted file mode 100644 index 5f230011df..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_auth.yaml +++ /dev/null @@ -1,121 +0,0 @@ -get: - operationId: GetAuth - summary: Get Current Customer - description: Retrieve the currently logged in Customer's details. - x-authenticated: true - x-codegen: - method: getSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_auth/get.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_auth/get.sh - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreAuthRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -post: - operationId: PostAuth - summary: Customer Login - description: >- - Log a customer in and includes the Cookie session in the response header. - The cookie session can be used in subsequent requests to authenticate the - customer. When using Medusa's JS or Medusa React clients, the cookie is - automatically attached to subsequent requests. - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostAuthReq.yaml - x-codegen: - method: authenticate - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_auth/post.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_auth/post.sh - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreAuthRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/incorrect_credentials.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteAuth - summary: Customer Log out - description: Delete the current session for the logged in customer. - x-authenticated: true - x-codegen: - method: deleteSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_auth/delete.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_auth/delete.sh - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Auth - responses: - '200': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_auth_token.yaml b/www/apps/api-reference/specs/store/paths/store_auth_token.yaml deleted file mode 100644 index df6f066bb5..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_auth_token.yaml +++ /dev/null @@ -1,44 +0,0 @@ -post: - operationId: PostToken - summary: Customer Login (JWT) - x-authenticated: false - description: >- - After a successful login, a JWT token is returned, which can be used to send - authenticated requests. - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostAuthReq.yaml - x-codegen: - method: getToken - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_auth_token/post.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_auth_token/post.sh - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreBearerAuthRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/incorrect_credentials.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_auth_{email}.yaml b/www/apps/api-reference/specs/store/paths/store_auth_{email}.yaml deleted file mode 100644 index 9b1b2ac50d..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_auth_{email}.yaml +++ /dev/null @@ -1,42 +0,0 @@ -get: - operationId: GetAuthEmail - summary: Check if Email Exists - description: Check if there's a customer already registered with the provided email. - parameters: - - in: path - name: email - schema: - type: string - format: email - required: true - description: The email to check. - x-codegen: - method: exists - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_auth_{email}/get.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_auth_{email}/get.sh - tags: - - Auth - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreGetAuthEmailRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_carts.yaml b/www/apps/api-reference/specs/store/paths/store_carts.yaml index fe36954e14..b3c9f70118 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts.yaml @@ -1,33 +1,10 @@ post: - operationId: PostCart - summary: Create a Cart - description: > - Create a Cart. Although optional, specifying the cart's region and sales - channel can affect the cart's pricing and - - the products that can be added to the cart respectively. So, make sure to - set those early on and change them if necessary, such as when the customer - changes their region. - - - If a customer is logged in, make sure to pass its ID or email within the - cart's details so that the cart is attached to the customer. - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCartReq.yaml - x-codegen: - method: create + operationId: PostCarts + summary: Create Cart + description: Create a cart. + x-authenticated: false + parameters: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_carts/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_carts/post.tsx - lang: Shell label: cURL source: @@ -35,14 +12,10 @@ post: tags: - Carts responses: - '200': - description: Successfully created a new Cart - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': @@ -51,3 +24,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml index f64f7415c8..6c7ff10d87 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml @@ -1,25 +1,18 @@ get: - operationId: GetCartsCart + operationId: GetCartsId summary: Get a Cart - description: Retrieve a Cart's details. This includes recalculating its totals. + description: >- + Retrieve a cart by its ID. You can expand the cart's relations or select the + fields that should be returned. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The ID of the Cart. schema: type: string - x-codegen: - method: retrieve x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_carts_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_carts_{id}/get.tsx - lang: Shell label: cURL source: @@ -27,14 +20,10 @@ get: tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': @@ -43,36 +32,23 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostCartsCart - summary: Update a Cart - description: >- - Update a Cart's details. If the cart has payment sessions and the region was - not changed, the payment sessions are updated. The cart's totals are also - recalculated. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string requestBody: content: application/json: - schema: - $ref: ../components/schemas/StorePostCartsCartReq.yaml - x-codegen: - method: update + schema: {} +post: + operationId: PostCartsId + summary: Update a Cart + description: Update a cart's details. + x-authenticated: false + parameters: + - name: id + in: path + description: The cart's ID. + required: true + schema: + type: string x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_carts_{id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_carts_{id}/post.tsx - lang: Shell label: cURL source: @@ -80,14 +56,10 @@ post: tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': @@ -96,3 +68,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_complete.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_complete.yaml deleted file mode 100644 index 999000b60c..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_complete.yaml +++ /dev/null @@ -1,69 +0,0 @@ -post: - summary: Complete a Cart - operationId: PostCartsCartComplete - description: > - Complete a cart and place an order or create a swap, based on the cart's - type. This includes attempting to authorize the cart's payment. - - If authorizing the payment requires more action, the cart will not be - completed and the order will not be placed or the swap will not be created. - - - An idempotency key will be generated if none is provided in the header - `Idempotency-Key` and added to - - the response. If an error occurs during cart completion or the request is - interrupted for any reason, the cart completion can be retried by passing - the idempotency - - key in the `Idempotency-Key` header. - externalDocs: - description: Cart completion overview - url: https://docs.medusajs.com/modules/carts-and-checkout/cart#cart-completion - parameters: - - in: path - name: id - required: true - description: The Cart ID. - schema: - type: string - x-codegen: - method: complete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_carts_{id}_complete/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_carts_{id}_complete/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts_{id}_complete/post.sh - tags: - - Carts - responses: - '200': - description: >- - If the payment of the cart was successfully authorized, but requires - further action from the customer, the response body will contain the - cart with an updated payment session. Otherwise, if the payment was - authorized and the cart was successfully completed, the response body - will contain either the newly created order or swap, depending on what - the cart was created for. - content: - application/json: - schema: - $ref: ../components/schemas/StoreCompleteCartRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_discounts_{code}.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_discounts_{code}.yaml deleted file mode 100644 index e89f14a946..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_discounts_{code}.yaml +++ /dev/null @@ -1,50 +0,0 @@ -delete: - operationId: DeleteCartsCartDiscountsDiscount - summary: Remove Discount - description: >- - Remove a Discount from a Cart. This only removes the application of the - discount, and not completely deletes it. The totals will be re-calculated - and the payment sessions will be refreshed after the removal. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string - - in: path - name: code - required: true - description: The unique discount code. - schema: - type: string - x-codegen: - method: deleteDiscount - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_carts_{id}_discounts_{code}/delete.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts_{id}_discounts_{code}/delete.sh - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml index d3c6533c7d..c821f142a0 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml @@ -1,30 +1,16 @@ post: - operationId: PostCartsCartLineItems - summary: Add a Line Item - description: Generates a Line Item with a given Product Variant and adds it to the Cart + operationId: PostCartsIdLineItems + summary: Add Line Items to Cart + description: Add a list of line items to a cart. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The id of the Cart to add the Line Item to. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCartsCartLineItemsReq.yaml - x-codegen: - method: createLineItem x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_carts_{id}_line-items/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_carts_{id}_line-items/post.tsx - lang: Shell label: cURL source: @@ -32,14 +18,10 @@ post: tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': @@ -48,3 +30,7 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml index 1478eb81ea..eb41b93406 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml @@ -1,37 +1,22 @@ post: - operationId: PostCartsCartLineItemsItem - summary: Update a Line Item - description: Update a line item's quantity. + operationId: PostCartsIdLineItemsLine_id + summary: Add Line Items to Cart + description: Add a list of line items to a cart. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The ID of the Cart. schema: type: string - - in: path - name: line_id + - name: line_id + in: path + description: The cart's line id. required: true - description: The ID of the Line Item. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCartsCartLineItemsItemReq.yaml - x-codegen: - method: updateLineItem x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_carts_{id}_line-items_{line_id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_carts_{id}_line-items_{line_id}/post.tsx - lang: Shell label: cURL source: @@ -39,14 +24,10 @@ post: tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': @@ -55,37 +36,31 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteCartsCartLineItemsItem - summary: Delete a Line Item + operationId: DeleteCartsIdLineItemsLine_id + summary: Remove Line Items from Cart description: >- - Delete a Line Item from a Cart. The payment sessions will be updated and the - totals will be recalculated. + Remove a list of line items from a cart. This doesn't delete the Line Item, + only the association between the Line Item and the cart. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The ID of the Cart. schema: type: string - - in: path - name: line_id + - name: line_id + in: path + description: The cart's line id. required: true - description: The ID of the Line Item. schema: type: string - x-codegen: - method: deleteLineItem x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_carts_{id}_line-items_{line_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_carts_{id}_line-items_{line_id}/delete.tsx - lang: Shell label: cURL source: @@ -93,14 +68,10 @@ delete: tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': @@ -109,3 +80,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_payment-collections.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-collections.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_payment-collections.yaml rename to www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-collections.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-session.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-session.yaml deleted file mode 100644 index 3b2bbff0dd..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-session.yaml +++ /dev/null @@ -1,53 +0,0 @@ -post: - operationId: PostCartsCartPaymentSession - summary: Select a Payment Session - description: >- - Select the Payment Session that will be used to complete the cart. This is - typically used when the customer chooses their preferred payment method - during checkout. The totals of the cart will be recalculated. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCartsCartPaymentSessionReq.yaml - x-codegen: - method: setPaymentSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_carts_{id}_payment-session/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_carts_{id}_payment-session/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts_{id}_payment-session/post.sh - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-sessions.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-sessions.yaml deleted file mode 100644 index 73aaef6c07..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-sessions.yaml +++ /dev/null @@ -1,49 +0,0 @@ -post: - operationId: PostCartsCartPaymentSessions - summary: Create Payment Sessions - description: >- - Create Payment Sessions for each of the available Payment Providers in the - Cart's Region. If there's only one payment session created, it will be - selected by default. The creation of the payment session uses the payment - provider and may require sending requests to third-party services. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string - x-codegen: - method: createPaymentSessions - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_carts_{id}_payment-sessions/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_carts_{id}_payment-sessions/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts_{id}_payment-sessions/post.sh - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-sessions_{provider_id}.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-sessions_{provider_id}.yaml deleted file mode 100644 index a1c3285a73..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-sessions_{provider_id}.yaml +++ /dev/null @@ -1,120 +0,0 @@ -post: - operationId: PostCartsCartPaymentSessionUpdate - summary: Update a Payment Session - description: >- - Update a Payment Session with additional data. This can be useful depending - on the payment provider used. All payment sessions are updated and cart - totals are recalculated afterwards. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string - - in: path - name: provider_id - required: true - description: The ID of the payment provider. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCartsCartPaymentSessionUpdateReq.yaml - x-codegen: - method: updatePaymentSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}/post.sh - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml -delete: - operationId: DeleteCartsCartPaymentSessionsSession - summary: Delete a Payment Session - description: >- - Delete a Payment Session in a Cart. May be useful if a payment has failed. - The totals will be recalculated. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string - - in: path - name: provider_id - required: true - description: >- - The ID of the Payment Provider used to create the Payment Session to be - deleted. - schema: - type: string - x-codegen: - method: deletePaymentSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}/delete.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}/delete.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}/delete.sh - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-sessions_{provider_id}_refresh.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-sessions_{provider_id}_refresh.yaml deleted file mode 100644 index d7090b15dc..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_payment-sessions_{provider_id}_refresh.yaml +++ /dev/null @@ -1,58 +0,0 @@ -post: - operationId: PostCartsCartPaymentSessionsSession - summary: Refresh a Payment Session - description: >- - Refresh a Payment Session to ensure that it is in sync with the Cart. This - is usually not necessary, but is provided for edge cases. - parameters: - - in: path - name: id - required: true - description: The ID of the Cart. - schema: - type: string - - in: path - name: provider_id - required: true - description: >- - The ID of the Payment Provider that created the Payment Session to be - refreshed. - schema: - type: string - x-codegen: - method: refreshPaymentSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/store_carts_{id}_payment-sessions_{provider_id}_refresh/post.sh - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_promotions.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_promotions.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/paths/store_carts_{id}_promotions.yaml rename to www/apps/api-reference/specs/store/paths/store_carts_{id}_promotions.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_shipping-methods.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_shipping-methods.yaml deleted file mode 100644 index e3fee76747..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_shipping-methods.yaml +++ /dev/null @@ -1,52 +0,0 @@ -post: - operationId: PostCartsCartShippingMethod - summary: Add Shipping Method - description: >- - Add a Shipping Method to the Cart. The validation of the `data` field is - handled by the fulfillment provider of the chosen shipping option. - parameters: - - in: path - name: id - required: true - description: The cart ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCartsCartShippingMethodReq.yaml - x-codegen: - method: addShippingMethod - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_carts_{id}_shipping-methods/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_carts_{id}_shipping-methods/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_carts_{id}_shipping-methods/post.sh - tags: - - Carts - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml index fd002e7f31..b682bfc374 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml @@ -1,23 +1,20 @@ post: - operationId: PostCartsCartTaxes - summary: Calculate Cart Taxes - description: >- - Calculate the taxes for a cart. This is useful if the `automatic_taxes` - field of the cart's region is set to `false`. If the cart's region uses a - tax provider other than Medusa's system provider, this may lead to sending - requests to third-party services. - externalDocs: - description: How to calculate taxes manually during checkout - url: https://docs.medusajs.com/modules/taxes/storefront/manual-calculation + operationId: PostCartsIdTaxes + summary: Add Taxes to Cart + description: Add a list of taxes to a cart. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The cart's ID. required: true - description: The Cart ID. schema: type: string - x-codegen: - method: calculateTaxes + requestBody: + content: + application/json: + schema: + $ref: ../components/schemas/StorePostCartsCartTaxesReq.yaml x-codeSamples: - lang: Shell label: cURL @@ -26,14 +23,10 @@ post: tags: - Carts responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartsRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': diff --git a/www/apps/api-reference/specs/store/paths/store_collections.yaml b/www/apps/api-reference/specs/store/paths/store_collections.yaml deleted file mode 100644 index e798d10141..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_collections.yaml +++ /dev/null @@ -1,110 +0,0 @@ -get: - operationId: GetCollections - summary: List Collections - description: >- - Retrieve a list of product collections. The product collections can be - filtered by fields such as `handle` or `created_at`. The product collections - can also be paginated. - parameters: - - in: query - name: offset - description: >- - The number of product collections to skip when retrieving the product - collections. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of product collections returned. - schema: - type: integer - default: 10 - - in: query - name: handle - style: form - explode: false - description: Filter by handles - schema: - type: array - items: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: StoreGetCollectionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_collections/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_collections/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_collections/get.sh - tags: - - Product Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCollectionsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_collections_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_collections_{id}.yaml deleted file mode 100644 index f417830db6..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_collections_{id}.yaml +++ /dev/null @@ -1,45 +0,0 @@ -get: - operationId: GetCollectionsCollection - summary: Get a Collection - description: Retrieve a Product Collection's details. - parameters: - - in: path - name: id - required: true - description: The id of the Product Collection - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_collections_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_collections_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_collections_{id}/get.sh - tags: - - Product Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCollectionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/store/paths/store_currencies.yaml b/www/apps/api-reference/specs/store/paths/store_currencies.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/paths/store_currencies.yaml rename to www/apps/api-reference/specs/store/paths/store_currencies.yaml diff --git a/www/apps/api-reference/specs-v2/store/paths/store_currencies_{code}.yaml b/www/apps/api-reference/specs/store/paths/store_currencies_{code}.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/paths/store_currencies_{code}.yaml rename to www/apps/api-reference/specs/store/paths/store_currencies_{code}.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_customers.yaml b/www/apps/api-reference/specs/store/paths/store_customers.yaml index 4066cea147..26ff1861ee 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers.yaml @@ -1,28 +1,10 @@ post: operationId: PostCustomers - summary: Create a Customer - description: >- - Register a new customer. This will also automatically authenticate the - customer and set their login session in the response Cookie header. The - cookie session can be used in subsequent requests to authenticate the - customer. When using Medusa's JS or Medusa React clients, the cookie is - automatically attached to subsequent requests. - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCustomersReq.yaml - x-codegen: - method: create + summary: Create Customer + description: Create a customer. + x-authenticated: false + parameters: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_customers/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_customers/post.tsx - lang: Shell label: cURL source: @@ -30,39 +12,19 @@ post: tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCustomersRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': $ref: ../components/responses/invalid_state_error.yaml '422': - description: A customer with the same email exists - content: - application/json: - schema: - type: object - properties: - code: - type: string - description: The error code - type: - type: string - description: The type of error - message: - type: string - description: Human-readable message with details about the error - example: - code: invalid_request_error - type: duplicate_error - message: >- - A customer with the given email already has an account. Log in - instead + $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/store/paths/store_customers_me.yaml b/www/apps/api-reference/specs/store/paths/store_customers_me.yaml index c47ff60add..f4fa33b2b6 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers_me.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers_me.yaml @@ -1,35 +1,19 @@ get: - operationId: GetCustomersCustomer - summary: Get a Customer - description: Retrieve the logged-in Customer's details. - x-authenticated: true - x-codegen: - method: retrieve + operationId: GetCustomersMe + summary: List Customers + description: >- + Retrieve a list of customers. The customers can be filtered by fields such + as `id`. The customers can also be sorted or paginated. + x-authenticated: false + parameters: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_customers_me/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_customers_me/get.tsx - lang: Shell label: cURL source: $ref: ../code_samples/Shell/store_customers_me/get.sh - security: - - cookie_auth: [] - - jwt_token: [] tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCustomersRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -42,52 +26,7 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml -post: - operationId: PostCustomersCustomer - summary: Update Customer - description: Update the logged-in customer's details. - x-authenticated: true requestBody: content: application/json: - schema: - $ref: ../components/schemas/StorePostCustomersCustomerReq.yaml - x-codegen: - method: update - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_customers_me/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_customers_me/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_customers_me/post.sh - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Customers - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCustomersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml + schema: {} diff --git a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml index 685ddfbea9..d993417ab0 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml @@ -1,36 +1,19 @@ -post: - operationId: PostCustomersCustomerAddresses - summary: Add a Shipping Address - description: Add a Shipping Address to a Customer's saved addresses. - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCustomersCustomerAddressesReq.yaml - x-codegen: - method: addAddress +get: + operationId: GetCustomersMeAddresses + summary: List Customers + description: >- + Retrieve a list of customers. The customers can be filtered by fields such + as `id`. The customers can also be sorted or paginated. + x-authenticated: false + parameters: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_customers_me_addresses/post.js - lang: Shell label: cURL source: - $ref: ../code_samples/Shell/store_customers_me_addresses/post.sh - security: - - cookie_auth: [] - - jwt_token: [] + $ref: ../code_samples/Shell/store_customers_me_addresses/get.sh tags: - Customers responses: - '200': - description: A successful response - content: - application/json: - schema: - $ref: ../components/schemas/StoreCustomersRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -43,3 +26,37 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} +post: + operationId: PostCustomersMeAddresses + summary: Create Customer + description: Create a customer. + x-authenticated: false + parameters: [] + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/store_customers_me_addresses/post.sh + tags: + - Customers + responses: + '400': + $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml + '404': + $ref: ../components/responses/not_found_error.yaml + '409': + $ref: ../components/responses/invalid_state_error.yaml + '422': + $ref: ../components/responses/invalid_request_error.yaml + '500': + $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml index d52aaaedd4..cd34e7826b 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml @@ -1,46 +1,62 @@ -post: - operationId: PostCustomersCustomerAddressesAddress - summary: Update a Shipping Address - description: Update the logged-in customer's saved Shipping Address's details. - x-authenticated: true +get: + operationId: GetCustomersMeAddressesAddress_id + summary: List Addresses + description: >- + Retrieve a list of addresses in a customer. The addresses can be filtered by + fields like FILTER FIELDS. The addresses can also be paginated. + x-authenticated: false parameters: - - in: path - name: address_id + - name: address_id + in: path + description: The customer's address id. required: true - description: The ID of the Address. schema: type: string + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/store_customers_me_addresses_{address_id}/get.sh + tags: + - Customers + responses: + '400': + $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml + '404': + $ref: ../components/responses/not_found_error.yaml + '409': + $ref: ../components/responses/invalid_state_error.yaml + '422': + $ref: ../components/responses/invalid_request_error.yaml + '500': + $ref: ../components/responses/500_error.yaml requestBody: content: application/json: - schema: - $ref: >- - ../components/schemas/StorePostCustomersCustomerAddressesAddressReq.yaml - x-codegen: - method: updateAddress + schema: {} +post: + operationId: PostCustomersMeAddressesAddress_id + summary: Add Addresses to Customer + description: Add a list of addresses to a customer. + x-authenticated: false + parameters: + - name: address_id + in: path + description: The customer's address id. + required: true + schema: + type: string x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_customers_me_addresses_{address_id}/post.js - lang: Shell label: cURL source: $ref: >- ../code_samples/Shell/store_customers_me_addresses_{address_id}/post.sh - security: - - cookie_auth: [] - - jwt_token: [] tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCustomersRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -53,43 +69,33 @@ post: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} delete: - operationId: DeleteCustomersCustomerAddressesAddress - summary: Delete an Address - description: Delete an Address from the Customer's saved addresses. - x-authenticated: true + operationId: DeleteCustomersMeAddressesAddress_id + summary: Remove Addresses from Customer + description: >- + Remove a list of addresses from a customer. This doesn't delete the Address, + only the association between the Address and the customer. + x-authenticated: false parameters: - - in: path - name: address_id + - name: address_id + in: path + description: The customer's address id. required: true - description: The id of the Address to remove. schema: type: string - x-codegen: - method: deleteAddress x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_customers_me_addresses_{address_id}/delete.js - lang: Shell label: cURL source: $ref: >- ../code_samples/Shell/store_customers_me_addresses_{address_id}/delete.sh - security: - - cookie_auth: [] - - jwt_token: [] tags: - Customers responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCustomersRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': @@ -102,3 +108,7 @@ delete: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/store/paths/store_customers_me_orders.yaml b/www/apps/api-reference/specs/store/paths/store_customers_me_orders.yaml deleted file mode 100644 index 5939bc14b4..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_customers_me_orders.yaml +++ /dev/null @@ -1,238 +0,0 @@ -get: - operationId: GetCustomersCustomerOrders - summary: List Orders - description: >- - Retrieve a list of the logged-in Customer's Orders. The orders can be - filtered by fields such as `status` or `fulfillment_status`. The orders can - also be paginated. - x-authenticated: true - parameters: - - in: query - name: q - description: >- - term to search orders' display ID, email, shipping address's first name, - customer's first name, customer's last name, and customer's phone - number. - schema: - type: string - - in: query - name: id - description: Filter by ID. - schema: - type: string - - in: query - name: status - style: form - explode: false - description: Filter by status. - schema: - type: array - items: - type: string - enum: - - pending - - completed - - archived - - canceled - - requires_action - - in: query - name: fulfillment_status - style: form - explode: false - description: Fulfillment status to search for. - schema: - type: array - items: - type: string - enum: - - not_fulfilled - - partially_fulfilled - - fulfilled - - partially_shipped - - shipped - - partially_returned - - returned - - canceled - - requires_action - - in: query - name: payment_status - style: form - explode: false - description: Payment status to search for. - schema: - type: array - items: - type: string - enum: - - not_paid - - awaiting - - captured - - partially_refunded - - refunded - - canceled - - requires_action - - in: query - name: display_id - description: Filter by display ID. - schema: - type: string - - in: query - name: cart_id - description: Filter by cart ID. - schema: - type: string - - in: query - name: email - description: Filter by email. - schema: - type: string - - in: query - name: region_id - description: Filter by region ID. - schema: - type: string - - in: query - name: currency_code - style: form - explode: false - description: Filter by the 3 character ISO currency code of the order. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - - in: query - name: tax_rate - description: Filter by tax rate. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: canceled_at - description: Filter by a cancelation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: limit - description: Limit the number of orders returned. - schema: - type: integer - default: 10 - - in: query - name: offset - description: The number of orders to skip when retrieving the orders. - schema: - type: integer - default: 0 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - orders. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned orders. - schema: - type: string - x-codegen: - method: listOrders - queryParams: StoreGetCustomersCustomerOrdersParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_customers_me_orders/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_customers_me_orders/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_customers_me_orders/get.sh - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Customers - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCustomersListOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_customers_me_payment-methods.yaml b/www/apps/api-reference/specs/store/paths/store_customers_me_payment-methods.yaml deleted file mode 100644 index 67e16318a8..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_customers_me_payment-methods.yaml +++ /dev/null @@ -1,46 +0,0 @@ -get: - operationId: GetCustomersCustomerPaymentMethods - summary: Get Saved Payment Methods - description: >- - Retrieve the logged-in customer's saved payment methods. This API Route only - works with payment providers created with the deprecated Payment Service - interface. The payment methods are saved using the Payment Service's - third-party service, and not on the Medusa backend. So, they're retrieved - from the third-party service. - x-authenticated: true - deprecated: true - x-codegen: - method: listPaymentMethods - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_customers_me_payment-methods/get.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_customers_me_payment-methods/get.sh - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Customers - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCustomersListPaymentMethodsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_customers_password-reset.yaml b/www/apps/api-reference/specs/store/paths/store_customers_password-reset.yaml deleted file mode 100644 index 5961ccda45..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_customers_password-reset.yaml +++ /dev/null @@ -1,48 +0,0 @@ -post: - operationId: PostCustomersResetPassword - summary: Reset Password - description: >- - Reset a Customer's password using a password token created by a previous - request to the Request Password Reset API Route. If the password token - expired, you must create a new one. - externalDocs: - description: How to reset password - url: >- - https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles#reset-password - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCustomersResetPasswordReq.yaml - x-codegen: - method: resetPassword - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_customers_password-reset/post.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_customers_password-reset/post.sh - tags: - - Customers - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCustomersResetPasswordRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_customers_password-token.yaml b/www/apps/api-reference/specs/store/paths/store_customers_password-token.yaml deleted file mode 100644 index 21ae415b8e..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_customers_password-token.yaml +++ /dev/null @@ -1,47 +0,0 @@ -post: - operationId: PostCustomersCustomerPasswordToken - summary: Request Password Reset - description: >- - Create a reset password token to be used in a subsequent Reset Password API - Route. This emits the event `customer.password_reset`. If a notification - provider is installed in the Medusa backend and is configured to handle this - event, a notification to the customer, such as an email, may be sent with - reset instructions. - externalDocs: - description: How to reset password - url: >- - https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles#reset-password - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/StorePostCustomersCustomerPasswordTokenReq.yaml - x-codegen: - method: generatePasswordToken - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_customers_password-token/post.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_customers_password-token/post.sh - tags: - - Customers - responses: - '204': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_gift-cards_{code}.yaml b/www/apps/api-reference/specs/store/paths/store_gift-cards_{code}.yaml deleted file mode 100644 index bac81d521a..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_gift-cards_{code}.yaml +++ /dev/null @@ -1,45 +0,0 @@ -get: - operationId: GetGiftCardsCode - summary: Get Gift Card by Code - description: Retrieve a Gift Card's details by its associated unique code. - parameters: - - in: path - name: code - required: true - description: The unique Gift Card code. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_gift-cards_{code}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_gift-cards_{code}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_gift-cards_{code}/get.sh - tags: - - Gift Cards - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreGiftCardsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_order-edits_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_order-edits_{id}.yaml deleted file mode 100644 index 42f6ca79d8..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_order-edits_{id}.yaml +++ /dev/null @@ -1,47 +0,0 @@ -get: - operationId: GetOrderEditsOrderEdit - summary: Retrieve an Order Edit - description: Retrieve an Order Edit's details. - parameters: - - in: path - name: id - required: true - description: The ID of the OrderEdit. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_order-edits_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_order-edits_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_order-edits_{id}/get.sh - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_order-edits_{id}_complete.yaml b/www/apps/api-reference/specs/store/paths/store_order-edits_{id}_complete.yaml deleted file mode 100644 index fb014d017c..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_order-edits_{id}_complete.yaml +++ /dev/null @@ -1,49 +0,0 @@ -post: - operationId: PostOrderEditsOrderEditComplete - summary: Complete an Order Edit - description: >- - Complete an Order Edit and reflect its changes on the original order. Any - additional payment required must be authorized first using the Payment - Collection API Routes. - externalDocs: - description: How to handle order edits in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/handle-order-edits - parameters: - - in: path - name: id - required: true - description: The ID of the Order Edit. - schema: - type: string - x-codegen: - method: complete - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_order-edits_{id}_complete/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_order-edits_{id}_complete/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_order-edits_{id}_complete/post.sh - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_order-edits_{id}_decline.yaml b/www/apps/api-reference/specs/store/paths/store_order-edits_{id}_decline.yaml deleted file mode 100644 index 77758822dc..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_order-edits_{id}_decline.yaml +++ /dev/null @@ -1,48 +0,0 @@ -post: - operationId: PostOrderEditsOrderEditDecline - summary: Decline an Order Edit - description: Decline an Order Edit. The changes are not reflected on the original order. - parameters: - - in: path - name: id - required: true - description: The ID of the OrderEdit. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostOrderEditsOrderEditDecline.yaml - x-codegen: - method: decline - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_order-edits_{id}_decline/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_order-edits_{id}_decline/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_order-edits_{id}_decline/post.sh - tags: - - Order Edits - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreOrderEditsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_orders.yaml b/www/apps/api-reference/specs/store/paths/store_orders.yaml deleted file mode 100644 index ac43935045..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_orders.yaml +++ /dev/null @@ -1,78 +0,0 @@ -get: - operationId: GetOrders - summary: Look Up an Order - description: >- - Look up an order using filters. If the filters don't narrow down the results - to a single order, a 404 response is returned with no orders. - parameters: - - in: query - name: display_id - required: true - description: Filter by ID. - schema: - type: number - - in: query - name: fields - description: Comma-separated fields that should be expanded in the returned order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be expanded in the returned order. - schema: - type: string - - in: query - name: email - style: form - explode: false - description: Filter by email. - required: true - schema: - type: string - format: email - - in: query - name: shipping_address - style: form - explode: false - description: Filter by the shipping address's postal code. - schema: - type: object - properties: - postal_code: - type: string - description: The postal code of the shipping address - x-codegen: - method: lookupOrder - queryParams: StoreGetOrdersParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_orders/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_orders/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_orders/get.sh - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_orders_batch_customer_token.yaml b/www/apps/api-reference/specs/store/paths/store_orders_batch_customer_token.yaml deleted file mode 100644 index 93e26c1aa0..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_orders_batch_customer_token.yaml +++ /dev/null @@ -1,56 +0,0 @@ -post: - operationId: PostOrdersCustomerOrderClaim - summary: Claim Order - description: >- - Allow the logged-in customer to claim ownership of one or more orders. This - generates a token that can be used later on to verify the claim using the - Verify Order Claim API Route. This also emits the event - `order-update-token.created`. So, if you have a notification provider - installed that handles this event and sends the customer a notification, - such as an email, the customer should receive instructions on how to - finalize their claim ownership. - externalDocs: - description: How to implement claim-order flow in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/implement-claim-order - x-authenticated: true - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCustomersCustomerOrderClaimReq.yaml - x-codegen: - method: requestCustomerOrders - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_orders_batch_customer_token/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_orders_batch_customer_token/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_orders_batch_customer_token/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_orders_cart_{cart_id}.yaml b/www/apps/api-reference/specs/store/paths/store_orders_cart_{cart_id}.yaml deleted file mode 100644 index 9adc1e3528..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_orders_cart_{cart_id}.yaml +++ /dev/null @@ -1,47 +0,0 @@ -get: - operationId: GetOrdersOrderCartId - summary: Get by Cart ID - description: >- - Retrieve an Order's details by the ID of the Cart that was used to create - the Order. - parameters: - - in: path - name: cart_id - required: true - description: The ID of Cart. - schema: - type: string - x-codegen: - method: retrieveByCartId - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_orders_cart_{cart_id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_orders_cart_{cart_id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_orders_cart_{cart_id}/get.sh - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_orders_customer_confirm.yaml b/www/apps/api-reference/specs/store/paths/store_orders_customer_confirm.yaml deleted file mode 100644 index c6eda5bd8a..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_orders_customer_confirm.yaml +++ /dev/null @@ -1,50 +0,0 @@ -post: - operationId: PostOrdersCustomerOrderClaimsCustomerOrderClaimAccept - summary: Verify Order Claim - description: >- - Verify the claim order token provided to the customer when they request - ownership of an order. - externalDocs: - description: How to implement claim-order flow in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/implement-claim-order - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostCustomersCustomerAcceptClaimReq.yaml - x-codegen: - method: confirmRequest - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_orders_customer_confirm/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_orders_customer_confirm/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_orders_customer_confirm/post.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Orders - responses: - '200': - description: OK - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_orders_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_orders_{id}.yaml deleted file mode 100644 index b79018cb51..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_orders_{id}.yaml +++ /dev/null @@ -1,55 +0,0 @@ -get: - operationId: GetOrdersOrder - summary: Get an Order - description: Retrieve an Order's details. - parameters: - - in: path - name: id - required: true - description: The ID of the Order. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be expanded in the returned order. - schema: - type: string - - in: query - name: expand - description: Comma-separated relations that should be included in the returned order. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_orders_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_orders_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_orders_{id}/get.sh - tags: - - Orders - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreOrdersRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}.yaml deleted file mode 100644 index 7c117d86c9..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}.yaml +++ /dev/null @@ -1,66 +0,0 @@ -get: - operationId: GetPaymentCollectionsPaymentCollection - summary: Get a PaymentCollection - description: Retrieve a Payment Collection's details. - x-authenticated: false - parameters: - - in: path - name: id - required: true - description: The ID of the PaymentCollection. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be expanded in the returned payment - collection. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - payment collection. - schema: - type: string - x-codegen: - method: retrieve - queryParams: StoreGetPaymentCollectionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_payment-collections_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_payment-collections_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_payment-collections_{id}/get.sh - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StorePaymentCollectionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs-v2/store/paths/store_payment-collections_{id}_payment-sessions.yaml b/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_payment-sessions.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/paths/store_payment-collections_{id}_payment-sessions.yaml rename to www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_payment-sessions.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions.yaml b/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions.yaml deleted file mode 100644 index 9bcb2e1e8a..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions.yaml +++ /dev/null @@ -1,57 +0,0 @@ -post: - operationId: PostPaymentCollectionsSessions - summary: Create a Payment Session - description: Create a Payment Session for a payment provider in a Payment Collection. - x-authenticated: false - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePaymentCollectionSessionsReq.yaml - x-codegen: - method: managePaymentSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_payment-collections_{id}_sessions/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_payment-collections_{id}_sessions/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_payment-collections_{id}_sessions/post.sh - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StorePaymentCollectionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_batch.yaml b/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_batch.yaml deleted file mode 100644 index e8896b1bc9..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_batch.yaml +++ /dev/null @@ -1,63 +0,0 @@ -post: - operationId: PostPaymentCollectionsPaymentCollectionSessionsBatch - summary: Manage Payment Sessions - description: >- - Create, update, or delete a list of payment sessions of a Payment - Collections. If a payment session is not provided in the `sessions` array, - it's deleted. - x-authenticated: false - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/StorePostPaymentCollectionsBatchSessionsReq.yaml - x-codegen: - method: managePaymentSessionsBatch - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_payment-collections_{id}_sessions_batch/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/store_payment-collections_{id}_sessions_batch/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/store_payment-collections_{id}_sessions_batch/post.sh - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StorePaymentCollectionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_batch_authorize.yaml b/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_batch_authorize.yaml deleted file mode 100644 index 028af4b2ed..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_batch_authorize.yaml +++ /dev/null @@ -1,60 +0,0 @@ -post: - operationId: PostPaymentCollectionsSessionsBatchAuthorize - summary: Authorize Payment Sessions - description: Authorize the Payment Sessions of a Payment Collection. - x-authenticated: false - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collections. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - ../components/schemas/StorePostPaymentCollectionsBatchSessionsAuthorizeReq.yaml - x-codegen: - method: authorizePaymentSessionsBatch - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_payment-collections_{id}_sessions_batch_authorize/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/store_payment-collections_{id}_sessions_batch_authorize/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/store_payment-collections_{id}_sessions_batch_authorize/post.sh - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StorePaymentCollectionsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_{session_id}.yaml b/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_{session_id}.yaml deleted file mode 100644 index 35e1714798..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_{session_id}.yaml +++ /dev/null @@ -1,60 +0,0 @@ -post: - operationId: PostPaymentCollectionsPaymentCollectionPaymentSessionsSession - summary: Refresh a Payment Session - description: >- - Refresh a Payment Session's data to ensure that it is in sync with the - Payment Collection. - x-authenticated: false - parameters: - - in: path - name: id - required: true - description: The id of the PaymentCollection. - schema: - type: string - - in: path - name: session_id - required: true - description: The id of the Payment Session to be refreshed. - schema: - type: string - x-codegen: - method: refreshPaymentSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_payment-collections_{id}_sessions_{session_id}/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/store_payment-collections_{id}_sessions_{session_id}/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/store_payment-collections_{id}_sessions_{session_id}/post.sh - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StorePaymentCollectionsSessionRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_{session_id}_authorize.yaml b/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_{session_id}_authorize.yaml deleted file mode 100644 index f55c6942e3..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_sessions_{session_id}_authorize.yaml +++ /dev/null @@ -1,60 +0,0 @@ -post: - operationId: PostPaymentCollectionsSessionsSessionAuthorize - summary: Authorize Payment Session - description: Authorize a Payment Session of a Payment Collection. - x-authenticated: false - parameters: - - in: path - name: id - required: true - description: The ID of the Payment Collection. - schema: - type: string - - in: path - name: session_id - required: true - description: The ID of the Payment Session. - schema: - type: string - x-codegen: - method: authorizePaymentSession - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: >- - ../code_samples/JavaScript/store_payment-collections_{id}_sessions_{session_id}_authorize/post.js - - lang: tsx - label: Medusa React - source: - $ref: >- - ../code_samples/tsx/store_payment-collections_{id}_sessions_{session_id}_authorize/post.tsx - - lang: Shell - label: cURL - source: - $ref: >- - ../code_samples/Shell/store_payment-collections_{id}_sessions_{session_id}_authorize/post.sh - security: - - cookie_auth: [] - - jwt_token: [] - tags: - - Payment Collections - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StorePaymentCollectionsSessionRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_product-categories.yaml b/www/apps/api-reference/specs/store/paths/store_product-categories.yaml deleted file mode 100644 index db7fe719f7..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_product-categories.yaml +++ /dev/null @@ -1,105 +0,0 @@ -get: - operationId: GetProductCategories - summary: List Product Categories - description: >- - Retrieve a list of product categories. The product categories can be - filtered by fields such as `handle` or `q`. The product categories can also - be paginated. This API Route can also be used to retrieve a product category - by its handle. - x-featureFlag: product_categories - externalDocs: - description: How to retrieve a product category by its handle - url: >- - https://docs.medusajs.com/modules/products/storefront/use-categories#get-a-category-by-its-handle - parameters: - - in: query - name: q - description: term used to search product category's names and handles. - schema: - type: string - - in: query - name: handle - description: Filter by handle. - schema: - type: string - - in: query - name: parent_category_id - description: >- - Filter by the ID of a parent category. Only children of the provided - parent category are retrieved. - schema: - type: string - - in: query - name: include_descendants_tree - description: Whether all nested categories inside a category should be retrieved. - schema: - type: boolean - - in: query - name: offset - description: >- - The number of product categories to skip when retrieving the product - categories. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of product categories returned. - schema: - type: integer - default: 100 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - product categories. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned product - categories. - schema: - type: string - x-codegen: - method: list - queryParams: StoreGetProductCategoriesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_product-categories/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_product-categories/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_product-categories/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreGetProductCategoriesRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_product-categories_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_product-categories_{id}.yaml deleted file mode 100644 index 97b4ef6609..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_product-categories_{id}.yaml +++ /dev/null @@ -1,67 +0,0 @@ -get: - operationId: GetProductCategoriesCategory - summary: Get a Product Category - description: Retrieve a Product Category's details. - x-featureFlag: product_categories - parameters: - - in: path - name: id - required: true - description: The ID of the Product Category - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be expanded in the returned product - category. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - product category. - schema: - type: string - x-codegen: - method: retrieve - queryParams: StoreGetProductCategoriesCategoryParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_product-categories_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_product-categories_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_product-categories_{id}/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Categories - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreGetProductCategoriesCategoryRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_product-tags.yaml b/www/apps/api-reference/specs/store/paths/store_product-tags.yaml deleted file mode 100644 index 64981bfa3b..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_product-tags.yaml +++ /dev/null @@ -1,136 +0,0 @@ -get: - operationId: GetProductTags - summary: List Product Tags - description: >- - Retrieve a list of product tags. The product tags can be filtered by fields - such as `id` or `q`. The product tags can also be sorted or paginated. - x-authenticated: true - x-codegen: - method: list - queryParams: StoreGetProductTagsParams - parameters: - - in: query - name: limit - description: Limit the number of product tags returned. - schema: - type: integer - default: 20 - - in: query - name: offset - description: The number of product tags to skip when retrieving the product tags. - schema: - type: integer - default: 0 - - in: query - name: order - description: A product-tag field to sort-order the retrieved product tags by. - schema: - type: string - - in: query - name: discount_condition_id - description: >- - Filter by the ID of a discount condition. When provided, only tags that - the discount condition applies for will be retrieved. - schema: - type: string - - in: query - name: value - style: form - explode: false - description: Filter by tag values. - schema: - type: array - items: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by IDs. - schema: - type: array - items: - type: string - - in: query - name: q - description: term to search product tag's value. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_product-tags/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_product-tags/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_product-tags/get.sh - tags: - - Product Tags - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreProductTagsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_product-types.yaml b/www/apps/api-reference/specs/store/paths/store_product-types.yaml deleted file mode 100644 index 116d462d60..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_product-types.yaml +++ /dev/null @@ -1,141 +0,0 @@ -get: - operationId: GetProductTypes - summary: List Product Types - description: >- - Retrieve a list of product types. The product types can be filtered by - fields such as `value` or `q`. The product types can also be sorted or - paginated. - x-authenticated: true - parameters: - - in: query - name: limit - description: Limit the number of product types returned. - schema: - type: integer - default: 20 - - in: query - name: offset - description: The number of product types to skip when retrieving the product types. - schema: - type: integer - default: 0 - - in: query - name: order - description: A product-type field to sort-order the retrieved product types by. - schema: - type: string - - in: query - name: discount_condition_id - description: >- - Filter by the ID of a discount condition. When provided, only types that - the discount condition applies for will be retrieved. - schema: - type: string - - in: query - name: value - style: form - explode: false - description: Filter by type values. - schema: - type: array - items: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by IDs. - schema: - type: array - items: - type: string - - in: query - name: q - description: term to search product type's value. - schema: - type: string - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: StoreGetProductTypesParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_product-types/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_product-types/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_product-types/get.sh - security: - - api_token: [] - - cookie_auth: [] - - jwt_token: [] - tags: - - Product Types - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreProductTypesListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '401': - $ref: ../components/responses/unauthorized.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_products.yaml b/www/apps/api-reference/specs/store/paths/store_products.yaml deleted file mode 100644 index 4ba195f147..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_products.yaml +++ /dev/null @@ -1,266 +0,0 @@ -get: - operationId: GetProducts - summary: List Products - description: > - Retrieves a list of products. The products can be filtered by fields such as - `id` or `q`. The products can also be sorted or paginated. - - This API Route can also be used to retrieve a product by its handle. - - - For accurate and correct pricing of the products based on the customer's - context, it's highly recommended to pass fields such as - - `region_id`, `currency_code`, and `cart_id` when available. - - - Passing `sales_channel_id` ensures retrieving only products available in the - specified sales channel. - - You can alternatively use a publishable API key in the request header - instead of passing a `sales_channel_id`. - externalDocs: - description: How to retrieve a product by its handle - url: >- - https://docs.medusajs.com/modules/products/storefront/show-products#retrieve-product-by-handle - parameters: - - in: query - name: q - description: >- - term used to search products' title, description, variant's title, - variant's sku, and collection's title. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: Filter by IDs. - schema: - oneOf: - - type: string - - type: array - items: - type: string - - in: query - name: sales_channel_id - style: form - explode: false - description: >- - Filter by sales channel IDs. When provided, only products available in - the selected sales channels are retrieved. Alternatively, you can pass a - publishable API key in the request header and this will have the same - effect. - schema: - type: array - items: - type: string - - in: query - name: collection_id - style: form - explode: false - description: >- - Filter by product collection IDs. When provided, only products that - belong to the specified product collections are retrieved. - schema: - type: array - items: - type: string - - in: query - name: type_id - style: form - explode: false - description: >- - Filter by product type IDs. When provided, only products that belong to - the specified product types are retrieved. - schema: - type: array - items: - type: string - - in: query - name: tags - style: form - explode: false - description: >- - Filter by product tag IDs. When provided, only products that belong to - the specified product tags are retrieved. - schema: - type: array - items: - type: string - - in: query - name: title - description: Filter by title. - schema: - type: string - - in: query - name: description - description: Filter by description - schema: - type: string - - in: query - name: handle - description: Filter by handle. - schema: - type: string - - in: query - name: is_giftcard - description: Whether to retrieve regular products or gift-card products. - schema: - type: boolean - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: category_id - style: form - explode: false - description: >- - Filter by product category IDs. When provided, only products that belong - to the specified product categories are retrieved. - schema: - type: array - x-featureFlag: product_categories - items: - type: string - - in: query - name: include_category_children - style: form - explode: false - description: >- - Whether to include child product categories when filtering using the - `category_id` field. - schema: - type: boolean - x-featureFlag: product_categories - - in: query - name: offset - description: The number of products to skip when retrieving the products. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of products returned. - schema: - type: integer - default: 100 - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - products. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned products. - schema: - type: string - - in: query - name: order - description: A product field to sort-order the retrieved products by. - schema: - type: string - - in: query - name: cart_id - description: >- - The ID of the cart. This is useful for accurate pricing based on the - cart's context. - schema: - type: string - - in: query - name: region_id - description: >- - The ID of the region. This is useful for accurate pricing based on the - selected region. - schema: - type: string - - in: query - name: currency_code - style: form - explode: false - description: >- - A 3 character ISO currency code. This is useful for accurate pricing - based on the selected currency. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: list - queryParams: StoreGetProductsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_products/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_products/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_products/get.sh - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreProductsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_products_search.yaml b/www/apps/api-reference/specs/store/paths/store_products_search.yaml deleted file mode 100644 index 06eeecdf7c..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_products_search.yaml +++ /dev/null @@ -1,42 +0,0 @@ -post: - operationId: PostProductsSearch - summary: Search Products - description: >- - Run a search query on products using the search service installed on the - Medusa backend. The searching is handled through the search service, so the - returned data's format depends on the search service you're using. - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostSearchReq.yaml - x-codegen: - method: search - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_products_search/post.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_products_search/post.sh - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StorePostSearchRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_products_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_products_{id}.yaml deleted file mode 100644 index d86103a15f..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_products_{id}.yaml +++ /dev/null @@ -1,105 +0,0 @@ -get: - operationId: GetProductsProduct - summary: Get a Product - description: > - Retrieve a Product's details. For accurate and correct pricing of the - product based on the customer's context, it's highly recommended to pass - fields such as - - `region_id`, `currency_code`, and `cart_id` when available. - - - Passing `sales_channel_id` ensures retrieving only products available in the - current sales channel. - - You can alternatively use a publishable API key in the request header - instead of passing a `sales_channel_id`. - externalDocs: - description: How to pass product pricing parameters - url: >- - https://docs.medusajs.com/modules/products/storefront/show-products#product-pricing-parameters - parameters: - - in: path - name: id - required: true - description: The ID of the Product. - schema: - type: string - - in: query - name: sales_channel_id - description: The ID of the sales channel the customer is viewing the product from. - schema: - type: string - - in: query - name: cart_id - description: >- - The ID of the cart. This is useful for accurate pricing based on the - cart's context. - schema: - type: string - - in: query - name: region_id - description: >- - The ID of the region. This is useful for accurate pricing based on the - selected region. - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - product. - schema: - type: string - - in: query - name: fields - description: Comma-separated fields that should be included in the returned product. - schema: - type: string - - in: query - name: currency_code - style: form - explode: false - description: >- - A 3 character ISO currency code. This is useful for accurate pricing - based on the selected currency. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: retrieve - queryParams: StoreGetProductsProductParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_products_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_products_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_products_{id}/get.sh - tags: - - Products - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreProductsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_regions.yaml b/www/apps/api-reference/specs/store/paths/store_regions.yaml index bf97482e18..d360b3398d 100644 --- a/www/apps/api-reference/specs/store/paths/store_regions.yaml +++ b/www/apps/api-reference/specs/store/paths/store_regions.yaml @@ -3,81 +3,10 @@ get: summary: List Regions description: >- Retrieve a list of regions. The regions can be filtered by fields such as - `created_at`. The regions can also be paginated. This API Route is useful to - show the customer all available regions to choose from. - externalDocs: - description: How to use regions in a storefront - url: >- - https://docs.medusajs.com/modules/regions-and-currencies/storefront/use-regions - parameters: - - in: query - name: offset - description: The number of regions to skip when retrieving the regions. - schema: - type: integer - default: 0 - - in: query - name: limit - description: Limit the number of regions returned. - schema: - type: integer - default: 100 - - in: query - name: created_at - description: Filter by a creation date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - - in: query - name: updated_at - description: Filter by an update date range. - schema: - type: object - properties: - lt: - type: string - description: filter by dates less than this date - format: date - gt: - type: string - description: filter by dates greater than this date - format: date - lte: - type: string - description: filter by dates less than or equal to this date - format: date - gte: - type: string - description: filter by dates greater than or equal to this date - format: date - x-codegen: - method: list - queryParams: StoreGetRegionsParams + `id`. The regions can also be sorted or paginated. + x-authenticated: false + parameters: [] x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_regions/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_regions/get.tsx - lang: Shell label: cURL source: @@ -85,14 +14,10 @@ get: tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreRegionsListRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': @@ -101,3 +26,7 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/store/paths/store_regions_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_regions_{id}.yaml index 67ad39ae69..8c726fd014 100644 --- a/www/apps/api-reference/specs/store/paths/store_regions_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_regions_{id}.yaml @@ -1,25 +1,18 @@ get: - operationId: GetRegionsRegion + operationId: GetRegionsId summary: Get a Region - description: Retrieve a Region's details. + description: >- + Retrieve a region by its ID. You can expand the region's relations or select + the fields that should be returned. + x-authenticated: false parameters: - - in: path - name: id + - name: id + in: path + description: The region's ID. required: true - description: The ID of the Region. schema: type: string - x-codegen: - method: retrieve x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_regions_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_regions_{id}/get.tsx - lang: Shell label: cURL source: @@ -27,14 +20,10 @@ get: tags: - Regions responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreRegionsRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': @@ -43,3 +32,7 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs-v2/store/paths/store_regions_{id}_payment-providers.yaml b/www/apps/api-reference/specs/store/paths/store_regions_{id}_payment-providers.yaml similarity index 100% rename from www/apps/api-reference/specs-v2/store/paths/store_regions_{id}_payment-providers.yaml rename to www/apps/api-reference/specs/store/paths/store_regions_{id}_payment-providers.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_return-reasons.yaml b/www/apps/api-reference/specs/store/paths/store_return-reasons.yaml deleted file mode 100644 index aa5801b6d4..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_return-reasons.yaml +++ /dev/null @@ -1,40 +0,0 @@ -get: - operationId: GetReturnReasons - summary: List Return Reasons - description: >- - Retrieve a list of Return Reasons. This is useful when implementing a Create - Return flow in the storefront. - x-codegen: - method: list - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_return-reasons/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_return-reasons/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_return-reasons/get.sh - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreReturnReasonsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_return-reasons_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_return-reasons_{id}.yaml deleted file mode 100644 index fae3979347..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_return-reasons_{id}.yaml +++ /dev/null @@ -1,45 +0,0 @@ -get: - operationId: GetReturnReasonsReason - summary: Get a Return Reason - description: Retrieve a Return Reason's details. - parameters: - - in: path - name: id - required: true - description: The id of the Return Reason. - schema: - type: string - x-codegen: - method: retrieve - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_return-reasons_{id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_return-reasons_{id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_return-reasons_{id}/get.sh - tags: - - Return Reasons - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreReturnReasonsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_returns.yaml b/www/apps/api-reference/specs/store/paths/store_returns.yaml deleted file mode 100644 index 7f8aca95a2..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_returns.yaml +++ /dev/null @@ -1,48 +0,0 @@ -post: - operationId: PostReturns - summary: Create Return - description: >- - Create a Return for an Order. If a return shipping method is specified, the - return is automatically fulfilled. - externalDocs: - description: How to create a return in a storefront - url: https://docs.medusajs.com/modules/orders/storefront/create-return - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostReturnsReq.yaml - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_returns/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_returns/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_returns/post.sh - tags: - - Returns - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreReturnsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_shipping-options.yaml b/www/apps/api-reference/specs/store/paths/store_shipping-options.yaml deleted file mode 100644 index 502166c2cc..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_shipping-options.yaml +++ /dev/null @@ -1,62 +0,0 @@ -get: - operationId: GetShippingOptions - summary: Get Shipping Options - description: Retrieve a list of Shipping Options. - parameters: - - in: query - name: is_return - description: >- - Whether return shipping options should be included. By default, all - shipping options are returned. - schema: - type: boolean - - in: query - name: product_ids - description: >- - "Comma-separated list of Product IDs to filter Shipping Options by. If - provided, only shipping options that can be used with the provided - products are retrieved." - schema: - type: string - - in: query - name: region_id - description: >- - "The ID of the region that the shipping options belong to. If not - provided, all shipping options are retrieved." - schema: - type: string - x-codegen: - method: list - queryParams: StoreGetShippingOptionsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_shipping-options/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_shipping-options/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_shipping-options/get.sh - tags: - - Shipping Options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreShippingOptionsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_shipping-options_{cart_id}.yaml b/www/apps/api-reference/specs/store/paths/store_shipping-options_{cart_id}.yaml index ad69d42ff2..6d78928e6f 100644 --- a/www/apps/api-reference/specs/store/paths/store_shipping-options_{cart_id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_shipping-options_{cart_id}.yaml @@ -1,29 +1,18 @@ get: - operationId: GetShippingOptionsCartId - summary: List for Cart - description: Retrieve a list of Shipping Options available for a cart. - externalDocs: - description: How to implement shipping step in checkout - url: >- - https://docs.medusajs.com/modules/carts-and-checkout/storefront/implement-checkout-flow#shipping-step + operationId: GetShippingOptionsCart_id + summary: Get a Shipping Option + description: >- + Retrieve a shipping option by its ID. You can expand the shipping option's + relations or select the fields that should be returned. + x-authenticated: false parameters: - - in: path - name: cart_id + - name: cart_id + in: path + description: The shipping option's cart id. required: true - description: The ID of the Cart. schema: type: string - x-codegen: - method: listCartOptions x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_shipping-options_{cart_id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_shipping-options_{cart_id}/get.tsx - lang: Shell label: cURL source: @@ -31,14 +20,10 @@ get: tags: - Shipping Options responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreCartShippingOptionsListRes.yaml '400': $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': @@ -47,3 +32,7 @@ get: $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml + requestBody: + content: + application/json: + schema: {} diff --git a/www/apps/api-reference/specs/store/paths/store_swaps.yaml b/www/apps/api-reference/specs/store/paths/store_swaps.yaml deleted file mode 100644 index b069f049f5..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_swaps.yaml +++ /dev/null @@ -1,62 +0,0 @@ -post: - operationId: PostSwaps - summary: Create a Swap - description: > - Create a Swap for an Order. This will also create a return and associate it - with the swap. If a return shipping option is specified, the return will - automatically be fulfilled. - - To complete the swap, you must use the Complete Cart API Route passing it - the ID of the swap's cart. - - - An idempotency key will be generated if none is provided in the header - `Idempotency-Key` and added to - - the response. If an error occurs during swap creation or the request is - interrupted for any reason, the swap creation can be retried by passing the - idempotency - - key in the `Idempotency-Key` header. - externalDocs: - description: How to create a swap - url: https://docs.medusajs.com/modules/orders/storefront/create-swap - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/StorePostSwapsReq.yaml - x-codegen: - method: create - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_swaps/post.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_swaps/post.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_swaps/post.sh - tags: - - Swaps - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreSwapsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_swaps_{cart_id}.yaml b/www/apps/api-reference/specs/store/paths/store_swaps_{cart_id}.yaml deleted file mode 100644 index a0054ac2b5..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_swaps_{cart_id}.yaml +++ /dev/null @@ -1,45 +0,0 @@ -get: - operationId: GetSwapsSwapCartId - summary: Get by Cart ID - description: Retrieve a Swap's details by the ID of its cart. - parameters: - - in: path - name: cart_id - required: true - description: The id of the Cart - schema: - type: string - x-codegen: - method: retrieveByCartId - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_swaps_{cart_id}/get.js - - lang: tsx - label: Medusa React - source: - $ref: ../code_samples/tsx/store_swaps_{cart_id}/get.tsx - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_swaps_{cart_id}/get.sh - tags: - - Swaps - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreSwapsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_variants.yaml b/www/apps/api-reference/specs/store/paths/store_variants.yaml deleted file mode 100644 index 472bc9eb9c..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_variants.yaml +++ /dev/null @@ -1,176 +0,0 @@ -get: - operationId: GetVariants - summary: Get Product Variants - description: > - Retrieves a list of product variants. The product variants can be filtered - by fields such as `id` or `title`. The product variants can also be - paginated. - - - For accurate and correct pricing of the product variants based on the - customer's context, it's highly recommended to pass fields such as - - `region_id`, `currency_code`, and `cart_id` when available. - - - Passing `sales_channel_id` ensures retrieving only variants of products - available in the specified sales channel. - - You can alternatively use a publishable API key in the request header - instead of passing a `sales_channel_id`. - externalDocs: - description: How to pass product pricing parameters - url: >- - https://docs.medusajs.com/modules/products/storefront/show-products#product-pricing-parameters - parameters: - - in: query - name: ids - description: >- - Filter by a comma-separated list of IDs. If supplied, it overrides the - `id` parameter. - schema: - type: string - - in: query - name: id - style: form - explode: false - description: >- - Filter by one or more IDs. If `ids` is supplied, it's overrides the - value of this parameter. - schema: - oneOf: - - type: string - description: Filter by an ID. - - type: array - description: Filter by IDs. - items: - type: string - - in: query - name: sales_channel_id - description: >- - "Filter by sales channel IDs. When provided, only products available in - the selected sales channels are retrieved. Alternatively, you can pass a - publishable API key in the request header and this will have the same - effect." - schema: - type: string - - in: query - name: expand - description: >- - Comma-separated relations that should be expanded in the returned - product variants. - schema: - type: string - - in: query - name: fields - description: >- - Comma-separated fields that should be included in the returned product - variants. - schema: - type: string - - in: query - name: offset - description: The number of products to skip when retrieving the product variants. - schema: - type: number - default: '0' - - in: query - name: limit - description: Limit the number of product variants returned. - schema: - type: number - default: '100' - - in: query - name: cart_id - description: >- - The ID of the cart. This is useful for accurate pricing based on the - cart's context. - schema: - type: string - - in: query - name: region_id - description: >- - The ID of the region. This is useful for accurate pricing based on the - selected region. - schema: - type: string - - in: query - name: currency_code - style: form - explode: false - description: >- - A 3 character ISO currency code. This is useful for accurate pricing - based on the selected currency. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - - in: query - name: title - style: form - explode: false - description: Filter by title - schema: - oneOf: - - type: string - description: a single title to filter by - - type: array - description: multiple titles to filter by - items: - type: string - - in: query - name: inventory_quantity - description: Filter by available inventory quantity - schema: - oneOf: - - type: number - description: A specific number to filter by. - - type: object - description: Filter using less and greater than comparisons. - properties: - lt: - type: number - description: Filter by inventory quantity less than this number - gt: - type: number - description: Filter by inventory quantity greater than this number - lte: - type: number - description: Filter by inventory quantity less than or equal to this number - gte: - type: number - description: >- - Filter by inventory quantity greater than or equal to this - number - x-codegen: - method: list - queryParams: StoreGetVariantsParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_variants/get.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_variants/get.sh - tags: - - Product Variants - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreVariantsListRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/specs/store/paths/store_variants_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_variants_{id}.yaml deleted file mode 100644 index d46d5ef79b..0000000000 --- a/www/apps/api-reference/specs/store/paths/store_variants_{id}.yaml +++ /dev/null @@ -1,91 +0,0 @@ -get: - operationId: GetVariantsVariant - summary: Get a Product Variant - description: > - Retrieve a Product Variant's details. For accurate and correct pricing of - the product variant based on the customer's context, it's highly recommended - to pass fields such as - - `region_id`, `currency_code`, and `cart_id` when available. - - - Passing `sales_channel_id` ensures retrieving only variants of products - available in the current sales channel. - - You can alternatively use a publishable API key in the request header - instead of passing a `sales_channel_id`. - externalDocs: - description: How to pass product pricing parameters - url: >- - https://docs.medusajs.com/modules/products/storefront/show-products#product-pricing-parameters - parameters: - - in: path - name: id - required: true - description: The ID of the Product Variant. - schema: - type: string - - in: query - name: sales_channel_id - description: >- - The ID of the sales channel the customer is viewing the product variant - from. - schema: - type: string - - in: query - name: cart_id - description: >- - The ID of the cart. This is useful for accurate pricing based on the - cart's context. - schema: - type: string - - in: query - name: region_id - description: >- - The ID of the region. This is useful for accurate pricing based on the - selected region. - schema: - type: string - - in: query - name: currency_code - style: form - explode: false - description: >- - A 3 character ISO currency code. This is useful for accurate pricing - based on the selected currency. - schema: - type: string - externalDocs: - url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes - description: See a list of codes. - x-codegen: - method: retrieve - queryParams: StoreGetVariantsVariantParams - x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/store_variants_{id}/get.js - - lang: Shell - label: cURL - source: - $ref: ../code_samples/Shell/store_variants_{id}/get.sh - tags: - - Product Variants - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../components/schemas/StoreVariantsRes.yaml - '400': - $ref: ../components/responses/400_error.yaml - '404': - $ref: ../components/responses/not_found_error.yaml - '409': - $ref: ../components/responses/invalid_state_error.yaml - '422': - $ref: ../components/responses/invalid_request_error.yaml - '500': - $ref: ../components/responses/500_error.yaml diff --git a/www/apps/api-reference/types/openapi.ts b/www/apps/api-reference/types/openapi.ts index a6e5d3d31c..4487edad62 100644 --- a/www/apps/api-reference/types/openapi.ts +++ b/www/apps/api-reference/types/openapi.ts @@ -1,7 +1,6 @@ import type { OpenAPIV3 } from "openapi-types" export type Area = "admin" | "store" -export type Version = "1" | "2" export type Code = { lang: string diff --git a/www/apps/api-reference/utils/base-path-url.ts b/www/apps/api-reference/utils/base-path-url.ts new file mode 100644 index 0000000000..c9215b4c46 --- /dev/null +++ b/www/apps/api-reference/utils/base-path-url.ts @@ -0,0 +1,5 @@ +import { getLinkWithBasePath } from "docs-ui" + +export default function basePathUrl(path: string) { + return getLinkWithBasePath(path, process.env.NEXT_PUBLIC_BASE_PATH) +} diff --git a/www/apps/api-reference/utils/get-paths-of-tag.ts b/www/apps/api-reference/utils/get-paths-of-tag.ts index 009c86bdd3..a2ce748c6a 100644 --- a/www/apps/api-reference/utils/get-paths-of-tag.ts +++ b/www/apps/api-reference/utils/get-paths-of-tag.ts @@ -1,7 +1,7 @@ import path from "path" import { promises as fs } from "fs" import type { OpenAPIV3 } from "openapi-types" -import type { Operation, Document, Version } from "@/types/openapi" +import type { Operation, Document } from "@/types/openapi" import readSpecDocument from "./read-spec-document" import getSectionId from "./get-section-id" import OpenAPIParser from "@readme/openapi-parser" @@ -12,15 +12,10 @@ type ParsedPathItemObject = OpenAPIV3.PathItemObject & { export default async function getPathsOfTag( tagName: string, - area: string, - version: Version = "1" + area: string ): Promise { // get path files - const basePath = path.join( - process.cwd(), - version === "1" ? "specs" : "specs-v2", - `${area}/paths` - ) + const basePath = path.join(process.cwd(), "specs", `${area}/paths`) const files = await fs.readdir(basePath) diff --git a/www/apps/api-reference/utils/get-url.ts b/www/apps/api-reference/utils/get-url.ts index 67297b198b..c4eeaec365 100644 --- a/www/apps/api-reference/utils/get-url.ts +++ b/www/apps/api-reference/utils/get-url.ts @@ -1,5 +1,6 @@ import { config } from "../config" +import basePathUrl from "./base-path-url" export default function getUrl(area: string, tagName?: string): string { - return `${config.baseUrl}/api/${area}#${tagName}` + return `${config.baseUrl}${basePathUrl(`/api/${area}#${tagName}`)}` } diff --git a/www/apps/book/.env.sample b/www/apps/book/.env.sample index 6cd0d41119..49f78d1ae0 100644 --- a/www/apps/book/.env.sample +++ b/www/apps/book/.env.sample @@ -9,6 +9,7 @@ NEXT_PUBLIC_RESOURCES_URL= NEXT_PUBLIC_USER_GUIDE_URL= NEXT_PUBLIC_UI_URL= NEXT_PUBLIC_API_URL= +NEXT_PUBLIC_DOCS_V1_URL= ALGOLIA_WRITE_API_KEY= ANALYZE_BUNDLE= NEXT_PUBLIC_AI_ASSISTANT_URL= diff --git a/www/apps/book/next.config.mjs b/www/apps/book/next.config.mjs index 3b1df77911..b7f82a6899 100644 --- a/www/apps/book/next.config.mjs +++ b/www/apps/book/next.config.mjs @@ -45,7 +45,7 @@ const withMDX = mdx({ process.env.VERCEL_ENV !== "production" ? process.env.NEXT_PUBLIC_API_URL : undefined, - path: "api", + path: "v2/api", }, }, }, @@ -91,6 +91,44 @@ const nextConfig = { transpilePackages: ["docs-ui"], basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/v2", + async rewrites() { + return { + fallback: [ + { + source: "/v2/resources", + destination: `${ + process.env.NEXT_PUBLIC_RESOURCES_URL || "https://localhost:3001" + }/v2/resources`, + basePath: false, + }, + { + source: "/v2/resources/:path*", + destination: `${ + process.env.NEXT_PUBLIC_RESOURCES_URL || "https://localhost:3001" + }/v2/resources/:path*`, + basePath: false, + }, + // TODO comment out once we have the user guide published + // { + // source: "/user-guide", + // destination: `${process.env.NEXT_PUBLIC_USER_GUIDE_URL}/user-guide`, + // basePath: false, + // }, + // { + // source: "/user-guide/:path*", + // destination: `${process.env.NEXT_PUBLIC_USER_GUIDE_URL}/user-guide/:path*`, + // basePath: false, + // }, + { + source: "/:path*", + destination: `${ + process.env.NEXT_PUBLIC_DOCS_V1_URL || "https://localhost:3000" + }/:path*`, + basePath: false, + }, + ], + } + }, } export default withMDX(nextConfig) diff --git a/www/apps/book/utils/base-path-url.ts b/www/apps/book/utils/base-path-url.ts index b8b852feda..b8584730ad 100644 --- a/www/apps/book/utils/base-path-url.ts +++ b/www/apps/book/utils/base-path-url.ts @@ -1,3 +1,5 @@ +import { getLinkWithBasePath } from "docs-ui" + export function basePathUrl(path = "") { - return `${process.env.NEXT_PUBLIC_BASE_PATH || ""}${path}` + return getLinkWithBasePath(path, process.env.NEXT_PUBLIC_BASE_PATH) } diff --git a/www/apps/resources/.env.sample b/www/apps/resources/.env.sample index 87d2ab8df6..f81125850a 100644 --- a/www/apps/resources/.env.sample +++ b/www/apps/resources/.env.sample @@ -10,6 +10,7 @@ NEXT_PUBLIC_DOCS_URL= NEXT_PUBLIC_USER_GUIDE_URL= NEXT_PUBLIC_UI_URL= NEXT_PUBLIC_API_URL= +NEXT_PUBLIC_DOCS_V1_URL= ALGOLIA_WRITE_API_KEY= ANALYZE_BUNDLE= NEXT_PUBLIC_AI_ASSISTANT_URL= diff --git a/www/apps/resources/mdx-options.mjs b/www/apps/resources/mdx-options.mjs index 7c721b6eaa..a972bc92c2 100644 --- a/www/apps/resources/mdx-options.mjs +++ b/www/apps/resources/mdx-options.mjs @@ -43,7 +43,7 @@ const mdxPluginOptions = { process.env.VERCEL_ENV !== "production" ? process.env.NEXT_PUBLIC_API_URL : undefined, - path: "api", + path: "v2/api", }, }, }, diff --git a/www/apps/resources/utils/base-path-url.ts b/www/apps/resources/utils/base-path-url.ts index e10c6f9cbb..b8584730ad 100644 --- a/www/apps/resources/utils/base-path-url.ts +++ b/www/apps/resources/utils/base-path-url.ts @@ -1,3 +1,5 @@ +import { getLinkWithBasePath } from "docs-ui" + export function basePathUrl(path = "") { - return `${process.env.NEXT_PUBLIC_BASE_PATH}${path}` + return getLinkWithBasePath(path, process.env.NEXT_PUBLIC_BASE_PATH) } diff --git a/www/apps/ui/src/lib/base-path-url.ts b/www/apps/ui/src/lib/base-path-url.ts index b8b852feda..b8584730ad 100644 --- a/www/apps/ui/src/lib/base-path-url.ts +++ b/www/apps/ui/src/lib/base-path-url.ts @@ -1,3 +1,5 @@ +import { getLinkWithBasePath } from "docs-ui" + export function basePathUrl(path = "") { - return `${process.env.NEXT_PUBLIC_BASE_PATH || ""}${path}` + return getLinkWithBasePath(path, process.env.NEXT_PUBLIC_BASE_PATH) } diff --git a/www/apps/user-guide/next.config.mjs b/www/apps/user-guide/next.config.mjs index 9f3f60520c..bad202e3ae 100644 --- a/www/apps/user-guide/next.config.mjs +++ b/www/apps/user-guide/next.config.mjs @@ -46,7 +46,7 @@ const withMDX = mdx({ process.env.VERCEL_ENV !== "production" ? process.env.NEXT_PUBLIC_API_URL : undefined, - path: "api", + path: "v2/api", }, }, }, diff --git a/www/apps/user-guide/utils/base-path-url.ts b/www/apps/user-guide/utils/base-path-url.ts index e10c6f9cbb..b8584730ad 100644 --- a/www/apps/user-guide/utils/base-path-url.ts +++ b/www/apps/user-guide/utils/base-path-url.ts @@ -1,3 +1,5 @@ +import { getLinkWithBasePath } from "docs-ui" + export function basePathUrl(path = "") { - return `${process.env.NEXT_PUBLIC_BASE_PATH}${path}` + return getLinkWithBasePath(path, process.env.NEXT_PUBLIC_BASE_PATH) } diff --git a/www/packages/docs-ui/package.json b/www/packages/docs-ui/package.json index 1e372a25c4..dbacafea67 100644 --- a/www/packages/docs-ui/package.json +++ b/www/packages/docs-ui/package.json @@ -30,7 +30,8 @@ "build:js:cjs": "tsc --project tsconfig.cjs.json && tsc-alias -p tsconfig.cjs.json", "build:js:esm": "tsc --project tsconfig.esm.json && tsc-alias -p tsconfig.esm.json", "clean": "rimraf dist", - "dev": "yarn build:js:cjs && yarn build:js:esm" + "dev": "yarn build:js:cjs && yarn build:js:esm", + "lint": "eslint src --fix" }, "devDependencies": { "@types/react": "^18.2.0", @@ -38,6 +39,7 @@ "@types/react-google-recaptcha": "^2.1.6", "clsx": "^2.0.0", "cpy-cli": "^5.0.0", + "eslint": "^8", "eslint-config-docs": "*", "next": "14.1.0", "react": "^18.2.0", diff --git a/www/packages/docs-ui/src/components/Navbar/Link/index.tsx b/www/packages/docs-ui/src/components/Navbar/Link/index.tsx index 44efccd873..fee3cc4fe0 100644 --- a/www/packages/docs-ui/src/components/Navbar/Link/index.tsx +++ b/www/packages/docs-ui/src/components/Navbar/Link/index.tsx @@ -18,7 +18,7 @@ export const NavbarLink = ({ label, className, isActive, - badge + badge, }: NavbarLinkProps) => { return ( {label} - {badge && } + {badge && ( + + )} ) } diff --git a/www/packages/docs-ui/src/components/Navbar/NavbarDivider/index.tsx b/www/packages/docs-ui/src/components/Navbar/NavbarDivider/index.tsx index 4cd0fee2a8..933a83e273 100644 --- a/www/packages/docs-ui/src/components/Navbar/NavbarDivider/index.tsx +++ b/www/packages/docs-ui/src/components/Navbar/NavbarDivider/index.tsx @@ -3,9 +3,8 @@ import React from "react" export const NavbarDivider = () => { return ( -
+
) -} \ No newline at end of file +} diff --git a/www/packages/docs-ui/src/components/Navbar/index.tsx b/www/packages/docs-ui/src/components/Navbar/index.tsx index 4ea2756fc9..09d76bbc39 100644 --- a/www/packages/docs-ui/src/components/Navbar/index.tsx +++ b/www/packages/docs-ui/src/components/Navbar/index.tsx @@ -8,13 +8,15 @@ import { NavbarSearchModalOpener } from "./SearchModalOpener" import { NavbarMobileMenuButtonProps } from "./MobileMenu/Button" import { NavbarDivider } from "./NavbarDivider" -export type NavbarItem = { - type: "link" - props: NavbarLinkProps -} | { - type: "divider" - props?: {} -} +export type NavbarItem = + | { + type: "link" + props: NavbarLinkProps + } + | { + type: "divider" + props?: Record + } export type NavbarProps = { logo: NavbarLogoProps @@ -54,10 +56,10 @@ export const Navbar = ({ >
- {items.map(({type, props}, index) => { - switch(type) { + {items.map(({ type, props }, index) => { + switch (type) { case "divider": - return + return default: return } diff --git a/www/packages/docs-ui/src/components/Search/index.tsx b/www/packages/docs-ui/src/components/Search/index.tsx index f56deec91f..03505afff6 100644 --- a/www/packages/docs-ui/src/components/Search/index.tsx +++ b/www/packages/docs-ui/src/components/Search/index.tsx @@ -86,7 +86,7 @@ export const Search = ({ indexName={algolia.mainIndexName} searchClient={searchClient} future={{ - preserveSharedStateOnUnmount: true + preserveSharedStateOnUnmount: true, }} >
diff --git a/www/packages/docs-ui/src/components/Sidebar/Item/index.tsx b/www/packages/docs-ui/src/components/Sidebar/Item/index.tsx index 4dcff4280e..968b33e61c 100644 --- a/www/packages/docs-ui/src/components/Sidebar/Item/index.tsx +++ b/www/packages/docs-ui/src/components/Sidebar/Item/index.tsx @@ -27,7 +27,7 @@ export const SidebarItem = ({ className, currentLevel = 1, sidebarHasParent = false, - isMobile = false + isMobile = false, }: SidebarItemProps) => { const [showLoading, setShowLoading] = useState(false) const { diff --git a/www/packages/docs-ui/src/components/TypeList/Items/index.tsx b/www/packages/docs-ui/src/components/TypeList/Items/index.tsx index aa00bc68cf..0c2b020056 100644 --- a/www/packages/docs-ui/src/components/TypeList/Items/index.tsx +++ b/www/packages/docs-ui/src/components/TypeList/Items/index.tsx @@ -42,7 +42,9 @@ const TypeListItem = ({ }: TypeListItemProps) => { const isBrowser = useIsBrowser() const pathname = usePathname() - const { config: { baseUrl, basePath } } = useSiteConfig() + const { + config: { baseUrl, basePath }, + } = useSiteConfig() const siteUrl = `${baseUrl}${basePath}` const groupName = useMemo(() => { diff --git a/www/packages/docs-ui/src/constants.tsx b/www/packages/docs-ui/src/constants.tsx index e162cb1628..27d749fe34 100644 --- a/www/packages/docs-ui/src/constants.tsx +++ b/www/packages/docs-ui/src/constants.tsx @@ -89,42 +89,13 @@ export const navbarItemsV2: NavbarItem[] = [ href: `/v2/resources`, }, }, - { - type: "divider", - }, - { - type: "link", - props: { - label: "Docs", - target: "_blank", - rel: "noreferrer", - href: `/`, - badge: { - variant: "neutral", - children: "v1", - }, - }, - }, - { - type: "link", - props: { - label: "User Guide", - target: "_blank", - rel: "noreferrer", - href: `/user-guide`, - badge: { - variant: "neutral", - children: "v1", - }, - }, - }, { type: "link", props: { label: "Store API", target: "_blank", rel: "noreferrer", - href: `/api/store`, + href: `/v2/api/store`, }, }, { @@ -133,7 +104,7 @@ export const navbarItemsV2: NavbarItem[] = [ label: "Admin API", target: "_blank", rel: "noreferrer", - href: `/api/admin`, + href: `/v2/api/admin`, }, }, { @@ -145,6 +116,22 @@ export const navbarItemsV2: NavbarItem[] = [ href: `/ui`, }, }, + { + type: "divider", + }, + { + type: "link", + props: { + label: "Medusa V1", + target: "_blank", + rel: "noreferrer", + href: `/`, + badge: { + variant: "neutral", + children: "v1", + }, + }, + }, ] export const legacyNavbarItems: NavbarItem[] = [ @@ -236,7 +223,7 @@ export const mobileSidebarItemsV1: SidebarItemType[] = [ isPathHref: true, }, { - title: "Book", + title: "Learn Medusa V2", path: `/v2`, loaded: true, isPathHref: true, @@ -246,7 +233,7 @@ export const mobileSidebarItemsV1: SidebarItemType[] = [ export const mobileSidebarItemsV2: SidebarItemType[] = [ { - title: "Book", + title: "Docs", path: `/v2`, loaded: true, isPathHref: true, @@ -257,29 +244,15 @@ export const mobileSidebarItemsV2: SidebarItemType[] = [ loaded: true, isPathHref: true, }, - { - title: "Docs", - path: `/`, - loaded: true, - isPathHref: true, - additionalElms: v1, - }, - { - title: "User Guide", - path: `/user-guide`, - loaded: true, - isPathHref: true, - additionalElms: v1, - }, { title: "Store API", - path: `/api/store`, + path: `/v2/api/store`, loaded: true, isPathHref: true, }, { title: "Admin API", - path: `/api/admin`, + path: `/v2/api/admin`, loaded: true, isPathHref: true, }, @@ -289,6 +262,13 @@ export const mobileSidebarItemsV2: SidebarItemType[] = [ loaded: true, isPathHref: true, }, + { + title: "Docs", + path: `/`, + loaded: true, + isPathHref: true, + additionalElms: v1, + }, ] export const legacyMobileSidebarItems: SidebarItemType[] = [ @@ -327,13 +307,21 @@ export const legacyMobileSidebarItems: SidebarItemType[] = [ export const searchFiltersV2: OptionType[] = [ { value: "book", - label: "Book", + label: "Docs V2", }, { value: "resources", - label: "Resources", + label: "Learning Resources", }, - // TODO add more filters once V2 become the main docs + { + value: "admin-v2", + label: "Admin API", + }, + { + value: "store-v2", + label: "Store API", + }, + // TODO add more filters ] export const searchFiltersV1: OptionType[] = [ diff --git a/www/packages/docs-ui/src/utils/get-navbar-items.ts b/www/packages/docs-ui/src/utils/get-navbar-items.ts index ebcace177d..34acc0a014 100644 --- a/www/packages/docs-ui/src/utils/get-navbar-items.ts +++ b/www/packages/docs-ui/src/utils/get-navbar-items.ts @@ -9,9 +9,14 @@ type Options = { export function getNavbarItems({ basePath, activePath, - version = "legacy" + version = "legacy", }: Options): NavbarItem[] { - const navbarItems = version === "v2" ? navbarItemsV2 : version === "v1" ? navbarItemsV1 : legacyNavbarItems + const navbarItems = + version === "v2" + ? navbarItemsV2 + : version === "v1" + ? navbarItemsV1 + : legacyNavbarItems return navbarItems.map((item) => { if (item.type === "divider") { return item @@ -23,7 +28,7 @@ export function getNavbarItems({ ...item.props, isActive: activePath === item.props?.href, href: `${basePath}${item.props?.href}`, - } + }, } }) } diff --git a/www/yarn.lock b/www/yarn.lock index 1cadcb6cd6..fcbe974822 100644 --- a/www/yarn.lock +++ b/www/yarn.lock @@ -7239,6 +7239,7 @@ __metadata: clsx: ^2.0.0 copy-text-to-clipboard: ^3.2.0 cpy-cli: ^5.0.0 + eslint: ^8 eslint-config-docs: "*" mermaid: ^10.9.0 next: 14.1.0