docs: refactor to use TypeScript, ESLint, and Tailwind CSS (#4136)
* docs(refactoring): configured eslint and typescript (#3511) * docs: configured eslint and typescript * fixed yarn.lock * docs(refactoring): migrate components directory to typescript (#3517) * docs: migrate components directory to typescript * removed vscode settings * fix following merge * docs: refactored QueryNote component (#3576) * docs: refactored first batch of theme components (#3579) * docs: refactored second batch of theme components (#3580) * added missing badge styles * fix after merge * docs(refactoring): migrated remaining component to TypeScript (#3770) * docs(refactoring): configured eslint and typescript (#3511) * docs: configured eslint and typescript * fixed yarn.lock * docs(refactoring): migrate components directory to typescript (#3517) * docs: migrate components directory to typescript * removed vscode settings * fix following merge * docs: refactored QueryNote component (#3576) * docs: refactored first batch of theme components (#3579) * docs: refactored second batch of theme components (#3580) * added missing badge styles * docs: refactoring second batch of theme components * fix after merge * refactored icons and other components * docs: refactored all components * docs(refactoring): set up and configured Tailwind Css (#3841) * docs: added tailwind config * docs: added more tailwind configurations * add includes option * added more tailwind configurations * fix to configurations * docs(refactoring): use tailwind css (#4134) * docs: added tailwind config * docs: added more tailwind configurations * add includes option * added more tailwind configurations * fix to configurations * docs(refactoring): refactored all styles to use tailwind css (#4132) * refactored Badge component to use tailwind css * refactored Bordered component to use tailwind css * updated to latest docusaurus * refactored BorderedIcon component to use tailwind css * refactored Feedback component to use tailwind css * refactored icons and footersociallinks to tailwind css * start refactoring of large card * refactored large card styling * refactored until admonitions * refactored until codeblock * refactored until Tabs * refactored Tabs (without testing * finished refactoring styles to tailwind css * upgraded to version 2.4.1 * general fixes * adjusted eslint configurations * fixed ignore files * fixes to large card * fix search styling * fix npx command * updated tabs to use isCodeTabs prop * fixed os tabs * removed os-tabs class in favor of general styling * improvements to buttons * fix for searchbar * fixed redocly download button * chore: added eslint code action (#4135) * small change in commerce modules page
This commit is contained in:
@@ -52,7 +52,7 @@ It's also assumed you already have [used CartProvider higher in your component t
|
||||
|
||||
You can create a cart with the following code snippet:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -115,7 +115,7 @@ The cart by default will have a random region assigned to it. You can specify th
|
||||
|
||||
Otherwise, you can assign it a specific region during creation:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```jsx
|
||||
@@ -198,7 +198,7 @@ Notice that in the previous code snippets, you set the cart’s ID in the local
|
||||
|
||||
You can retrieve the cart at any given point using its ID with the following code snippet:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -261,7 +261,7 @@ A cart has different data associated with it including the region, email, addres
|
||||
|
||||
You can use the following snippet to update any of the cart’s data:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -327,7 +327,7 @@ A customer might add items to their cart, then creates an account or log in. In
|
||||
|
||||
You can do that using the same update operation:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -389,7 +389,7 @@ In case the customer doesn't want to use their own account, you must at least as
|
||||
|
||||
You can do that using the same update operation:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -449,7 +449,7 @@ fetch(`<BACKEND_URLL>/store/carts/${cartId}`, {
|
||||
|
||||
To create a line item of a product and add it to a cart, you can use the following code snippet:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```jsx
|
||||
@@ -524,7 +524,7 @@ If you’re using Sales Channels, make sure that the cart and the product belong
|
||||
|
||||
To update a line item's quantity in the cart, you can use the following code snippet:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -591,7 +591,7 @@ It returns the updated cart.
|
||||
|
||||
To delete a line item from the cart, you can use the following code snippet:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -62,7 +62,7 @@ In this step, the customer generally enters their shipping info, then chooses th
|
||||
|
||||
After the customer enters their shipping address information, you must send a `POST` request to the [Update a Cart](/api/store/#tag/Cart/operation/PostCartsCart) API endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -166,7 +166,7 @@ After updating the cart with the customer’s address, the list of available [sh
|
||||
|
||||
You can retrieve the list of shipping options by sending a `GET` request to the [Retrieve Shipping Options for Cart API](/api/store/#tag/Shipping-Option/operation/GetShippingOptionsCartId) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -237,7 +237,7 @@ The request accepts the ID of the cart as a path parameter. It returns the array
|
||||
|
||||
Once the customer chooses one of the available shipping options, send a `POST` request to the [Add a Shipping Method](/api/store/#tag/Cart/operation/PostCartsCartShippingMethod) API endpoint. This will create a [shipping method](../shipping.md#shipping-method) based on the shipping option chosen and will associate it with the customer’s cart:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -311,7 +311,7 @@ When the page opens and before the payment providers are displayed to the custom
|
||||
|
||||
To initialize the payment sessions, send a `POST` request to the [Initialize Payment Sessions](/api/store/#tag/Cart/operation/PostCartsCartPaymentSessions) API endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -380,7 +380,7 @@ This endpoint accepts the ID of the cart as a path parameter. It returns the upd
|
||||
|
||||
When the customer chooses the payment processor they want to complete purchase with, you should select the payment session associated with that payment processor. To do that, send a `POST` request to the [Select a Payment Session](/api/store/#tag/Cart/operation/PostCartsCartPaymentSession) API endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -455,7 +455,7 @@ This step is optional and is only necessary for some payment processors. As ment
|
||||
|
||||
If you need to update that data at any point before the purchase is made, send a request to [Update a Payment Session](/api/store/#tag/Cart/operation/PostCartsCartPaymentSessionUpdate) API endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -541,7 +541,7 @@ The last step is to place the order by completing the cart. When you complete th
|
||||
|
||||
To complete a cart, send a `POST` request to the [Complete a Cart](/api/store/#tag/Cart/operation/PostCartsCartComplete) API endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -50,7 +50,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can create a customer group by sending a request to the Create Customer Group endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -133,7 +133,7 @@ This request requires the `name` parameter and optionally accepts the `metadata`
|
||||
|
||||
You can get a list of all customer groups by sending a request to the List Customer Groups endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -214,7 +214,7 @@ You can also pass filters and other selection query parameters to the request. C
|
||||
|
||||
You can retrieve a single customer group by sending a request to the Get a Customer Group endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -281,7 +281,7 @@ This request accepts the ID of the customer group to retrieve as a path paramete
|
||||
|
||||
You can update a customer group’s data by sending a request to the Update Customer Group endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -375,7 +375,7 @@ This request accepts the ID of the customer group as a path parameter, and optio
|
||||
|
||||
You can delete a customer group by sending a request to the Delete a Customer Group endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -445,7 +445,7 @@ This request accepts the ID of the customer group to delete as a path parameter.
|
||||
|
||||
You can add a customer to a group by sending a request to the Customer Group’s Add Customer endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -545,7 +545,7 @@ This request accepts the ID of the customer group as a path parameter. In its bo
|
||||
|
||||
You can retrieve a list of all customers in a customer group using the List Customers endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -628,7 +628,7 @@ Removing customers from a group does not remove them entirely. They’ll still b
|
||||
|
||||
You can remove customers from a customer group by sending a request to the Remove Customers endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -54,7 +54,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can show a list of customers by sending a request to the [List Customers](/api/admin/#tag/Customer/operation/GetCustomers) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -141,7 +141,7 @@ Admins can create customer accounts. They have to supply the customer’s creden
|
||||
|
||||
You can create a customer account by sending a request to the [Create a Customer](/api/admin/#tag/Customer/operation/PostCustomers) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -248,7 +248,7 @@ An admin can edit a customer’s basic information and credentials.
|
||||
|
||||
You can edit a customer’s information by sending a request to the [Update a Customer](/api/admin/#tag/Customer/operation/PostCustomersCustomer) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -60,7 +60,7 @@ A customer can register with an email and a password to store and manage their d
|
||||
|
||||
You can register a new customer by sending a request to the [Create a Customer](/api/store/#tag/Customer/operation/PostCustomers) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -152,7 +152,7 @@ A customer can log in to your store to manage their data and make purchases usin
|
||||
|
||||
You can log in a customer into your store by sending a request to the [Customer Login](/api/store/#tag/Auth/operation/PostAuth) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -201,7 +201,7 @@ However, if you’re using the Fetch API, you must include the option `credentia
|
||||
|
||||
You can log out a customer by sending a request to the [Customer Logout](/api/store/#tag/Auth/operation/DeleteAuth) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -241,7 +241,7 @@ The customer must first enter their account’s email. Then, if an account with
|
||||
|
||||
You can request to reset a customer’s password by sending a request to the [Request Password Reset](/api/store/#tag/Customer/operation/PostCustomersCustomerPasswordToken) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -297,7 +297,7 @@ After the first step, the customer should receive an email with a link to a page
|
||||
|
||||
You can then reset the customer’s password to the new password they enter by sending a request to the [Reset Password](/api/store/#tag/Customer/operation/PostCustomersResetPassword) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -352,7 +352,7 @@ A logged-in customer can edit their info, such as their first name or email addr
|
||||
|
||||
You can edit a customer’s info using the [Update Customer](/api/store/#tag/Customer/operation/PostCustomersCustomer) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -437,7 +437,7 @@ The customer object returned in the requests mentioned in this document include
|
||||
|
||||
You can add a shipping address to a customer’s account by sending a request to the [Add a Shipping Address](/api/store/#tag/Customer/operation/PostCustomersCustomerAddresses) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -513,7 +513,7 @@ This request returns the updated customer object in the response.
|
||||
|
||||
You can edit a customer’s shipping address using the [Update a Shipping Address](/api/store/#tag/Customer/operation/PostCustomersCustomerAddressesAddress) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -558,7 +558,7 @@ This request returns the updated customer object in the response.
|
||||
|
||||
You can delete a shipping address by sending a request to the [Delete an Address](/api/store/#tag/Customer/operation/DeleteCustomersCustomerAddressesAddress) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -597,7 +597,7 @@ Logged-in customers can see their orders along with the orders’ details.
|
||||
|
||||
You can retrieve a customer’s orders by sending a request to the [List Orders](/api/store/#tag/Customer/operation/GetCustomersCustomerOrders) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -66,7 +66,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can create a discount by sending a request to the [Create Discount](/api/admin/#tag/Discount/operation/PostDiscounts) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -206,7 +206,7 @@ You can update any of the discount’s information, configurations, and conditio
|
||||
|
||||
For example, you can update the discount’s description and status by sending the following request:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -296,7 +296,7 @@ You can learn more about conditions and conditions types in the [Discount Archit
|
||||
|
||||
You can send a request to the [Create Condition](/api/admin/#tag/Discount-Condition/operation/PostDiscountsDiscountConditions) endpoint to create a condition in a discount:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -409,7 +409,7 @@ This request returns the full `discount` object in the response which includes a
|
||||
|
||||
You can retrieve a condition and its resources by sending a request to the [Get Condition](/api/admin/#tag/Discount-Condition/operation/GetDiscountsDiscountConditionsCondition) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -510,7 +510,7 @@ You can update a condition’s resources using the [Update Condition](/api/admin
|
||||
|
||||
For example, to update the products in a condition:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -610,7 +610,7 @@ This request returns the full `discount` object with the updated condition in th
|
||||
|
||||
You can delete a condition by sending a request to the [Delete Condition](/api/admin/#tag/Discount-Condition/operation/DeleteDiscountsDiscountConditionsCondition) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -685,7 +685,7 @@ It returns the `discount` object in the response.
|
||||
|
||||
You can delete a discount by sending a request to the [Delete Discount](/api/admin/#tag/Discount/operation/DeleteDiscountsDiscount) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -64,7 +64,7 @@ The customer can enter a discount code during the checkout flow to benefit from
|
||||
|
||||
You can add a discount to a customer’s cart by sending the [Update Cart request](/api/store/#tag/Cart/operation/PostCartsCart):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -255,7 +255,7 @@ The customer can choose to remove a discount from their cart.
|
||||
|
||||
You can remove a discount from a customer’s cart using the [Remove Discount request](/api/store/#tag/Cart/operation/DeleteCartsCartDiscountsDiscount):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -65,7 +65,7 @@ As gift cards are, before purchase, essentially products, you’ll be using prod
|
||||
|
||||
You can retrieve the gift card products by sending a request to the [List Products](/api/admin/#tag/Product/operation/GetProducts) endpoint, but filtering the products with the `is_giftcard` flag:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -154,7 +154,7 @@ The request returns the `products` array in the response which holds the gift ca
|
||||
|
||||
You can create a gift card product by sending a request to the [Create a Product](/api/admin/#tag/Product/operation/PostProducts) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -355,7 +355,7 @@ After creating a gift card, merchants can update it or its denomination.
|
||||
|
||||
You can update a gift card product’s details by sending a request to the [Update a Product](/api/admin/#tag/Product/operation/PostProductsProduct) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -434,7 +434,7 @@ This request returns the updated gift card product in the response.
|
||||
|
||||
You can delete a gift card product by sending a request to the [Delete a Product](/api/admin/#tag/Product/operation/DeleteProductsProduct) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -507,7 +507,7 @@ This section covers how to manage custom gift cards. You can create an unlimited
|
||||
|
||||
You can retrieve all custom gift cards by sending a request to the [List Gift Cards](/api/admin/#tag/Gift-Card/operation/GetGiftCards) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -581,7 +581,7 @@ Merchants can create custom gift cards to send a reward or gift to the customer.
|
||||
|
||||
You can create a custom gift card by sending a request to the [Create a Gift Card](/api/admin/#tag/Gift-Card/operation/PostGiftCards) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -666,7 +666,7 @@ Merchants can update any of the gift card’s properties, except for the value o
|
||||
|
||||
You can update a gift card by sending a request to the [Update a Gift Card](/api/admin/#tag/Gift-Card/operation/PostGiftCardsGiftCard) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -747,7 +747,7 @@ This request returns the updated gift card object in the response.
|
||||
|
||||
You can delete a custom gift card by sending a request to the [Delete a Gift Card](/api/admin/#tag/Gift-Card/operation/DeleteGiftCardsGiftCard) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -60,7 +60,7 @@ Customers should be able to view gift cards before they make the purchase. Gift
|
||||
|
||||
You can retrieve the gift card product using the [List Products](/api/store/#tag/Product/operation/GetProducts) endpoint, but passing it the `is_giftcard` query parameter:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -149,7 +149,7 @@ After the customer purchases the gift card, they’ll receive a code to redeem t
|
||||
|
||||
You can retrieve the details of a gift card by sending a request to the [Get Gift Card by Code](/api/store/#tag/Gift-Card/operation/GetGiftCardsCode) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -224,7 +224,7 @@ A customer can redeem more than one gift card during checkout. The cart’s tota
|
||||
|
||||
You can redeem a gift card during checkout by sending a request to the [Update Cart](/api/store/#tag/Cart/operation/PostCartsCart) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -59,7 +59,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can list inventory items by sending a request to the [List Inventory Items endpoint](/api/admin#tag/Inventory-Items/operation/GetInventoryItems):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -142,7 +142,7 @@ Inventory items are automatically created when a variant is created with `manage
|
||||
|
||||
You can create an inventory item by sending a request to the [Create Inventory Item endpoint](/api/admin#tag/Inventory-Items/operation/PostInventoryItems):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -221,7 +221,7 @@ This request returns the created inventory item as an object.
|
||||
|
||||
You can retrieve an inventory item by sending a request to the [Get Inventory Item endpoint](/api/admin#tag/Inventory-Items/operation/GetInventoryItemsInventoryItem):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -291,7 +291,7 @@ The request returns the inventory item as an object.
|
||||
|
||||
You can update an inventory item by sending a request to the [Update Inventory Item endpoint](/api/admin#tag/Inventory-Items/operation/PostInventoryItemsInventoryItem):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -378,7 +378,7 @@ This section shows you the different ways you can manage inventory levels. Each
|
||||
|
||||
You can list inventory levels of an inventory item by sending a request to the [List inventory levels endpoint](/api/admin#tag/Inventory-Items/operation/GetInventoryItemsInventoryItemLocationLevels):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -453,7 +453,7 @@ The request returns the inventory item as an object. In that object, the list of
|
||||
|
||||
You can create a location level by sending a request to the [Create Inventory Level endpoint](/api/admin#tag/Inventory-Items/operation/PostInventoryItemsInventoryItemLocationLevels):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -546,7 +546,7 @@ This request returns the inventory item associated with the created location lev
|
||||
|
||||
You can update a location level by sending a request to the [Update Location Level endpoint](/api/admin#tag/Inventory-Items/operation/PostInventoryItemsInventoryItemLocationLevelsLocationLevel):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -634,7 +634,7 @@ The request returns the inventory item associated with the location level as an
|
||||
|
||||
You can delete a location level of an inventory item by sending a request to the [Delete Location Level endpoint](/api/admin#tag/Inventory-Items/operation/DeleteInventoryItemsInventoryIteLocationLevelsLocation):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -706,7 +706,7 @@ The request returns the inventory item as an object.
|
||||
|
||||
You can delete an inventory item by sending a request to the [Delete Inventory Item endpoint](/api/admin#tag/Inventory-Items/operation/DeleteInventoryItemsInventoryItem):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -78,7 +78,7 @@ Item allocations are created automatically for items that are associated with pr
|
||||
|
||||
You can create an item allocation by sending a request to the [Create a Reservation endpoint](/api/admin#tag/Reservations/operation/PostReservations):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -174,7 +174,7 @@ When listing item allocations, by default, you’ll be retrieving all item alloc
|
||||
|
||||
You can retrieve the item allocations of a line item in an order using the [List Reservations endpoint](/api/admin#tag/Reservations/operation/GetReservations):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -251,7 +251,7 @@ The request returns the reservations along with [pagination fields](/api/admin#s
|
||||
|
||||
You can retrieve a single item allocation by its ID using the [Get a Reservation endpoint](/api/admin#tag/Reservations/operation/GetReservationsReservation):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -317,7 +317,7 @@ The request returns the reservation as an object.
|
||||
|
||||
You can update an item allocation to change the location to allocate from or the quantity to allocate by sending a request to the [Update Reservation endpoint](/api/admin#tag/Reservations/operation/PostReservationsReservation):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -404,7 +404,7 @@ Deleting an item allocation means that the quantity that was previously reserved
|
||||
|
||||
You can delete an item allocation by sending a request to the [Delete Reservation endpoint](/api/admin#tag/Reservations/operation/DeleteReservationsReservation):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -475,7 +475,7 @@ The request returns the following fields:
|
||||
|
||||
When you create a fulfillment of an order, you can specify the location to fulfill the item from by passing the `location_id` parameter:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -581,7 +581,7 @@ You can learn more about this endpoint’s parameters and response in the [API r
|
||||
|
||||
When requesting a return, you can specify the location to return the item to by passing the `location_id` parameter:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -61,7 +61,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can list stock locations by using the [List Stock Locations endpoint](/api/admin#tag/Stock-Locations/operation/GetStockLocations):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -138,7 +138,7 @@ The request returns an array of stock location objects along with [pagination pa
|
||||
|
||||
You can create a stock location using the [Create a Stock Location endpoint](/api/admin#tag/Stock-Locations/operation/PostStockLocations):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -217,7 +217,7 @@ This request returns the created stock location as an object.
|
||||
|
||||
You can retrieve a stock location by sending a request to the [Get Stock Location endpoint](/api/admin#tag/Stock-Locations/operation/GetStockLocationsStockLocation):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -287,7 +287,7 @@ It returns the stock location as an object.
|
||||
|
||||
You can associate a stock location with a sales channel by sending a request to the [Associate Stock Channel endpoint](/api/admin#tag/Sales-Channels/operation/PostSalesChannelsSalesChannelStockLocation):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -373,7 +373,7 @@ You can associate a location with more than one sales channel, and you can assoc
|
||||
|
||||
You can remove the association between a stock location and a sales channel by sending a request to the [Remove Stock Location Association endpoint](/api/admin#tag/Sales-Channels/operation/DeleteSalesChannelsSalesChannelStockLocation):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -466,7 +466,7 @@ This request does not delete the stock location. It only removes the association
|
||||
|
||||
You can update a stock location by sending a request to the [Update Stock Location endpoint](/api/admin#tag/Stock-Locations/operation/PostStockLocationsStockLocation):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -547,7 +547,7 @@ This request returns the updated stock location as an object.
|
||||
|
||||
You can delete a stock location by sending a request to the [Delete Stock Location endpoint](/api/admin#tag/Stock-Locations/operation/DeleteStockLocationsStockLocation):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -82,7 +82,7 @@ Before you can start making changes to an order, you have to create a new order
|
||||
|
||||
To do that, send a request to the [Create an OrderEdit](/api/admin/#tag/OrderEdit/operation/PostOrderEdits) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -176,7 +176,7 @@ You can only make changes to items that have not been fulfilled yet in the order
|
||||
|
||||
To add a new item to the original order, send a request to the [Add Line Item](/api/admin/#tag/OrderEdit/operation/PostOrderEditsEditLineItems) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -261,7 +261,7 @@ You can edit an item’s quantity in the original order.
|
||||
|
||||
To update an item, send a request to the [Update Line Item](/api/admin/#tag/OrderEdit/operation/PostOrderEditsEditLineItemsLineItem) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -344,7 +344,7 @@ This request returns the Order Edit object. You can access returned item changes
|
||||
|
||||
You can remove an item from the original order by sending a request to the [Remove Line Item](/api/admin/#tag/OrderEdit/operation/DeleteOrderEditsOrderEditLineItemsLineItem) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -415,7 +415,7 @@ A merchant might make a mistake while making a change to the original order’s
|
||||
|
||||
To revert an item change, send a request to the [Delete Item Change](/api/admin/#tag/OrderEdit/operation/DeleteOrderEditsOrderEditItemChange) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -493,7 +493,7 @@ After an Order Edit is created and all the item changes are added, it must be mo
|
||||
|
||||
To move an Order Edit into the request state, send a request to the [Request Confirmation](/api/admin/#tag/OrderEdit/operation/PostOrderEditsOrderEditRequest) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -589,7 +589,7 @@ This section covers how the Admin API can be used to force-confirm the Order Edi
|
||||
|
||||
To confirm an Order Edit, send a request to the [Confirm Order Edit](/api/admin/#tag/OrderEdit/operation/PostOrderEditsOrderEditConfirm) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -672,7 +672,7 @@ You can learn how to allow customers to authorize payment on the storefront in [
|
||||
|
||||
If the payment is authorized by the customer, it can be captured by sending a request to the [Capture Payment](/api/admin/#tag/Payment/operation/PostPaymentsPaymentCapture) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -738,7 +738,7 @@ When the total after the order edit is less than the original order total, the m
|
||||
|
||||
To refund the difference to the customer, send a request to the [Refund Payment](/api/admin/#tag/Payment/operation/PostPaymentsPaymentRefunds) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -60,7 +60,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
To view an order’s claims, you can retrieve the order using the [Get Order endpoint](/api/admin#tag/Orders/operation/GetOrdersOrder) and access the order’s claims:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -139,7 +139,7 @@ The request returns the order as an object. In that object, you can access an ar
|
||||
|
||||
You can create a claim by sending a request to the [Create Claim endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderClaims):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -257,7 +257,7 @@ The request returns the updated order as an object. You can access the order’s
|
||||
|
||||
You can update a claim by sending a request to the [Update Claim endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderClaimsClaim):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -348,7 +348,7 @@ Fulfillments are available on a claim object under the `fulfillments` property,
|
||||
|
||||
You can create a fulfillment for a claim by sending a request to the [Create Claim Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderClaimsClaimFulfillments):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -418,7 +418,7 @@ The request returns the updated order as an object. You can access the order’s
|
||||
|
||||
You can create a shipment for a claim by sending a request to the [Create Claim Shipment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderClaimsClaimShipments):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -510,7 +510,7 @@ You can’t cancel a fulfillment that has a shipment
|
||||
|
||||
You can cancel a fulfillment by sending a request to the [Cancel Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersClaimFulfillmentsCancel):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -594,7 +594,7 @@ You can’t cancel a claim that has been refunded. You must also cancel the clai
|
||||
|
||||
You can cancel a claim by sending a request to the [Cancel Claim endpoint](/api/admin#tag/Orders/operation/PostOrdersClaimCancel):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -54,7 +54,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can list draft orders by sending a request to the [List Draft Orders endpoint]( /api/admin#tag/Draft-Orders/operation/GetDraftOrders):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -127,7 +127,7 @@ The request returns an array of draft order objects along with [pagination param
|
||||
|
||||
You can create a draft order by sending a request to the [Create Draft Order endpoint]( /api/admin#tag/Draft-Orders/operation/PostDraftOrders):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -300,7 +300,7 @@ The request returns the created draft order as an object.
|
||||
|
||||
You can retrieve a draft order by sending a request to the [Get Draft Order endpoint]( /api/admin#tag/Draft-Orders/operation/GetDraftOrdersDraftOrder):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -368,7 +368,7 @@ The request returns the draft order as an object.
|
||||
|
||||
You can update a draft order by sending a request to the [Update Draft Order endpoint]( /api/admin#tag/Draft-Orders/operation/PostDraftOrdersDraftOrder):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -453,7 +453,7 @@ The request returns the updated draft order as an object.
|
||||
|
||||
You can add line items to a draft order by sending a request to the [Create Line Items endpoint]( /api/admin#tag/Draft-Orders/operation/PostDraftOrdersDraftOrderLineItems):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -543,7 +543,7 @@ The request returns the updated draft order as an object. You can access the dra
|
||||
|
||||
You can update a line item by sending a request to the [Update Line Item endpoint]( /api/admin#tag/Draft-Orders/operation/PostDraftOrdersDraftOrderLineItemsItem):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -627,7 +627,7 @@ The request returns the updated draft order as an object. You can access the dra
|
||||
|
||||
You can delete a line item by sending a request to the [Delete Line Item endpoint]( /api/admin#tag/Draft-Orders/operation/DeleteDraftOrdersDraftOrderLineItemsItem):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -698,7 +698,7 @@ Registering the draft order’s payment leads to authorizing and capturing the p
|
||||
|
||||
You can register the draft order payment by sending a request to the [Register Draft Order Payment endpoint]( /api/admin#tag/Draft-Orders/operation/PostDraftOrdersDraftOrderRegisterPayment):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -765,7 +765,7 @@ The request returns the order created from the draft order as an object.
|
||||
|
||||
You can delete a draft order by sending a request to the [Delete Draft Order endpoint]( /api/admin#tag/Draft-Orders/operation/DeleteDraftOrdersDraftOrder):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -62,7 +62,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can list orders by sending a request to the [List Orders endpoint](/api/admin#tag/Orders/operation/GetOrders):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -133,7 +133,7 @@ This endpoint accepts a variety of query parameters that allow you to filter ord
|
||||
|
||||
For example, you can filter the orders by one or more status:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -214,7 +214,7 @@ You can check available order statuses [here](../../../references/entities/enums
|
||||
|
||||
Another example is filtering the orders by a sales channel:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -295,7 +295,7 @@ curl -L -X GET '<BACKEND_URL>/admin/orders?sales_channel_id[]=<CHANNEL_ID>' \
|
||||
|
||||
You can also combine filters together:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -382,7 +382,7 @@ curl -L -X GET '<BACKEND_URL>/admin/orders?status[]=completed&sales_channel_id[]
|
||||
|
||||
You can retrieve an order by sending a request to the [Get an Order endpoint](/api/admin#tag/Orders/operation/GetOrdersOrder):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -463,7 +463,7 @@ Updating an order’s details can include updating its:
|
||||
|
||||
You can update any of the above details of an order by sending a request to the [Update an Order endpoint](/api/admin#tag/Orders/operation/PostOrdersOrder):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -548,7 +548,7 @@ The request returns the updated order as an object.
|
||||
|
||||
You can capture an order’s payment by sending a request to the [Capture Order’s Payment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderCapture):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -616,7 +616,7 @@ You can refund an amount that is less than `order.refundable_amount`.
|
||||
|
||||
To refund payment, send a request to the [Refund Payment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderRefunds):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -710,7 +710,7 @@ The request returns the updated order as an object.
|
||||
|
||||
You can create a fulfillment by sending a request to the [Create a Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderFulfillments):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -818,7 +818,7 @@ The request returns the updated order as an object.
|
||||
|
||||
You can create a shipment for a fulfillment by sending a request to the [Create Shipment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderShipment):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -899,7 +899,7 @@ The request returns the updated order as an object.
|
||||
|
||||
You can cancel a fulfillment by sending a request to the [Cancel Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderFulfillmentsCancel):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -968,7 +968,7 @@ The request returns the updated order as an object.
|
||||
|
||||
You can mark an order completed, changing its status, by sending a request to the [Complete an Order endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderComplete):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -1035,7 +1035,7 @@ The request returns the updated order as an object.
|
||||
|
||||
You can cancel an order by sending a request to the [Cancel Order endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderCancel):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -1102,7 +1102,7 @@ The request returns the updated order as an object.
|
||||
|
||||
You can archive an order by sending a request to the [Archive Order endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderArchive):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -59,7 +59,7 @@ Return reasons allow you to specify why an item is returned. They are especially
|
||||
|
||||
You can list available return reasons using the [List Return Reasons endpoint](/api/admin#tag/Return-Reasons/operation/GetReturnReasons):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -132,7 +132,7 @@ The request returns an array of return reason objects.
|
||||
|
||||
You can create a return reason using the [Create Return Reason endpoint](/api/admin#tag/Return-Reasons/operation/PostReturnReasons):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -218,7 +218,7 @@ This request returns the created return reason as an object.
|
||||
|
||||
You can update a return reason by sending a request to the [Update Return Reason endpoint](/api/admin#tag/Return-Reasons/operation/PostReturnReasonsReason):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -299,7 +299,7 @@ The request returns the updated return reason as an object.
|
||||
|
||||
You can delete a return reason by sending a request to the [Delete Return Reason endpoint](/api/admin#tag/Return-Reasons/operation/DeleteReturnReason):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -376,7 +376,7 @@ You can view all returns in your commerce system, regardless of which order they
|
||||
|
||||
When you retrieve an order using the [Get Order endpoint](/api/admin#tag/Orders/operation/GetOrdersOrder), you can access the returns within the order object:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -469,7 +469,7 @@ You can retrieve a claim using the Get Order endpoint as explained [here](./mana
|
||||
|
||||
You can mark a return as received by sending a request to the [Receive a Return endpoint](/api/admin#tag/Returns/operation/PostReturnsReturnReceive):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -578,7 +578,7 @@ A received return can’t be canceled.
|
||||
|
||||
You can cancel a return by sending a request to the [Cancel Return endpoint](/api/admin#tag/Returns/operation/PostReturnsReturnCancel):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -67,7 +67,7 @@ If you want to view all swaps in your system, and not swaps specific to an order
|
||||
|
||||
You can view an order’s swaps by retrieving the order using the [Get Order endpoint](/api/admin#tag/Orders/operation/GetOrdersOrder):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -147,7 +147,7 @@ Processing a swap’s payment can mean either refunding or capturing payment, de
|
||||
|
||||
Regardless of whether you need to refund or capture the payment, you can process the swap’s payment by sending a request to the [Process Swap Payment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderSwapsSwapProcessPayment):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -222,7 +222,7 @@ Fulfillments are available on a swap object under the `fulfillments` property, w
|
||||
|
||||
You can create a fulfillment for a swap by sending a request to the [Create Swap Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderSwapsSwapFulfillments):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -294,7 +294,7 @@ The request returns the updated order as an object. You can access the order’s
|
||||
|
||||
You can create a shipment for a swap’s fulfillment using the [Create Swap Shipment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderSwapsSwapShipments):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -388,7 +388,7 @@ You can’t cancel a fulfillment that has a shipment
|
||||
|
||||
You can cancel a fulfillment by sending a request to the [Cancel Swap Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersSwapFulfillmentsCancel):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -472,7 +472,7 @@ You can’t cancel a swap that has been refunded. You must also cancel all swap
|
||||
|
||||
You can cancel a swap by sending a request to the [Cancel Swap endpoint](/api/admin#tag/Orders/operation/PostOrdersSwapCancel):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -59,7 +59,7 @@ When a customer wants to create a return, they must choose the items they want t
|
||||
|
||||
You can optionally allow customers to choose a return shipping option that they’ll use to return the items. To show the customers the available return shipping options, send a request to the Get [Shipping Options endpoint](/api/store#tag/Shipping-Options/operation/GetShippingOptions):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -131,7 +131,7 @@ The request returns an array of shipping option objects.
|
||||
|
||||
You can create the return by sending a request to the [Create Return endpoint](/api/store#tag/Returns/operation/PostReturns):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -62,7 +62,7 @@ You can optionally allow customers to choose a return shipping option that they
|
||||
|
||||
After collecting the swap details in step 1, you can create a swap in the Medusa backend by sending a request to the [Create Swap endpoint](/api/store#tag/Swaps/operation/PostSwaps):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -190,7 +190,7 @@ When you complete the cart, the returned `type` field can be used to indicate th
|
||||
|
||||
During your checkout flow, you might need to retrieve the swap using the cart’s ID. For example, if you want to display the swap’s details after the cart is successfully completed. You can do that using the [Get by Cart ID endpoint](/api/store#tag/Swaps/operation/GetSwapsSwapCartId):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -72,7 +72,7 @@ You must have an existing order edit in the “request” state.
|
||||
|
||||
You can retrieve a single order edit by its ID by sending a request to the [Get Order Edit](/api/store/#tag/OrderEdit/operation/GetOrderEditsOrderEdit) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -200,7 +200,7 @@ If `difference_due` is greater than 0, then additional payment from the customer
|
||||
1. Show the customer the available payment processors. These can be retrieved from the details of [the region of the order](/api/store/#tag/Region/operation/GetRegionsRegion).
|
||||
2. When the customer selects the payment processor, initialize the payment session of that provider in the payment collection. You can do that by sending a request to the [Manage Payment Sessions](/api/store/#tag/Payment/operation/PostPaymentCollectionsSessions) endpoint, passing it the payment collection’s ID as a path parameter, and the payment processor's ID as a request body parameter:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
<!-- eslint-disable max-len -->
|
||||
@@ -269,7 +269,7 @@ fetch(
|
||||
1. Show the customer the payment details form based on the payment session’s provider. For example, if the provider ID of a payment session is `stripe`, you must show Stripe’s card component to enter the customer’s card details.
|
||||
2. Authorize the payment using the payment processor. The [Authorize Payment Session](/api/store/#tag/Payment/operation/PostPaymentCollectionsSessionsSessionAuthorize) endpoint accepts the payment collection’s ID and the ID of the payment session as path parameters:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -337,7 +337,7 @@ After performing the above steps, you can [complete the Order Edit](#complete-th
|
||||
|
||||
To confirm and complete the order edit, send a request to the [Complete Order Edit](/api/store/#tag/OrderEdit/operation/PostOrderEditsOrderEditComplete) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -404,7 +404,7 @@ If the payment isn’t authorized first, the order edit completion will fail.
|
||||
|
||||
If the customer wants to decline the Order Edit, you can do that by sending a request to the Decline Order Edit endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -79,7 +79,7 @@ When the customer wants to claim an order, they must supply its ID.
|
||||
|
||||
To allow the customer to claim an order, send a request to the Claim an Order endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -137,7 +137,7 @@ The link in the email that the customer receives should be a page in your storef
|
||||
|
||||
Then, you send a request to the Verify Claim Order endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -38,7 +38,7 @@ Retrieving an order by its ID is useful for different scenarios, such as using a
|
||||
|
||||
You can retrieve an order by its ID using the [Get Order endpoint](/api/store#tag/Orders/operation/GetOrdersOrder):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -100,7 +100,7 @@ Display IDs allow you to show human-readable IDs to your customers. Retrieving a
|
||||
|
||||
You can retrieve an order by its display ID using the [Look Up Order endpoint](/api/store#tag/Orders/operation/GetOrders):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -172,7 +172,7 @@ In certain scenarios, you may need to retrieve an order’s details using the ID
|
||||
|
||||
You can retrieve an order by the cart ID using the [Get by Cart ID endpoint](/api/store#tag/Orders/operation/GetOrdersOrderCartId):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -232,6 +232,9 @@ If you have any questions about Medusa, its features, and development with it, f
|
||||
description: 'Learn how to create a payment processor.',
|
||||
},
|
||||
},
|
||||
]} />
|
||||
|
||||
<DocCardList colSize={4} items={[
|
||||
{
|
||||
type: 'link',
|
||||
href: '/modules/orders/admin/edit-order',
|
||||
@@ -259,4 +262,4 @@ If you have any questions about Medusa, its features, and development with it, f
|
||||
description: 'Manage sales channels.',
|
||||
}
|
||||
}
|
||||
]} />
|
||||
]} />
|
||||
@@ -71,7 +71,7 @@ The first step is to upload the CSV file to import prices from.
|
||||
|
||||
You can do that by sending the following request to the [Upload Files](/api/admin/#tag/Upload/operation/PostUploads) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -145,7 +145,7 @@ To start a new price import, you must create a batch job.
|
||||
|
||||
You can do that by sending the following request to the [Create a Batch Job](/api/admin/#tag/Batch-Job/operation/PostBatchJobs) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -259,7 +259,7 @@ After creating the batch job, it will be pre-processed. At this point, the CSV f
|
||||
|
||||
You can retrieve all the details of the batch job, including its status and the brief statistics related to the prices by sending the following request:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -349,7 +349,7 @@ A batch job can be confirmed only once the batch job has the status `pre_process
|
||||
|
||||
To confirm a batch job send the following request:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -76,7 +76,7 @@ You can learn more about what the conditions you can apply on a price list and i
|
||||
|
||||
For example, sending the following request creates a price list with two prices: one that is applied when the maximum quantity of the product variant in the cart is 3; another is applied when the minimum quantity of the same variant in the cart is 4:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```jsx
|
||||
@@ -232,7 +232,7 @@ You can check the full list of request body parameters in the [API reference](/a
|
||||
|
||||
You can retrieve all of a price list’s details using the Get a Price List endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```jsx
|
||||
@@ -298,7 +298,7 @@ After creating a price list, you can update all of its fields including its stat
|
||||
|
||||
For example, by sending the following request the end date of the price list will be updated:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```jsx
|
||||
@@ -387,7 +387,7 @@ You can also set the `override` request body parameter to `true` to replace the
|
||||
|
||||
For example, sending the following request adds a new price to the price list:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```jsx
|
||||
@@ -490,7 +490,7 @@ For a full list of request body parameters, check out the [API reference](/api/a
|
||||
|
||||
You can delete all the prices of a product’s variants using the [Delete Product Prices](/api/admin/#tag/Price-List/operation/DeletePriceListsPriceListProductsProductPrices) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```tsx
|
||||
@@ -564,7 +564,7 @@ This request returns the IDs of the deleted prices.
|
||||
|
||||
You can delete all the prices of a variant using the [Delete Variant Prices](/api/admin/#tag/Price-List/operation/DeletePriceListsPriceListVariantsVariantPrices) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```tsx
|
||||
@@ -641,7 +641,7 @@ This request returns the IDs of the deleted prices.
|
||||
|
||||
You can delete a price list, and subsequently all prices defined in it, using the [Delete Price List](/api/admin/#tag/Price-List/operation/DeletePriceListsPriceList) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```jsx
|
||||
|
||||
@@ -65,7 +65,7 @@ The first step is to upload the CSV file that you want to import products.
|
||||
|
||||
You can do that by sending the following request to the [Upload Files](/api/admin/#tag/Upload/operation/PostUploads) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -139,7 +139,7 @@ To start a new product import, you must create a batch job.
|
||||
|
||||
You can do that by sending the following request to the [Create a Batch Job](/api/admin/#tag/Batch-Job/operation/PostBatchJobs) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -247,7 +247,7 @@ After creating the batch job, it will be pre-processed. At this point, the CSV f
|
||||
|
||||
You can retrieve all the details of the batch job, including its status and the brief statistics related to the products by sending the following request:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -337,7 +337,7 @@ A batch job can be confirmed only once the batch job has the status `pre_process
|
||||
|
||||
To confirm a batch job send the following request:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -53,7 +53,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can retrieve available categories by sending a request to the [List Categories](/api/admin#tag/Product-Category/operation/GetProductCategories) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -133,7 +133,7 @@ You can also pass filters and other selection query parameters to the request. C
|
||||
|
||||
You can create a category by sending a request to the [Create a Category](/api/admin#tag/Product-Category/operation/PostProductCategories) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -217,7 +217,7 @@ The request returns the newly created product category.
|
||||
|
||||
You can retrieve a product category by sending a request to the [Get a Product Category](/api/admin#tag/Product-Category/operation/GetProductCategoriesCategory) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -287,7 +287,7 @@ It returns the full object of the product category.
|
||||
|
||||
You can edit a product category by sending a request to the [Update a Product Category](/api/admin#tag/Product-Category/operation/PostProductCategoriesCategory) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -382,7 +382,7 @@ You can manage the categories of each product individually using the [product AP
|
||||
|
||||
You can add more than one product to a category using the [Add Products to a Category](/api/admin#tag/Product-Category/operation/PostProductCategoriesCategoryProductsBatch) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -493,7 +493,7 @@ The request returns the full object of the product category updated with the new
|
||||
|
||||
You can remove products from a category by sending a request to the [Delete Products](/api/admin#tag/Product-Category/operation/DeleteProductCategoriesCategoryProductsBatch) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -610,7 +610,7 @@ The request returns the full object of the product category updated with the its
|
||||
|
||||
You can delete a product category by sending a request to the [Delete a Product Category](/api/admin#tag/Product-Category/operation/DeleteProductCategoriesCategory) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -54,7 +54,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can list products as an admin using the [List Products endpoint](/api/admin#tag/Products/operation/GetProducts):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -127,7 +127,7 @@ The request returns an array of products along with [pagination parameters](/api
|
||||
|
||||
You can create a product by sending a request to the [Create a Product endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProducts):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -401,7 +401,7 @@ You can learn more about pricing and zero-decimal currencies [here](../products.
|
||||
|
||||
You can retrieve a single product as an admin by sending a request to the [Get a Product endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/GetProductsProduct):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -469,7 +469,7 @@ The request returns the product as an object.
|
||||
|
||||
You can update a product by sending a request to the [Update Product endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProductsProduct):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -560,7 +560,7 @@ You can retrieve a product’s options by retrieving the product either using th
|
||||
|
||||
You can add a product option to a product by sending a request to the [Add Product Option endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProductsProductOptions):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -639,7 +639,7 @@ The request returns the updated product as an option. You can view available opt
|
||||
|
||||
You can update a product option by sending a request to the [Update Product Option endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProductsProductOptionsOption):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -723,7 +723,7 @@ The request returns the updated product as an option. You can view available opt
|
||||
|
||||
You can delete a product option by sending a request to the [Delete Product Option endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/DeleteProductsProductOptionsOption):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -805,7 +805,7 @@ You can retrieve a product’s variants by retrieving the product either using t
|
||||
|
||||
You can create a product variant by sending a request to the [Create Product Variant endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProductsProductVariants):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -940,7 +940,7 @@ The request returns the updated product. You can access the product’s variants
|
||||
|
||||
You can update a product variant by sending a request to the [Update a Product Variant endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProductsProductVariantsVariant):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -1024,7 +1024,7 @@ The request returns the updated product. You can access the product’s variants
|
||||
|
||||
You can delete a product variant by sending a request to the [Delete a Product Variant endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/DeleteProductsProductVariantsVariant):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -1098,7 +1098,7 @@ The request returns the following fields:
|
||||
|
||||
You can delete a product by sending a request to the [Delete a Product endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/DeleteProductsProduct):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -51,7 +51,7 @@ If you follow the Medusa React code blocks, it's assumed you already have [Medus
|
||||
|
||||
You can list available products using the [List Products endpoint](/api/store#tag/Products/operation/GetProducts):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -122,7 +122,7 @@ The List Products endpoint accepts different query parameters that allow you to
|
||||
|
||||
For example, you can filter products by a category ID:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -193,7 +193,7 @@ This will retrieve only products that belong to that category.
|
||||
|
||||
To expand the categories of each product, you can pass `categories` to the `expand` query parameter:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -272,7 +272,7 @@ It’s recommended to always include the cart and region’s IDs when you’re l
|
||||
|
||||
For example:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -391,7 +391,7 @@ Medusa React provides utility methods such as `formatVariantPrice` that handles
|
||||
|
||||
Here’s an example of how you can calculate the price with and without Medusa React:
|
||||
|
||||
<Tabs groupId="client-preference" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="client-preference" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Without Medusa Client" default>
|
||||
|
||||
```tsx
|
||||
@@ -505,7 +505,7 @@ The Search functionality requires either installing a [search plugin](../../../p
|
||||
|
||||
You can search products using the [Search Products endpoint](/api/store#tag/Products/operation/PostProductsSearch):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -551,7 +551,7 @@ The request returns a `hits` array holding the result items. The structure of th
|
||||
|
||||
You can retrieve the details of a single product by its ID using the [Get a Product endpoint](/api/store#tag/Products/operation/GetProductsProduct):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -618,7 +618,7 @@ On the storefront, you may use the handle of a product as its page’s path. For
|
||||
|
||||
You can retrieve the details of a product by its handle by sending a request to the List Products endpoint, passing the `handle` as a filter:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -49,7 +49,7 @@ If you follow the Medusa React code blocks, it's assumed you already have [Medus
|
||||
|
||||
You can list product categories by sending a request to the [List Product Categories endpoint](/api/store#tag/Product-Category/operation/GetProductCategories):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -132,7 +132,7 @@ By default, the categories are not retrieved along with their nested children. T
|
||||
|
||||
You can retrieve a single product category by its ID using the [Get a Product Category endpoint](/api/store#tag/Product-Category/operation/GetProductCategoriesCategory):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -200,7 +200,7 @@ On the storefront, you may use the handle of a category as its page’s path. Fo
|
||||
|
||||
You can retrieve the details of a category by its handle by sending a request to the List Categories endpoint, passing the `handle` as a filter:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -62,7 +62,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can list all available currencies in your system by sending a request to the [List Currencies endpoint](/api/admin#tag/Currencies/operation/GetCurrencies):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -136,7 +136,7 @@ This request returns an array of currencies along with pagination parameters.
|
||||
|
||||
You can update a currency by sending a request to the [Update Currency endpoint](/api/admin#tag/Currencies/operation/PostCurrenciesCurrency):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -227,7 +227,7 @@ This section explains how you can manage the currencies of a store.
|
||||
|
||||
You can list currencies in a store by sending a request to the [Get Store Details endpoint](/api/admin#tag/Store/operation/GetStore):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -305,7 +305,7 @@ This request returns the store as an object. In that object, there are two prope
|
||||
|
||||
You can add a currency to a store using the [Add a Currency Code endpoint](/api/admin#tag/Store/operation/PostStoreCurrenciesCode):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -368,7 +368,7 @@ The request returns the updated store as an object. You can access the new list
|
||||
|
||||
You can remove a currency from a store by sending a request to the [Delete Currency Code endpoint](/api/admin#tag/Store/operation/DeleteStoreCurrenciesCode):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -62,7 +62,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can retrieve regions available on your backend using the [List Regions](/api/admin/#tag/Region/operation/GetRegions) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -136,7 +136,7 @@ You can also pass filters and other selection query parameters to the request. C
|
||||
|
||||
You can create a region by sending a request to the [Create a Region](/api/admin/#tag/Region/operation/PostRegions) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -270,7 +270,7 @@ You can update any of the region’s fields and configurations. The REST APIs of
|
||||
|
||||
Alternatively, you can update the details of a region using the [Update a Region](/api/admin/#tag/Region/operation/PostRegionsRegion) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -369,7 +369,7 @@ In the example above, the list of countries replace any countries that were prev
|
||||
|
||||
You can add a shipping option to a region by sending a request to the [Create Shipping Option](/api/admin/#tag/Shipping-Option/operation/PostShippingOptions) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -488,7 +488,7 @@ You can also manage shipping options such as list, update, and delete. You can l
|
||||
|
||||
You can delete a region by sending a request to the [Delete a Region](/api/admin/#tag/Region/operation/DeleteRegionsRegion) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -54,7 +54,7 @@ Customers should be able to see the list of available regions and select their r
|
||||
|
||||
You can retrieve available regions by sending a request to the [List Regions](/api/store/#tag/Region/operation/GetRegions) endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -123,7 +123,7 @@ To retrieve products with the prices based on the selected regions, you can pass
|
||||
|
||||
For example:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -196,7 +196,7 @@ You can learn how to implement cart functionalities in your storefront in [this
|
||||
|
||||
For example:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -54,7 +54,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can create a sales channel by sending a request to the Create a Sales Channel endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -137,7 +137,7 @@ It returns the created sales channel.
|
||||
|
||||
You can list all sales channels by sending a request to the List Sales Channels endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -209,7 +209,7 @@ This request returns an array of all sales channels in your store. You can also
|
||||
|
||||
You can retrieve a sales channel’s details by its ID using the Get Sales Channel endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -274,7 +274,7 @@ This request returns the sales channel with the specified ID.
|
||||
|
||||
You can update a Sales Channel’s details and attributes by sending a request to the Update Sales Channel endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -357,7 +357,7 @@ You can check out [the API Reference for a full list of body parameters](/api/ad
|
||||
|
||||
You can delete a sales channel by sending a request to the Delete Sales Channel endpoint with the ID of the sales channel to delete:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -424,7 +424,7 @@ The ID of the deleted sales channel is returned in the response.
|
||||
|
||||
To add a product to a sales channel, send a request to the Sales Channel’s Add Products endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -524,7 +524,7 @@ This request returns the sales channel.
|
||||
|
||||
You can list the products available in a sales channel by sending a request to the List Products endpoint and passing the `sales_channel_id` query parameter to filter by a specific sales channel:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -616,7 +616,7 @@ Deleting a product from a sales channel doesn't delete it completely. It only ma
|
||||
|
||||
You can delete a product from a sales channel by sending a request to the Sales Channel’s Delete Products endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
<!-- eslint-disable max-len -->
|
||||
@@ -722,7 +722,7 @@ This request returns the sales channel.
|
||||
|
||||
You can filter orders by a specific sales channel by sending a request to the List Orders endpoint and passing the `sales_channel_id` query parameter to filter by a specific sales channel:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -55,7 +55,7 @@ For requests that use the cart, it's also assumed you already have [used CartPro
|
||||
|
||||
To filter products by a specific sales channel, pass the `sales_channel_id` query parameter to the List Products endpoint:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -129,7 +129,7 @@ The request returns an array of products. These are the products that are availa
|
||||
|
||||
To associate a sales channel with a cart while creating it, you can pass the `sales_channel_id` request body parameter with the ID of the sales channel:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ The request returns the created cart.
|
||||
|
||||
You can update the sales channel of an existing cart by passing the `sales_channel_id` request body parameter with the ID of the sales channel:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -53,7 +53,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can list the tax rates by sending a request to the [List Tax Rates endpoint](/api/admin#tag/Tax-Rates/operation/GetTaxRates):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -124,7 +124,7 @@ The endpoint returns an array of tax rate objects along with [pagination paramet
|
||||
|
||||
You can retrieve the tax rate of a region by passing the `region_id` query parameter:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -195,7 +195,7 @@ In the example above, you pass the region’s ID as the value of the `region_id`
|
||||
|
||||
This query parameter also accepts an array of strings, allowing you to filter the tax rates by more than one region:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -270,7 +270,7 @@ curl -L -X GET '<BACKEND_URL>/admin/tax-rates?region_id[]=reg_123®ion_id[]=re
|
||||
|
||||
You can create a tax rate by sending a request to the [Create Tax Rate endpoint](/api/admin#tag/Tax-Rates/operation/PostTaxRates):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -373,7 +373,7 @@ The request returns the created tax rate as an object.
|
||||
|
||||
You can update a tax rate by sending a request to the [Update Tax Rate endpoint](/api/admin#tag/Tax-Rates/operation/PostTaxRatesTaxRate):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -458,7 +458,7 @@ This section explains how you can add and remove products from a tax rate.
|
||||
|
||||
You can add a product to a tax rate by sending a request to the [Add Products endpoint](/api/admin#tag/Tax-Rates/operation/PostTaxRatesTaxRateProducts):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -547,7 +547,7 @@ The request returns the updated tax rate as an object. You can access the tax ra
|
||||
|
||||
You can remove a product from a tax rate by sending a request to the [Delete Products endpoint](/api/admin#tag/Tax-Rates/operation/DeleteTaxRatesTaxRateProducts):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -642,7 +642,7 @@ This section explains how you can add and remove product types from a tax rate.
|
||||
|
||||
You can add a product type to a tax rate by sending a request to the [Add Product Types endpoint](/api/admin#tag/Tax-Rates/operation/PostTaxRatesTaxRateProductTypes):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -735,7 +735,7 @@ The request returns the updated tax rate as an object. You can access the tax ra
|
||||
|
||||
You can remove a product type from a tax rate by sending a request to the [Delete Product Types endpoint](/api/admin#tag/Tax-Rates/operation/DeleteTaxRatesTaxRateProductTypes):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -834,7 +834,7 @@ This section explains how you can add and remove shipping options from a tax rat
|
||||
|
||||
You can add a shipping option to a tax rate by sending a request to the [Add Shipping Option endpoint](/api/admin#tag/Tax-Rates/operation/PostTaxRatesTaxRateShippingOptions):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -925,7 +925,7 @@ The request returns the updated tax rate as an object. You can access the tax ra
|
||||
|
||||
You can remove a shipping option from a tax rate by sending a request to the [Delete Shipping Options endpoint](/api/admin#tag/Tax-Rates/operation/DeleteTaxRatesTaxRateShippingOptions):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -1018,7 +1018,7 @@ The request returns the updated tax rate as an object. You can access the tax ra
|
||||
|
||||
You can delete a tax rate by sending a request to the [Delete Tax Rate endpoint](/api/admin#tag/Tax-Rates/operation/DeleteTaxRatesTaxRate):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -54,7 +54,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can list all tax providers of a store using the [List Tax Providers endpoint](/api/admin#tag/Store/operation/GetStoreTaxProviders):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -130,7 +130,7 @@ The request returns an array of tax provider objects.
|
||||
|
||||
You can change the tax provider of a region using the [Update Region endpoint](/api/admin#tag/Regions/operation/PostRegionsRegion):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -211,7 +211,7 @@ The request returns the updated region as an object.
|
||||
|
||||
In addition to changing the tax provider, you can use the same [Update Region endpoint](/api/admin#tag/Regions/operation/PostRegionsRegion) to update the region’s other tax settings:
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -56,7 +56,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can list invites by sending a request to the [List Invite endpoint](/api/admin#tag/Invites/operation/GetInvites):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -127,7 +127,7 @@ The request returns an array of invite endpoints.
|
||||
|
||||
You can create an invite by sending a request to the [Create Invite endpoint](/api/admin#tag/Invites/operation/PostInvites):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -215,7 +215,7 @@ A logged-out user can accept an invite, which would create a user for that user.
|
||||
|
||||
You can accept an invite by sending a request to the [Accept Invite endpoint](/api/admin#tag/Invites/operation/PostInvitesInviteAccept):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -319,7 +319,7 @@ The request does not return any data. If the invite was accepted successfully, t
|
||||
|
||||
You can resend an invite if it’s not accepted yet. To resend an invite, send a request to the [Resend Invite endpoint](/api/admin#tag/Invites/operation/PostInvitesInviteResend):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -384,7 +384,7 @@ The request does not return any data. If the invite was resent successfully, the
|
||||
|
||||
You can delete an invite by sending a request to the [Delete Invite endpoint](/api/admin#tag/Invites/operation/DeleteInvitesInvite):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -54,7 +54,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can log in a user by sending a request to the [User Login endpoint](/api/admin#tag/Auth/operation/PostAuth):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -137,7 +137,7 @@ The request returns the logged-in user as an object.
|
||||
|
||||
You can log out a user by sending a request to the [User Logout endpoint](/api/admin#tag/Auth/operation/DeleteAuth):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -202,7 +202,7 @@ The request does not return any data. The response code will be `200` for succes
|
||||
|
||||
You can retrieve the current user’s details for their profile by sending a request to the [Get Current User endpoint](/api/admin#tag/Auth/operation/GetAuth):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -266,7 +266,7 @@ The request returns the current user as an object.
|
||||
|
||||
You can update a user’s details in their profile by sending a request to the [Update User endpoint](/api/admin#tag/Users/operation/PostUsersUser):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -362,7 +362,7 @@ Sending the password reset email is not handled by default in the Medusa backend
|
||||
|
||||
You can request a password reset by sending a request to the [Request Password Reset endpoint](/api/admin#tag/Users/operation/PostUsersUserPasswordToken):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -440,7 +440,7 @@ After the user resets their password and, typically, receives an email with a li
|
||||
|
||||
You can reset the password by sending a request to the [Reset Password endpoint](/api/admin#tag/Users/operation/PostUsersUserPassword):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
@@ -55,7 +55,7 @@ You can learn more about [authenticating as an admin user in the API reference](
|
||||
|
||||
You can retrieve users in a store by sending a request to the [List Users endpoint](/api/admin#tag/Users/operation/GetUsers):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -126,7 +126,7 @@ The request returns an array of user objects.
|
||||
|
||||
You can create a user by sending a request to the [Create User endpoint](/api/admin#tag/Users/operation/PostUsers):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -214,7 +214,7 @@ The request returns the created user as an object.
|
||||
|
||||
You can update a user’s details by sending a request to the [Update User endpoint](/api/admin#tag/Users/operation/PostUsersUser):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
@@ -295,7 +295,7 @@ The request returns the updated user as an object.
|
||||
|
||||
You can delete a user by sending a request to the [Delete User endpoint](/api/admin#tag/Users/operation/DeleteUsersUser):
|
||||
|
||||
<Tabs groupId="request-type" wrapperClassName="code-tabs">
|
||||
<Tabs groupId="request-type" isCodeTabs={true}>
|
||||
<TabItem value="client" label="Medusa JS Client" default>
|
||||
|
||||
```ts
|
||||
|
||||
Reference in New Issue
Block a user